[mos-xenial] "ip netns list" can produce different output format

Bug #1580963 reported by Dmitry Burmistrov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Dmitry Burmistrov
Mitaka
Won't Fix
Medium
Dmitry Burmistrov
Newton
Fix Committed
Medium
Dmitry Burmistrov

Bug Description

Detailed bug description:
 Here outputs from different environments, second one has different output
 root@14.04:~# ip netns list | tail -1
 vrouter
 root@16.04:~# ip netns list | tail -1
 haproxy (id: 0)
Steps to reproduce:
 Install Ubuntu 16.04 with iproute2=4.3.0-1ubuntu3, run "ip netns list" and check output.
Expected results:
 ocf scripts handle both outputs
Actual result:
 ocf scripts works only with 1st outputs
Reproducibility:
 -
Workaround:
 -
Impact:
 Launch MOS with Ubuntu 16.04
Description of the environment:
 Operation system: Ubuntu 16.04
 Versions of components: -
 Reference architecture: -
 Network model: -
 Related projects installed: -
Additional information:
 affected scripts:
   - ns_IPaddr2
   - ns_dns
   - ns_haproxy
   - ns_vrouter
 command/function: `ip netns list | grep "$OCF_RESKEY_ns"` # "check_ns" function
 In any case script should be smarter to handle both outputs.
 Maybe "check_ns" function can be extracted to "library" file with common functions (instead of duplicating code in all scripts).

Revision history for this message
Dmitry Burmistrov (dmburmistrov) wrote :
Changed in fuel:
assignee: nobody → Dmitry Burmistrov (dmburmistrov)
tags: added: area-linux
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

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

commit d956661f743327e28b18092f2346a8dd11ea7faa
Author: dmburmistrov <email address hidden>
Date: Fri May 6 12:53:55 2016 +0300

    Accept "ip netns list" changed output format

    Now ip-netns also displays namespace ids,
    here are outputs:
    root@14.04:~# ip netns list | tail -1
    vrouter
    root@16.04:~# ip netns list | tail -1
    haproxy (id: 0)

    Closes-bug: #1580963

    Change-Id: I2966a19ef078f256464a93be549215648b036828

Changed in fuel:
status: In Progress → Fix Committed
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Dmitry Burmistrov (dmburmistrov) wrote : Re: "ip netns list" can produce different output format

Bug is still here. Backslash from awk was eaten by backticks. Backticks can be replaced with modern "$()" bash syntax. Or second backslash should be added.

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

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

commit 8e8bbf305bc044b060282f8f09fca288f32b3202
Author: dmburmistrov <email address hidden>
Date: Tue May 24 14:55:08 2016 +0300

    Replace backticks with "$()" syntax

    Backticks eat backslash from awk
    expression.

    Closes-bug: #1580963

    Change-Id: I21b015b79e52e8dd1fcfccce0fd8dea2abd7a84e

Changed in fuel:
status: In Progress → Fix Committed
tags: added: ubuntu-xenial
tags: added: mos-xenial
removed: ubuntu-xenial
summary: - "ip netns list" can produce different output format
+ [mos-xenial] "ip netns list" can produce different output format
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.