tech:pb_openstack_cli_timeout_glance
Pb openstack cli timeout glance
Erreur
Error finding address for https://192.168.21.53:9292/v2/images/52fc9459-7dcb-48f9-a8e3-b5c8d0d76359/file: The read operation timed out CommunicationError: Error finding address for https://192.168.21.53:9292/v2/images/caf82982-01d8-47d2-b360-e34ea76e152e/file: The read operation timed out
OK
wget http://download.cirros-cloud.net/0.5.0/cirros-0.5.0-x86_64-disk.img openstack image create cirros --file cirros-0.5.0-x86_64-disk.img --disk-format qcow2 --container-format bare --public
NOK après 18 minutes
time openstack image create test --file big-image.vmdk --disk-format vmdk --container-format bare --debug
{"container_format": "bare", "min_ram": 0, "updated_at": "2020-03-06T16:00:43Z", "file": "/v2/images/caf82982-01d8-47d2-b360-e34ea76e152e/file", "owner": "48ab5c57c7a246c58dc7ef86c7b36309", "id": "caf82982-01d8-47d2-b360-e34ea76e152e", "size": null, "self": "/v2/images/caf82982-01d8-47d2-b360-e34ea76e152e", "disk_format": "vmdk", "os_hash_algo": null, "schema": "/v2/schemas/im$ ge", "status": "queued", "tags": [], "visibility": "shared", "locations": [], "min_disk": 0, "virtual_size": null, "name": "test_jb", "checksum": null, "created_at": "2020-03-06T16:00:43Z", "os_hidden": false, "protected": false, "os_hash_value": null} curl -g -i -X PUT -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}82af774b6a8ce8bdd6fd268a645b7a b978fa588b' -H 'Content-Type: application/octet-stream' --cacert /etc/ssl/certs --cert None --key None https://192.168.21.53:9292/v2/images/caf82982-01d8-47d2-b360-e34ea76e152e/file curl -g -i -X DELETE -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}82af774b6a8ce8bdd6fd268a645 b7ab978fa588b' -H 'Content-Type: application/octet-stream' --cacert /etc/ssl/certs --cert None --key None https://192.168.21.53:9292/v2/images/caf82982-01d8-47d2-b360-e34ea76e152e Starting new HTTPS connection (2): 192.168.21.53:9292 https://192.168.21.53:9292 "DELETE /v2/images/caf82982-01d8-47d2-b360-e34ea76e152e HTTP/1.1" 204 0 DELETE call to image for https://192.168.21.53:9292/v2/images/caf82982-01d8-47d2-b360-e34ea76e152e used request id req-3dc34178-3eb1-4cff-aef2-b09f1e6ffedf
Solution
~/.curlrc
max-time = 0
Ou encore
sudo apt-get install python-glanceclient #sudo apt-get install python3-glanceclient
openstack.rc
unset $(set |grep _ENDPOINT_ |cut -d= -f1) unset $(set |grep ^OS_ |cut -d= -f1) export LC_ALL=C # LC_ALL=C.UTF-8 export OS_NO_CACHE='true' export OS_CACERT=/etc/ssl/certs/ export OS_IDENTITY_API_VERSION='3' export OS_AUTH_URL="https://192.168.21.53:5000/v3" export OS_USERNAME=admin export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_DOMAIN_NAME=Default export OS_PASSWORD="P@ssw0rd"
source clouds.rc glance image-create --name image-name --file big-image.vmdk --disk-format vmdk --container-format bare --visibility private
Ou
Faire tourner un serveur web pour partager le fichier image (qcow2, VMDK, raw…)
python3 -m http.server 8081
Puis
glance task-create --type import --input '{"import_from_format": "vmdk", "import_from": "http://192.168.21.33:8081/plop.vmdk", "image_properties": {"name": "plop-imported", "disk_format": "vmdk", "container_format": "bare", "vmware_adaptertype": "ide", "vmware_disktype": "streamOptimized", "vmware_ostype": "otherGuest"}}'
tech/pb_openstack_cli_timeout_glance.txt · Dernière modification : de Jean-Baptiste
