mysql-wss ocf script: invalid node score calculation

Bug #1623935 reported by Pavel Gluschak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Vladimir Kuklin
Mitaka
Fix Released
Medium
Maksim Malchuk

Bug Description

This code chunk contains typo near !/${OCF_RESOURCE_INSTANCE}:/

NODE_SCORE=`crm_simulate -Ls | awk "/${OCF_RESOURCE_INSTANCE}/ && /clone_color/ && !/${OCF_RESOURCE_INSTANCE}:/ && /${NODE}/" | sed -r -e 's/.*score on (.*)/\1/' | awk -F ':' '{print $2}' | tr -d '[:space:]'`

I.e.
[root@node-46 ~]# crm_simulate -Ls | awk "/p_mysqld/ && /clone_color/ && !/p_mysqld:/ && /node-46.localdomain/" | sed -r -e 's/.*score on (.*)/\1/' | awk -F ':' '{print $2}' | tr -d '[:space:]'
-bash: !/p_mysqld: event not found

There should be a space between ! and /
[root@node-46 ~]# crm_simulate -Ls | awk "/p_mysqld/ && /clone_color/ && ! /p_mysqld:/ && /node-46.localdomain/" | sed -r -e 's/.*score on (.*)/\1/' | awk -F ':' '{print $2}' | tr -d '[:space:]'
100

Pavel Gluschak (scsnow)
Changed in fuel:
assignee: nobody → Pavel Gluschak (scsnow)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/370797

Changed in fuel:
status: New → In Progress
Changed in fuel:
milestone: none → 10.0
importance: Undecided → High
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/371444

Dmitry Klenov (dklenov)
tags: added: area-library
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/371444
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=e7332a108f53a1e449aac9893d4f75dd839e2dad
Submitter: Jenkins
Branch: stable/mitaka

commit e7332a108f53a1e449aac9893d4f75dd839e2dad
Author: Pavel Glushchak <email address hidden>
Date: Thu Sep 15 16:02:50 2016 +0300

    mysql-wss: fixed node score calculation

    There was a typo near !/${OCF_RESOURCE_INSTANCE}:/
    Also it eliminates unnecessary forks as node score
    is placed in last column of a string.

    Change-Id: I3c4efacb1cf6038a14cb6834ed94903bc9f92466
    Closes-Bug: #1623935
    Signed-off-by: Pavel Glushchak <email address hidden>

tags: added: on-verification
Changed in fuel:
assignee: Pavel Gluschak (scsnow) → Vladimir Kuklin (vkuklin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/370797
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=c66d8c54d7cc75e188b6955ce3b36f79a8ce9a51
Submitter: Jenkins
Branch: master

commit c66d8c54d7cc75e188b6955ce3b36f79a8ce9a51
Author: Pavel Glushchak <email address hidden>
Date: Thu Sep 15 16:02:50 2016 +0300

    mysql-wss: fixed node score calculation

    There was a typo near !/${OCF_RESOURCE_INSTANCE}:/
    Also it eliminates unnecessary forks as node score
    is placed in last column of a string.

    Change-Id: I3c4efacb1cf6038a14cb6834ed94903bc9f92466
    Closes-Bug: #1623935
    Signed-off-by: Pavel Glushchak <email address hidden>

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
ElenaRossokhina (esolomina) wrote :

Verified on 9.2 snapshot 414
http://paste.openstack.org/show/586658/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/421382

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/newton)

Reviewed: https://review.openstack.org/421382
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=cab8687b4b1432bae6639324372158802179e489
Submitter: Jenkins
Branch: stable/newton

commit cab8687b4b1432bae6639324372158802179e489
Author: Pavel Glushchak <email address hidden>
Date: Thu Sep 15 16:02:50 2016 +0300

    [sync/mitaka] mysql-wss: fixed node score calculation

    There was a typo near !/${OCF_RESOURCE_INSTANCE}:/
    Also it eliminates unnecessary forks as node score
    is placed in last column of a string.

    Change-Id: I3c4efacb1cf6038a14cb6834ed94903bc9f92466
    Closes-Bug: #1623935
    Signed-off-by: Pavel Glushchak <email address hidden>

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-library 11.0.0.0rc1

This issue was fixed in the openstack/fuel-library 11.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.