Comment 2 for bug 2003359

Revision history for this message
Anton Kurbatov (akurbatov) wrote :

Hello Lajos,
I just double-checked on a fresh devstack installation (single node stand).
I'm running devstack on CentOS-Stream-GenericCloud-9, but looks like it's not so important.
My devstack local.conf:

[root@devstack0 ~]# cat ~cloud-user/devstack/local.conf
[[local|localrc]]
ADMIN_PASSWORD=<hidden>
DATABASE_PASSWORD=${ADMIN_PASSWORD}
RABBIT_PASSWORD=${ADMIN_PASSWORD}
SERVICE_PASSWORD=${ADMIN_PASSWORD}

ENABLED_SERVICES=key
ENABLED_SERVICES+=,n-api,n-cond,n-sch,n-api-meta,n-cpu
ENABLED_SERVICES+=,placement-api,placement-client
ENABLED_SERVICES+=,q-svc,q-agt,q-l3,q-meta,q-dhcp
ENABLED_SERVICES+=,c-sch,c-api,c-vol
ENABLED_SERVICES+=,g-api
ENABLED_SERVICES+=,rabbit,mysql

Q_DVR_MODE=dvr_snat
Q_ML2_TENANT_NETWORK_TYPE=vxlan
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch
Q_AGENT=openvswitch
PUBLIC_INTERFACE=eth1
NEUTRON_CREATE_INITIAL_NETWORKS=False

LOGFILE=${DEST}/logs/stack.sh.log
[root@devstack0 ~]#

Then, to avoid guessing at what point to remove the router, I made a delay at this point:

[root@devstack0 ~]# cd /opt/stack/neutron; git log --oneline | head -1; git diff; cd -
e6eeb700c8 Merge "Honor debug mode in keepalived-state-change script logs"
diff --git a/neutron/agent/l3/dvr_local_router.py b/neutron/agent/l3/dvr_local_router.py
index e12cc1a0ab..822d9d6a86 100644
--- a/neutron/agent/l3/dvr_local_router.py
+++ b/neutron/agent/l3/dvr_local_router.py
@@ -836,6 +836,8 @@ class DvrLocalRouter(dvr_router_base.DvrRouterBase):
                 self.agent.context, ex_gw_port['network_id'])
             LOG.debug("FloatingIP agent gateway port received from the "
                       "plugin: %s", fip_agent_port)
+ import time
+ time.sleep(5)
         self.fip_ns.create_or_update_gateway_port(fip_agent_port)

     def update_routing_table(self, operation, route):
/root
[root@devstack0 ~]# systemctl restart <email address hidden>
[root@devstack0 ~]#

and repeated the commands from the description:

[root@devstack0 ~]# source ~cloud-user/devstack/openrc admin
[root@devstack0 ~]# openstack network create public --provider-network-type flat --provider-physical-network public --external
[root@devstack0 ~]# openstack subnet create public --network public --subnet-range 10.136.16.0/20 --no-dhcp
[root@devstack0 ~]# r_id=$(openstack router create r1 --distributed --ha -c id -f value);
[root@devstack0 ~]# count_fip_requests() { journalctl -u <email address hidden> | grep 'FloatingIP agent gateway port received' | wc -l; }
[root@devstack0 ~]# fip_requests=$(count_fip_requests); openstack router set $r_id --external-gateway public; while :; do [[ $fip_requests == $(count_fip_requests) ]] && { echo "waiting before deletion..."; sleep 1; } || break; done; openstack router delete $r_id
waiting before deletion...
waiting before deletion...
[root@devstack0 ~]#
[root@devstack0 ~]# ip netns
fip-aea344ef-1a3b-4256-8b74-c04cc9603b9d (id: 1)
[root@devstack0 ~]# openstack port list --network public

[root@devstack0 ~]# openstack router create r1 --ha --distributed --external-gateway public
[root@devstack0 ~]# neutron l3-agent-list-hosting-router r1
neutron CLI is deprecated and will be removed in the Z cycle. Use openstack CLI instead.
The python binding code in neutronclient will be deprecated in favor of OpenstackSDK, please use that!
+--------------------------------------+-----------+----------------+-------+----------+
| id | host | admin_state_up | alive | ha_state |
+--------------------------------------+-----------+----------------+-------+----------+
| bd3d28aa-0bbb-438a-be05-b7e97ac5f03a | devstack0 | True | :-) | standby |
+--------------------------------------+-----------+----------------+-------+----------+
[root@devstack0 ~]#

mem/cpu info on my stand:

[root@devstack0 ~]# cat /proc/cpuinfo | grep -i process
processor : 0
processor : 1
processor : 2
processor : 3
[root@devstack0 ~]# free -m
               total used free shared buff/cache available
Mem: 23779 5043 15225 76 4011 18736
Swap: 0 0 0
[root@devstack0 ~]#

The most important thing is to get a stuck fip namespace when the floatingip_agent_gateway port already removed.