Invalid neutron agent validations - cause of occasiona neutron failure

Bug #1268293 reported by Gary Kotton on 2014-01-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Undecided
Unassigned

Bug Description

The neutron validations for agents would not take the timestamp into account, that is, when the classi is created it would record the first agent, then would later check if this agent is in the list of agents. This would fail because of the the agent timestampe

ft76.1: tempest.api.network.admin.test_agent_management.AgentManagementTestXML.test_list_agent[gate,smoke]_StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2014-01-12 11:51:20,597 Request: GET http://127.0.0.1:9696//v2.0/agents
2014-01-12 11:51:20,597 Request Headers: {'Content-Type': 'application/xml', 'Accept': 'application/xml', 'X-Auth-Token': '<Token omitted>'}
2014-01-12 11:51:20,630 Response Status: 200
2014-01-12 11:51:20,630 Response Headers: {'content-length': '4128', 'content-location': u'http://127.0.0.1:9696//v2.0/agents', 'date': 'Sun, 12 Jan 2014 11:51:20 GMT', 'content-type': 'application/xml; charset=UTF-8', 'connection': 'close'}
2014-01-12 11:51:20,630 Response Body: <?xml version='1.0' encoding='UTF-8'?>
<agents xmlns="http://openstack.org/quantum/api/v2.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><agent><binary>neutron-lbaas-agent</binary><description /><admin_state_up quantum:type="bool">True</admin_state_up><heartbeat_timestamp>2014-01-12 11:51:20</heartbeat_timestamp><alive quantum:type="bool">True</alive><id>1cb58119-562b-4a70-ab58-c08a760eabe2</id><topic>n-lbaas_agent</topic><host>devstack-precise-rax-ord-1067734.slave.openstack.org</host><agent_type>Loadbalancer agent</agent_type><started_at>2014-01-12 11:39:00</started_at><created_at>2014-01-12 11:39:00</created_at><configurations><device_drivers><device_driver>haproxy_ns</device_driver></device_drivers><instances quantum:type="int">0</instances></configurations></agent><agent><binary>neutron-metadata-agent</binary><description xsi:nil="true" /><admin_state_up quantum:type="bool">True</admin_state_up><heartbeat_timestamp>2014-01-12 11:51:20</heartbeat_timestamp><alive quantum:type="bool">True</alive><id>27f1aebd-5e2b-4d8e-a7ae-1f0a28ab3d42</id><topic>N/A</topic><host>devstack-precise-rax-ord-1067734.slave.openstack.org</host><agent_type>Metadata agent</agent_type><started_at>2014-01-12 11:39:00</started_at><created_at>2014-01-12 11:39:00</created_at><configurations><nova_metadata_port quantum:type="int">8775</nova_metadata_port><nova_metadata_ip>127.0.0.1</nova_metadata_ip><metadata_proxy_socket>/opt/stack/data/neutron/metadata_proxy</metadata_proxy_socket></configurations></agent><agent><binary>neutron-dhcp-agent</binary><description xsi:nil="true" /><admin_state_up quantum:type="bool">True</admin_state_up><heartbeat_timestamp>2014-01-12 11:51:20</heartbeat_timestamp><alive quantum:type="bool">True</alive><id>33a44be2-5bd1-40e0-aca0-ca1472376d37</id><topic>dhcp_agent</topic><host>devstack-precise-rax-ord-1067734.slave.openstack.org</host><agent_type>DHCP agent</agent_type><started_at>2014-01-12 11:39:00</started_at><created_at>2014-01-12 11:39:00</cr
2014-01-12 11:51:20,631 Large body (4128) md5 summary: 3578af2a4bb8baa463bb8b1f91e57827
}}}

Traceback (most recent call last):
  File "tempest/api/network/admin/test_agent_management.py", line 37, in test_list_agent
    self.assertIn(self.agent, agents)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 330, in assertIn
    self.assertThat(haystack, Contains(needle))
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 414, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: {'binary': 'neutron-lbaas-agent', 'description': {}, 'admin_state_up': 'True', 'heartbeat_timestamp': '2014-01-12 11:51:16', 'alive': 'True', 'topic': 'n-lbaas_agent', 'host': 'devstack-precise-rax-ord-1067734.slave.openstack.org', 'agent_type': 'Loadbalancer agent', 'created_at': '2014-01-12 11:39:00', 'started_at': '2014-01-12 11:39:00', 'id': '1cb58119-562b-4a70-ab58-c08a760eabe2', 'configurations': {'device_drivers': {'device_driver': 'haproxy_ns'}, 'instances': '0'}} not in [{'binary': 'neutron-lbaas-agent', 'description': {}, 'admin_state_up': 'True', 'heartbeat_timestamp': '2014-01-12 11:51:20', 'alive': 'True', 'topic': 'n-lbaas_agent', 'host': 'devstack-precise-rax-ord-1067734.slave.openstack.org', 'agent_type': 'Loadbalancer agent', 'created_at': '2014-01-12 11:39:00', 'started_at': '2014-01-12 11:39:00', 'id': '1cb58119-562b-4a70-ab58-c08a760eabe2', 'configurations': {'device_drivers': {'device_driver': 'haproxy_ns'}, 'instances': '0'}}, {'binary': 'neutron-metadata-agent', 'description': {'{http://www.w3.org/2001/XMLSchema-instance}nil': 'true'}, 'admin_state_up': 'True', 'heartbeat_timestamp': '2014-01-12 11:51:20', 'alive': 'True', 'topic': 'N/A', 'host': 'devstack-precise-rax-ord-1067734.slave.openstack.org', 'agent_type': 'Metadata agent', 'created_at': '2014-01-12 11:39:00', 'started_at': '2014-01-12 11:39:00', 'id': '27f1aebd-5e2b-4d8e-a7ae-1f0a28ab3d42', 'configurations': {'nova_metadata_ip': '127.0.0.1', 'nova_metadata_port': '8775', 'metadata_proxy_socket': '/opt/stack/data/neutron/metadata_proxy'}}, {'binary': 'neutron-dhcp-agent', 'description': {'{http://www.w3.org/2001/XMLSchema-instance}nil': 'true'}, 'admin_state_up': 'True', 'heartbeat_timestamp': '2014-01-12 11:51:20', 'alive': 'True', 'topic': 'dhcp_agent', 'host': 'devstack-precise-rax-ord-1067734.slave.openstack.org', 'agent_type': 'DHCP agent', 'created_at': '2014-01-12 11:39:00', 'started_at': '2014-01-12 11:39:00', 'id': '33a44be2-5bd1-40e0-aca0-ca1472376d37', 'configurations': {'subnets': '1', 'use_namespaces': 'True', 'dhcp_lease_duration': '86400', 'dhcp_driver': 'neutron.agent.linux.dhcp.Dnsmasq', 'networks': '1', 'ports': '2'}}, {'binary': 'neutron-l3-agent', 'description': {'{http://www.w3.org/2001/XMLSchema-instance}nil': 'true'}, 'admin_state_up': 'True', 'heartbeat_timestamp': '2014-01-12 11:51:16', 'alive': 'True', 'topic': 'l3_agent', 'host': 'devstack-precise-rax-ord-1067734.slave.openstack.org', 'agent_type': 'L3 agent', 'created_at': '2014-01-12 11:39:00', 'started_at': '2014-01-12 11:39:00', 'id': '7063bb39-037d-4802-ab6c-ca56ac10e8f7', 'configurations': {'router_id': {}, 'gateway_external_network_id': {}, 'handle_internal_only_routers': 'True', 'use_namespaces': 'True', 'routers': '1', 'interfaces': '1', 'floating_ips': '0', 'interface_driver': 'neutron.agent.linux.interface.OVSInterfaceDriver', 'ex_gw_ports': '1'}}, {'binary': 'neutron-openvswitch-agent', 'description': {'{http://www.w3.org/2001/XMLSchema-instance}nil': 'true'}, 'admin_state_up': 'True', 'heartbeat_timestamp': '2014-01-12 11:51:16', 'alive': 'True', 'topic': 'N/A', 'host': 'devstack-precise-rax-ord-1067734.slave.openstack.org', 'agent_type': 'Open vSwitch agent', 'created_at': '2014-01-12 11:39:00', 'started_at': '2014-01-12 11:39:00', 'id': 'c4a3355f-d89a-440f-9883-183bb707dc9e', 'configurations': {'tunnel_types': {'{http://openstack.org/quantum/api/v2.0}type': 'list'}, 'tunneling_ip': '23.253.62.176', 'bridge_mappings': {'{http://openstack.org/quantum/api/v2.0}type': 'dict'}, 'l2_population': 'False', 'devices': '3'}}]

Fix proposed to branch: master
Review: https://review.openstack.org/66190

Changed in tempest:
assignee: nobody → Gary Kotton (garyk)
status: New → In Progress
Henry Gessau (gessau) wrote :

Duplicate of Bug #1261814 ?

Yaroslav Lobankov (ylobankov) wrote :

Henry, it looks like you are right. This bug and bug #1261814 are duplicated.

Changed in tempest:
assignee: Gary Kotton (garyk) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers