6.4. Testing a workload health check script
Prerequisites
- You have root access.
- You installed a workload.
- You created a health check script for the workload.
- The MicroShift service is enabled.
The output of the greenboot workload health check script varies with the host system type. Example outputs are included for your reference.
Procedure
To test that greenboot is running a health check script file, reboot the host by running the following command:
$ sudo rebootExamine the output of greenboot health checks by running the following command:
$ sudo journalctl -o cat -u greenboot-healthcheck.service注意MicroShift core service health checks run before the workload health checks.
Example output for a RHEL for Edge system
GRUB boot variables: boot_success=0 boot_indeterminate=0 Greenboot variables: GREENBOOT_WATCHDOG_CHECK_ENABLED=true MICROSHIFT_WAIT_TIMEOUT_SEC=600 System installation type: ostree System installation status: * rhel 19619bd269094510180c845c44d0944fd9aa15925376f249c4d680a3355e51ae.0 Version: 9.4 origin refspec: edge:rhel-9.4-microshift-4.18Example output for an image mode for RHEL system
GRUB boot variables: boot_success=0 Greenboot variables: GREENBOOT_WATCHDOG_CHECK_ENABLED=true MICROSHIFT_WAIT_TIMEOUT_SEC=600 System installation type: bootc System installation status: bootcHostExample output for an RPM system
GRUB boot variables: boot_success=1 boot_indeterminate=0 Greenboot variables: GREENBOOT_WATCHDOG_CHECK_ENABLED=true System installation type: RPM System installation status: Not an ostree / bootc system