[R3.1-build-13]: Updating the dns server address for existing subnet through api should throw error if DNS does not get updated

Bug #1609277 reported by alok kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Won't Fix
High
Atul Moghe
R3.2
Fix Committed
High
Atul Moghe
Trunk
Fix Committed
High
Atul Moghe

Bug Description

Updating the DNS for subnet may not be allowed just like gateway.
But if we try to update the dns through vnc api, it does NOT throw any error, however dns does not get updated.

new dns server(0.0.0.0) was seen in PUT request to api but it's not updated and does not throw any error.

(Pdb) print vn_obj.network_ipam_refs[0]['attr'].ipam_subnets[0].__dict__
{'subnet': <vnc_api.gen.resource_xsd.SubnetType object at 0x7f2efbc7ca50>, 'addr_from_start': True, 'enable_dhcp': True, 'default_gateway': u'176.105.34.1', 'alloc_unit': 1, 'dns_nameservers': [], 'dhcp_option_list': None, 'subnet_uuid': u'5afcae06-fea0-4ba0-84e8-02c1a90c27ae', 'allocation_pools': [], 'host_routes': None, 'dns_server_address': '0.0.0.0', 'subnet_name': u''}
(Pdb) self.vnc_lib_h.virtual_network_update(vn_obj)
u'{"virtual-network": {"href": "http://10.204.217.104:8082/virtual-network/a79939c9-04fe-4d87-9fd5-0981308c5692", "uuid": "a79939c9-04fe-4d87-9fd5-0981308c5692"}}'

2016 Aug 03 12:33:09.783174 nodec64 [Config:contrail-api:0:__default__][SYS_INFO] : VncApiConfigLog:290 [VncApiCommon: identifier_uuid = a79939c9-04fe-4d87-9fd5-0981308c5692, object_type = virtual_network, identifier_name = default-domain:ctest-DisablePolicyEcmp-96635670:ctest-ctest-DisablePolicyEcmp-96635670-12148927, url = http://10.204.217.104:8082/virtual-network/a79939c9-04fe-4d87-9fd5-0981308c5692, operation = put, useragent = nodec64:/usr/local/lib/python2.7/dist-packages/testtools/run.py, remote_ip = 10.204.217.104:8082, body = {"virtual-network": {"network_ipam_refs": [{"to": ["default-domain", "default-project", "default-network-ipam"], "attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "176.105.34.0", "ip_prefix_len": 24}, "addr_from_start": true, "enable_dhcp": true, "default_gateway": "176.105.34.1", "dns_nameservers": [], "alloc_unit": 1, "subnet_uuid": "5afcae06-fea0-4ba0-84e8-02c1a90c27ae", "dhcp_option_list": null, "host_routes": null, "dns_server_address": "0.0.0.0", "subnet_name": "", "allocation_pools": []}], "host_routes": null}, "uuid": "7deb94c4-885d-4fe0-860e-de356e49e43f"}], "uuid": "a79939c9-04fe-4d87-9fd5-0981308c5692"}}, domain = default-domain, project = ctest-DisablePolicyEcmp-96635670, user = DisablePolicyEcmp]
2016 Aug 03 12:33:09.792236 nodec64 [Config:contrail-api:0:__default__][SYS_INFO] : VncApiStatsLog:4909 [VncApiStats: operation_type = PUT, user = DisablePolicyEcmp, useragent = nodec64:/usr/local/lib/python2.7/dist-packages/testtools/run.py, remote_ip = 10.204.217.104:8082, domain_name = default-domain, project_name = ctest-DisablePolicyEcmp-96635670, object_type = virtual_network, response_time_in_usec = 11823, response_size = 160, resp_code = 200]

Tags: config
alok kumar (kalok)
information type: Proprietary → Public
Revision history for this message
Atul Moghe (moghea) wrote :

actively working to fix this along with gw_ip update block..

Revision history for this message
Atul Moghe (moghea) wrote :

it got fixed with this commit:
https://review.opencontrail.org/#/c/29937/

Revision history for this message
Atul Moghe (moghea) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.