Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@controller:~# . admin-rc
- root@controller:~# openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public --debug
- START with options: [u'image', u'create', u'cirros', u'--file', u'cirros-0.3.4-x86_64-disk.img', u'--disk-format', u'qcow2', u'--container-format', u'bare', u'--public', u'--debug']
- options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', auth_type='', auth_url='http://controller:35357/v3', authorization_code='', cacert=None, cert='', client_id='', client_secret='***', cloud='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', key='', log_file=None, old_profile=None, openid_scope='', os_beta_command=False, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='2', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', passcode='', password='***', profile=None, project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
- Auth plugin password selected
- auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'interface': None, 'auth_url': 'http://controller:35357/v3', u'network_api_version': u'2', u'image_format': u'qcow2', 'networks': [], u'image_api_version': '2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', 'debug': True, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'password': 'wolfgang7', 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'disable_vendor_agent': {}}
- 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', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': u'1', u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'http://controller:35357/v3', u'network_api_version': u'2', u'image_format': u'qcow2', 'networks': [], u'image_api_version': '2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'Default', 'auth_url': 'http://controller:35357/v3', 'password': '***', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, u'interface': None, 'password': '***', 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, 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 3, cmd group openstack.identity.v3
- object_store API version 1, cmd group openstack.object_store.v1
- neutronclient API version 2, cmd group openstack.neutronclient.v2
- Auth plugin password selected
- auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'interface': None, 'auth_url': 'http://controller:35357/v3', u'network_api_version': u'2', u'image_format': u'qcow2', 'networks': [], u'image_api_version': '2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', 'debug': True, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'password': 'wolfgang7', 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'disable_vendor_agent': {}}
- command: image create -> openstackclient.image.v2.image.CreateImage
- Using auth plugin: password
- Using parameters {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'Default', 'auth_url': 'http://controller:35357/v3', 'password': '***', 'project_domain_name': 'Default'}
- Get auth_ref
- REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.12.1 python-requests/2.10.0 CPython/2.7.12"
- Starting new HTTP connection (1): controller
- "GET /v3 HTTP/1.1" 200 250
- RESP: [200] Date: Thu, 07 Dec 2017 13:54:49 GMT Server: Apache/2.4.18 (Ubuntu) Vary: X-Auth-Token X-Distribution: Ubuntu Content-Length: 250 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
- RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}
- Making authentication request to http://controller:35357/v3/auth/tokens
- "POST /v3/auth/tokens HTTP/1.1" 201 2714
- {"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "52a39bd0884847aca3d8a4e99a862d89", "name": "admin"}], "expires_at": "2017-12-07T14:54:49.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "75d5d6de91744443809a66e386858d2f", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://controller:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "1314a165398f44589689d07fbec89622"}, {"url": "http://controller:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "16cc85b825a0412696bceb9e0e01e553"}, {"url": "http://controller:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "18c2b5f7128b44a298c6ed6dd067ae15"}, {"url": "http://controller:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "21ee7ff72dd648f390f637a9251638d3"}, {"url": "http://controller:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "465c2d2988494651a77536cf02c4b3be"}, {"url": "http://controller:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "b5c1f8d9526d4ef89c146ab2f7c12f6c"}], "type": "image", "id": "3963830ad4764f6dbf005596135fea25", "name": "glance"}, {"endpoints": [{"url": "http://controller:8774/v2.1/75d5d6de91744443809a66e386858d2f", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "19e57ea4f1cd4b9ea3b0e7353af82e3b"}, {"url": "http://controller:8774/v2.1/75d5d6de91744443809a66e386858d2f", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5c46816fa8334688b2211a33a7c748e6"}, {"url": "http://controller:8774/v2.1/75d5d6de91744443809a66e386858d2f", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "e4eb4273b8334fe9b147968d32a7aac1"}], "type": "compute", "id": "5aebde00568f47229eb3304ad40b5b3c", "name": "nova"}, {"endpoints": [{"url": "http://controller:5000/v3/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "09d802297f404c89b74e8d36778b6dfe"}, {"url": "http://controller:5000/v3/", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a837bdcc975a4ed1a3e16f8aa5dc1133"}, {"url": "http://controller:35357/v3/", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "dce1373a55044e0983a5256f54aba9a1"}], "type": "identity", "id": "7f4c754f893049b28214d2552dd242b2", "name": "keystone"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "0c29508c8ef04043aa913874169802de", "name": "admin"}, "audit_ids": ["4740CmJYTuuETIA9wpaR7A"], "issued_at": "2017-12-07T13:54:49.000000Z"}}
- run(Namespace(checksum=None, columns=[], container_format=u'bare', copy_from=None, disk_format=u'qcow2', file=u'cirros-0.3.4-x86_64-disk.img', force=False, formatter='table', id=None, location=None, max_width=0, min_disk=None, min_ram=None, name=u'cirros', noindent=False, owner=None, prefix='', private=False, project=None, project_domain=None, properties=None, protected=False, public=True, size=None, store=None, tags=None, unprotected=False, variables=[], volume=None))
- Instantiating identity client: <class 'keystoneclient.v3.client.Client'>
- Instantiating image client: <class 'glanceclient.v2.client.Client'>
- Making authentication request to http://controller:35357/v3/auth/tokens
- "POST /v3/auth/tokens HTTP/1.1" 201 2714
- {"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "52a39bd0884847aca3d8a4e99a862d89", "name": "admin"}], "expires_at": "2017-12-07T14:54:49.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "75d5d6de91744443809a66e386858d2f", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://controller:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "1314a165398f44589689d07fbec89622"}, {"url": "http://controller:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "16cc85b825a0412696bceb9e0e01e553"}, {"url": "http://controller:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "18c2b5f7128b44a298c6ed6dd067ae15"}, {"url": "http://controller:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "21ee7ff72dd648f390f637a9251638d3"}, {"url": "http://controller:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "465c2d2988494651a77536cf02c4b3be"}, {"url": "http://controller:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "b5c1f8d9526d4ef89c146ab2f7c12f6c"}], "type": "image", "id": "3963830ad4764f6dbf005596135fea25", "name": "glance"}, {"endpoints": [{"url": "http://controller:8774/v2.1/75d5d6de91744443809a66e386858d2f", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "19e57ea4f1cd4b9ea3b0e7353af82e3b"}, {"url": "http://controller:8774/v2.1/75d5d6de91744443809a66e386858d2f", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5c46816fa8334688b2211a33a7c748e6"}, {"url": "http://controller:8774/v2.1/75d5d6de91744443809a66e386858d2f", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "e4eb4273b8334fe9b147968d32a7aac1"}], "type": "compute", "id": "5aebde00568f47229eb3304ad40b5b3c", "name": "nova"}, {"endpoints": [{"url": "http://controller:5000/v3/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "09d802297f404c89b74e8d36778b6dfe"}, {"url": "http://controller:5000/v3/", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a837bdcc975a4ed1a3e16f8aa5dc1133"}, {"url": "http://controller:35357/v3/", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "dce1373a55044e0983a5256f54aba9a1"}], "type": "identity", "id": "7f4c754f893049b28214d2552dd242b2", "name": "keystone"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "0c29508c8ef04043aa913874169802de", "name": "admin"}, "audit_ids": ["ogV2YBf6QDiObt0mthObVA"], "issued_at": "2017-12-07T13:54:49.000000Z"}}
- Instantiating image api: <class 'openstackclient.api.image_v2.APIv2'>
- curl -g -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}82440f6b8af6037408ed3d6d68e35e146f3b86a5' -H 'Content-Type: application/octet-stream' http://controller:9292/v2/schemas/image
- Starting new HTTP connection (1): controller
- "GET /v2/schemas/image HTTP/1.1" 200 4149
- GET call to glance-api for http://controller:9292/v2/schemas/image used request id req-2aae961a-4737-4428-8cfb-52cfa4f9c3b1
- HTTP/1.1 200 OK
- Content-Type: application/json; charset=UTF-8
- Content-Length: 4149
- X-Openstack-Request-Id: req-2aae961a-4737-4428-8cfb-52cfa4f9c3b1
- Date: Thu, 07 Dec 2017 13:54:50 GMT
- Connection: keep-alive
- {"additionalProperties": {"type": "string"}, "name": "image", "links": [{"href": "{self}", "rel": "self"}, {"href": "{file}", "rel": "enclosure"}, {"href": "{schema}", "rel": "describedby"}], "properties": {"status": {"readOnly": true, "enum": ["queued", "saving", "active", "killed", "deleted", "pending_delete", "deactivated"], "type": "string", "description": "Status of the image"}, "tags": {"items": {"type": "string", "maxLength": 255}, "type": "array", "description": "List of strings related to the image"}, "kernel_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": ["null", "string"], "description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image.", "is_base": false}, "container_format": {"enum": [null, "ami", "ari", "aki", "bare", "ovf", "ova", "docker"], "type": ["null", "string"], "description": "Format of the container"}, "min_ram": {"type": "integer", "description": "Amount of ram (in MB) required to boot image."}, "ramdisk_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": ["null", "string"], "description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.", "is_base": false}, "locations": {"items": {"required": ["url", "metadata"], "type": "object", "properties": {"url": {"type": "string", "maxLength": 255}, "metadata": {"type": "object"}}}, "type": "array", "description": "A set of URLs to access the image file kept in external store"}, "visibility": {"enum": ["public", "private"], "type": "string", "description": "Scope of image accessibility"}, "updated_at": {"readOnly": true, "type": "string", "description": "Date and time of the last image modification"}, "owner": {"type": ["null", "string"], "description": "Owner of the image", "maxLength": 255}, "file": {"readOnly": true, "type": "string", "description": "An image file url"}, "min_disk": {"type": "integer", "description": "Amount of disk space (in GB) required to boot image."}, "virtual_size": {"readOnly": true, "type": ["null", "integer"], "description": "Virtual size of image in bytes"}, "id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": "string", "description": "An identifier for the image"}, "size": {"readOnly": true, "type": ["null", "integer"], "description": "Size of image file in bytes"}, "instance_uuid": {"type": "string", "description": "Metadata which can be used to record which instance this image is associated with. (Informational only, does not create an instance snapshot.)", "is_base": false}, "os_distro": {"type": "string", "description": "Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html", "is_base": false}, "name": {"type": ["null", "string"], "description": "Descriptive name for the image", "maxLength": 255}, "checksum": {"readOnly": true, "type": ["null", "string"], "description": "md5 hash of image contents.", "maxLength": 32}, "created_at": {"readOnly": true, "type": "string", "description": "Date and time of image registration"}, "disk_format": {"enum": [null, "ami", "ari", "aki", "vhd", "vhdx", "vmdk", "raw", "qcow2", "vdi", "iso", "root-tar"], "type": ["null", "string"], "description": "Format of the disk"}, "os_version": {"type": "string", "description": "Operating system version as specified by the distributor", "is_base": false}, "protected": {"type": "boolean", "description": "If true, image will not be deletable."}, "architecture": {"type": "string", "description": "Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html", "is_base": false}, "direct_url": {"readOnly": true, "type": "string", "description": "URL to access the image file kept in external store"}, "self": {"readOnly": true, "type": "string", "description": "An image self url"}, "schema": {"readOnly": true, "type": "string", "description": "An image schema url"}}}
- curl -g -i -X POST -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}82440f6b8af6037408ed3d6d68e35e146f3b86a5' -H 'Content-Type: application/json' -d '{"container_format": "bare", "disk_format": "qcow2", "name": "cirros", "visibility": "public"}' http://controller:9292/v2/images
- "POST /v2/images HTTP/1.1" 500 114
- POST call to glance-api for http://controller:9292/v2/images used request id req-dd8cc873-ac94-4830-941d-5b887106d605
- Request returned failure status 500.
- 500 Internal Server Error
- The server has either erred or is incapable of performing the requested operation.
- (HTTP 500)
- Traceback (most recent call last):
- File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 387, in run_subcommand
- result = cmd.run(parsed_args)
- File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
- return super(Command, self).run(parsed_args)
- File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 100, in run
- column_names, data = self.take_action(parsed_args)
- File "/usr/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 336, in take_action
- image = image_client.images.create(**kwargs)
- File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 235, in create
- resp, body = self.http_client.post(url, data=image)
- File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 290, in post
- return self._request('POST', url, **kwargs)
- File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 279, in _request
- resp, body_iter = self._handle_response(resp)
- File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 107, in _handle_response
- raise exc.from_response(resp, resp.content)
- HTTPInternalServerError: 500 Internal Server Error
- The server has either erred or is incapable of performing the requested operation.
- (HTTP 500)
- clean_up CreateImage: 500 Internal Server Error
- The server has either erred or is incapable of performing the requested operation.
- (HTTP 500)
- Traceback (most recent call last):
- File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in run
- ret_val = super(OpenStackShell, self).run(argv)
- File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 267, in run
- result = self.run_subcommand(remainder)
- File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in run_subcommand
- ret_value = super(OpenStackShell, self).run_subcommand(argv)
- File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 387, in run_subcommand
- result = cmd.run(parsed_args)
- File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
- return super(Command, self).run(parsed_args)
- File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 100, in run
- column_names, data = self.take_action(parsed_args)
- File "/usr/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 336, in take_action
- image = image_client.images.create(**kwargs)
- File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 235, in create
- resp, body = self.http_client.post(url, data=image)
- File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 290, in post
- return self._request('POST', url, **kwargs)
- File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 279, in _request
- resp, body_iter = self._handle_response(resp)
- File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 107, in _handle_response
- raise exc.from_response(resp, resp.content)
- HTTPInternalServerError: 500 Internal Server Error
- The server has either erred or is incapable of performing the requested operation.
- (HTTP 500)
- END return value: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement