Bug 1387202
Summary: | hammer host status returns Foreman::Exception on inactive host | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Peter Ondrejka <pondrejk> | ||||
Component: | Hosts | Assignee: | Shimon Shtein <sshtein> | ||||
Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 6.3.0 | CC: | bbuckingham, dhlavacd, dlobatog, egolov, inecas, mhulan, pondrejk, sghai, sgraessl, sshtein, tstrachota | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | foreman-1.15.6.8 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-02-21 16:54:37 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Peter Ondrejka
2016-10-20 10:46:11 UTC
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
|