Public Cloud OVHcloud - Problème automatisation SnapShoot
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Problème automatisation SnapShoot

Von
RamziA
Erstellungsdatum 2018-03-13 17:21:07 (edited on 2024-09-04 13:24:13) in Public Cloud OVHcloud

Bonjour,

Je suis ce tutoriel https://www.cloudvps.com/blog/automatic-backup-snapshots-openstack afin d'automatiser mes Snapshoot.

Cependant lorsque je tape "nova credentials" j'ai cette erreur qui apparait :
ERROR (ClientException): Unknown Error (HTTP 300)

Du coup je peux pas automatiser la suite avec le script pour le lancer en cron.
Le contenu du document /root/.openstack_snapshotrc :
#!/usr/bin/env bash
# To use an OpenStack cloud you need to authenticate against the Identity
# service named keystone, which returns a **Token** and **Service Catalog**.
# The catalog contains the endpoints for all services the user/tenant has
# access to - such as Compute, Image Service, Identity, Object Storage, Block
# Storage, and Networking (code-named nova, glance, keystone, swift,
# cinder, and neutron).
#
# *NOTE*: Using the 2.0 *Identity API* does not necessarily mean any other
# OpenStack API is version 2.0. For example, your cloud provider may implement
# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is
# only for the Identity API served through keystone.
export OS_AUTH_URL=https://auth.cloud.ovh.net/
# With the addition of Keystone we have standardized on the term **tenant**
# as the entity that owns the resources.
export OS_TENANT_ID=ID du projet (mis par défaut par OVH)
export OS_TENANT_NAME=Nom du projet (mis par défaut par OVH)
# unsetting v3 items in case set
unset OS_PROJECT_ID
unset OS_PROJECT_NAME
unset OS_USER_DOMAIN_NAME
unset OS_INTERFACE
# In addition to the owning entity (tenant), OpenStack stores the entity
# performing the action as the **user**.
export OS_USERNAME="j'ai mis le nom d'utilisateur"
# With Keystone you pass the keystone password.
echo "Please enter your OpenStack Password for project $OS_TENANT_NAME as user $OS_USERNAME: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD="j'ai remplacé la variable par mon mot de passe"
# If your configuration has multiple regions, we set that information here.
# OS_REGION_NAME is optional and only valid in certain environments.
export OS_REGION_NAME="GRA3"
# Don't leave a blank variable, unset it if it was empty
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
export OS_ENDPOINT_TYPE=publicURL
export OS_IDENTITY_API_VERSION=2

Merci de votre aide :)
Noé


6 Antworten ( Latest reply on 2018-03-20 12:20:32 Von
RamziA
)

Hello,
Enlevez le 'read -sr ...' le script attend votre réponse ;)

Merci mais maintenant j'ai cette erreur :

root@srv1:~# nova credentials
ERROR (CommandError): You must provide a username or user id via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]

Dois-je mettre entre guillemet les différents champs (type OS_USERNAME etc... ?)

Vous avez bien fait un source du fichier openstack_snapshotrc ?

Oui tout à fait la commande pour y accéder c'est :

nano /root/.openstack_snapshotrc

Et la il m'ouvre le fichier avec toutes les configurations

Il faut faire "source /root/.openstack_snapshotrc" pour appliquer le fichier.
cf https://docs.ovh.com/fr/public-cloud/charger-les-variables-denvironnement-openstack/

Bonjour,

Tout fonctionne merci beaucoup de votre aide :) snapshoot automatique et fonctionnel