compute get_server_ip() should have detailed server object

Bug #1817701 reported by Yang Youseok on 2019-02-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Medium
Yang Youseok

Bug Description

in tempest/api/compute/servers/test_server_actions.py, test_resize_volume_backed_server_confirm()

get_server_ip() accept server object which has 'addresses' field. But the passed server object is returned value from create(POST) API which does not have 'addresses' field.

At result, this test case failed emitting KeyError like below.

=============================
Failed 1 test - output below:
=============================

tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_resize_volume_backed_server_confirm
--------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "tempest/lib/decorators.py", line 112, in wrapper
    raise exc
KeyError: 'addresses'

======
Totals
======

Ran: 1 tests in 44.858 sec.
 - Success: 0
 - Skipped: 0
 - Expected failures: 0
 - Unexpected success: 0
 - Failures: 1

Furthermore, this test case also has another bug in that it was trying to validate server which was made without validation related flag (validatable,validation_resources). SSH connection was not completed since it does not have keypair (RemoteClient has no password so keypair is only way to be used)

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

Changed in tempest:
assignee: nobody → Yang Youseok (ileixe)
status: New → In Progress
Yang Youseok (ileixe) wrote :

I run test with 18.0.0 and one case failed. But seems to be more failed test cases at master with same reason.

Ghanshyam Mann (ghanshyammann) wrote :

Yeah, there are issue in few cases. I thought we always get complete server response and then pass it to get_server_ip.

None of the gate job run test with fixed_ip as connect_method where get_server_ip method use the addresses from server response. While grep into whole code, along with test_server_actions.py, I found few more place which need similar fix

- https://github.com/openstack/tempest/blob/91d92424bc49350ee6eff8dce0c6eb3fd18d8fb0/tempest/api/compute/servers/test_attach_interfaces.py

-https://github.com/openstack/tempest/blob/1b43d266102735617e226152b66b8dbdecf1c759/tempest/api/compute/servers/test_server_actions.py#L104

- https://github.com/openstack/tempest/blob/1b43d266102735617e226152b66b8dbdecf1c759/tempest/api/compute/servers/test_device_tagging.py#L370

Changed in tempest:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers