Table des matières
- 2026:
- 2025:
4 billet(s) pour juillet 2026
| Procédure simple augmentation de la SWAP | 2026/07/17 15:49 | Jean-Baptiste |
| Exemple git clone avec Ansible | 2026/07/16 14:47 | Jean-Baptiste |
| Windows exe - Comparaison de fichiers binaires | 2026/07/16 10:25 | Jean-Baptiste |
| Pb git | 2026/07/01 17:36 | Jean-Baptiste |
Pb OpenStack client API - Debian unable to establish connection to
Pb Debian - Unable to establish connection to
$ export OS_AUTH_URL=https://vio.acme.local:5000/v3 $ openstack service list Unable to establish connection to https://192.168.51.61:5000/v3/auth/tokens
Mais je ne veux pas me connecter sur https://192.168.51.61:5000/v3/auth/tokens mais sur https://vio.acme.local:5000/v3 ! D'où sort ce 192.168.51.61 ?
Voilà la réponse
curl https://vio.acme.local:5000/ | jq
{ "versions": { "values": [ { "status": "stable", "updated": "2018-02-28T00:00:00Z", "media-types": [ { "base": "application/json", "type": "application/vnd.openstack.identity-v3+json" } ], "id": "v3.10", "links": [ { "href": "https://192.168.51.61:5000/v3/", "rel": "self" } ] }, { "status": "deprecated", "updated": "2016-08-04T00:00:00Z", "media-types": [ { "base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json" } ], "id": "v2.0", "links": [ { "href": "https://192.168.51.61:5000/v2.0/", "rel": "self" }, { "href": "https://docs.openstack.org/", "type": "text/html", "rel": "describedby" } ] } ] } }
Mais comment cela se fait-il que ça marche sous Ubuntu (paquet plus récent) sans passer par 192.168.51.61:5000 ?
Pour infos (Sur une machine Ubuntu OK)
openstack endpoint list | grep identity
| Interface | URL |
|---|---|
| admin | https://192.168.51.61:35357/v3 |
| internal | https://192.168.51.61:5000/v3 |
| public | https://vio.acme.local:5000/v3 |
En mode debug
openstack service list --debug
Using auth plugin: password
Using parameters {'username': 'Admin', 'project_name': 'admin', 'user_domain_name': 'local', 'auth_url': 'https://vio.acme.local:5000/v3', 'password': '***', 'project_domain_id': 'default'}
Get auth_ref
REQ: curl -g -i --cacert "/etc/ssl/certs/" -X GET https://vio.acme.local:5000/v3 -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.12.1 python-requests/2.12.4 CPython/2.7.13"
Starting new HTTPS connection (1): vio.acme.local
https://vio.acme.local:5000 "GET /v3 HTTP/1.1" 200 253
RESP: [200] Date: Fri, 15 Mar 2019 16:24:42 GMT Server: Apache/2.4.18 (Ubuntu) Vary: X-Auth-Token,Accept-Encoding X-Distribution: Ubuntu x-openstack-request-id: req-e9811abb-cd7a-4811-8164-76e86fcedc59 Content-Type: application/json Content-Length: 253
RESP BODY: {"version": {"status": "stable", "updated": "2018-02-28T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.10", "links": [{"href": "https://192.168.51.61:5000/v3/", "rel": "self"}]}}
Making authentication request to https://192.168.51.61:5000/v3/auth/tokens
Starting new HTTPS connection (1): 192.168.51.61
Solution
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"}}'
Pb OpenStack cinder - volume status on error - Err Update driver status failed
Devstack
WARNING cinder.volume.manager Update driver status failed: (config name lvmdriver-1) is uninitialized." WARNING cinder.volume.manager [None req-c2fc258b-ae9a-450b-b348-d7916542ff49 None None] Update driver status failed: (config name lvmdriver-1) is uninitialized.
[Error: Build of instance add5dc51-259c-42b4-93d6-9efa0aa90507 aborted: Volume e42027a0-a257-4fb0-8ce9-4a044dfc57ad did not finish being created even after we waited 0 seconds or 1 attempts. And its status is error.].
openstack volume list
“Status error”
Solution
/etc/cinder/cinder.conf
[lvmdriver-1] #volume_group = stack-volumes-lvmdriver-1 volume_group = ubuntu-vg
systemctl restart "devstack@c-*"
Voir Cinder : https://vishmule.com/2016/03/07/basic-cinder-volume-service-functionality-in-openstack-part1/
Pb OpenStack - pas d’accès a la console
Récupérer la console :
#nova get-vnc-console adf9c868-a595-4ae8-9ee8-fb775ab4c8de novnc
openstack console url show adf9c868-a595-4ae8-9ee8-fb775ab4c8de novnc
Solution
/etc/nova/nova-cpu.conf
[vnc] #server_proxyclient_address = 127.0.0.1 server_proxyclient_address = 0.0.0.0 #server_listen = 127.0.0.1 server_listen = 0.0.0.0 #novncproxy_base_url = http://10.245.108.3:6080/vnc_auto.html novncproxy_base_url = http://172.18.200.228:6080/vnc_auto.html [spice] #html5proxy_base_url = http://10.245.108.3:6082/spice_auto.html html5proxy_base_url = http://172.18.200.228:6082/spice_auto.html
sudo systemctl restart "devstack@n-*"
Pb OpenSSL LibreSSL Error Loading extension section v3_ca
Voir aussi :
$ openssl genrsa -des3 -out macle.key 2048 #Voir aussi "openssl ecparam -genkey" pour Elliptic Curve key Generating RSA private key, 2048 bit long modulus ................................................+++ ...................................................+++ e is 65537 (0x10001) Enter pass phrase for macle.key: Verifying - Enter pass phrase for macle.key:
$ openssl req -new -x509 -days 3650 -key macle.key -sha256 -extensions v3_ca -out macle.crt Error Loading extension section v3_ca
Le problème venait de LibreSSL (pourquoi !?)
Solution 1 (rapide) :
Spécifier le chemin pour prendre l'openssl de la distribution GNU/Linux
/usr/bin/openssl req -new -x509 -days 3650 -key macle.key -sha256 -extensions v3_ca -out macle.crt
Solution 2 (la bonne) :
mv /usr/local/etc/ssl{,.old} ln -s /etc/ssl /usr/local/etc/ssl
En effet, la conf n'est pas la même
# grep -ri v3_ca /etc/ssl /etc/ssl/openssl.cnf:x509_extensions = v3_ca # The extentions to add to the self signed cert /etc/ssl/openssl.cnf:[ v3_ca ]
openssl.cnf
[ v3_ca ] subjectKeyIdentifier=hash authorityKeyIdentifier=keyid:always,issuer basicConstraints = CA:true [ req ] x509_extensions = v3_ca # The extentions to add to the self signed cert
Autres
$ openssl x509 -ext basicConstraints,keyUsage -noout -in /usr/share/ca-certificates/mozilla/VeriSign_Universal_Root_Certification_Authority.crt
X509v3 Basic Constraints: critical
CA:TRUE
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
