instack-deploy-overcloud-tuskarcli fails when instack-prepare-for-overcloud is not previously run

Bug #1333285 reported by james labocki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tuskar
Invalid
Undecided
Unassigned

Bug Description

When instack-deploy-overcloud-tuskarcli is run without instack-prepare-for-overcloud having previously being run the command fails. While this is expected it does not inform the user why instack-deploy-overcloud-tuskarcli failed. Perhaps adding a friendlier log message or having instack-deploy-overcloud-tuskarcli check for what it needs prior to running would be useful.

$ instack-deploy-overcloud-tuskarcli
+ OS_AUTH_URL=http://localhost:5000/v2.0
+ '[' -z http://localhost:5000/v2.0 ']'
+ export TRIPLEO_ROOT=.
+ TRIPLEO_ROOT=.
+ CPU=1
+ MEM=2048
+ DISK=30
+ ARCH=amd64
+ MACS='52:54:00:01:0a:40 52:54:00:60:3f:3e 52:54:00:b7:af:d6 52:54:00:89:7b:2a'
+ PM_IPS=(${PM_IPS:-})
+ PM_USERS=(${PM_USERS:-})
+ PM_PASSWORDS=(${PM_PASSWORDS:-})
+ export USE_IRONIC=0
+ USE_IRONIC=0
+ JSONFILE=nodes.json
+ rm -f nodes.json
+ echo '{}'
++ jq '.nodes=[]' nodes.json
+ JSON='{
  "nodes": []
}'
+ count=0
+ for mac in '$MACS'
+ '[' -n '' -a -n '' -a -n '' ']'
++ jq '.nodes=(.nodes + [{mac:["52:54:00:01:0a:40"], cpu:"1", memory:"2048", disk:"30", arch:"amd64", pm_user:"stack", pm_addr:"ssh_host", pm_password:"ssh_key"}])'
+ JSON='{
  "nodes": [
    {
      "pm_password": "ssh_key",
      "pm_addr": "ssh_host",
      "pm_user": "stack",
      "arch": "amd64",
      "disk": "30",
      "memory": "2048",
      "cpu": "1",
      "mac": [
        "52:54:00:01:0a:40"
      ]
    }
  ]
}'
+ count=1
+ for mac in '$MACS'
+ '[' -n '' -a -n '' -a -n '' ']'
++ jq '.nodes=(.nodes + [{mac:["52:54:00:60:3f:3e"], cpu:"1", memory:"2048", disk:"30", arch:"amd64", pm_user:"stack", pm_addr:"ssh_host", pm_password:"ssh_key"}])'
+ JSON='{
  "nodes": [
    {
      "mac": [
        "52:54:00:01:0a:40"
      ],
      "cpu": "1",
      "memory": "2048",
      "disk": "30",
      "arch": "amd64",
      "pm_user": "stack",
      "pm_addr": "ssh_host",
      "pm_password": "ssh_key"
    },
    {
      "pm_password": "ssh_key",
      "pm_addr": "ssh_host",
      "pm_user": "stack",
      "arch": "amd64",
      "disk": "30",
      "memory": "2048",
      "cpu": "1",
      "mac": [
        "52:54:00:60:3f:3e"
      ]
    }
  ]
}'
+ count=2
+ for mac in '$MACS'
+ '[' -n '' -a -n '' -a -n '' ']'
++ jq '.nodes=(.nodes + [{mac:["52:54:00:b7:af:d6"], cpu:"1", memory:"2048", disk:"30", arch:"amd64", pm_user:"stack", pm_addr:"ssh_host", pm_password:"ssh_key"}])'
+ JSON='{
  "nodes": [
    {
      "pm_password": "ssh_key",
      "pm_addr": "ssh_host",
      "pm_user": "stack",
      "arch": "amd64",
      "disk": "30",
      "memory": "2048",
      "cpu": "1",
      "mac": [
        "52:54:00:01:0a:40"
      ]
    },
    {
      "mac": [
        "52:54:00:60:3f:3e"
      ],
      "cpu": "1",
      "memory": "2048",
      "disk": "30",
      "arch": "amd64",
      "pm_user": "stack",
      "pm_addr": "ssh_host",
      "pm_password": "ssh_key"
    },
    {
      "pm_password": "ssh_key",
      "pm_addr": "ssh_host",
      "pm_user": "stack",
      "arch": "amd64",
      "disk": "30",
      "memory": "2048",
      "cpu": "1",
      "mac": [
        "52:54:00:b7:af:d6"
      ]
    }
  ]
}'
+ count=3
+ for mac in '$MACS'
+ '[' -n '' -a -n '' -a -n '' ']'
++ jq '.nodes=(.nodes + [{mac:["52:54:00:89:7b:2a"], cpu:"1", memory:"2048", disk:"30", arch:"amd64", pm_user:"stack", pm_addr:"ssh_host", pm_password:"ssh_key"}])'
+ JSON='{
  "nodes": [
    {
      "mac": [
        "52:54:00:01:0a:40"
      ],
      "cpu": "1",
      "memory": "2048",
      "disk": "30",
      "arch": "amd64",
      "pm_user": "stack",
      "pm_addr": "ssh_host",
      "pm_password": "ssh_key"
    },
    {
      "pm_password": "ssh_key",
      "pm_addr": "ssh_host",
      "pm_user": "stack",
      "arch": "amd64",
      "disk": "30",
      "memory": "2048",
      "cpu": "1",
      "mac": [
        "52:54:00:60:3f:3e"
      ]
    },
    {
      "mac": [
        "52:54:00:b7:af:d6"
      ],
      "cpu": "1",
      "memory": "2048",
      "disk": "30",
      "arch": "amd64",
      "pm_user": "stack",
      "pm_addr": "ssh_host",
      "pm_password": "ssh_key"
    },
    {
      "pm_password": "ssh_key",
      "pm_addr": "ssh_host",
      "pm_user": "stack",
      "arch": "amd64",
      "disk": "30",
      "memory": "2048",
      "cpu": "1",
      "mac": [
        "52:54:00:89:7b:2a"
      ]
    }
  ]
}'
+ count=4
+ python -mjson.tool
+ echo '{' '"nodes":' '[' '{' '"mac":' '[' '"52:54:00:01:0a:40"' '],' '"cpu":' '"1",' '"memory":' '"2048",' '"disk":' '"30",' '"arch":' '"amd64",' '"pm_user":' '"stack",' '"pm_addr":' '"ssh_host",' '"pm_password":' '"ssh_key"' '},' '{' '"pm_password":' '"ssh_key",' '"pm_addr":' '"ssh_host",' '"pm_user":' '"stack",' '"arch":' '"amd64",' '"disk":' '"30",' '"memory":' '"2048",' '"cpu":' '"1",' '"mac":' '[' '"52:54:00:60:3f:3e"' ']' '},' '{' '"mac":' '[' '"52:54:00:b7:af:d6"' '],' '"cpu":' '"1",' '"memory":' '"2048",' '"disk":' '"30",' '"arch":' '"amd64",' '"pm_user":' '"stack",' '"pm_addr":' '"ssh_host",' '"pm_password":' '"ssh_key"' '},' '{' '"pm_password":' '"ssh_key",' '"pm_addr":' '"ssh_host",' '"pm_user":' '"stack",' '"arch":' '"amd64",' '"disk":' '"30",' '"memory":' '"2048",' '"cpu":' '"1",' '"mac":' '[' '"52:54:00:89:7b:2a"' ']' '}' ']' '}'
{
    "nodes": [
        {
            "arch": "amd64",
            "cpu": "1",
            "disk": "30",
            "mac": [
                "52:54:00:01:0a:40"
            ],
            "memory": "2048",
            "pm_addr": "ssh_host",
            "pm_password": "ssh_key",
            "pm_user": "stack"
        },
        {
            "arch": "amd64",
            "cpu": "1",
            "disk": "30",
            "mac": [
                "52:54:00:60:3f:3e"
            ],
            "memory": "2048",
            "pm_addr": "ssh_host",
            "pm_password": "ssh_key",
            "pm_user": "stack"
        },
        {
            "arch": "amd64",
            "cpu": "1",
            "disk": "30",
            "mac": [
                "52:54:00:b7:af:d6"
            ],
            "memory": "2048",
            "pm_addr": "ssh_host",
            "pm_password": "ssh_key",
            "pm_user": "stack"
        },
        {
            "arch": "amd64",
            "cpu": "1",
            "disk": "30",
            "mac": [
                "52:54:00:89:7b:2a"
            ],
            "memory": "2048",
            "pm_addr": "ssh_host",
            "pm_password": "ssh_key",
            "pm_user": "stack"
        }
    ]
}
+ echo '{' '"nodes":' '[' '{' '"mac":' '[' '"52:54:00:01:0a:40"' '],' '"cpu":' '"1",' '"memory":' '"2048",' '"disk":' '"30",' '"arch":' '"amd64",' '"pm_user":' '"stack",' '"pm_addr":' '"ssh_host",' '"pm_password":' '"ssh_key"' '},' '{' '"pm_password":' '"ssh_key",' '"pm_addr":' '"ssh_host",' '"pm_user":' '"stack",' '"arch":' '"amd64",' '"disk":' '"30",' '"memory":' '"2048",' '"cpu":' '"1",' '"mac":' '[' '"52:54:00:60:3f:3e"' ']' '},' '{' '"mac":' '[' '"52:54:00:b7:af:d6"' '],' '"cpu":' '"1",' '"memory":' '"2048",' '"disk":' '"30",' '"arch":' '"amd64",' '"pm_user":' '"stack",' '"pm_addr":' '"ssh_host",' '"pm_password":' '"ssh_key"' '},' '{' '"pm_password":' '"ssh_key",' '"pm_addr":' '"ssh_host",' '"pm_user":' '"stack",' '"arch":' '"amd64",' '"disk":' '"30",' '"memory":' '"2048",' '"cpu":' '"1",' '"mac":' '[' '"52:54:00:89:7b:2a"' ']' '}' ']' '}'
+ for i in ramdisk kernel
+ glance image-show bm-deploy-ramdisk
No image with a name or ID of 'bm-deploy-ramdisk' exists.
+ for i in ramdisk kernel
+ glance image-show bm-deploy-kernel
No image with a name or ID of 'bm-deploy-kernel' exists.
+ tripleo setup-baremetal --service-host undercloud --nodes /dev/fd/63
++ jq .nodes nodes.json
Fri Jun 13 05:10:49 EDT 2014
Nodes will be available in 60 seconds from now.
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 6b139951-fa89-458b-9f93-665d457abb57 | baremetal | 2048 | 30 | 0 | | 1 | 1.0 | True |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
+ sleep 60
+ tripleo setup-overcloud-passwords -o
+ source tripleo-overcloud-passwords
++ OVERCLOUD_ADMIN_TOKEN=e07786ef5ecfb271bb75db1fbdfff023e770ba47
++ OVERCLOUD_ADMIN_PASSWORD=edc39fa42ab84a4cc32aa8eb8dbd6afbbfb1fcfc
++ OVERCLOUD_CEILOMETER_PASSWORD=9543bc5a33e556ac2fa061030ca440dc5a399b4c
++ OVERCLOUD_CINDER_PASSWORD=6e3fc614691eedfe75afddcc69291570d63eb6de
++ OVERCLOUD_GLANCE_PASSWORD=ac968a4f1c601e679cde509c740f7fca92672e87
++ OVERCLOUD_HEAT_PASSWORD=cde07f131b3cf3e65b7027b33db87eff317c807b
++ OVERCLOUD_NEUTRON_PASSWORD=6fef3ca3df4b4b3dce1bc5500deafded60970b14
++ OVERCLOUD_NOVA_PASSWORD=454aa5ec5450fe1afe89d29b413805d56e5a4cd7
++ OVERCLOUD_SWIFT_PASSWORD=e9285c1de4efa48338758e4a7c60aecf98e7ab20
++ OVERCLOUD_SWIFT_HASH=95b48b3abed2723e471a84b7e8725a37fdf60421
++ OVERCLOUD_DEMO_PASSWORD=009400df5e01a476059354b087c6dc85c7f5306b
+ NeutronPublicInterface=eth0
+ OVERCLOUD_LIBVIRT_TYPE=qemu
+ export TUSKAR_URL=http://localhost:8585/
+ TUSKAR_URL=http://localhost:8585/
++ tr -d ' '
++ cut -d '|' -f3
++ grep '^| id '
++ nova flavor-show baremetal
+ flavor_id=6b139951-fa89-458b-9f93-665d457abb57
++ tr -d ' '
++ cut -d '|' -f2
++ grep overcloud-control
++ tuskar overcloud-role-list
+ controller_role_id=1
++ tr -d ' '
++ cut -d '|' -f2
++ grep overcloud-compute
++ tuskar overcloud-role-list
+ compute_role_id=2
++ tr -d ' '
++ cut -d '|' -f2
++ grep overcloud-cinder-volume
++ tuskar overcloud-role-list
+ blockstorage_role_id=3
++ tr -d ' '
++ cut -d '|' -f2
++ grep overcloud-swift-storage
++ tuskar overcloud-role-list
+ swiftstorage_role_id=4
+ for id in '$controller_role_id' '$compute_role_id' '$blockstorage_role_id'
+ tuskar overcloud-role-update -f 6b139951-fa89-458b-9f93-665d457abb57 1
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| description | Controller Node |
| flavor_id | 6b139951-fa89-458b-9f93-665d457abb57 |
| id | 1 |
| image_name | overcloud-control |
| name | controller |
+-------------+--------------------------------------+
+ for id in '$controller_role_id' '$compute_role_id' '$blockstorage_role_id'
+ tuskar overcloud-role-update -f 6b139951-fa89-458b-9f93-665d457abb57 2
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| description | Compute Nodes |
| flavor_id | 6b139951-fa89-458b-9f93-665d457abb57 |
| id | 2 |
| image_name | overcloud-compute |
| name | compute |
+-------------+--------------------------------------+
+ for id in '$controller_role_id' '$compute_role_id' '$blockstorage_role_id'
+ tuskar overcloud-role-update -f 6b139951-fa89-458b-9f93-665d457abb57 3
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| description | Block Storage Nodes |
| flavor_id | 6b139951-fa89-458b-9f93-665d457abb57 |
| id | 3 |
| image_name | overcloud-cinder-volume |
| name | blockstorage |
+-------------+--------------------------------------+
+ COMPUTESCALE=1
+ BLOCKSTORAGESCALE=1
+ SWIFTSTORAGESCALE=1
+ tuskar overcloud-create overcloud --description 'My overcloud' --attribute AdminToken=e07786ef5ecfb271bb75db1fbdfff023e770ba47 --attribute AdminPassword=edc39fa42ab84a4cc32aa8eb8dbd6afbbfb1fcfc --attribute CinderPassword=6e3fc614691eedfe75afddcc69291570d63eb6de --attribute GlancePassword=ac968a4f1c601e679cde509c740f7fca92672e87 --attribute HeatPassword=cde07f131b3cf3e65b7027b33db87eff317c807b --attribute NeutronPassword=6fef3ca3df4b4b3dce1bc5500deafded60970b14 --attribute NovaPassword=454aa5ec5450fe1afe89d29b413805d56e5a4cd7 --attribute NeutronPublicInterface=eth0 --attribute SwiftPassword=e9285c1de4efa48338758e4a7c60aecf98e7ab20 --attribute SwiftHashSuffix=95b48b3abed2723e471a84b7e8725a37fdf60421 --attribute NovaComputeLibvirtType=qemu --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'

Revision history for this message
Charles Crouch (ccrouch) wrote :

This bug should be logged against RDO not tuskar:
https://bugzilla.redhat.com/enter_bug.cgi?product=RDO

I'll raise a new BZ once the necessary components have been created

Changed in tuskar:
status: New → Invalid
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.