diff options
author | Chad Smith <chad.smith@canonical.com> | 2022-01-13 10:12:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 11:12:23 -0600 |
commit | 0de7acb194dc15650eee1d5332efed82ef162f84 (patch) | |
tree | e223562b3031a82894ceda71d6361aad9f570732 /doc/man/cloud-id.1 | |
parent | e3f3485d875f021915654bf2b64678e151a8d6f6 (diff) | |
download | vyos-cloud-init-0de7acb194dc15650eee1d5332efed82ef162f84.tar.gz vyos-cloud-init-0de7acb194dc15650eee1d5332efed82ef162f84.zip |
cli: cloud-id report not-run or disabled state as cloud-id (#1162)
This fix has two elements:
- cloud-init status will not correctly report 'not-run' prior to systemd
generator running. Only report "disabled" when generator has run
and /run/cloud-init/disabled exists.
- Expose not-run and disabled state in cloud-id responses
- Add unique error codes from cloud-id for error, disabled and not-run.
The new cloud-id exit codes:
0: success
1: error
2: cloud-init is in disabled state
3: cloud-init generator has not run yet
Diffstat (limited to 'doc/man/cloud-id.1')
-rw-r--r-- | doc/man/cloud-id.1 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/man/cloud-id.1 b/doc/man/cloud-id.1 index 59fecdd9..c56587c8 100644 --- a/doc/man/cloud-id.1 +++ b/doc/man/cloud-id.1 @@ -6,6 +6,15 @@ cloud-id \- Report the canonical cloud-id for this instance .SH SYNOPSIS .BR "cloud-id" " [-h] [-j] [-l] [-i <INSTANCE_DATA>]" +.SH DESCRIPTION +cloud-id is the lowercase name of the cloud datasource discovered. + +The cloud-id will be 'not-run' when systemd generator has not run yet. +The cloud-id will be 'disabled' when cloud-init is disabled or when +ds-identify did not find a valid datasource. + +See cloud-init status --long for more information. + .SH OPTIONS .TP .B "-h, --help" @@ -24,6 +33,20 @@ Report extended cloud-id information as tab-delimited string Path to instance-data.json file. Default is /run/cloud-init/instance-data.json +.SH EXIT STATUS +.TP +0 +On success +.TP +1 +Due to an error +.TP +2 +Due to cloud-init in a disabled state. See: cloud-init status --long +.TP +3 +The cloud-init generator and discovery has not yet run. + .SH COPYRIGHT Copyright (C) 2021 Canonical Ltd. License GPL-3 or Apache-2.0 |