Tempest Cleanup script is broken

Bug #1567832 reported by Daniel Mellado
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Daniel Mellado

Bug Description

When running the tempest cleanup utility, it gets broken due to the recent renaming of tenant/projects

$ tempest cleanup --init-saved-state
Traceback (most recent call last):
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup.py", line 79, in take_action
    self.init(parsed_args)
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup.py", line 98, in init
    self._init_admin_ids()
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup.py", line 193, in _init_admin_ids
    CONF.auth.admin_tenant_name)
  File "/home/vagrant/tempest_upstream/.tox/py27/lib/python2.7/site-packages/oslo_config/cfg.py", line 2946, in __getattr__
    return self._conf._get(name, self._group)
  File "/home/vagrant/tempest_upstream/.tox/py27/lib/python2.7/site-packages/oslo_config/cfg.py", line 2567, in _get
    value = self._do_get(name, group, namespace)
  File "/home/vagrant/tempest_upstream/.tox/py27/lib/python2.7/site-packages/oslo_config/cfg.py", line 2584, in _do_get
    info = self._get_opt_info(name, group)
  File "/home/vagrant/tempest_upstream/.tox/py27/lib/python2.7/site-packages/oslo_config/cfg.py", line 2718, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
NoSuchOptError: no such option in group auth: admin_tenant_name

Besides this, after fixed, it's also not using the proper client but the legacy one:

$ tempest cleanup --dry-run
Begin cleanup
Process 1 tenants
Cleaning tenant: dell
Traceback (most recent call last):
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup.py", line 81, in take_action
    self._cleanup()
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup.py", line 136, in _cleanup
    self._clean_tenant(tenant)
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup.py", line 186, in _clean_tenant
    svc.run()
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup_service.py", line 136, in run
    self.dry_run()
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup_service.py", line 731, in dry_run
    alarms = self.list()
  File "/home/vagrant/tempest_upstream/tempest/cmd/cleanup_service.py", line 717, in list
    alarms = client.list_alarms()
AttributeError: 'TelemetryClient' object has no attribute 'list_alarms'

Changed in tempest:
assignee: nobody → Daniel Mellado (daniel-mellado)
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/303312

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

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

commit d4d0b93f4a5958756f7f00c266a962c6724cba76
Author: Daniel Mellado <email address hidden>
Date: Fri Apr 8 08:57:29 2016 +0000

    Change alarm client name and tenant name

    Refactor to use correct client for alarms and project_name instead of
    tenant_name

    Also should test for aodh service being available instead of alarming,
    as ceilometer no longer handles alarming.

    Change-Id: I3aeedcb0277c8565b7935b77a2313c63319e92ff
    Closes-Bug: #1567832

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.