On CS9 baremetal deployment fails. The dhcp log on the undercloud will show:
+ DOCKER_HOST=
+ ARGS='--no-hosts --no-resolv --pid-file=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/host --addn-hosts=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/opts --dhcp-leasefile=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/leases --dhcp-match=set:ipxe,175 --dhcp-userclass=set:ipxe6,iPXE --local-service --bind-dynamic --dhcp-range=set:subnet-eaf4f552-0023-4e4a-9b6e-b5f3727e647e,192.168.24.0,static,255.255.255.0,86400s --dhcp-option-force=option:mtu,1500 --dhcp-lease-max=256 --conf-file=/dev/null --domain=home.arpa'
++ ip netns identify
+ NETNS=qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49
+ NAME=neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49
+ CLI='nsenter --net=/run/netns/qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49 --preserve-credentials -m -t 1 podman'
+ LOGGING='--log-driver k8s-file --log-opt path=/var/log/containers/stdouts/neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49.log'
+ CMD='/usr/sbin/dnsmasq -k'
++ awk '{print $1}'
++ nsenter --net=/run/netns/qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49 --preserve-credentials -m -t 1 podman ps -a --filter name=neutron-dnsmasq- --format '{{.ID}}:{{.Names}}:{{.Status}}'
+ LIST=5a6b8e987ae7:neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49:Created
++ printf '%s\n' 5a6b8e987ae7:neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49:Created
++ grep -E ':(Exited|Created)'
+ ORPHANTS=5a6b8e987ae7:neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49:Created
+ '[' -n 5a6b8e987ae7:neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49:Created ']'
++ printf '%s\n' 5a6b8e987ae7:neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49:Created
++ awk -F: '{print $1}'
+ for orphant in $(printf "%s\n" "${ORPHANTS}" | awk -F':' '{print $1}')
+ echo 'Removing orphaned container 5a6b8e987ae7'
+ nsenter --net=/run/netns/qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49 --preserve-credentials -m -t 1 podman stop 5a6b8e987ae7
Error: can only stop created or running containers. 5a6b8e987ae7f5b4e4c41a7c5b6afc3b1ef6aaa76795d1cd7067cace0af525a1 is in state configured: container state improper
+ true
+ nsenter --net=/run/netns/qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49 --preserve-credentials -m -t 1 podman rm -f 5a6b8e987ae7
+ grep -q 'neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49$'
+ printf '%s\n' 5a6b8e987ae7:neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49:Created
+ echo 'Starting a new child container neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49'
+ nsenter --net=/run/netns/qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49 --preserve-credentials -m -t 1 podman run --detach --log-driver k8s-file --log-opt path=/var/log/containers/stdouts/neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49.log -v /var/lib/config-data/puppet-generated/neutron/etc/neutron:/etc/neutron:ro -v /run/netns:/run/netns:shared -v /var/lib/neutron:/var/lib/neutron:shared -v /dev/log:/dev/log --net host --pid host --cgroupns host --privileged -u root --name neutron-dnsmasq-qdhcp-7083ee69-e139-4844-8af8-7efa798a3c49 undercloud-0.ctlplane.home.arpa:8787/tripleomastercentos9/openstack-neutron-dhcp-agent:8f4fa80dca5a62ca9a9049b664a60868 /usr/sbin/dnsmasq -k --no-hosts --no-resolv --pid-file=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/host --addn-hosts=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/opts --dhcp-leasefile=/var/lib/neutron/dhcp/7083ee69-e139-4844-8af8-7efa798a3c49/leases --dhcp-match=set:ipxe,175 --dhcp-userclass=set:ipxe6,iPXE --local-service --bind-dynamic --dhcp-range=set:subnet-eaf4f552-0023-4e4a-9b6e-b5f3727e647e,192.168.24.0,static,255.255.255.0,86400s --dhcp-option-force=option:mtu,1500 --dhcp-lease-max=256 --conf-file=/dev/null --domain=home.arpa
Error: create directory `/sys/fs/cgroup/../../libpod-b43b25a3bf3af73d24d3f4c52b983334ead7d28462e9ed8ba83f207e4264b1ed.scope`: No such file or directory: OCI runtime attempted to invoke a command that was not found
Once we start the dhcp + ovn meta containers with csgroupns=host this works again.
This is basically the cousin LP of https://bugs.launchpad.net/tripleo/+bug/1936005 but for neutron dhcp and ovn-metadata
Reviewed: https:/ /review. opendev. org/c/openstack /tripleo- heat-templates/ +/807604 /opendev. org/openstack/ tripleo- heat-templates/ commit/ 60d77b37ec64b8b b82ecc08632bd2f d7426fecea
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 60d77b37ec64b8b b82ecc08632bd2f d7426fecea
Author: Michele Baldessari <email address hidden>
Date: Mon Sep 6 18:15:27 2021 +0200
Set cgroupns=host for neutron_dhcp and ovn-metadata
Without this change on Centos Stream 9 we will get errors like the run/netns/ qdhcp-7083ee69- e139-4844- 8af8-7efa798a3c 49 --preserve- credentials -m -t 1 podman run --detach --log-driver k8s-file --log-opt path=/var/ log/containers/ stdouts/ neutron- dnsmasq- qdhcp-7083ee69- e139-4844- 8af8-7efa798a3c 49.log -v /var/lib/ config- data/puppet- generated/ neutron/ etc/neutron: /etc/neutron: ro -v /run/netns: /run/netns: shared -v /var/lib/ neutron: /var/lib/ neutron: shared -v /dev/log:/dev/log --net host --pid host --cgroupns host --privileged -u root --name neutron- dnsmasq- qdhcp-7083ee69- e139-4844- 8af8-7efa798a3c 49 undercloud- 0.ctlplane. home.arpa: 8787/tripleomas tercentos9/ openstack- neutron- dhcp-agent: 8f4fa80dca5a62c a9a9049b664a608 68 /usr/sbin/dnsmasq -k --no-hosts --no-resolv --pid-file= /var/lib/ neutron/ dhcp/7083ee69- e139-4844- 8af8-7efa798a3c 49/pid --dhcp- hostsfile= /var/lib/ neutron/ dhcp/7083ee69- e139-4844- 8af8-7efa798a3c 49/host --addn- hosts=/ var/lib/ neutron/ dhcp/7083ee69- e139-4844- 8af8-7efa798a3c 49/addn_ hosts --dhcp- optsfile= /var/lib/ neutron/ dhcp/7083ee69- e139-4844- 8af8-7efa798a3c 49/opts --dhcp- leasefile= /var/lib/ neutron/ dhcp/7083ee69- e139-4844- 8af8-7efa798a3c 49/leases --dhcp- match=set: ipxe,175 --dhcp- userclass= set:ipxe6, iPXE --local-service --bind-dynamic --dhcp- range=set: subnet- eaf4f552- 0023-4e4a- 9b6e-b5f3727e64 7e,192. 168.24. 0,static, 255.255. 255.0,86400s --dhcp- option- force=option: mtu,1500 --dhcp- lease-max= 256 --conf- file=/dev/ null --domain=home.arpa cgroup/ ../../libpod- b43b25a3bf3af73 d24d3f4c52b9833 34ead7d28462e9e d8ba83f207e4264 b1ed.scope` : No such file or directory: OCI runtime attempted to invoke a command that was not found
following:
+ nsenter --net=/
Error: create directory `/sys/fs/
See also the related libvirt/nova issue in https:/ /bugs.launchpad .net/tripleo/ +bug/1936005
Tested and with this change the error is gone and dhcp/ovn-metadata is functional
again.
Closes-Bug: #1944522
Change-Id: I8a5b885782386a 89c463ff0b7afd7 ace91958278