Hide Forgot
On Satellite 6.3 snap 5 (also reproducible on satellite-6.2.3-1.0) Execute host status on running host: # hammer host status --id 4 Status: No reports Power: running Executing the same command on disabled host: # hammer host status --id 1 ERF42-9958 [Foreman::Exception]: Unknown power management support - can't continue Actual results: Foreman::Exception returned Expected results: Status info should be returned, informing about the power status of the host, e.g.: # hammer host status --id 1 Status: No reports Power: not running
Thanks for the report Peter, this triggers an exception on server side, could you please upload the production.log after you run # hammer host status --id 1 That would help to find out what's happened I think. Extra points if the logger is configured to log debug messages too.
Created attachment 1212512 [details] production.log Sure, providing in the attachment
Thank you, few more questions. Is the host baremetal or VM? If it's baremetal, does it have BMC interface defined? What exactly you mean by "disabled" or "inactive" host. Extra thanks for debug log level.
Hey Marek, On a second sight I realize that I'm hitting this only on the host that is the Satellite server itself, which is a bare metal without the BMC interface. So I guess it is expected that I don't get the power status, I'd just like to have some nice message (maybe someth. like "Status: no interface detected") rather than the exception. I have no other bare metal host at hand, on VM hosts I get "Power: running" or "Power: off" if I power off the VM. Hope this helps
Should be fixed in Foreman 1.14 as part of http://projects.theforeman.org/issues/14688 The PR adds an action to HostsController that will not throw an exception in case the host does not support power commands: https://github.com/theforeman/foreman/blob/develop/config/routes.rb#L34
Connecting redmine issue http://projects.theforeman.org/issues/14688 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/14688 has been resolved.
Setting as triaged as there's a fix already upstream
Failed on Satellite-6.3 Snap 11. Requesting the status of a powered down (inactive) bare metal host via hammer still returns "ERF42-9958 [Foreman::Exception]: Unknown power management support - can't continue".
From what I was able to reproduce, the system now behaves as following for bare metal host: If the host is on, the system will return "on" status. If the host is off, the system will return "off" status. If the host has no BMC NIC configured, the system will return an exception. Is this an acceptable behavior? If it is, I would suggest moving the BZ to verified. If this is not the desired behavior, I would like to know what the desired behavior is.
@shimon: see https://bugzilla.redhat.com/show_bug.cgi?id=1387202#c5, the request is to not mention the exception, something like "Status: no interface detected"
Opened another upstream issuefor the specific case: https://github.com/theforeman/foreman/pull/4852
Connecting redmine issue http://projects.theforeman.org/issues/20966 from this bug
Verified with sat6.3 snap28. I don't see any exception for baremetal host instead see a proper message below: 1. baremetal host when no bmc enabled ~]# hammer host status --id 1 Power operations are not enabled on this host. 2. running virtual host ~]# hammer host status --id 3 Status: No reports Power: running 3. off virtual host ~]# hammer host status --id 4 Status: No reports Power: off
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > > > For information on the advisory, and where to find the updated files, follow the link below. > > > > If the solution does not work for you, open a new bug report. > > > > https://access.redhat.com/errata/RHSA-2018:0336