Public Cloud OVHcloud - Nova rebuild avec cloud-init
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

Nova rebuild avec cloud-init

Von
YoannP1
Erstellungsdatum 2018-09-15 13:03:14 (edited on 2024-09-04 11:42:15) in Public Cloud OVHcloud

Il ne semble pas possible d'utiliser "nova rebuild" avec un cloud-init.

Api non compatible côté OVH non ?

```
$ nova help rebuild
usage: nova rebuild [--rebuild-password ] [--poll]
[--minimal] [--preserve-ephemeral] [--name ]
[--description ] [--meta ]
[--key-name ] [--key-unset]
[--user-data ] [--user-data-unset]
[--trusted-image-certificate-id ]
[--trusted-image-certificates-unset]


Shutdown, re-image, and re-boot a server.

Positional arguments:
Name or ID of server.
Name or ID of new image.

Optional arguments:
--rebuild-password
Set the provided admin password on the rebuilt
server.
--poll Report the server rebuild progress until it
completes.
--minimal Skips flavor/image lookups when showing
servers.
--preserve-ephemeral Preserve the default ephemeral storage
partition on rebuild.
--name Name for the new server.
--description New description for the server. (Supported by
API versions '2.19' - '2.latest')
--meta Record arbitrary key/value metadata to
/meta_data.json on the metadata server. Can be
specified multiple times.
--key-name Keypair name to set in the server. Cannot be
specified with the '--key-unset' option.
(Supported by API versions '2.54' -
'2.latest')
--key-unset Unset keypair in the server. Cannot be
specified with the '--key-name' option.
(Supported by API versions '2.54' -
'2.latest')
--user-data User data file to pass to be exposed by the
metadata server. (Supported by API versions
'2.57' - '2.latest')
--user-data-unset Unset user_data in the server. Cannot be
specified with the '--user-data' option.
(Supported by API versions '2.57' -
'2.latest')
--trusted-image-certificate-id
Trusted image certificate IDs used to validate
certificates during the image signature
verification process. Defaults to
env[OS_TRUSTED_IMAGE_CERTIFICATE_IDS]. May be
specified multiple times to pass multiple
trusted image certificate IDs. (Supported by
API versions '2.63' - '2.latest')
--trusted-image-certificates-unset
Unset trusted_image_certificates in the
server. Cannot be specified with the
'--trusted-image-certificate-id' option.
(Supported by API versions '2.63' -
'2.latest')

$ nova rebuild --poll --name test --user-data cloud-config.yml YYYYY XXXXX
usage: nova [--version] [--debug] [--os-cache] [--timings]
[--os-region-name ] [--service-type ]
[--service-name ]
[--os-endpoint-type ]
[--os-compute-api-version ]
[--os-endpoint-override ] [--insecure]
[--os-cacert ] [--os-cert ]
[--os-key ] [--timeout ] [--collect-timing]
[--os-auth-type ] [--os-auth-url OS_AUTH_URL]
[--os-system-scope OS_SYSTEM_SCOPE] [--os-domain-id OS_DOMAIN_ID]
[--os-domain-name OS_DOMAIN_NAME] [--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
[--os-trust-id OS_TRUST_ID]
[--os-default-domain-id OS_DEFAULT_DOMAIN_ID]
[--os-default-domain-name OS_DEFAULT_DOMAIN_NAME]
[--os-user-id OS_USER_ID] [--os-username OS_USERNAME]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-password OS_PASSWORD]
...
error: unrecognized arguments: --user-data XXXXX
Try 'nova help ' for more information.
```


1 Antwort ( Latest reply on 2018-09-15 18:27:45 Von
Jalinn
)

Hello @YoannP1.

Si une API n'est pas autorisé par OVH, tu as un message d'erreur assez explicite.
Je ne l'ai pas en tête mais en gros ça te dit que tes pas admin
La, c'est juste une histoire de syntaxe.
Après, une action (rebuild) peut être autorisée, mais certains arguments interdit... La aussi le message sera normalement assez clair.

Jalinn.