[regression] Tempest test test_host_name_is_same_as_server_name is failed

Bug #1616365 reported by Sofiia Andriichenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Oleksiy Butenko

Bug Description

Detailed bug description:
9.1 snapshot #173

Configuration:
    ISO: http://paste.openstack.org/show/495771/
  Settings:
  Compute - QEMU.
  Network - Neutron with VLAN segmentation.
  Storage Backends - LVM
  Additional services - Install Ironic

  In tab Settings->Compute check Nova quotas
  In tab Settings->OpenStack Services check enable Install Ceilometer and Aodh
  In tab Networks->Other check enable Neutron DVR

Nodes: controller, compute, ironic,cinder, Telemetry - MongoDB

Steps to reproduce:
    1. Deploy ISO in configuration see (Detailed bug description)
    2. Navigate to controller node
    3. Install git (use apt-get install git)
    4. Clone script to deploy rally + tempest
       # git clone https://github.com/obutenko/mos-rally-verify.git
    5. Navigate to the https://github.com/obutenko/mos-rally-verify
    6. Execute necessary steps to deploy tempest
    7. Tun test in debug mode
        #rally --debug verify start --regex tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name

Expected results:
Test is passed

Actual result:
Test is Failed
(see comments)

Reproducibility:
See attachment

Workaround:
---

Impact:
---

Description of the environment:
See (Detailed bug description)

Additional information:
Traceback (most recent call last):
  File "/home/rally/.rally/tempest/for-deployment-f9995934-7294-491f-88d4-012506be5ca1/tempest/api/compute/servers/test_create_server.py", line 142, in test_host_name_is_same_as_server_name
    self.assertEqual(self.name, hostname, msg)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = 'tempest-ServersTestJSON-server-1484779575'
actual = u'tempest-serverstestjson-server-1484779575'
: Failed while verifying servername equals hostname. Expected hostname "tempest-ServersTestJSON-server-1484779575" but got "tempest-serverstestjson-server-1484779575".

Revision history for this message
Sofiia Andriichenko (sandriichenko) wrote :
Revision history for this message
Alexander Gubanov (ogubanov) wrote :

The problem is that we expected hostname with capital letters.

As I know DNS or name in /etc/hostname are insensetive:

http://www.ietf.org/rfc/rfc1035.txt
2.3.1. Preferred name syntax
Note that while upper and lower case letters are allowed in domain
names, no significance is attached to the case. That is, two names with
the same spelling but different case are to be treated as if identical."

So, we just can apply lower() method here
https://github.com/openstack/tempest/blob/master/tempest/api/compute/servers/test_create_server.py#L142

However, it is worked before and was broken on 9.x snapshot #169
https://mirantis.testrail.com/index.php?/tests/view/14007006&group_by=cases:section_id&group_order=asc&group_id=49560

It's easy to reproduce - just boot new instance with capital letters in name.

I guess, it's not clound-init problem (because I got hostname in lowercase for few images) and replated to Nova

default cirros image: http://pastebin.com/B8T4Q3A9
ubuntu image: http://pastebin.com/bPw7s8yb

Changed in mos:
status: New → Confirmed
stgleb (gstepanov)
Changed in mos:
assignee: MOS QA Team (mos-qa) → stgleb (gstepanov)
summary: - Tempes test test_host_name_is_same_as_server_name is failed
+ Tempest test test_host_name_is_same_as_server_name is failed
Changed in mos:
assignee: stgleb (gstepanov) → nobody
assignee: nobody → MOS Nova (mos-nova)
summary: - Tempest test test_host_name_is_same_as_server_name is failed
+ [regression] Tempest test test_host_name_is_same_as_server_name is
+ failed
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Hi MOS Nova team, could you please check the issue and provide a fix?
It looks like it is easy to reproduce the issue.

Revision history for this message
Andrew Laski (alaski) wrote :

I believe the Tempest test is invalid. Nova has lowercased hostnames since 2011 https://review.openstack.org/#/c/1484/ . And that Tempest test is not run at all in upstream jobs because CONF.validation.run_validation is always set to False in all jobs I checked. So I think it's a bad test and nobody noticed.

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

QA team, please see the Andrew's comment above.

Oleksii Butenko just mentioned to me, that https://github.com/openstack/tempest/commit/c6ce539647f569caef19b44a339ba3ad68f2724f was merged to Tempest recently, which most likely caused this failure.

Changed in mos:
assignee: MOS Nova (mos-nova) → MOS QA Team (mos-qa)
Changed in mos:
assignee: MOS QA Team (mos-qa) → Oleksiy Butenko (obutenko)
Revision history for this message
Oleksiy Butenko (obutenko) wrote :
Changed in mos:
status: Confirmed → Invalid
status: Invalid → In Progress
Revision history for this message
Oleksiy Butenko (obutenko) wrote :

https://review.openstack.org/#/c/363646/ - Change has been successfully merged into the git repository by Jenkins

Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Oleksiy Butenko (obutenko) wrote :

test_host_name_is_same_as_server_name[id-ac1ad47f-984b-4441-9274-c9079b7a0666] - pass
9.1 snapshot #221

Changed in mos:
status: Fix Committed → Fix Released
Revision history for this message
Alexander Gubanov (ogubanov) 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.