health-monitor show doesn't list the LB pools it is associated with

Bug #1376129 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R1.1
Fix Committed
High
Rudra Rugge
Trunk
Fix Committed
High
Rudra Rugge

Bug Description

R1.10 44

In the below tempest test, a HM is associated with a LB and a show of HM is expected to show the pool it is associated with.

----------------------------------------------------------------------
ERROR: tempest.api.network.test_load_balancer.LoadBalancerTestXML.test_associate_disassociate_health_monitor_with_pool[gate,smoke]
----------------------------------------------------------------------
pythonlogging:'': {{{
2014-10-01 12:17:14,857 Request (LoadBalancerTestXML:test_associate_disassociate_health_monitor_with_pool): 201 POST http://10.204.216.
47:9696/v2.0/lb/pools/b519f0af-20dc-4e5e-9bfb-c886e9e4c52a/health_monitors 0.061s
2014-10-01 12:17:14,886 Request (LoadBalancerTestXML:test_associate_disassociate_health_monitor_with_pool): 200 GET http://10.204.216.4
7:9696/v2.0/lb/health_monitors/45ffc276-6e08-4529-987b-12b49840a2e9 0.026s
2014-10-01 12:17:14,934 Request (LoadBalancerTestXML:test_associate_disassociate_health_monitor_with_pool): 200 GET http://10.204.216.4
7:9696/v2.0/lb/pools/b519f0af-20dc-4e5e-9bfb-c886e9e4c52a 0.046s
}}}

Traceback (most recent call last):
  File "tempest/api/network/test_load_balancer.py", line 359, in test_associate_disassociate_health_monitor_with_pool
    [p['pool_id'] for p in health_monitor['pools']])
KeyError: 'pools'

test code :
==========
    def test_associate_disassociate_health_monitor_with_pool(self):
        # Verify that a health monitor can be associated with a pool
        resp, body = (self.client.associate_health_monitor_with_pool
                     (self.health_monitor['id'], self.pool['id']))
        self.assertEqual('201', resp['status'])
        resp, body = self.client.show_health_monitor(
            self.health_monitor['id'])
        health_monitor = body['health_monitor']
        resp, body = self.client.show_pool(self.pool['id'])
        pool = body['pool']
        import pdb; pdb.set_trace()
        self.assertIn(pool['id'],
                      [p['pool_id'] for p in health_monitor['pools']])

(Pdb) print health_monitor
{'status': 'ACTIVE', 'admin_state_up': True, 'tenant_id': '32d178568cbb4c2d94b0b4361cd7842e', 'delay': 4, 'expected_codes': '200', 'max_retries': 3, 'http_method': 'GET', 'timeout': 1, 'url_path': '/', 'type': 'TCP', 'id': '2cbdc5d8-026f-4acd-a711-579dac9b9b67'}
(Pdb) print self.health_monitor['id']
2cbdc5d8-026f-4acd-a711-579dac9b9b67
(Pdb)

Revision history for this message
Rudra Rugge (rrugge) 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.