Error when using Tuskar to redeploy the overcloud

Bug #1313731 reported by Ronelle Landy on 2014-04-28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ana Krivokapić

Bug Description

I used Tuskar (installed on Fedora 20) to deploy the overcloud. I then deleted that original overcloud and removed the baremetal nodes. Afterwards, I used Tuskar to redploy the same overcloud. 'tuskar overcloud-create' returns warnings and errors, yet the overcloud continues to deploy. See commands and output copied below:

tuskar overcloud-create overcloud --description 'My overcloud' --attribute AdminToken=<> --attribute AdminPassword=<> --attribute CinderPassword=<> --attribute GlancePassword=<> --attribute HeatPasswor<> --attribute NeutronPassword=<> --attribute NovaPassword=<> --attribute
NeutronPublicInterface=em2 --attribute
SwiftPassword=<> --attribute SwiftHashSuffix=<> --attribute
NovaComputeLibvirtType=kvm --attribute
'GlanceLogFile='\'''\''' --attribute
 --role-count 1=1 --role-count 2=1 --role-count 3=1 --role-count 4=1

WARNING:tuskarclient.common.http:Request returned failure status. due to an error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tuskarclient/", line 224, in main
  File "/usr/lib/python2.7/site-packages/tuskarclient/", line 71, in run
    args.func(tuskar_client, args)
  File "/usr/lib/python2.7/site-packages/tuskarclient/v1/", line 57, in do_overcloud_create
    overcloud = tuskar.overclouds.create(**overcloud_dict)
  File "/usr/lib/python2.7/site-packages/tuskarclient/v1/", line 70, in create
    return self._create(self._path(), fields)
  File "/usr/lib/python2.7/site-packages/tuskarclient/common/", line 78, in _create
    resp, body = self.api.json_request('POST', url, body=body)
  File "/usr/lib/python2.7/site-packages/tuskarclient/common/", line 196, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/tuskarclient/common/", line 175, in _http_request
    raise exc.from_response(resp, method, conn_url)
  File "/usr/lib/python2.7/site-packages/tuskarclient/openstack/common/apiclient/", line 416, in from_response
    "request_id": response.headers.get("x-compute-request-id"),
AttributeError: HTTPResponse instance has no attribute 'headers'

heat stack-list
| id | stack_name | stack_status | creation_time |
| 47cd7e84-aab8-4ac5-be11-12886c2523ef | overcloud | CREATE_IN_PROGRESS | 2014-04-28T13:24:37Z |

Tuskar version installed:

rpm -qa |grep tuskar

Changed in tuskar:
status: New → Triaged
importance: Undecided → Medium
Viktor Serhieiev (vsergeyev) wrote :

This issue also related to tuskarclient, because (as we can see in traceback) error from pythonclient hides the original exception.

Seems to be, that this error in pythonclient is appeared after the patch (Revert "Use HTTPClient from common apiclient code") was merged. So now tuskarclient use `httplib` library (instead or `request`) for http request. But from_response() method from tuskarclient/openstack/common/apiclient/ file works correctly, when we put there response from `requests` library.

Changed in python-tuskarclient:
status: New → Triaged
importance: Undecided → Medium
Dougal Matthews (d0ugal) wrote :

Interesting. It looks like the an error was returned by the API but the tuskarclient's error handling failed and thus has hidden the original error.

Ryan Brady (rbrady) wrote :

How did you delete the overcloud?

Ana Krivokapić (akrivoka) wrote :

I'm seeing the same traceback when trying to re-deploy using Tuskar-UI.

What I did:

- installed devtest
- ssh'ed into undercloud and heat stack-delete overcloud
- tryed to re-deploy overcloud using the UI -> error with the above traceback

Fix proposed to branch: master

Changed in python-tuskarclient:
assignee: nobody → Ana Krivokapić (akrivoka)
status: Triaged → In Progress

Submitter: Jenkins
Branch: master

commit d1384e661b95182e196a07293a061697b7f72f44
Author: Ana Krivokapic <email address hidden>
Date: Thu Jun 26 14:48:30 2014 +0200

    Pass the requests.Response object to from_response()

    from_response() method expects a requests.Response object, so we need
    to convert the existing httplib.HTTPResponse instance to requests.Response.

    Change-Id: I15da7fcea7e90972da7508feea470a16ce2a4f12
    Closes-bug: #1313731

Changed in python-tuskarclient:
status: In Progress → Fix Committed
Jay Dobies (jdob) on 2014-07-08
Changed in python-tuskarclient:
status: Fix Committed → Fix Released
Jay Dobies (jdob) wrote :

In Juno, Tuskar is no longer delegating calls to Heat. The caller should go to Heat directly with the templates provided by Tuskar. Closing this out as this workflow no longer exists.

Changed in tuskar:
status: Triaged → Won't Fix
Peeyush Gupta (peeygupt) wrote :

I added the fix, but I am still getting the same error when trying to add a new compute node.

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

Other bug subscribers