Changes to the Neutron L3 agent to port it to Solaris. These changes
will eventually be proposed upstream.
--- neutron-2015.1.2/neutron/agent/l3_agent.py.~1~ 2015-10-13 10:35:16.000000000 -0700
+++ neutron-2015.1.2/neutron/agent/l3_agent.py 2016-01-28 23:07:42.233773807 -0800
@@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import platform
import sys
from oslo_config import cfg
@@ -46,6 +47,8 @@ def main(manager='neutron.agent.l3.agent
register_opts(cfg.CONF)
+ if platform.system() == "SunOS":
+ manager = 'neutron.agent.evs_l3_agent.EVSL3NATAgent'
server = neutron_service.Service.create(
binary='neutron-l3-agent',
topic=topics.L3_AGENT,
--- neutron-2015.1.2/neutron/agent/linux/daemon.py.~1~ 2015-10-13 10:35:16.000000000 -0700
+++ neutron-2015.1.2/neutron/agent/linux/daemon.py 2016-01-28 23:07:42.234372590 -0800
@@ -18,12 +18,14 @@ import grp
import logging as std_logging
from logging import handlers
import os
+import platform
import pwd
import signal
import sys
from oslo_log import log as logging
+from neutron.agent.linux import utils
from neutron.common import exceptions
from neutron.i18n import _LE, _LI
@@ -140,6 +142,15 @@ class Pidfile(object):
if not pid:
return False
+ if platform.system() == "SunOS":
+ cmd = ['/usr/bin/pargs', pid]
+ try:
+ exec_out = utils.execute(cmd)
+ except RuntimeError:
+ return False
+ return self.procname in exec_out and (not self.uuid or
+ self.uuid in exec_out)
+
cmdline = '/proc/%s/cmdline' % pid
try:
with open(cmdline, "r") as f:
--- neutron-2015.1.2/neutron/common/ipv6_utils.py.~1~ 2015-10-13 10:35:16.000000000 -0700
+++ neutron-2015.1.2/neutron/common/ipv6_utils.py 2016-01-28 23:28:34.771113032 -0800
@@ -17,6 +17,7 @@
IPv6-related utilities and helper functions.
"""
import os
+import platform
import netaddr
from oslo_log import log
@@ -51,6 +52,11 @@ def get_ipv6_addr_by_EUI64(prefix, mac):
def is_enabled():
global _IS_IPV6_ENABLED
+ if platform.system() == "SunOS":
+ if _IS_IPV6_ENABLED is None:
+ _IS_IPV6_ENABLED = True
+ return _IS_IPV6_ENABLED
+
if _IS_IPV6_ENABLED is None:
disabled_ipv6_path = "/proc/sys/net/ipv6/conf/default/disable_ipv6"
if os.path.exists(disabled_ipv6_path):