Skip to content

Commit

Permalink
man: Document cloud-init error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb committed Oct 26, 2023
1 parent cf46b3f commit cd4bd0f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
10 changes: 10 additions & 0 deletions doc/man/cloud-init.1
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ Run a single module.
.B "status"
Report cloud-init status or wait on completion.

.SH EXIT STATUS

.IP
0 - Success
.IP
1 - Error - Cloud-init failed.
.IP
2 - Recoverable error - Cloud-init completed but experienced errors.


.SH COPYRIGHT
Copyright (C) 2020 Canonical Ltd. License GPL-3 or Apache-2.0

Expand Down
15 changes: 7 additions & 8 deletions tests/unittests/cmd/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,13 @@ def fakeexists(filepath):
1,
dedent(
"""\
status: error
extended_status: error
boot_status_code: enabled-by-kernel-cmdline
last_update: Thu, 01 Jan 1970 00:02:05 +0000
detail:
DataSourceNoCloud [seed=/var/.../seed/nocloud-net][dsmode=net]
"""
status: error
extended_status: error
boot_status_code: enabled-by-kernel-cmdline
last_update: Thu, 01 Jan 1970 00:02:05 +0000
detail:
DataSourceNoCloud [seed=/var/.../seed/nocloud-net][dsmode=net]
"""
),
id="on_errors_long",
),
Expand Down Expand Up @@ -507,7 +507,6 @@ def fakeexists(filepath):
"datasource": "",
"detail": "Running in stage: init",
"errors": [],
"last_update": "Thu, 01 Jan 1970 00:02:04 +0000",
"status": "running",
"extended_status": "running",
"init": {"finished": None, "start": 124.456},
Expand Down

0 comments on commit cd4bd0f

Please sign in to comment.