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 1287314 - [NovaEvacuate] Simplify nova check
Summary: [NovaEvacuate] Simplify nova check
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Oyvind Albrigtsen
QA Contact: Asaf Hirshberg
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-01 23:16 UTC by Andrew Beekhof
Modified: 2016-11-04 00:00 UTC (History)
5 users (show)

Fixed In Version: resource-agents-3.9.5-67.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 00:00:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2174 0 normal SHIPPED_LIVE resource-agents bug fix and enhancement update 2016-11-03 13:16:36 UTC

Description Andrew Beekhof 2015-12-01 23:16:01 UTC
Description of problem:

There is a simpler way to check if a node is known by nova before we try to evacuate it

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

resource-agents-3.9.5-54.el7.x86_64

Additional info:

--- /usr/lib/ocf/resource.d/openstack/NovaEvacuate.orig	2015-11-30 21:53:57.868660753 -0500
+++ /usr/lib/ocf/resource.d/openstack/NovaEvacuate	2015-12-01 18:13:14.031530234 -0500
@@ -180,14 +180,8 @@
 	    found=0
 	    ocf_log notice "Initiating evacuation of $node"
 
-	    for known in $(fence_compute ${fence_options} -o list | tr -d ','); do
-		if [ ${known} = ${node} ]; then
-		    found=1
-		    break
-		fi
-	    done
-
-	    if [ $found = 0 ]; then
+	    fence_compute ${fence_options} -o status -n ${node}
+	    if [ $? != 0 ]; then
 		ocf_log info "Nova does not know about ${node}"
 		# Dont mark as no because perhaps nova is unavailable right now
 		continue

Comment 2 Oyvind Albrigtsen 2015-12-08 08:07:03 UTC
https://review.openstack.org/#/c/254516/

Comment 5 Andrew Beekhof 2016-03-10 22:08:33 UTC
Just that the instance HA feature still works

Comment 6 Asaf Hirshberg 2016-03-22 14:02:44 UTC
Verified: using director 8.0 puddle - 2016-03-11.1 & resource-agents-3.9.5-67.el7

pcs cluster stop --all
yum install -y brewkoji
brew search build resource-agents* | grep resource-agents-3.9.5-67
brew download-build --arch=x86_64 --arch=noarch resource-agents-3.9.5-67.el7
rpm -Uvh resource-agents-3.9.5-67.el7.x86_64.rpm
vi /usr/lib/ocf/resource.d/openstack/NovaEvacuate 
rpm -qa|grep resource
pcs cluster start --all

[stack@puma33 ~]$ nova list --fields name,status,host
+--------------------------------------+------+--------+-------------------------------------+
| ID                                   | Name | Status | Host                                |
+--------------------------------------+------+--------+-------------------------------------+
| 77aabf19-2bd1-4e85-99b2-4b2766240fb6 | vm01 | ACTIVE | overcloud-novacompute-2.localdomain |
| c1cc12e9-52fa-429a-b83f-389af0b1ac85 | vm03 | ACTIVE | overcloud-novacompute-2.localdomain |
| dc342a5e-ad11-4ed3-ac76-ac88867866fd | vm03 | ACTIVE | overcloud-novacompute-2.localdomain |
| 6cd0d350-c408-4ef1-962c-dfa73bea8d16 | vm04 | ACTIVE | overcloud-novacompute-1.localdomain |
| 3cf4fd8c-974c-4ef9-9146-41edafafad00 | vm05 | ACTIVE | overcloud-novacompute-1.localdomain |
| e1c45b96-9530-47d3-8131-a715b963953f | vm06 | ACTIVE | overcloud-novacompute-1.localdomain |
| ee4f02d7-b958-4bfc-b659-c581784d58c2 | vm07 | ACTIVE | overcloud-novacompute-2.localdomain |
| b8c2f374-4f02-42e3-b8e2-649f08040437 | vm08 | ACTIVE | overcloud-novacompute-2.localdomain |
+--------------------------------------+------+--------+-------------------------------------+

** fencing compute-1

[stack@puma33 ~]$ nova list --fields name,status,host
+--------------------------------------+------+--------+-------------------------------------+
| ID                                   | Name | Status | Host                                |
+--------------------------------------+------+--------+-------------------------------------+
| 77aabf19-2bd1-4e85-99b2-4b2766240fb6 | vm01 | ACTIVE | overcloud-novacompute-2.localdomain |
| c1cc12e9-52fa-429a-b83f-389af0b1ac85 | vm03 | ACTIVE | overcloud-novacompute-2.localdomain |
| dc342a5e-ad11-4ed3-ac76-ac88867866fd | vm03 | ACTIVE | overcloud-novacompute-2.localdomain |
| 6cd0d350-c408-4ef1-962c-dfa73bea8d16 | vm04 | ACTIVE | overcloud-novacompute-0.localdomain |
| 3cf4fd8c-974c-4ef9-9146-41edafafad00 | vm05 | ACTIVE | overcloud-novacompute-0.localdomain |
| e1c45b96-9530-47d3-8131-a715b963953f | vm06 | ACTIVE | overcloud-novacompute-0.localdomain |
| ee4f02d7-b958-4bfc-b659-c581784d58c2 | vm07 | ACTIVE | overcloud-novacompute-2.localdomain |
| b8c2f374-4f02-42e3-b8e2-649f08040437 | vm08 | ACTIVE | overcloud-novacompute-2.localdomain |
+--------------------------------------+------+--------+-------------------------------------+

Comment 8 errata-xmlrpc 2016-11-04 00:00:14 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://rhn.redhat.com/errata/RHBA-2016-2174.html


Note You need to log in before you can comment on or make changes to this bug.