Skip to content

Instantly share code, notes, and snippets.

@planetrobbie
Created January 5, 2017 16:53
Show Gist options
  • Save planetrobbie/d1097338e4011dd8af7d3b69338a66ad to your computer and use it in GitHub Desktop.
Save planetrobbie/d1097338e4011dd8af7d3b69338a66ad to your computer and use it in GitHub Desktop.
START with options: ['server', 'create', '--debug', '--flavor', 'baremetal', '--image', 'dd1e78e0-b89d-451b-b75d-3317414d55a0 ', '--nic', 'net-id=386ea8c4-354d-4922-bbbb-35db7a02b435', 'test-ironic']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='http://10.0.1.3:5000/', cacert='', client_id='', client_secret='***', cloud='', debug=True, default_domain='Default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_baremetal_api_version='1.6', os_clustering_api_version='1', os_compute_api_version='', os_data_processing_api_version='1.1', os_data_processing_url='', os_dns_api_version='2', os_identity_api_version='', os_image_api_version='', os_key_manager_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='1.1', os_volume_api_version='', os_workflow_api_version='2', password='***', profile=None, project_domain_id='', project_domain_name='', project_id='', project_name='admin', protocol='', region_name='RegionOne', scope='', service_provider_endpoint='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', 'data_processing_api_version': '1.1', u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'verbose_level': 3, 'region_name': 'RegionOne', 'api_timeout': None, u'baremetal_api_version': '1.6', 'queues_api_version': '1.1', 'auth': {'username': 'admin', 'project_name': 'admin', 'password': '***', 'auth_url': 'http://10.0.1.3:5000/'}, 'default_domain': 'Default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': u'2.0', 'workflow_api_version': '2', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 2.0, cmd group openstack.identity.v2
object_store API version 1, cmd group openstack.object_store.v1
orchestration API version 1, cmd group openstack.orchestration.v1
workflow_engine API version 2, cmd group openstack.workflow_engine.v2
messaging API version 1.1, cmd group openstack.messaging.v1
baremetal API version 1.6, cmd group openstack.baremetal.v1
dns API version 2, cmd group openstack.dns.v2
clustering API version 1, cmd group openstack.clustering.v1
key_manager API version 1, cmd group openstack.key_manager.v1
data_processing API version 1.1, cmd group openstack.data_processing.v1
command: server create -> openstackclient.compute.v2.server.CreateServer
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'admin', 'password': '***', 'project_name': 'admin', 'auth_url': 'http://10.0.1.3:5000/'}
Get auth_ref
REQ: curl -g -i -X GET http://10.0.1.3:5000/ -H "Accept: application/json" -H "User-Agent: python-openstackclient keystoneauth1/2.3.0 python-requests/2.9.1 CPython/2.7.6"
Starting new HTTP connection (1): 10.0.1.3
"GET / HTTP/1.1" 300 585
RESP: [300] Content-Length: 585 Vary: X-Auth-Token Server: Apache Connection: close Date: Thu, 05 Jan 2017 16:52:46 GMT Content-Type: application/json
RESP BODY: {"versions": {"values": [{"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://10.0.1.3:5000/v3/", "rel": "self"}]}, {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://10.0.1.3:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}]}}
Making authentication request to http://10.0.1.3:5000/v2.0/tokens
Resetting dropped connection: 10.0.1.3
"POST /v2.0/tokens HTTP/1.1" 200 5609
run(Namespace(availability_zone=None, block_device_mapping=[], columns=[], config_drive=False, file=[], flavor='baremetal', formatter='table', hint=[], image='dd1e78e0-b89d-451b-b75d-3317414d55a0 ', key_name=None, max=1, max_width=0, min=1, nic=['net-id=386ea8c4-354d-4922-bbbb-35db7a02b435'], noindent=False, prefix='', property=None, security_group=[], server_name='test-ironic', user_data=None, variables=[], volume=None, wait=False))
Instantiating compute client for VAPI Version Major: 2, Minor: 0
Instantiating volume client: <class 'cinderclient.v2.client.Client'>
Making authentication request to http://10.0.1.3:5000/v2.0/tokens
Resetting dropped connection: 10.0.1.3
"POST /v2.0/tokens HTTP/1.1" 200 5609
REQ: curl -g -i -X GET http://192.168.1.141:8774/v2.1/images/dd1e78e0-b89d-451b-b75d-3317414d55a0 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5ba460ddefa709ae5e36dd1c6f9ced5021e34869"
Starting new HTTP connection (1): 192.168.1.141
"GET /v2.1/images/dd1e78e0-b89d-451b-b75d-3317414d55a0%20 HTTP/1.1" 404 62
RESP: [404] Content-Length: 62 X-Compute-Request-Id: req-c19b8f57-8841-49ad-b650-5adf4244c955 Vary: X-OpenStack-Nova-API-Version Connection: close X-Openstack-Nova-Api-Version: 2.1 Date: Thu, 05 Jan 2017 16:52:47 GMT Content-Type: application/json; charset=UTF-8
RESP BODY: {"itemNotFound": {"message": "Image not found.", "code": 404}}
REQ: curl -g -i -X GET http://192.168.1.141:8774/v2.1/images -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5ba460ddefa709ae5e36dd1c6f9ced5021e34869"
Resetting dropped connection: 192.168.1.141
"GET /v2.1/images HTTP/1.1" 200 3071
RESP: [200] Content-Length: 3071 X-Compute-Request-Id: req-a09fd2cc-0af0-4c36-99f7-93edeb28a9e6 Vary: X-OpenStack-Nova-API-Version Connection: close X-Openstack-Nova-Api-Version: 2.1 Date: Thu, 05 Jan 2017 16:52:48 GMT Content-Type: application/json
RESP BODY: {"images": [{"id": "53ab3f64-23dd-4897-b276-bb906309db93", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/53ab3f64-23dd-4897-b276-bb906309db93", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/53ab3f64-23dd-4897-b276-bb906309db93", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/53ab3f64-23dd-4897-b276-bb906309db93", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "ubuntu-16.04"}, {"id": "34cc3c4c-36e1-42c1-a01b-569397da6a4c", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/34cc3c4c-36e1-42c1-a01b-569397da6a4c", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/34cc3c4c-36e1-42c1-a01b-569397da6a4c", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/34cc3c4c-36e1-42c1-a01b-569397da6a4c", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "vm-image"}, {"id": "dd1e78e0-b89d-451b-b75d-3317414d55a0", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/dd1e78e0-b89d-451b-b75d-3317414d55a0", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/dd1e78e0-b89d-451b-b75d-3317414d55a0", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/dd1e78e0-b89d-451b-b75d-3317414d55a0", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "baremetal-image"}, {"id": "f0ca10b0-c2c6-4fbd-bf07-76a5f118fa57", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/f0ca10b0-c2c6-4fbd-bf07-76a5f118fa57", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/f0ca10b0-c2c6-4fbd-bf07-76a5f118fa57", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/f0ca10b0-c2c6-4fbd-bf07-76a5f118fa57", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "ironic-deploy-squashfs"}, {"id": "45c7857e-9570-43ea-b21f-271f2f919790", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/45c7857e-9570-43ea-b21f-271f2f919790", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/45c7857e-9570-43ea-b21f-271f2f919790", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/45c7857e-9570-43ea-b21f-271f2f919790", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "ironic-deploy-initramfs"}, {"id": "bc09289d-eb7a-4508-aa3c-a6a5e76215e1", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/bc09289d-eb7a-4508-aa3c-a6a5e76215e1", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/bc09289d-eb7a-4508-aa3c-a6a5e76215e1", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/bc09289d-eb7a-4508-aa3c-a6a5e76215e1", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "ironic-deploy-linux"}, {"id": "6cbb6263-45ee-475b-9cb4-02c0a21cab7e", "links": [{"href": "http://192.168.1.141:8774/v2.1/images/6cbb6263-45ee-475b-9cb4-02c0a21cab7e", "rel": "self"}, {"href": "http://192.168.1.141:8774/images/6cbb6263-45ee-475b-9cb4-02c0a21cab7e", "rel": "bookmark"}, {"href": "http://192.168.1.142:9292/images/6cbb6263-45ee-475b-9cb4-02c0a21cab7e", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "TestVM"}]}
No image with a name or ID of 'dd1e78e0-b89d-451b-b75d-3317414d55a0 ' exists.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 378, in take_action
parsed_args.image,
File "/usr/lib/python2.7/dist-packages/openstackclient/common/utils.py", line 95, in find_resource
raise exceptions.CommandError(msg)
CommandError: No image with a name or ID of 'dd1e78e0-b89d-451b-b75d-3317414d55a0 ' exists.
clean_up CreateServer: No image with a name or ID of 'dd1e78e0-b89d-451b-b75d-3317414d55a0 ' exists.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 118, in run
ret_val = super(OpenStackShell, self).run(argv)
File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 255, in run
result = self.run_subcommand(remainder)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 153, in run_subcommand
ret_value = super(OpenStackShell, self).run_subcommand(argv)
File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 378, in take_action
parsed_args.image,
File "/usr/lib/python2.7/dist-packages/openstackclient/common/utils.py", line 95, in find_resource
raise exceptions.CommandError(msg)
CommandError: No image with a name or ID of 'dd1e78e0-b89d-451b-b75d-3317414d55a0 ' exists.
END return value: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment