tempest charm rebuild: ImportError: No module named 'charms_openstack'

Bug #1760949 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Tempest Charm (Deprecated)
Fix Released
Medium
Unassigned

Bug Description

The tempest charm's run-tempest action is failing after a rebuild.

After running `tox -e func27-smoke`:

#### The action amulet test fails:
2018-04-03 17:40:03,927 test_run_tempest DEBUG: Running Tempest...
2018-04-03 17:40:06,303 run_action WARNING: charmhelpers.contrib.amulet.utils.run_action has been deprecated for amulet.run_action
Traceback (most recent call last):
  File "tests/gate-basic-xenial-pike", line 12, in <module>
    deployment.run_tests()
  File "/home/ubuntu/temp/tempest/build/builds/tempest/.tox/func27-smoke/local/lib/python2.7/site-packages/charmhelpers/contrib/amulet/deployment.py", line 97, in run_tests
    getattr(self, test)()
  File "/home/ubuntu/temp/tempest/build/builds/tempest/tests/basic_deployment.py", line 104, in test_run_tempest
    assert u.wait_on_action(action_id), "run-tempest action failed."
AssertionError: run-tempest action failed.

#### Juju status looks good
ubuntu@beisner-bastion:~/temp/tempest/build/builds/tempest/tests⟫ juju status tempest
Model Controller Cloud/Region Version SLA
beisner beisner-serverstack serverstack/serverstack 2.3.5 unsupported

App Version Status Scale Charm Store Rev OS Notes
tempest 2.7.4 active 1 tempest local 0 ubuntu

Unit Workload Agent Machine Public address Ports Message
tempest/0* active idle 5 10.5.0.17 Unit is ready

Machine State DNS Inst id Series AZ Message
5 started 10.5.0.17 d28a6e1b-7b54-40a0-817f-e903a423b6ad xenial nova ACTIVE

Relation provider Requirer Interface Type Message
keystone:identity-admin tempest:identity-admin keystone-admin regular
openstack-dashboard:website tempest:dashboard http regular

#### A quick poke at it manually confirms:
ubuntu@beisner-bastion:~/temp/tempest/build/builds/tempest/tests⟫ juju actions tempest
Action Description
run-tempest Run tempest

ubuntu@beisner-bastion:~/temp/tempest/build/builds/tempest/tests⟫ juju run-action tempest/0 run-tempest
Action queued with id: 128559c9-632b-4987-88b8-56148aded0b2

ubuntu@beisner-bastion:~/temp/tempest/build/builds/tempest/tests⟫ juju show-action-output 128559c9-632b-4987-88b8-56148aded0b2
message: exit status 1
status: failed
timing:
  completed: 2018-04-03 17:41:21 +0000 UTC
  enqueued: 2018-04-03 17:41:19 +0000 UTC
  started: 2018-04-03 17:41:20 +0000 UTC

#### And, in debug-hooks:
root@juju-6afed5-beisner-5:/var/lib/juju/agents/unit-tempest-0/charm# actions/run-tempest
Traceback (most recent call last):
  File "actions/run-tempest", line 5, in <module>
    import charm.openstack.tempest as tempest
  File "lib/charm/openstack/tempest.py", line 18, in <module>
    import charms_openstack.charm as charm
ImportError: No module named 'charms_openstack'

Tags: uosci
Revision history for this message
James Page (james-page) wrote :

It needs to run in the charm venv, use a hashbang:

#!/usr/local/sbin/charm-env python3

Changed in charm-tempest:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-tempest (master)

Reviewed: https://review.opendev.org/693567
Committed: https://git.openstack.org/cgit/openstack/charm-tempest/commit/?id=1e546550f2298dabda091f753ecb710b84f5a341
Submitter: Zuul
Branch: master

commit 1e546550f2298dabda091f753ecb710b84f5a341
Author: Alex Kavanagh <email address hidden>
Date: Fri Nov 8 17:54:55 2019 +0000

    Fix python3 invocation for charm to charm-env

    Closes bug: #1760949

    Change-Id: I739835fe71da6a727f51b3c42389372ac139d039

Changed in charm-tempest:
status: Triaged → Fix Committed
James Page (james-page)
Changed in charm-tempest:
milestone: none → 20.02
Liam Young (gnuoy)
Changed in charm-tempest:
status: Fix Committed → 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.