diff --git a/tests/cmc-upgrade-kernel-test.md b/tests/cmc-upgrade-kernel-test.md index eb8fdb7..b0db9e6 100644 --- a/tests/cmc-upgrade-kernel-test.md +++ b/tests/cmc-upgrade-kernel-test.md @@ -20,8 +20,11 @@ Validate CMC behavior across staged kernel upgrades on a cloned VM, including re - Cirrus profile/project: `gcstage` / `skidamarink` ## Credential Source -- Use credentials from: `/home/aw/code/cds/.env.credentials.local` +- Use credentials from: `/home/cirrus/cds/.env.credentials.local` - Do not hardcode usernames/passwords in test records or commands. +- Before any vCenter, SSH, Red Hat subscription, or CMC action, load credentials with `set -a; source /home/cirrus/cds/.env.credentials.local; set +a`. +- Verify required credential variable names are present without printing secret values. +- Do not parse the credential file with `grep`/`awk` as the authority; source it and inspect the environment because entries may use `export KEY=...`. ## CMC Tooling Rule (Global) - For all CMC-related actions in this test, use the `cirrusdata` skill/CLI path. @@ -48,7 +51,7 @@ Validate CMC behavior across staged kernel upgrades on a cloned VM, including re - `subscription-manager unregister` - `subscription-manager clean` - `subscription-manager register --username "$REDHAT_SUBSCRIPTION_USER" --password "$REDHAT_SUBSCRIPTION_PASSWORD"` -- Source credentials from `/home/aw/code/cds/.env.credentials.local`. +- Source credentials from `/home/cirrus/cds/.env.credentials.local`. ## SUSE Exclusion Rule (Global) - Do not run this test against SUSE/SLES ATVM machines. @@ -84,6 +87,7 @@ Validate CMC behavior across staged kernel upgrades on a cloned VM, including re - Do not begin teardown until every item below is checked complete. - If any checklist item cannot be checked, stop the test and record the blocker. +- [ ] 0. Source `/home/cirrus/cds/.env.credentials.local` and verify required credential variables are present without printing secret values. - [ ] 1. Confirm the requested source host is not a SUSE/SLES machine. - [ ] 2. Remove offline hosts in `skidamarink` using MCP offline-host cleanup. - [ ] 3. Confirm source host is powered on for the inspection phase. @@ -105,7 +109,7 @@ Validate CMC behavior across staged kernel upgrades on a cloned VM, including re - [ ] 18. Verify both FC passthrough devices are no longer present on the clone. - [ ] 19. Power on the clone. - [ ] 20. Query vCenter guest-tools for the live clone IP. -- [ ] 21. SSH to the live clone IP using credentials from `/home/aw/code/cds/.env.credentials.local`. +- [ ] 21. SSH to the live clone IP using credentials from `/home/cirrus/cds/.env.credentials.local`. - [ ] 22. Change the OS hostname to the clone name with `.` replaced by `-`. - [ ] 23. Convert networking from static IP to DHCP. - [ ] 24. Remove/clean static IP configuration references. @@ -153,6 +157,11 @@ Validate CMC behavior across staged kernel upgrades on a cloned VM, including re ## Test Procedure The `Execution Checklist` above is the authoritative run ledger. Use the procedure below as the detailed action reference for each checklist item. +0. Credential gate: + - Before any MCP, vCenter, SSH, Red Hat subscription, or CMC action, load credentials with `set -a; source /home/cirrus/cds/.env.credentials.local; set +a`. + - Verify required variables are present without printing secret values: `VCENTER_HOST`, `VCENTER_USER`, `VCENTER_PASSWORD`, `ATVM_TARGET_USER`, `ATVM_TARGET_PASSWORD`, `REDHAT_SUBSCRIPTION_USER`, `REDHAT_SUBSCRIPTION_PASSWORD`, `CMC_GCSTAGE_URL`, `CMC_GCSTAGE_REGISTRATION_CODE`, and `CIRRUS_API_TOKEN`. + - If any required variable is missing, hard stop before powering on or modifying any VM. + - Do not parse the credential file with `grep`/`awk` as the authority; source it and inspect the environment because entries may use `export KEY=...`. 1. Confirm the requested source host is not a SUSE/SLES machine. If it is SUSE/SLES, hard stop immediately and do not power on, inspect, or clone the machine. 2. Remove offline hosts in `skidamarink` using MCP offline-host cleanup. 3. Confirm source host is powered on for the inspection phase. If it is powered off, power it on. @@ -187,7 +196,7 @@ The `Execution Checklist` above is the authoritative run ledger. Use the procedu 18. Verify in vCenter that both FC passthrough devices are no longer present on the clone. 19. Power on clone. 20. Query vCenter guest-tools for the live clone IP. -21. SSH to the live clone IP using credentials from `/home/aw/code/cds/.env.credentials.local`. +21. SSH to the live clone IP using credentials from `/home/cirrus/cds/.env.credentials.local`. 22. Change OS hostname to clone name, replacing `.` with `-`. 23. Convert networking from static IP to DHCP. 24. Remove/clean static IP configuration references. @@ -195,7 +204,7 @@ The `Execution Checklist` above is the authoritative run ledger. Use the procedu 26. Query vCenter guest-tools again for the new live clone IP. 27. SSH to the new live clone IP and verify the DHCP state. 28. If the clone still reports the previous static IP, fix static config cleanup and repeat reboot/verify. -29. Continue all remaining steps using the live DHCP IP from vCenter and credentials from `/home/aw/code/cds/.env.credentials.local`. +29. Continue all remaining steps using the live DHCP IP from vCenter and credentials from `/home/cirrus/cds/.env.credentials.local`. 30. Before the first CMC install, wipe the 10GB source disk with `dd if=/dev/zero of=/dev/sdb bs=1M count=32 status=progress conv=fsync`, then verify that no filesystem or partition signatures remain (`wipefs -n /dev/sdb`, `blkid /dev/sdb`, `file -s /dev/sdb`, `lsblk -f /dev/sdb`). This disk prep is one-time only and must not be repeated in later stages of the test. 31. Using `cirrusdata` (`gcstage`, project `skidamarink`), reinstall CMC on clone, always adding `-no-prebuilt-mtdi-nexus`. 32. Create local migration from 10GB source disk to 11GB destination disk using `cirrusdata`.