DNS domain name update test give KeyError

Bug #1762369 reported by abhishek tiwary
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Slawek Kaplonski

Bug Description

neutron.tests.tempest.api.test_ports.PortsTestJSON.test_create_update_port_with_dns_domain tes is failing.Below is the traceback.

Environment : Openstack pike version

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/common/utils/__init__.py", line 108, in wrapper
    return func(*func_args, **func_kwargs)
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/api/test_ports.py", line 111, in test_create_update_port_with_dns_domain
    self.assertEqual('d.org.', body['dns_domain'])
KeyError: 'dns_domain'

It is failing since 111 line in neutron/neutron/tests/tempest/api/test_ports.py has error:

    108 body = self.client.update_port(body['id'],
    109 dns_name='d2', dns_domain='d.org.')
    110 self.assertEqual('d2', body['port']['dns_name'])
    111 self.assertEqual('d.org.', body['dns_domain'])

The response of test_create_update_port_with_dns_domain is below. 'dns_domain' comes under port.

2018-04-09 02:29:16.096 27142 DEBUG tempest.lib.common.rest_client [req-c1573c7a-4809-4abd-8bc7-ec6f6201fc41 ] Request - Headers: {'X-Auth-Token': '<omitted>'}
        Body: {"port": {"dns_name": "d2", "dns_domain": "d.org."}}
    Response - Headers: {'status': '200', u'content-length': '848', 'content-location': 'http://172.16.0.118:9696/v2.0/ports/60d595d5-d196-4044-a791-5f402187f8a4', u'date': 'Mon, 09 Apr 2018 02:29:16 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-c1573c7a-4809-4abd-8bc7-ec6f6201fc41'}
        Body: {
            "port": {
                "allowed_address_pairs": [],
                "extra_dhcp_opts": [],
                "updated_at": "2018-04-09T02:29:15Z",
                "dns_domain": "d.org.",
                "device_owner": "",
                "revision_number": 6,
                "port_security_enabled": true,
                "fixed_ips": [{
                        "subnet_id": "70569352-f1d8-4a7e-b574-be59690ba82d",
                        "ip_address": "10.100.0.6"
                    }
                ],
                "id": "60d595d5-d196-4044-a791-5f402187f8a4",
                "security_groups": ["e5a97e2b-000f-45d5-ba67-7e018aef1de7"],
                "qos_policy_id": null,
                "mac_address": "fa:16:3e:bd:00:35",
                "project_id": "0f45914cbe9645c4a3ae8e5be462275b",
                "status": "DOWN",
                "description": "",
                "tags": [],
                "dns_assignment": [{
                        "hostname": "d2",
                        "ip_address": "10.100.0.6",
                        "fqdn": "d2.openstackgate.local."
                    }
                ],
                "device_id": "",
                "name": "",
                "admin_state_up": true,
                "network_id": "e8480305-7af5-4a90-809e-7d4c3330db91",
                "dns_name": "d2",
                "created_at": "2018-04-09T02:29:14Z",
                "binding:vnic_type": "normal",
                "tenant_id": "0f45914cbe9645c4a3ae8e5be462275b"

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

It is exactly the same in master branch in neutron_tempest_plugin repo: https://github.com/openstack/neutron-tempest-plugin/blob/7681a5cf5769211dc355e2bf8cd7499795f6de22/neutron_tempest_plugin/api/test_ports.py#L111
and I think that it's not failing only because it's skipped in gate job probably

affects: tempest → neutron
Changed in neutron:
status: New → Confirmed
Changed in neutron:
importance: Undecided → Low
assignee: nobody → Slawek Kaplonski (slaweq)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/575805

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

neutron_tempest_plugin patch: https://review.openstack.org/#/c/575726/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/pike)

Reviewed: https://review.openstack.org/575805
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=74a8a70c6864f8445918eff73587045d9c09f9ce
Submitter: Zuul
Branch: stable/pike

commit 74a8a70c6864f8445918eff73587045d9c09f9ce
Author: Slawek Kaplonski <email address hidden>
Date: Fri Jun 15 19:41:31 2018 +0200

    Enable dns_domain_ports extension in tempest config

    This patch adds missing dns-domain-ports extension to tempest
    config to not skip related tests.

    It also fixes small issue with getting port's dns_domain attribute
    from update port response's body.

    Closes-Bug: #1762369

    Change-Id: I770900b9a3a9efe229b375e2acdf4ddf72f7ed04

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.6

This issue was fixed in the openstack/neutron 11.0.6 release.

Changed in neutron:
status: Confirmed → Fix Released
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.