21306943 IP address prefix length is not being set in the network/install service profile s11u2-sru
authorsaurabh.vyas@oracle.com
Thu, 25 Jun 2015 13:27:37 -0700
branchs11u2-sru
changeset 4686 27b24e7a4997
parent 4685 da890a7f6af0
child 4687 4604da308115
21306943 IP address prefix length is not being set in the network/install service profile 21309060 Zone is not configured with IPv6 default address for DHCP disabled subnets
components/openstack/nova/files/solariszones/driver.py
components/openstack/nova/files/solariszones/sysconfig.py
--- a/components/openstack/nova/files/solariszones/driver.py	Wed Jul 22 02:28:56 2015 -0700
+++ b/components/openstack/nova/files/solariszones/driver.py	Thu Jun 25 13:27:37 2015 -0700
@@ -1032,6 +1032,8 @@
             evs_uuid = port['network_id']
             vport_uuid = port['id']
             ip = network['network']['subnets'][0]['ips'][0]['address']
+            ip_plen = network['network']['subnets'][0]['cidr'].split('/')[1]
+            ip = '/'.join([ip, ip_plen])
             ip_version = network['network']['subnets'][0]['version']
             route = network['network']['subnets'][0]['gateway']['address']
             dns_list = network['network']['subnets'][0]['dns']
--- a/components/openstack/nova/files/solariszones/sysconfig.py	Wed Jul 22 02:28:56 2015 -0700
+++ b/components/openstack/nova/files/solariszones/sysconfig.py	Thu Jun 25 13:27:37 2015 -0700
@@ -1,6 +1,6 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    not use this file except in compliance with the License. You may obtain
@@ -49,6 +49,11 @@
     instance = etree.SubElement(install, "instance", enabled="true",
                                 name="default")
 
+    if not route:
+        # network/install SMF method script checks for ::0 for IPv6
+        # for no-gateway case
+        route = '0.0.0.0' if ip_version == 4 else '::0'
+
     if ip_version == 4:
         pg4 = etree.SubElement(instance, "property_group",
                                type="ipv4_interface",
@@ -89,6 +94,8 @@
                              name="static_address", value=ip)
             etree.SubElement(pg6, "propval", type="astring", name="name",
                              value="%s/v6" % linkname)
+            etree.SubElement(pg6, "propval", type="net_address_v6",
+                             name="default_route", value=route)
         else:
             pg6 = etree.SubElement(instance, "property_group",
                                    type="ipv6_interface",