oslo config generator does not handle a random python hash seed

Bug #1365136 reported by Adam Gandelman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Jon Grimm

Bug Description

The upgrade tox to 1.7.2 and defaulting PYTHONHASHSEED=random caused many problems for Tempest. Up until now we've been running all tests with PYTHONHASHSEED=0 but have been slowly working on enabling gate runs to use a random seed. In addition to the bugs in Tempest itself, we notice that the pep8 check occasionally fails due to config file diffs found by the check_uptodate.sh script. These only appear when running the tox pep8 testenv with PYHTONHASHSEED=random:

$ tox -e pep8
pep8 develop-inst-noop: /opt/stack/tempest
pep8 runtests: PYTHONHASHSEED='1380597196'
pep8 runtests: commands[0] | flake8
pep8 runtests: commands[1] | /opt/stack/tempest/tools/config/check_uptodate.sh
--- /tmp/tempest.0fUbNM/tempest.conf.sample 2014-09-03 12:57:30.383111441 -0700
+++ etc/tempest.conf.sample 2014-09-03 12:20:10.679091009 -0700
@@ -229,6 +229,12 @@
 # Options defined in tempest.config
 #

+# Allows test cases to create/destroy tenants and users. This
+# option enables isolated test cases and better parallel
+# execution, but also requires that OpenStack Identity API
+# admin credentials are known. (boolean value)
+#allow_tenant_isolation=false
+
 # Valid primary image reference to be used in tests. This is a
 # required option (string value)
 #image_ref=<None>
@@ -259,6 +265,9 @@
 # alternate image. (string value)
 #image_alt_ssh_password=password

+# Time in seconds between build status checks. (integer value)
+#build_interval=1
+
 # Timeout in seconds to wait for an instance to build.
 # (integer value)
 #build_timeout=300
@@ -347,6 +356,15 @@
 # value)
 #floating_ip_range=10.0.0.0/29

+# Allows test cases to create/destroy tenants and users. This
+# option enables isolated test cases and better parallel
+# execution, but also requires that OpenStack Identity API
+# admin credentials are known. (boolean value)
+#allow_tenant_isolation=false
+
+# Time in seconds between build status checks. (integer value)
+#build_interval=1
+

 [compute-admin]

@@ -832,15 +850,6 @@
 # Options defined in tempest.config
 #

-# Allows test cases to create/destroy tenants and users. This
-# option enables isolated test cases and better parallel
-# execution, but also requires that OpenStack Identity API
-# admin credentials are known. (boolean value)
-#allow_tenant_isolation=false
-
-# Time in seconds between build status checks. (integer value)
-#build_interval=1
-
 # Catalog type of the Orchestration service. (string value)
 #catalog_type=orchestration

@@ -854,15 +863,6 @@
 # (string value)
 #endpoint_type=publicURL

-# Allows test cases to create/destroy tenants and users. This
-# option enables isolated test cases and better parallel
-# execution, but also requires that OpenStack Identity API
-# admin credentials are known. (boolean value)
-#allow_tenant_isolation=false
-
-# Time in seconds between build status checks. (integer value)
-#build_interval=1
-
 # Timeout in seconds to wait for a stack to build. (integer
 # value)
 #build_timeout=1200
check_uptodate.sh: tempest.conf.sample is not up to date.
check_uptodate.sh: Please run /opt/stack/tempest/tools/config/generate_sample.sh.
ERROR: InvocationError: '/opt/stack/tempest/tools/config/check_uptodate.sh'

vs consistent success /w PYTHONHASHSEED=0:
$ tox -e pep8
pep8 develop-inst-noop: /opt/stack/tempest
pep8 runtests: PYTHONHASHSEED='0'
pep8 runtests: commands[0] | flake8
pep8 runtests: commands[1] | /opt/stack/tempest/tools/config/check_uptodate.sh
___________________________________________________________________________________________________________________________________________________________________________________________ summary
  congratulations :)

affects: oslo-incubator → oslo.config
no longer affects: oslo.config
Revision history for this message
Matthew Treinish (treinish) wrote :

The fix here is to migrate to using the new config generator in oslo.config instead of the one in oslo-incubator. There is a patch to do that here:

https://review.openstack.org/#/c/112111/

but it's blocked waiting on other oslo.config and incubator migrations.

Changed in tempest:
assignee: nobody → Jon Grimm (jgrimm)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jon Grimm (jgrimm) wrote :

https://review.openstack.org/#/c/112111/ should land soon... I should just need to remove PYTHONHASHSEED=0 from pep8 tox.ini as bug effectively already fixed by that patch.

Changed in tempest:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/129016
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=edcb24c85864c3fd61def8462998bbdd62acce16
Submitter: Jenkins
Branch: master

commit edcb24c85864c3fd61def8462998bbdd62acce16
Author: Jon Grimm <email address hidden>
Date: Thu Oct 16 18:09:40 2014 +0000

    Remove PYTHONHASHSEED=0 from tox pep8 job

    Tempest has moved to new oslo-config-generator and this bug
    workaround is no longer needed.

    Change-Id: I50ffdcbc8a8f4830ba9c274af4c908e96467dad5
    Closes-Bug: 1365136

Changed in tempest:
status: In Progress → 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.