The default value of IPv6 RA and address modes is None (if they are not specified when the subnet is created).
However, we cannot change IPv6 two modes to None from other values after creating a subnet.
(ra_mode address_mode) = (None, None) is a valid combinaiton, but for example we cannot change them from (slaac, slaac) to (none, none).
IMO IPv6 two modes should accept None in API to allow users to reset the attribute value to None.
ubuntu@dev02:~/neutron (master)$ neutron subnet-show 4ab34962-b330-4be5-98fe-ac7862f8d511
+-------------------+---------------------------------------------------------------------------+
| Field | Value |
+-------------------+---------------------------------------------------------------------------+
| allocation_pools | {"start": "fe80:8888::2", "end": "fe80:8888:ff:ffff:ffff:ffff:ffff:fffe"} |
| cidr | fe80:8888::/40 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | fe80:8888::1 |
| host_routes | |
| id | 4ab34962-b330-4be5-98fe-ac7862f8d511 |
| ip_version | 6 |
| ipv6_address_mode | slaac |
| ipv6_ra_mode | slaac |
| name | |
| network_id | 07315dce-0c6c-4c2f-99ec-e8575ffa72af |
| tenant_id | 36c29390faa8408cb9deff8762319740 |
+-------------------+---------------------------------------------------------------------------+
ubuntu@dev02:~/neutron (master)$ neutron subnet-update 4ab34962-b330-4be5-98fe-ac7862f8d511 --ipv6_ra_mode action=clear --ipv6_address_mode action=clear
Invalid input for ipv6_ra_mode. Reason: 'None' is not in ['dhcpv6-stateful', 'dhcpv6-stateless', 'slaac']. (HTTP 400) (Request-ID: req-9431df59-3881-4c85-861e-b25217b8013d)
python- neutronclient is indeed making a call to Neutron Server with ipv6_ra_mode and ipv6_address_mode set to None and the error is seen on the Neutron Server. So, looks like we may not need any changes in neutronclient.
Error on Neutron Server (q-svc.log) api.v2. resource [req-a3a19ccf- cecc-410b- b7fb-05e34cec2d 7a demo e90083df0cfe4ef caf33133601bf90 c4] update failed api.v2. resource Traceback (most recent call last): api.v2. resource File "/opt/stack/ neutron/ neutron/ api/v2/ resource. py", line 87, in resource api.v2. resource result = method( request= request, **args) api.v2. resource File "/opt/stack/ neutron/ neutron/ api/v2/ base.py" , line 501, in update api.v2. resource allow_bulk= self._allow_ bulk) api.v2. resource File "/opt/stack/ neutron/ neutron/ api/v2/ base.py" , line 640, in prepare_ request_ body api.v2. resource raise webob.exc. HTTPBadRequest( msg) api.v2. resource HTTPBadRequest: Invalid input for ipv6_ra_mode. Reason: 'None' is not in ['dhcpv6-stateful', 'dhcpv6-stateless', 'slaac']. api.v2. resource
2014-10-03 16:08:27.121 ERROR neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
2014-10-03 16:08:27.121 TRACE neutron.
Error reported in python- neutronclient: cecc-410b- b7fb-05e34cec2d 7a)
Bad Request (HTTP 400) (Request-ID: req-a3a19ccf-
Once the problem is addressed in Neutron, we would not see the error on the client.