ClusterLabs / cluster-glue

Reusable Cluster Components ("glue")
http://clusterlabs.org/
GNU General Public License v2.0
18 stars 28 forks source link

errors reported by drac5 external stonith plugin #32

Open tabraham opened 3 years ago

tabraham commented 3 years ago

The drac5 external plugin outputs empty error lines on every instance it's called due to the handling in the trap on exit. We should prevent empty error lines by checking if there's content to output.

Also, it considers all output from the racadm command it uses as an error. However, it's output can indicate success, so we shouldn't report it as an error. Considering it debug is probably more appropriate.

dmuhamedagic commented 3 years ago

On Tue, Aug 31, 2021 at 03:44:56PM +0000, T.M. Abraham wrote:

The drac5 external plugin outputs empty error lines on every instance it's called due to the handling in the trap on exit. We should prevent empty error lines by checking if there's content to output.

Also, it considers all output from the racadm command it uses as an error. However, it's output can indicate success, so we shouldn't report it as an error. Considering it debug is probably more appropriate.

I'd say that either is suboptimal. Is there a meaningful exit code from racadm? Otherwise, we could try to match the output for error/warning.

tabraham commented 3 years ago

This is a more significant change. The trap isn't really needed since all use of the temporary file is limited to sshlogin function. It makes changes to log as an error only when racadm returns an error code (non-zero) and logs as debug otherwise