Bug 1290684 - ha-all-in-one-util.erb script is broken, can't evaluate member through crm_node command
ha-all-in-one-util.erb script is broken, can't evaluate member through crm_no...
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-foreman-installer (Show other bugs)
6.0 (Juno)
All Linux
urgent Severity urgent
: ---
: Installer
Assigned To: Jason Guiditta
: OtherQA, Triaged, ZStream
: 1294539 1299812 1299987 (view as bug list)
Depends On:
Blocks: 1292555
  Show dependency treegraph
Reported: 2015-12-11 02:26 EST by Salman Khan
Modified: 2018-02-08 06:08 EST (History)
17 users (show)

See Also:
Fixed In Version: openstack-foreman-installer-3.0.27-1.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-22 07:32:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Salman Khan 2015-12-11 02:26:57 EST
Description of problem:
While deploying controller or computes nodes puppet get stuck in to check memcached status using "/tmp/ha-all-in-one-util.bash all_members_include memcached" and then eventually fails. Further investigation reveals that crm_node have changed output format which breaks the regex used in "ha-all-in-one-util.erb" to get members.
members=$(/usr/sbin/crm_node -l | perl -p -e 's/^.*\s+(\S+)$/$1/g')

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

How reproducible:

Steps to Reproduce:
1. Install rhel-osp-installer on RHEL7.2 and create a deployment.
2. Discover nodes and assign deployment roles to the discovered node.
3. Node will install the operating system and runs the puppet.
4. puppet will get stuck in "tmp/ha-all-in-one-util.bash all_members_include memcached"

Actual results:
Failed to get service status from members.

Expected results:
It should be able to get the status of the node.

Additional info:
I tried using awk to get crm members in ha-all-in-one-util.bash by using following command to get pass this error.

members=$(/usr/sbin/crm_node -l | awk '{print $2}')
Comment 2 Dave Cain 2015-12-17 11:28:13 EST
I'm going to piggy back off of this bug.  This problem is causing deployments for me to fail as well following the FlexPod OpenStack CVD.  Adding additional members to this bug for awareness.

If one patches /etc/puppet/environments/production/modules/quickstack/templates/ha-all-in-one-util.erb and comment out this:

members=$(/usr/sbin/crm_node -l | perl -p -e 's/^.*\s+(\S+)$/$1/g')

which returns "member"

and instead use: 

members=$(/usr/sbin/crm_node -l | awk '{print $2}')

The deployment proceeds.
Comment 4 Mike Orazi 2015-12-22 10:32:44 EST

Is there any way you can provide a pull request to the kilo branch of astapor  with the update you mention in comment 2?
Comment 5 Jason Guiditta 2015-12-22 10:55:14 EST
FYI, there is no kilo branch for astapor, it is just master[1], as kilo was the last (osp7) release we did with astapor.  That said, since you are using osp6/juno, it might make more sense for such a patch (including the one for the other BZ) to go directly to the juno branch, and we can later discuss what of that is relevant to kilo/osp7 if needed.

[1] https://github.com/redhat-openstack/astapor/branches
Comment 6 Dave Cain 2016-01-11 11:18:53 EST
Pull request to fix this bug here: 
Comment 7 Mike Orazi 2016-01-12 09:41:58 EST

If we are able to produce an updated rpm would you be able to help verify?
Comment 8 Dave Cain 2016-01-12 09:51:30 EST
Hi Mike,

Sure can, and would be happy to kick off a new build to verify, assuming 1292555 is patched too. That bug and this one prevent deployments from occurring.
Comment 9 Jason Guiditta 2016-01-12 11:43:02 EST
Comment 11 Jason Guiditta 2016-01-19 12:31:00 EST
*** Bug 1299987 has been marked as a duplicate of this bug. ***
Comment 13 GE Scott Knauss 2016-01-20 03:56:09 EST
*** Bug 1299812 has been marked as a duplicate of this bug. ***
Comment 14 Dave Cain 2016-01-28 12:50:52 EST
I was able to test this with the assistance of a colleague of mine and can say that builds are successful now with the rhel-osp-installer.  Builds no longer fail.  We even did a clean install of the database, as I seem to remember that it was required when updating the openstack-foreman-installer package.  

Marking bug VERIFIED.  Hope that's the right state.
Comment 17 errata-xmlrpc 2016-02-22 07:32:23 EST
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.

Comment 18 GE Scott Knauss 2016-06-14 03:15:53 EDT
*** Bug 1294539 has been marked as a duplicate of this bug. ***

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