AIX "monit summary -B" not working as expected.

Issue #886 resolved
John Reino Taisto created an issue

Seems like all versions of monit on AIX have an issue when invoked as “monit summary -B” only works if invoked as “monit -B summary.” The first invocation gives an error of “Service -B not found.” Note, this works on LINUX versions of monit with either invocation. Why it matters? The ansible monit module uses the first invocation which doesn’t work on AIX. I can work around this by simply reworking the ansible module to use the other invocation, but I figured it probably should be fixed here for consistency.

Comments (1)

  1. Tildeslash repo owner

    Fixed: Issue #886: The command-line options on some platforms (such as AIX) cannot be used past the non-option argument. The problem was, that AIX uses strict POSIX implementation, which stops parsing ARGV on the first non-option argument. Linux, MacOS and other platforms permute elements in ARGV by default, so it allows parsing all options, even if used after non-option argument. The new implementation extracts non-option arguments to a list, so even mixing options between e.g. "monit status -B myservice" will work now (this originally didn't work even on linux with non-posix extension either, as we checked for service name right past the "status" keyword, where -B would be found)

    → <<cset f0eaaca52b42>>

  2. Log in to comment