ns_haproxy ns_vrouter ocf have incorrect grep command

Bug #1651404 reported by Anton Rodionov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Oleksiy Molchanov

Bug Description

The bug as customer reports it:
"Incorrect interface name variable in grep command

The grep commands in ocf ns_haproxy and ns_vrouter result in blank interface search because the variable in grep command in suffixed with ':'

But hapr-host and vr-host-base interface names are suffixed with @if<N> followed by colon.

Hence ':' should be removed to correct the same."

1. Steps to reproduce:

The script in, belonging to package fuel-ha-utils, /usr/lib/ocf/resource.d/fuel/ns_vrouter and /usr/lib/ocf/resource.d/fuel/ns_haproxy produces errors when executed.

2. Expected Result:

root@cic-1:/usr/lib/ocf/resource.d/fuel# ./ns_vrouter restart
ocf-ns_vrouter: DEBUG: Vrouter was stopped, namespaces still exist
ocf-ns_vrouter: DEBUG: default: check_ns(): recieved netns list: vrouter
ocf-ns_vrouter: INFO: net.ipv4.ip_forward = 1

root@cic-1:/usr/lib/ocf/resource.d/fuel# ./ns_haproxy restart
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: Pids for /usr/sbin/haproxy: 21587
ocf-ns_haproxy: INFO: haproxy daemon is running
ocf-ns_haproxy: INFO: default: proc_stop(): Stopping /usr/sbin/haproxy by PID 21587
ocf-ns_haproxy: DEBUG: default: proc_kill(): Stopping /usr/sbin/haproxy with SIGTERM...
ocf-ns_haproxy: DEBUG: default: proc_kill(): Stopped /usr/sbin/haproxy with SIGTERM
ocf-ns_haproxy: INFO: default: proc_stop(): Stopped /usr/sbin/haproxy
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: Pids for /usr/sbin/haproxy:
ocf-ns_haproxy: INFO: haproxy daemon is not running but pid file exists
ocf-ns_haproxy: DEBUG: Bringing up host interface: hapr-host
ocf-ns_haproxy: DEBUG: Bringing up the namespace interface: hapr-ns
ocf-ns_haproxy: INFO: net.ipv4.conf.hapr-host.rp_filter = 2
ocf-ns_haproxy: INFO: net.ipv4.conf.all.rp_filter = 2
ocf-ns_haproxy: INFO: Started haproxy daemon.

3. Actual Result:

root@cic-1:/usr/lib/ocf/resource.d/fuel# ./ns_vrouter restart
ocf-ns_vrouter: DEBUG: Vrouter was stopped, namespaces still exist
ocf-ns_vrouter: DEBUG: default: check_ns(): recieved netns list: vrouter
ocf-ns_vrouter: INFO: net.ipv4.ip_forward = 1
ocf-ns_vrouter: DEBUG: Creating host interface: vr-host-base and namespace interface: vr-host-ns
ocf-ns_vrouter: ERROR: RTNETLINK answers: File exists
ocf-ns_vrouter: DEBUG: Bringing up host interface: vr-host-base
ocf-ns_vrouter: DEBUG: Bringing up the namespace interface: vr-host-ns
ocf-ns_vrouter: INFO: net.ipv4.conf.vr-host-base.rp_filter = 2
ocf-ns_vrouter: INFO: net.ipv4.conf.all.rp_filter = 2

root@cic-1:/usr/lib/ocf/resource.d/fuel# ./ns_haproxy restart
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: Pids for /usr/sbin/haproxy: 12907
ocf-ns_haproxy: INFO: haproxy daemon is running
ocf-ns_haproxy: INFO: default: proc_stop(): Stopping /usr/sbin/haproxy by PID 12907
ocf-ns_haproxy: DEBUG: default: proc_kill(): Stopping /usr/sbin/haproxy with SIGTERM...
ocf-ns_haproxy: DEBUG: default: proc_kill(): Stopped /usr/sbin/haproxy with SIGTERM
ocf-ns_haproxy: INFO: default: proc_stop(): Stopped /usr/sbin/haproxy
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: default: check_ns(): recieved netns list: haproxy
ocf-ns_haproxy: DEBUG: default: get_variables(): set up variables and PIDFILE name
ocf-ns_haproxy: DEBUG: Pids for /usr/sbin/haproxy:
ocf-ns_haproxy: INFO: haproxy daemon is not running but pid file exists
ocf-ns_haproxy: DEBUG: Creating host interface: hapr-host and namespace interface: hapr-ns
ocf-ns_haproxy: ERROR: RTNETLINK answers: File exists
ocf-ns_haproxy: DEBUG: Bringing up host interface: hapr-host
ocf-ns_haproxy: DEBUG: Bringing up the namespace interface: hapr-ns
ocf-ns_haproxy: INFO: net.ipv4.conf.hapr-host.rp_filter = 2
ocf-ns_haproxy: INFO: net.ipv4.conf.all.rp_filter = 2
ocf-ns_haproxy: INFO: Started haproxy daemon.

ocf-ns_vrouter: ERROR: RTNETLINK answers: File exists
The above error is triggered because of the incorrect grep command which results in blank interface search though the interfaces are actually created.Hence it tries to
create the interfaces again which results in the error.

The above issue is raised for most of the actions that can be performed as part of the scripts like {start|stop|restart|status|monitor|validate-all|meta-data}

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Incomplete - no MOS version affected, not steps to reproduce, no expected/actual result.

Anton - please provide the information.

Changed in mos:
status: New → Incomplete
assignee: nobody → Anton Rodionov (arodionov)
Revision history for this message
Maxim V. Yefimov (mefimov) wrote :

STR, Actual and Expected results was added.

description: updated
Changed in mos:
status: Incomplete → New
Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

Vitaly,

The requested information was provided.
Please triage the bug again.

Changed in mos:
importance: Undecided → Medium
milestone: none → 9.2
assignee: Anton Rodionov (arodionov) → Vitaly Sedelnik (vsedelnik)
Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

sla2 for 9.0-updates

no longer affects: mos
Changed in fuel:
milestone: none → 9.2
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
importance: Undecided → High
Revision history for this message
Oleksiy Molchanov (omolchanov) wrote :

Anton, can you provide output for

ip link

Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Anton Rodionov (arodionov)
importance: High → Medium
Revision history for this message
Anton Rodionov (arodionov) wrote :
Download full text (4.6 KiB)

root@cic-1:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:6e:46:82 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:c1:0b:7d brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:3b:3e:2e brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:db:a0:4d brd ff:ff:ff:ff:ff:ff
6: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br-iscsi-left state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:73:8c:46 brd ff:ff:ff:ff:ff:ff
7: eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br-iscsi-right state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:61:e6:07 brd ff:ff:ff:ff:ff:ff
8: eth6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:bb:2f:73 brd ff:ff:ff:ff:ff:ff
9: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 8a:c3:01:ac:0c:b2 brd ff:ff:ff:ff:ff:ff
10: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/ether b6:a7:20:6a:87:aa brd ff:ff:ff:ff:ff:ff
11: br-fake: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ether ce:6e:e2:25:38:44 brd ff:ff:ff:ff:ff:ff
12: br-fw-admin: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ether 2a:94:48:84:46:4c brd ff:ff:ff:ff:ff:ff
13: br-mgmt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ether 2e:02:d0:de:b9:42 brd ff:ff:ff:ff:ff:ff
14: br-sr-ctrl: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ether e6:dd:df:67:a3:4a brd ff:ff:ff:ff:ff:ff
15: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ether a2:a6:d6:56:5f:4c brd ff:ff:ff:ff:ff:ff
16: br-prv: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ether 0a:f2:d1:f3:3b:43 brd ff:ff:ff:ff:ff:ff
17: br-iscsi-left: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:73:8c:46 brd ff:ff:ff:ff:ff:ff
18: br-iscsi-right: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:61:e6:07 brd ff:ff:ff:ff:ff...

Read more...

Changed in fuel:
assignee: Anton Rodionov (arodionov) → Fuel Sustaining (fuel-sustaining-team)
importance: Medium → High
Changed in fuel:
importance: High → Medium
milestone: 9.2 → 9.3
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Oleksiy Molchanov (omolchanov)
Revision history for this message
Oleksiy Molchanov (omolchanov) wrote :
Changed in fuel:
status: New → In Progress
Changed in fuel:
milestone: 9.x-updates → 9.2-mu-1
Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 + MU1 updates.

Actual results:
http://paste.openstack.org/show/601722/

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
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.