Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1473860

Summary: fence_compute: Agent options defined in fence_compute are ignored
Product: Red Hat Enterprise Linux 7 Reporter: Marian Krcmarik <mkrcmari>
Component: fence-agentsAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact: Marian Krcmarik <mkrcmari>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.4CC: cfeist, cluster-maint, jreznik, jruemker, michele, mjuricek, nbarcet, oalbrigt, rscarazz, tvvcox
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fence-agents-4.0.11-68.el7 Doc Type: If docs needed, set a value
Doc Text:
Prior to this update, the fence_compute agent ignored some of its options. Consequently, the fence_compute agent was unable to create a Nova connection, and fence-nova "Shoot The Offending Node In The Head" (STONITH) devices that used the fence_compute agent were unable to start. With this update, fence_compute recognizes the options correctly, and the described problem no longer occurs.
Story Points: ---
Clone Of:
: 1479851 1497241 (view as bug list) Environment:
Last Closed: 2018-04-10 12:13:34 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:
Bug Depends On:    
Bug Blocks: 1479851, 1497241    
Attachments:
Description Flags
Proposed patch none

Description Marian Krcmarik 2017-07-21 21:47:42 UTC
Description of problem:
There is a change in behaviour of fence_compute between version 4.0.11-47.el7_3.5 (RHEL7.3.z) and 4.0.11-66 (RHEL7.4 wannabe) and since fence_compute code did not change then It must be related to some changes in /usr/share/fencing.py.
I've been testing fence_compute behaviour in Openstack environment (Instance HA) and It seems like options[1] defined in fence_compute (auth-url, tenant-name, etc.) are being ignored - at the time of use they have empty value which leads to unsuccessful creation of nova connection.

The log from corosync:
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Parse error: Ignoring unknown option 'auth-url=http://10.0.0.101:5000/v2.0' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [  ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Parse error: Ignoring unknown option 'record-only=1' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [  ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Parse error: Ignoring unknown option 'no-shared-storage=False' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [  ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Parse error: Ignoring unknown option 'tenant-name=admin' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [  ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Nova connection failed. AuthorizationFailure: Authentication requires 'auth_url', which should be specified in 'HTTPClient' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ Nova connection failed. AuthorizationFailure: Authentication requires 'auth_url', which should be specified in 'HTTPClient' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Nova connection failed. AuthorizationFailure: Authentication requires 'auth_url', which should be specified in 'HTTPClient' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ Nova connection failed. AuthorizationFailure: Authentication requires 'auth_url', which should be specified in 'HTTPClient' ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ WARNING:root:Couldn't obtain a supported connection to nova, tried: ['2.11', '2'] ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [  ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ Couldn't obtain a supported connection to nova, tried: ['2.11', '2'] ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [  ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ Traceback (most recent call last): ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/sbin/fence_compute", line 502, in <module> ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     main() ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/sbin/fence_compute", line 498, in main ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     result = fence_action(None, options, set_power_status, get_power_status, get_plugs_list, None) ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/share/fence/fencing.py", line 1005, in fence_action ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     outlets = get_outlet_list(tn, options) ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/sbin/fence_compute", line 298, in get_plugs_list ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     hypervisors = nova.hypervisors.list() ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/lib/python2.7/site-packages/novaclient/v2/hypervisors.py", line 43, in list ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     return self._list('/os-hypervisors%s' % detail, 'hypervisors') ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 242, in _list ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     resp, body = self.api.client.get(url) ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 452, in get ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     return self._cs_request(url, 'GET', **kwargs) ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 408, in _cs_request ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     self.authenticate() ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [   File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 539, in authenticate ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [     raise exceptions.AuthorizationFailure(msg) ]
Jul 21 17:16:57 [4754] controller-2 stonith-ng:  warning: log_action:   fence_compute[10436] stderr: [ novaclient.exceptions.AuthorizationFailure: Authentication requires 'auth_url', which should be specified in 'HTTPClient' ]

Downgrade to RHEL7.3.z version solves problem, no code change in fence_compute.py

Version-Release number of selected component (if applicable):
4.0.11-66

How reproducible:
Always

Steps to Reproduce:
1. Define stonith device of fence-nova which uses fence_compute agent.

Actual results:
The resource will not get into Started status.

[1] https://github.com/ClusterLabs/fence-agents/blob/master/fence/agents/compute/fence_compute.py#L341-L421

Comment 2 Marek Grac 2017-07-24 10:04:01 UTC
Created attachment 1303548 [details]
Proposed patch

Proposed patch is in the attachment. 

The problem is in the planned switch to use '-' instead of '_' in stdin options. In order to support both I have expected that '-' is not used anywhere. What is not true as it was already used in fence_compute. This patch changes the name of options but both '_' and '-' variants are working as expected.

Comment 4 Marian Krcmarik 2017-07-26 11:52:23 UTC
I tested scratch build with proposed patch and It fixes the problem.

Comment 10 Oyvind Albrigtsen 2017-09-27 12:55:21 UTC
Additional patch to maintain ABI compatibility:
https://github.com/ClusterLabs/fence-agents/pull/146/commits/0b36c4ac191d88922d972668732575ef8a579a5b

Comment 17 errata-xmlrpc 2018-04-10 12:13:34 UTC
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/RHBA-2018:0758

Comment 18 Red Hat Bugzilla 2023-09-14 04:01:30 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days