CI periodic nonha job fail on mistral error

Bug #1633450 reported by Gabriele Cerami on 2016-10-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
High
Dougal Matthews

Bug Description

Today's periodic nonha master job fails with this error:

http://logs.openstack.org/periodic/periodic-tripleo-ci-centos-7-ovb-nonha/b3dd37d/console.html#_2016-10-14_07_52_48_735388

Asked dmatthews to look at it first, it seems to be a real issue.

Dougal Matthews (d0ugal) on 2016-10-14
Changed in tripleo:
assignee: nobody → Dougal Matthews (d0ugal)
Changed in tripleo:
status: New → In Progress
Changed in tripleo:
milestone: none → ocata-1
tags: added: newton-backport-potential
Changed in tripleo:
importance: Undecided → High
Dougal Matthews (d0ugal) wrote :

Users hitting this issue will see something like this:

[2016-10-18 06:55:44,771] (os-refresh-config) [INFO] Completed phase post-configure
os-refresh-config completed successfully
Not creating flavor "baremetal" because it already exists.
Not creating flavor "control" because it already exists.
Not creating flavor "compute" because it already exists.
Not creating flavor "ceph-storage" because it already exists.
Not creating flavor "block-storage" because it already exists.
Not creating flavor "swift-storage" because it already exists.
Not creating default plan "overcloud" because it already exists.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1195, in install
    _post_config(instack_env)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1177, in _post_config
    _post_config_mistral(mistral)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1147, in _post_config_mistral
    "undercloud_ceilometer_snmpd_password": snmpd_password
  File "/usr/lib/python2.7/site-packages/mistralclient/api/v2/environments.py", line 56, in create
    return self._create('/environments', kwargs)
  File "/usr/lib/python2.7/site-packages/mistralclient/api/base.py", line 92, in _create
    self._raise_api_exception(resp)
  File "/usr/lib/python2.7/site-packages/mistralclient/api/base.py", line 140, in _raise_api_exception
    error_message=error_data)
mistralclient.api.base.APIException: Duplicate entry for Environment: ['name']
Command 'instack-install-undercloud' returned non-zero exit status 1

Dougal Matthews (d0ugal) wrote :

To work around the issue, run this command before running `openstack undercloud install` again.

    $ mistral environment-delete tripleo.undercloud-config

The undercloud install will then re-create it when you next run. You can confirm this by looking it in the output of the following command:

    $ mistral environment-list

Reviewed: https://review.openstack.org/386558
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=a370e16be69a1d4a72038f26eb58f33a40120f48
Submitter: Jenkins
Branch: master

commit a370e16be69a1d4a72038f26eb58f33a40120f48
Author: Dougal Matthews <email address hidden>
Date: Fri Oct 14 13:08:56 2016 +0100

    Only create the Mistral config env if it doesn't exist

    From I71edae4a4dee2204edf32e3b2800f075d221b856 we started to create a
    Mistral env in instack-undercloud. This happens at install time. We
    failed to only do this if the environment doesn't exist, at the moment
    instack will fail on a second undercloud install as Mistral will attempt
    to create the environment again and raise an exception.

    This patch also fixes a regression introduced by
    I71edae4a4dee2204edf32e3b2800f075d221b856 which created the config
    env *after* creating the default plan - given the default plan creation
    depends on the environment, this was an error.

    Closes-Bug: #1633450
    Change-Id: I186217fd0e1125519149763e610d3efdff583388

Changed in tripleo:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/387832
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=5dcc3c0fb5e926cc040ac5cac4a629509fe03d00
Submitter: Jenkins
Branch: stable/newton

commit 5dcc3c0fb5e926cc040ac5cac4a629509fe03d00
Author: Dougal Matthews <email address hidden>
Date: Fri Oct 14 13:08:56 2016 +0100

    Only create the Mistral config env if it doesn't exist

    From I71edae4a4dee2204edf32e3b2800f075d221b856 we started to create a
    Mistral env in instack-undercloud. This happens at install time. We
    failed to only do this if the environment doesn't exist, at the moment
    instack will fail on a second undercloud install as Mistral will attempt
    to create the environment again and raise an exception.

    This patch also fixes a regression introduced by
    I71edae4a4dee2204edf32e3b2800f075d221b856 which created the config
    env *after* creating the default plan - given the default plan creation
    depends on the environment, this was an error.

    Closes-Bug: #1633450
    Change-Id: I186217fd0e1125519149763e610d3efdff583388
    (cherry picked from commit a370e16be69a1d4a72038f26eb58f33a40120f48)

tags: added: in-stable-newton

This issue was fixed in the openstack/instack-undercloud 5.1.0 release.

This issue was fixed in the openstack/instack-undercloud 6.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers