[openstack-dev] [devstack] Bug in is_*_enabled functions?

Brian Haley brian.haley at hp.com
Wed Feb 26 21:23:39 UTC 2014


On 02/26/2014 01:36 PM, Dean Troyer wrote:
> On Wed, Feb 26, 2014 at 11:51 AM, Brian Haley <brian.haley at hp.com
> <mailto:brian.haley at hp.com>> wrote:
>
>     While trying to track down why Jenkins was handing out -1's in a
>     Neutron patch,
>     I was seeing errors in the devstack tests it runs.  When I dug
>     deeper it looked
>     like it wasn't properly determining that Neutron was enabled -
>     ENABLED_SERVICES
>     had multiple "q-*" entries, but 'is_service_enabled neutron' was
>     returning 0.
>
>
> This is the correct return, 0 == success.

But, at least in lib/neutron, there is a check like this:

if is_service_enabled neutron; then
...
fi

Which will fail with a 0 return code and miss some config.

> Can you point to a specific log example?

http://logs.openstack.org/89/70689/24/check/check-devstack-dsvm-neutron/8e137e0/console.html

And snippet from log where the above call caused the test to not put a 
'sudo' at the front of something correctly:

2014-02-26 13:11:58.382 | + ping_check private 10.1.0.4 90
2014-02-26 13:11:58.382 | + is_service_enabled neutron
2014-02-26 13:11:58.385 | ++ set +o
2014-02-26 13:11:58.386 | ++ grep xtrace
2014-02-26 13:11:58.391 | + local 'xtrace=set -o xtrace'
2014-02-26 13:11:58.391 | + set +o xtrace
2014-02-26 13:11:58.392 | + return 0
2014-02-26 13:11:58.410 | + _ping_check_neutron private 10.1.0.4 90
2014-02-26 13:11:58.410 | + local from_net=private
2014-02-26 13:11:58.410 | + local ip=10.1.0.4
2014-02-26 13:11:58.410 | + local timeout_sec=90
2014-02-26 13:11:58.411 | + local expected=True
2014-02-26 13:11:58.411 | + local check_command=
2014-02-26 13:11:58.411 | ++ _get_probe_cmd_prefix private
2014-02-26 13:11:58.411 | ++ local from_net=private
2014-02-26 13:11:58.412 | +++ _get_net_id private
2014-02-26 13:11:58.412 | +++ neutron --os-tenant-name admin 
--os-username admin --os-password secret net-list
2014-02-26 13:11:58.412 | +++ grep private
2014-02-26 13:11:58.412 | +++ awk '{print $2}'
2014-02-26 13:11:59.586 | ++ net_id=779f6b6a-f477-494b-9a7a-6d81c731c4f8
2014-02-26 13:11:59.590 | +++ neutron-debug --os-tenant-name admin 
--os-username admin --os-password secret probe-list -c id -c network_id
2014-02-26 13:11:59.591 | +++ grep 779f6b6a-f477-494b-9a7a-6d81c731c4f8
2014-02-26 13:11:59.592 | +++ awk '{print $2}'
2014-02-26 13:11:59.594 | +++ head -n 1
2014-02-26 13:12:00.906 | 2014-02-26 13:12:00.876 28681 ERROR 
neutron.common.legacy [-] Skipping unknown group key: firewall_driver
2014-02-26 13:12:01.183 | ++ probe_id=ace800b2-5753-4609-b2c3-f9c87d0cc004
2014-02-26 13:12:01.184 | ++ echo ' ip netns exec 
qprobe-ace800b2-5753-4609-b2c3-f9c87d0cc004'
2014-02-26 13:12:01.184 | + probe_cmd=' ip netns exec 
qprobe-ace800b2-5753-4609-b2c3-f9c87d0cc004'
2014-02-26 13:12:01.185 | + [[ True = \T\r\u\e ]]
2014-02-26 13:12:01.185 | + check_command='while !  ip netns exec 
qprobe-ace800b2-5753-4609-b2c3-f9c87d0cc004 ping -w 1 -c 1 10.1.0.4; do 
sleep 1; done'
2014-02-26 13:12:01.185 | + timeout 90 sh -c 'while !  ip netns exec 
qprobe-ace800b2-5753-4609-b2c3-f9c87d0cc004 ping -w 1 -c 1 10.1.0.4; do 
sleep 1; done'
2014-02-26 13:12:01.194 | Cannot open network namespace: Permission denied
2014-02-26 13:12:02.201 | Cannot open network namespace: Permission denied
2014-02-26 13:12:03.207 | Cannot open network namespace: Permission denied
2014-02-26 13:12:04.213 | Cannot open network namespace: Permission denied

Thanks for any help on this.

-Brian



More information about the OpenStack-dev mailing list