crm_* commands output should be (null) escaped in OCF scripts

Bug #1415021 reported by Bogdan Dobrelya on 2015-01-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
High
Bogdan Dobrelya

Bug Description

With Corosync 2 and Pacemaker 1.1.12, crm_node, crm_attribute and other commands may return (null) strings sometimes. Exact circumstances are unknown.

Example:
crm_node --list
2 (null)
1 node-1.test.domain.local
3 (null)

But OCF scripts are expecting instead:
crm_node --list
1 node-1.test.domain.local

A workaround is to escape (null) strings with sed -e '/(null)/d'. A complete solution is unknown as well as a root cause.

Changed in fuel:
milestone: none → 6.1
assignee: nobody → Bogdan Dobrelya (bogdando)
importance: Undecided → High
status: New → Triaged

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

Changed in fuel:
status: Triaged → In Progress

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

commit d49c1e3031bbbf12daccf5a5e63e16dc2baec48c
Author: Bogdan Dobrelya <email address hidden>
Date: Tue Jan 27 13:43:51 2015 +0100

    Escape null strings from crm_* commands output

    W/o this patch, when Pacemaker v1.1.12, OCF scripts
    could parse crm_node, crm_attribute commands output
    in a wrong way as it may contain "(null)" strings.

    The workaround is to escape these null strings with
    a sed command.

    Closes-bug: #1415021

    Change-Id: Ia7670a4f1b8540f6ac9ca8ff66dabd36e7f8738a
    Signed-off-by: Bogdan Dobrelya <email address hidden>

Changed in fuel:
status: In Progress → Fix Committed
Anastasia Palkina (apalkina) wrote :

Verified on ISO #92

"build_id": "2015-02-01_22-55-01", "ostf_sha": "c9100263140008abfcc2704732e98fbdfd644068", "build_number": "92", "release_versions": {"2014.2-6.1": {"VERSION": {"build_id": "2015-02-01_22-55-01", "ostf_sha": "c9100263140008abfcc2704732e98fbdfd644068", "build_number": "92", "api": "1.0", "nailgun_sha": "c0932eb5c2aa7fd1e13a999cb1b4bf5aff101c3b", "production": "docker", "python-fuelclient_sha": "2ea7b3e91c1d2ff85110bf5abb161a6f4e537358", "astute_sha": "ed5270bf9c6c1234797e00bd7d4dd3213253a413", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "", "fuellib_sha": "c5e4a0410ba66f9e9911f62b3b71c0b9c29aed6e"}}}, "auth_required": true, "api": "1.0", "nailgun_sha": "c0932eb5c2aa7fd1e13a999cb1b4bf5aff101c3b", "production": "docker", "python-fuelclient_sha": "2ea7b3e91c1d2ff85110bf5abb161a6f4e537358", "astute_sha": "ed5270bf9c6c1234797e00bd7d4dd3213253a413", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "", "fuellib_sha": "c5e4a0410ba66f9e9911f62b3b71c0b9c29aed6e"

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers