Summary: | dev-db/postgresql-10.6: init script "postgresql-10" has weird output for "status" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | David Klaftenegger <davidweb> |
Component: | Current packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | hydrapolic |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
David Klaftenegger
2019-01-07 23:25:05 UTC
As OpenRC passes along the exit code of the last command run in the init script, the Ansible module should be checking that exit code rather than grepping for a keyword. Further, there are standards[1] for the exit codes, whereas there are none for textual phrases -- at least, not that I could find. Alternatively, maybe the Ansible module could make use of the output from rc-status. But, there doesn't appear to be any promises from upstream that the output format will never change. The init script makes use of pg_ctl which has additional checks to verify that the server we're getting information on is the server we think it is, and not some imposter. The pg_ctl program itself is responsible for the output, and for setting the exit code. This init script is not alone in including additional information in the status message. In short, I think the behavior of the postgresql-XX init scripts are correct and normal; Ansible is being weird. [1]: http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html Thank you. Reported at https://github.com/ansible/ansible/issues/50822 |