Repository navigation
base-host-check: expand to cover more (COMPOSER-2498) - #1432
Conversation
|
TODO:
|
|
@lucasgarfield / @croissanne, when using the hostname customization for an AMI, and booted on EC2 the hostname gets overwritten by How do we want to handle this. This seems like a behavioral issue (we need to not allow hostname customizations when |
|
Looking at the results here it seems like |
I think it might be more reasonable to modify the cloud-init config to set |
|
Rebased on #1456 to make masked services work. |
For now, it seems like testing this in AWS is impractical. And of course, it also seems pointless to expose this to users for AWS. We'll handle all of that in the front end. In the future, we'll probably need to extend these boot tests for all targets. Maybe we can just disable the hostname test for targets that are initialized with cloud-init. |
thozza
left a comment
There was a problem hiding this comment.
Thank you for extending the test coverage, much appreciated.
I've added a few comments.
On a general note, we should consider not failing fast in checks that are checking multiple values in a loop, but failing after all values are checked.
| # we only emit a warning here since the hostname gets reset by cloud-init and we're not | ||
| # entirely sure how to deal with it yet on the service level | ||
| if [[ $actual_hostname != "${expected_hostname}" ]]; then | ||
| echo "🟡 Hostname was not set: hostname=${actual_hostname} expected=${expected_hostname}" | ||
| else | ||
| echo "Hostname was set" | ||
| fi |
There was a problem hiding this comment.
Could the check warn only if cloud-init service is enabled and fail in case there is no cloud-init?
There was a problem hiding this comment.
Only if the service is enabled, if the package is installed, or if it is configured in a certain way? There were a lot of ways and since we don't currently test in any ways where cloud-init isn't being used I felt it wasn't necessary.
There was a problem hiding this comment.
My idea was to warn only if the cloud-init service is enabled, which implies that it is installed. It could be configured not to set the hostname, but let's not complicate it with this option.
You are, of course, right that the effect in our current testing matrix is none. I was thinking more in the context of us not having to remember to fix this test case when we ever end up boot-testing image types without cloud-init.
FWIW, I'm OK with keeping the test as is for now.
Verifies the hostname configuration, if set. Signed-off-by: Simon de Vlieger <[email protected]>
Initial smoke test to see if a user exists. More details to be tested in follow ups. Signed-off-by: Simon de Vlieger <[email protected]>
`hostname` is currently failing kinda expectedly so (since `cloud-init` overwrites whatever customization we set when booted in AWS). Let's run it last so we can also fix that expected failure last. Signed-off-by: Simon de Vlieger <[email protected]>
Signed-off-by: Simon de Vlieger <[email protected]>
Signed-off-by: Simon de Vlieger <[email protected]>
Add firewall rules to the all-customizations so they can be boot-tested. Signed-off-by: Simon de Vlieger <[email protected]>
Signed-off-by: Simon de Vlieger <[email protected]>
Signed-off-by: Simon de Vlieger <[email protected]>
Signed-off-by: Simon de Vlieger <[email protected]>
Signed-off-by: Simon de Vlieger <[email protected]>
Let's make the hostname check emit a yellow circle as a warning, it's currently kinda expected in the image types that we boot test to have this fail due to cloud-init setting the host name on boot. When we start boot testing more image types this can be conditionalized on that. Signed-off-by: Simon de Vlieger <[email protected]>
Images need to be generated newly so the additional testcases will run in CI. Signed-off-by: Simon de Vlieger <[email protected]>
tag v0.140.0 Tagger: imagebuilder-bot <[email protected]> Changes with 0.140.0 ---------------- * Loader part override followups (osbuild/image-builder#1466) * Author: Michael Vogt, Reviewers: Tomáš Hozza * RHEL-10/gce: install cloud-utils-growpart by default (osbuild/image-builder#1463) * Author: Tomáš Hozza, Reviewers: Michael Vogt, Simon de Vlieger * base-host-check: expand to cover more (COMPOSER-2498) (osbuild/image-builder#1432) * Author: Simon de Vlieger, Reviewers: Tomáš Hozza * rhel8,9: move partitioning into YAML (osbuild/image-builder#1390) * Author: Michael Vogt, Reviewers: Tomáš Hozza — Somewhere on the Internet, 2025-04-28 --- tag v0.141.0 Tagger: imagebuilder-bot <[email protected]> Changes with 0.141.0 ---------------- * Shrink the current installer images a bit (osbuild/image-builder#1423) * Author: Brian C. Lane, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza * Update EL10 Azure images with changes made in RHEL 9.6 (osbuild/image-builder#1472) * Author: Achilleas Koutsou, Reviewers: Michael Vogt, Tomáš Hozza * distro: add DNFSetReleaseVerVar to ImageConfig (osbuild/image-builder#1465) * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Tomáš Hozza * test/base-host-check.sh: fix disabled firewall services check (osbuild/image-builder#1471) * Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Tomáš Hozza — Somewhere on the Internet, 2025-04-29 ---
tag v0.140.0 Tagger: imagebuilder-bot <[email protected]> Changes with 0.140.0 ---------------- * Loader part override followups (osbuild/image-builder#1466) * Author: Michael Vogt, Reviewers: Tomáš Hozza * RHEL-10/gce: install cloud-utils-growpart by default (osbuild/image-builder#1463) * Author: Tomáš Hozza, Reviewers: Michael Vogt, Simon de Vlieger * base-host-check: expand to cover more (COMPOSER-2498) (osbuild/image-builder#1432) * Author: Simon de Vlieger, Reviewers: Tomáš Hozza * rhel8,9: move partitioning into YAML (osbuild/image-builder#1390) * Author: Michael Vogt, Reviewers: Tomáš Hozza — Somewhere on the Internet, 2025-04-28 --- tag v0.141.0 Tagger: imagebuilder-bot <[email protected]> Changes with 0.141.0 ---------------- * Shrink the current installer images a bit (osbuild/image-builder#1423) * Author: Brian C. Lane, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza * Update EL10 Azure images with changes made in RHEL 9.6 (osbuild/image-builder#1472) * Author: Achilleas Koutsou, Reviewers: Michael Vogt, Tomáš Hozza * distro: add DNFSetReleaseVerVar to ImageConfig (osbuild/image-builder#1465) * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Tomáš Hozza * test/base-host-check.sh: fix disabled firewall services check (osbuild/image-builder#1471) * Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Tomáš Hozza — Somewhere on the Internet, 2025-04-29 ---
TBD, includes the checks from #1419 plus more.