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/393754 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=4339740b931 dbf4e44f487dfdc 91acfb84992d4a
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 4339740b931dbf4 e44f487dfdc91ac fb84992d4a
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