vpnaas pluto.pid file path wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Undecided
|
Unassigned |
Bug Description
currently, class OpenSwanProcess weil define
self.pid_file = '%s.pid' % self.pid_path
print pid_file in log file:
e.g:
/opt/stack/
but the cmd to start pluto process
sudo neutron-rootwrap /etc/neutron/
will generate pid file:
/opt/stack/
means self.pid_file defined in class OpenSwanProcess is wrong.
and in the function def _cleanup_
if the pluto.pid not been deleted, when we start neutron-l3-agent, we will get an error, pluto.pid exists, and the pluto process will fail to start.
Yes, the current code (since 2015) states: netns.execute(
[ns_ wrapper,
' --mount_ paths=/ etc:%s/ etc,%s: %s/var/ run' % (
self. config_ dir, self._strongswa n_piddir, self.config_dir),
( '--rootwrap_ config= %s' % self._rootwrap_cfg
' --cmd=% s' % ','.join(cmd)],
return ip_wrapper.
if self._rootwrap_cfg else ''),
--
But it should be /run not /var/run but due to legacy we can't say if /var/run should be removed...
Would something like this work: vpnaas/ services/ vpn/device_ drivers/ strongswan_ ipsec.py vpnaas/ services/ vpn/device_ drivers/ strongswan_ ipsec.py ss(ipsec. BaseSwanProcess ): ns_wrapper( ) netns.execute(
[ ns_wrapper, paths=/ etc:%s/ etc,%s: %s/var/ run' % ( n_piddir, self.config_dir), paths=/ etc:%s/ etc,%s: %s/var/ run,%s: %s/run' % ( n_piddir, self.config_dir, self._strongswa n_piddir, self.config_dir),
('--rootwrap_ config= %s' % self._rootwrap_cfg
if self._rootwrap_cfg else ''),
'--cmd= %s' % ','.join(cmd)],
--- a/neutron_
+++ b/neutron_
@@ -113,8 +113,8 @@ class StrongSwanProce
ns_wrapper = self.get_
return ip_wrapper.
- '--mount_
- self.config_dir, self._strongswa
+ '--mount_
+ self.config_dir, self._strongswa
---
Completely untested.