Can't run commands within dhcp namespaces(created by neutron): " from overcloud controller(Containerized Services)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Medium
|
Brent Eagles |
Bug Description
Description:
============
Not able to execute commands within network namespaces(ip netns exec <qdhcp-namespace> ip a) on overcloud controller(
Steps to reproduce:
===================
1) Install Containerized Overcloud using tripleo-quickstart, I used following overcloud deploy command:-
Release used: master-tripleo-ci
openstack overcloud deploy \
--templates /usr/share/
--libvirt-type qemu --control-flavor oooq_control --compute-flavor oooq_compute --ceph-
2) Login to undercloud(stack user) and Create flavor, image, network and then a VM on overcloud
source overcloudrc
curl -O http://
openstack image create --disk-format qcow2 --container-format bare --public --file ./cirros-
openstack flavor create --public m1.extra_tiny --id auto --ram 256 --disk 0 --vcpus 1 --rxtx-factor 1
openstack security group rule create default --protocol tcp --dst-port 22:22 --remote-ip 0.0.0.0/0
openstack security group rule create --protocol icmp default
openstack network create net1
openstack subnet create subnet1 --network net1 --subnet-range 192.0.2.0/24
netid=$(openstack network show net1 -f value -c id)
nova boot --nic net-id=$netid --image cirros --flavor m1.extra_tiny testvm
# Wait for some time for VM to be in ACTIVE state
# Login to overcloud controller node to run commands in neutron namespaces
# Login as root
# List network namespaces
ip netns
# run command within namespace found, namespace would be named qdhcp-<network-id>
ip netns exec <qdhcp namespace> ip a
ip netns exec <qdhcp namespace> ping <vm ip>
Expected result:
===============
Both commands should return some output
Actual result:
==============
Both command gives below Error:-
[root@overcloud
RTNETLINK answers: Invalid argument
setting the network namespace "qdhcp-
# Some more info:-
I am able to run above commands with "docker exec -it <neutron dhcp container> sudo ip netns exec <qdhcp namespace> ip a
Also check file permission on controller and in docker container: ls -l /var/run/
On controller something below:-
----------. 1 root root 0 May 31 10:01 qdhcp-5c73dc75-
On Container something below:
-r--r--r--. 1 root root 0 May 31 10:01 qdhcp-5c73dc75-
NOTE: sudo command can't be run in container, i somehow updated sudoers file within container and executed netns commands
devname=$(sudo docker inspect -f '{{ .GraphDriver.
sudo dmsetup info $devname
# Get minor number for the device
minornum=$(sudo dmsetup info $devname |grep Major|cut -d"," -f 3)
Hence the docker device for container is dm-<minor number>
# Mount the device and you can access container file system.
Changed in tripleo: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → pike-3 |
Changed in tripleo: | |
milestone: | pike-3 → pike-rc1 |
Changed in tripleo: | |
milestone: | pike-rc1 → queens-1 |
Changed in tripleo: | |
milestone: | queens-1 → queens-2 |
Changed in tripleo: | |
milestone: | queens-2 → queens-3 |
Changed in tripleo: | |
milestone: | queens-3 → queens-rc1 |
Changed in tripleo: | |
milestone: | queens-rc1 → rocky-1 |
From the description, this problem should be resolved by https:/ /review. openstack. org/#/c/ 542858/