Failed to validate nested template: Property error: resources[10].properties: Property KeystoneCredential0 not assigned

Bug #1626422 reported by Michele Baldessari
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
mathieu bultel

Bug Description

When doing M/N upgrades, we get the following error at the very first init step:
+ openstack overcloud deploy --templates /home/stack/tripleo-heat-templates --libvirt-type qemu --control-flavor oooq_control --compute-flavor oooq_compute --ceph-storage-flavor oooq_ceph --timeout 75 --ntp-server clock.redhat.com --cont
rol-scale 3 --neutron-network-type vxlan --neutron-tunnel-types vxlan -e /home/stack/tripleo-heat-templates/overcloud-resource-registry-puppet.yaml -e /home/stack/tripleo-heat-templates/environments/network-isolation.yaml -e /home/stack/
tripleo-heat-templates/environments/net-single-nic-with-vlans.yaml -e /home/stack/network-environment.yaml -e /home/stack/tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /home/stack/tripleo-heat-templates/environments/major-
upgrade-pacemaker-init.yaml -e /home/stack/overcloud-repo.yaml --ntp-server clock.redhat.com -e /tmp/deploy_env.yaml
WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils
Removing the current plan files
Uploading new plan files
Started Mistral Workflow. Execution ID: 6a7ed13b-1d0f-4e96-9f7f-b1bbb42109ff
Plan updated
Deploying templates in the directory /home/stack/tripleo-heat-templates
Object GET failed: http://192.0.2.1:8080/v1/AUTH_d55f158fae1040858c999979bac7c5ce/overcloud/overcloud-without-mergepy.yaml 404 Not Found [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be found.<
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1647, in _retry
    service_token=self.service_token, **kwargs)
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1139, in get_object
    raise ClientException.from_response(resp, 'Object GET failed', body)
ClientException: Object GET failed: http://192.0.2.1:8080/v1/AUTH_d55f158fae1040858c999979bac7c5ce/overcloud/overcloud-without-mergepy.yaml 404 Not Found [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be
found.<
Started Mistral Workflow. Execution ID: 392f17fa-cf38-4f3f-9196-1c31d3384748
....
 u'message': u"Failed to run action [action_ex_id=77f2ab1d-5111-4226-9407-04babb8bfa76, action_cls='<class 'mistral.actions.action_factory.DeployStackAction'>', attributes='{}', params='{u'container': u'overcloud', u'timeout': 75}']\n ER
ROR: Failed to validate: : resources.ControllerServiceChain: : Failed to validate nested template: Property error: resources[10].properties: Property KeystoneCredential0 not assigned",

This keystone credential support was added in THT via:
commit 8ce3d646a6d76f9449509456ad0f1e0964b9fe8d
Author: Emilien Macchi <email address hidden>
Date: Tue Sep 6 18:24:28 2016 -0400

    Configure Keystone credentials

and in python-tripleo-client via:
commit 5f0694a64efcf6527306e8507efa92d03d60a05a
Author: Emilien Macchi <email address hidden>
Date: Tue Sep 6 14:32:24 2016 -0400

    Generate Keystone credentials for overcloud

From a cursory look it seems to me the problematic code is in v1/overcloud_deploy.py:
    stack_is_new = stack is None
    ....
    if stack_is_new:
        parameters.update({
            'CephClusterFSID': six.text_type(uuid.uuid1()),
            'KeystoneCredential0': utils.create_keystone_credential(),
            'KeystoneCredential1': utils.create_keystone_credential()})

In this case the stack is existing already so those parameters are never set.

Note that this bug actually affects CephClusterFSID as well, it is just that I did not hit it because I was not using ceph.

tags: added: upgrade
Revision history for this message
Michele Baldessari (michele) wrote :

matbu is hitting this one as well

Changed in tripleo:
importance: Undecided → Critical
milestone: none → newton-rc2
status: New → Confirmed
Revision history for this message
mathieu bultel (mat-bultel) wrote :
Changed in tripleo:
assignee: nobody → mbu (mat-bultel)
Changed in tripleo:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (stable/newton)

Change abandoned by mathieu bultel (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/374600
Reason: I abandon this review and work on this one on master branch:
https://review.openstack.org/#/c/374892/

description: updated
Revision history for this message
mathieu bultel (mat-bultel) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/374892
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=13620fc4ff3b03d19a17663e26036e4a05c5e8d5
Submitter: Jenkins
Branch: master

commit 13620fc4ff3b03d19a17663e26036e4a05c5e8d5
Author: Mathieu Bultel <email address hidden>
Date: Thu Sep 22 16:54:45 2016 +0200

    Keystone credentials needs to be set with the overcloud password

    While working on upgrade Mitaka to newton we hit this issue
    https://bugs.launchpad.net/tripleo/+bug/1626422
    It appear that the keystone credentials needs to be generated
    and store with the overcloud password only once

    Change-Id: I15888f31c6b275ac785107bb95256296fd67487f
    Closes-Bug: #1626422

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/376449

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/newton)

Reviewed: https://review.openstack.org/376449
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=203c6ddaaaa53aeccc63088b405dea8047aeaa16
Submitter: Jenkins
Branch: stable/newton

commit 203c6ddaaaa53aeccc63088b405dea8047aeaa16
Author: Mathieu Bultel <email address hidden>
Date: Thu Sep 22 16:54:45 2016 +0200

    Keystone credentials needs to be set with the overcloud password

    While working on upgrade Mitaka to newton we hit this issue
    https://bugs.launchpad.net/tripleo/+bug/1626422
    It appear that the keystone credentials needs to be generated
    and store with the overcloud password only once

    Change-Id: I15888f31c6b275ac785107bb95256296fd67487f
    Closes-Bug: #1626422
    (cherry picked from commit 13620fc4ff3b03d19a17663e26036e4a05c5e8d5)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.2.0

This issue was fixed in the openstack/python-tripleoclient 5.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.5.0

This issue was fixed in the openstack/python-tripleoclient 5.5.0 release.

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.