Error when using Tuskar to redeploy the overcloud

Bug #1313731 reported by Ronelle Landy
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-tuskarclient
Fix Released
Medium
Ana Krivokapić
tuskar
Won't Fix
Medium
Unassigned

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
 NeutronDnsmasqOptions=dhcp-option-force=26,1400
 --role-count 1=1 --role-count 2=1 --role-count 3=1 --role-count 4=1

WARNING:tuskarclient.common.http:Request returned failure status.
ERROR:tuskarclient.shell:Exiting due to an error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tuskarclient/shell.py", line 224, in main
    TuskarShell(sys.argv[1:]).run()
  File "/usr/lib/python2.7/site-packages/tuskarclient/shell.py", line 71, in run
    args.func(tuskar_client, args)
  File "/usr/lib/python2.7/site-packages/tuskarclient/v1/overclouds_shell.py", line 57, in do_overcloud_create
    overcloud = tuskar.overclouds.create(**overcloud_dict)
  File "/usr/lib/python2.7/site-packages/tuskarclient/v1/overclouds.py", line 70, in create
    return self._create(self._path(), fields)
  File "/usr/lib/python2.7/site-packages/tuskarclient/common/base.py", line 78, in _create
    resp, body = self.api.json_request('POST', url, body=body)
  File "/usr/lib/python2.7/site-packages/tuskarclient/common/http.py", line 196, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/tuskarclient/common/http.py", line 175, in _http_request
    raise exc.from_response(resp, method, conn_url)
  File "/usr/lib/python2.7/site-packages/tuskarclient/openstack/common/apiclient/exceptions.py", 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
python-tuskarclient-0.1.4-1.fc21.noarch
openstack-tuskar-ui-0.1.0-10.fc21.noarch
openstack-tuskar-0.3.0-1.fc21.noarch

Changed in tuskar:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
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 https://review.openstack.org/#/c/87315/ (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/exceptions.py file works correctly, when we put there response from `requests` library.

Changed in python-tuskarclient:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
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.

Revision history for this message
Ryan Brady (rbrady) wrote :

How did you delete the overcloud?

Revision history for this message
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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tuskarclient (master)

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

Changed in python-tuskarclient:
assignee: nobody → Ana Krivokapić (akrivoka)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tuskarclient (master)

Reviewed: https://review.openstack.org/102821
Committed: https://git.openstack.org/cgit/openstack/python-tuskarclient/commit/?id=d1384e661b95182e196a07293a061697b7f72f44
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)
Changed in python-tuskarclient:
status: Fix Committed → Fix Released
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.