Skip to content

Commit 226358d

Browse files
committed
OSDOCS-7871: add greenboot status check
1 parent 8578958 commit 226358d

File tree

6 files changed

+78
-3
lines changed

6 files changed

+78
-3
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ Topics:
124124
File: microshift-using-config-tools
125125
- Name: Cluster access with kubeconfig
126126
File: microshift-cluster-access-kubeconfig
127+
- Name: Checking the status of Greenboot health checks
128+
File: microshift-greenboot-checking-status
127129
---
128130
Name: Networking
129131
Dir: microshift_networking
@@ -189,7 +191,7 @@ Topics:
189191
File: microshift-troubleshoot-cluster
190192
- Name: Troubleshoot updates
191193
File: microshift-troubleshoot-updates
192-
- Name: Checking audit logs
194+
- Name: Checking audit logs
193195
File: microshift-audit-logs
194196
- Name: Additional information
195197
File: microshift-things-to-know
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:_content-type: ASSEMBLY
2+
[id="microshift-greenboot-checking-status"]
3+
= Checking Greenboot scripts status
4+
include::_attributes/attributes-microshift.adoc[]
5+
:context: microshift-greenboot-script-status
6+
7+
toc::[]
8+
9+
To deploy applications or make other changes through the {product-title} API with tools other than `kustomize` manifests, you must wait until the Greenboot health checks have finished. This ensures that your changes are not lost if Greenboot rolls your `rpm-ostree` system back to an earlier state.
10+
11+
The `greenboot-healthcheck` service runs one time and then exits. After Greenboot has exited and the system is in a healthy state, you can proceed with configuration changes and deployments.
12+
13+
include::modules/microshift-greenboot-check-status.adoc[leveloffset=+1]

microshift_configuring/microshift-using-config-tools.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ toc::[]
88

99
A YAML file customizes {product-title} instances with your preferences, settings, and parameters.
1010

11+
include::snippets/microshift-greenboot-status-snip.adoc[leveloffset=+2]
12+
1113
include::modules/microshift-config-yaml.adoc[leveloffset=+1]
1214

13-
include::modules/microshift-config-nodeport-limits.adoc[leveloffset=+1]
15+
include::modules/microshift-config-nodeport-limits.adoc[leveloffset=+1]
16+
17+
//[id="additional-resources_microshift-using-config-tools_{context}"]
18+
//[role="_additional-resources"]
19+
//== Additional resources
20+
21+
//TODO:add xref to check greenboot status module after merge

microshift_troubleshooting/microshift-troubleshoot-updates.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ include::modules/microshift-updates-troubleshooting.adoc[leveloffset=+1]
2525
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/index[Composing, installing, and managing RHEL for Edge images]
2626
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/composing_installing_and_managing_rhel_for_edge_images/index#rolling_back_rhel_for_edge_images[Rolling back RHEL for Edge images]
2727
28-
include::modules/microshift-check-journal-logs-updates.adoc[leveloffset=+1]
28+
include::modules/microshift-check-journal-logs-updates.adoc[leveloffset=+1]
29+
30+
include::modules/microshift-greenboot-check-status.adoc[leveloffset=+1]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_running applications/checking-greenboot-scripts-status.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="microshift-greenboot-check-status_{context}"]
7+
= Checking the status of Greenboot health checks
8+
9+
Check the status of Greenboot health checks before making changes to the system or during troubleshooting. You can use any of the following commands to help you ensure that Greenboot scripts have finished running.
10+
11+
.Procedure
12+
13+
* To see a report of health check status, use the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ systemctl show --property=SubState --value greenboot-healthcheck.service
18+
----
19+
+
20+
** An output of `start` means that Greenboot checks are still running.
21+
** An output of `exited` means that checks have passed and Greenboot has exited. Greenboot runs the scripts in the `green.d` directory when the system is a healthy state.
22+
** An output of `failed` means that checks have not passed. Greenboot runs the scripts in `red.d` directory when the system is in this state and might restart the system.
23+
24+
* To see a report showing the numerical exit code of the service where `0` means success and non-zero values mean a failure occurred, use the following command:
25+
+
26+
[source,terminal]
27+
----
28+
$ systemctl show --property=ExecMainStatus --value greenboot-healthcheck.service
29+
----
30+
31+
* To see a report showing a message about boot status, such as `Boot Status is GREEN - Health Check SUCCESS`, use the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ cat /run/motd.d/boot-status
36+
----
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Text snippet included in the following assemblies:
2+
//
3+
// * microshift_configuring/microshift-using-config-tools.adoc
4+
//
5+
// Text snippet included in the following modules:
6+
//
7+
// *
8+
9+
:_content-type: SNIPPET
10+
11+
[NOTE]
12+
====
13+
If you want to make configuration changes or deploy applications through the {product-title} API with tools other than `kustomize` manifests, you must wait until the Greenboot health checks have finished. This ensures that your changes are not lost if Greenboot rolls your `rpm-ostree` system back to an earlier state.
14+
====

0 commit comments

Comments
 (0)