Tempest dependency issue - install_venv moved to oslo-incubator project

Bug #1577608 reported by cappetta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Packstack
New
Undecided
Unassigned

Bug Description

Packstack has a dependency on the install_venv.py script in the tempest manifest - yet that file no longer exists in the tools folder of the tempest repo. I did however see that it was moved to the oslo-incubator project.

I am not able to figure out where the tempest module is downloaded from but appears to be slightly out of sync with the current master of https://github.com/openstack/puppet-tempest. I notice the logic for "if $setup_venv {" in init.pp is different then the module the packstack script is pulling

Packstack logic:
    if $setup_venv {
      # virtualenv will be installed along with tox
      exec { 'setup-venv':
        command => "/usr/bin/python ${tempest_clone_path}/tools/install_venv.py",

Existing logic in the master branch:
 if $setup_venv {
      # virtualenv will be installed along with tox
      exec { 'setup-venv':
        command => "/usr/bin/virtualenv ${tempest_clone_path}/.venv && ${tempest_clone_path}/.venv/bin/pip install -U -r requirements.txt",

How to fix -- my initial hack would be to integrate the new module but if needed you can change the packstack logic from
        command => "/usr/bin/python ${tempest_clone_path}/tools/install_venv.py",
to
        command => "curl https://raw.githubusercontent.com/openstack/oslo-incubator/master/tools/install_venv.py -o ${tempest_clone_path}/tools/install_venv.py ; /usr/bin/python ${tempest_clone_path}/tools/install_venv.py",

BTW - this issue is blocking me from testing a solution a minor unreported issue. When installing packstack with provision_demo=n and provision_tempest=y the script fails due to glance image names and user/pass variables not being correct. Once the above issue is fix I can commit the fix for the demo=n & tempest=y provisioning use case

Revision history for this message
David Moreau Simard (dmsimard) wrote :

setup_venv was removed from master in https://github.com/openstack/packstack/commit/5b2648aec3c44c6249d12305a0e99502088c5b4e and from what I can tell that was backported to Mitaka as well: https://github.com/openstack/packstack/blob/stable/mitaka/packstack/puppet/templates/provision_tempest.pp

It may not have hit the stable repositories, though. Is that where you are seeing it ?

Revision history for this message
cappetta (thomas-cappetta) wrote :

Yes - Exactly. I was thinking it was an rpm build/increment issue my current build version is openstack-packstack-8.0.0-0.7.0rc2.el7.noarch

According to the mirror below it was built on 4/11/16
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-mitaka/

Revision history for this message
Alfredo Moralejo (amoralej) wrote :

The required patch has not been promoted to stable repositores yet, we are working on it. If you want to test with latest patches, you can use the latest trunk build of packstack for mitaka from:

https://trunk.rdoproject.org/centos7-mitaka/consistent/openstack-packstack-8.0.0.0-0.20160502041802.f4f5738.el7.centos.noarch.rpm

This should fix the issue.

Revision history for this message
cappetta (thomas-cappetta) wrote :

This might take us down a rabbit's hole but I tried the RPM and getting an error when the provisioning manifest is being built. When I get some free time I'll spend some time sorting through the diff : http://paste.fedoraproject.org/362543/71909146/

Adding Provisioning manifest entries [ ERROR ]
ERROR : not enough arguments for format string

the openstack log output ends with:

2016-05-04 10:09:21::DEBUG::run_setup::623::root:: nagios-passwd: ********

Installed the 3 packages below:

[root@mini-workstation cappetta]# rpm -qa | grep -i openstack
openstack-packstack-puppet-8.0.0.0-0.20160502041802.f4f5738.el7.centos.noarch
openstack-packstack-8.0.0.0-0.20160502041802.f4f5738.el7.centos.noarch
openstack-puppet-modules-8.0.4-0.20160427233054.78df1fe.el7.centos.noarch

Openstack Log shows the following:

2016-05-04 10:17:36::DEBUG::sequences::52::root:: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 50, in run
    self.function(config, messages)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/provision_700.py", line 354, in create_provision_manifest
    manifest_data = getManifestTemplate("provision")
  File "/usr/lib/python2.7/site-packages/packstack/modules/ospluginutils.py", line 81, in getManifestTemplate
    return fp.read() % controller.CONF
TypeError: not enough arguments for format string

2016-05-04 10:17:36::ERROR::run_setup::1018::root:: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 1013, in main
    _main(options, confFile, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 660, in _main
    runSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 627, in runSequences
    controller.runAllSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/setup_controller.py", line 81, in runAllSequences
    sequence.run(config=self.CONF, messages=self.MESSAGES)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 109, in run
    step.run(config=config, messages=messages)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 50, in run
    self.function(config, messages)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/provision_700.py", line 354, in create_provision_manifest
    manifest_data = getManifestTemplate("provision")
  File "/usr/lib/python2.7/site-packages/packstack/modules/ospluginutils.py", line 81, in getManifestTemplate
    return fp.read() % controller.CONF
TypeError: not enough arguments for format string

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.