Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8505

RunNiFi is_loaded returns 0 exit code for all statuses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.13.0, 1.13.1, 1.13.2
    • None
    • Core Framework
    • None

    Description

      The is_loaded command in RunNiFi should return a non-zero exit code when NiFi is not running.

      RunNiFi [1] handles the is_loaded not running state by catching a NiFiNotRunningException and then exiting cleanly. This is inconsistent with error handling in the rest of the commands, particularly compared to status() which returns a non-zero exit code for not running.

      Additionally, isNiFiFullyRunning() is unique in handling its error states via an exception. It'd be good if there was consistency across all the commands, either managing this via exception or not.

      1. https://github.com/apache/nifi/blob/3963f66dffcdc0ca8c3c5a35844007c077d77f41/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java

      Attachments

        Activity

          People

            Unassigned Unassigned
            jfrazee Joey Frazee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: