If a neutron router has no ports defined, its namespace is deleted
by the cronjob /etc/cron.d/neutron-l3-agent-netns-cleanup.
It is required to check if the namespace exists before calling
iproute2 commands against the namespace.
It is not enough for the string of the namespace uuid to be defined,
the namespace must really exist on the network node.
This patch checks if the namespace exists when calling get_devices().
Otherwise the agent log file will be flooded with messages like
Cannot open network namespace "qrouter-<uuid>": No such file or directory
Failed to process compatible router '<uuid>'
Related-bug: 1573073
Change-Id: I744ef11529f9da5cbfdb812de0b35b95f9d078bb
(cherry picked from commit 7675495f260daf0174f4e04b36279513889df19a)
Reviewed: https:/ /review. openstack. org/393739 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=5a3dadc6010 3a8c2dc88446fe4 b2412c9bdf0790
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 5a3dadc60103a8c 2dc88446fe4b241 2c9bdf0790
Author: Saverio Proto <email address hidden>
Date: Thu Apr 21 16:50:07 2016 +0200
Check if namespace exists before getting devices
If a neutron router has no ports defined, its namespace is deleted d/neutron- l3-agent- netns-cleanup.
by the cronjob /etc/cron.
It is required to check if the namespace exists before calling
iproute2 commands against the namespace.
It is not enough for the string of the namespace uuid to be defined,
the namespace must really exist on the network node.
This patch checks if the namespace exists when calling get_devices().
Otherwise the agent log file will be flooded with messages like
Cannot open network namespace "qrouter-<uuid>": No such file or directory
Failed to process compatible router '<uuid>'
Related-bug: 1573073
Change-Id: I744ef11529f9da 5cbfdb812de0b35 b95f9d078bb 174f4e04b362795 13889df19a)
(cherry picked from commit 7675495f260daf0