Skip to content

test: kernel name in base-host-check (COMPOSER-2498) - #1419

Closed
achilleas-k wants to merge 2 commits into
osbuild:mainfrom
achilleas-k:base-host-check/more-stuff
Closed

achilleas-k wants to merge 2 commits into
osbuild:mainfrom
achilleas-k:base-host-check/more-stuff

Conversation

@achilleas-k

@achilleas-k achilleas-k commented Apr 11, 2025 •

Copy link
Copy Markdown
Member

test: kernel name in base-host-check


test: add the kernel.name customization to all-customizations

This enables the kernel name customization test since we run
base-host-check on AMI builds and all-customizations is used with AMIs.


@achilleas-k
achilleas-k requested review from a team and thozza as code owners April 11, 2025 14:02
@achilleas-k
achilleas-k requested review from mvo5 and schuellerf April 11, 2025 14:04
mvo5
mvo5 previously approved these changes Apr 11, 2025

@mvo5 mvo5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Comment thread test/scripts/base-host-check.sh Outdated
[[ "$(hostname)" == "$(jq -r '.blueprint.customizations.hostname' "${config}")" ]]
fi

if jq -e '.blueprint.customizations.kernel.name' "${config}"; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(super nitpick) maybe a small comment that the kernel-rt,debug customization sets this (its not part of all-configs) but maybe/probably overkill

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean. Yeah, we don't set any alt kernels in all-customizations. Maybe we should make it kernel-debug though?

We have a kernel-debug config for iot-commit. Maybe we should add ami to that config too to cover it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added kernel-debug as the kernel name in all-customizations, making the name of the test a little more accurate.

@achilleas-k

achilleas-k commented Apr 11, 2025 •

Copy link
Copy Markdown
Member Author

There's some really interesting (and inconsistent) failures in the tests.
I think some of them are simply that we're hitting limits with the number of AWS instances we're running. But I'm also seeing some hostname checks and failures to boot.

But that's Monday's problem

@supakeen supakeen changed the title test: hostname and kernel name in base-host-check test: hostname and kernel name in base-host-check (COMPOSER-2498) Apr 14, 2025

@thozza thozza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these tests.

The kernel name test is IMO not correct.

In addition, I would prefer not to use shortcuts to make the test script fail, but instead print a message indicating which check failed. This information is currently lost, and the script just "exits with 1"...

Comment thread test/scripts/base-host-check.sh Outdated
fi

if jq -e '.blueprint.customizations.kernel.name' "${config}"; then
[[ "$(uname -s)" == "$(jq -r '.blueprint.customizations.kernel.name' "${config}")" ]]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not the correct approach.

[root@vm-10-0-184-196 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.7 Beta (Plow)
[root@vm-10-0-184-196 ~]# uname -s
Linux

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I don't know what I was thinking. It turns out this is pretty tricky to check. I gave it a shot though.

@achilleas-k

Copy link
Copy Markdown
Member Author

Ideally, a failed check would not exit 1 and we would print error messages and then exit if there's at least one, but doing this in bash is annoying so let's keep it like it is and rewrite it in a real language later.

@achilleas-k

Copy link
Copy Markdown
Member Author

Ok, now we're seeing a failure that I was sort of expecting. The hostname doesn't match because cloud-init (I think it's cloud-init?) sets it again on boot. I think this is a good opportunity to re-examine this. Either find the best way to stop this from happening if and when a user sets a hostname on an AMI build, or inform users (through docs) that hostnames are overridden when launching on EC2 with default settings and how to disable it on the platform.

(Note: there's a bit of speculation about the inner workings here on my part; I'd like to dig deeper at some point)

@supakeen

Copy link
Copy Markdown
Member

Ok, now we're seeing a failure that I was sort of expecting. The hostname doesn't match because cloud-init (I think it's cloud-init?) sets it again on boot. I think this is a good opportunity to re-examine this. Either find the best way to stop this from happening if and when a user sets a hostname on an AMI build, or inform users (through docs) that hostnames are overridden when launching on EC2 with default settings and how to disable it on the platform.

(Note: there's a bit of speculation about the inner workings here on my part; I'd like to dig deeper at some point)

@lucasgarfield and I discussed this in our chat; because I found out the same in #1432 where I do print the values if things failed :)

@supakeen

Copy link
Copy Markdown
Member

Obsoleted by #1432. If you can drop the hostname check from this one then we can merge the kernel-change.

@achilleas-k

Copy link
Copy Markdown
Member Author

Haven't forgotten about this but I'll get back to it when I have time, unless someone finds some time to clean it up and only do the kernel name test.

@mvo5
mvo5 force-pushed the base-host-check/more-stuff branch from 43c9a46 to a538ba0 Compare April 29, 2025 11:53
@mvo5 mvo5 changed the title test: hostname and kernel name in base-host-check (COMPOSER-2498) test: kernel name in base-host-check (COMPOSER-2498) Apr 29, 2025

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this up, @mvo5. Sadly, I can't approve :)

mvo5
mvo5 previously approved these changes Apr 29, 2025

@mvo5 mvo5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can

thozza
thozza previously approved these changes Apr 29, 2025

@thozza thozza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@thozza
thozza enabled auto-merge April 29, 2025 13:02
@achilleas-k
achilleas-k dismissed stale reviews from thozza and mvo5 via 5967f06 May 12, 2025 12:10
@achilleas-k
achilleas-k force-pushed the base-host-check/more-stuff branch from a538ba0 to 5967f06 Compare May 12, 2025 12:10
@achilleas-k

Copy link
Copy Markdown
Member Author

Rebased and fixed conflicts.

@achilleas-k
achilleas-k requested review from mvo5 and thozza May 12, 2025 12:10
thozza
thozza previously approved these changes May 12, 2025

@thozza thozza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@achilleas-k
achilleas-k force-pushed the base-host-check/more-stuff branch from 4327400 to d5e6463 Compare May 28, 2025 07:48
thozza
thozza previously approved these changes May 28, 2025
@achilleas-k

Copy link
Copy Markdown
Member Author

Some tests are failing rather consistently on the boot check. I don't think it's an issue with this change, unless kernel-debug is causing issues. I'd like to keep this PR open and see if I can add some stability to the tests (at least some retry logic?) in another PR.

@github-actions

Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions

github-actions Bot commented Aug 1, 2025

Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Aug 1, 2025
@achilleas-k achilleas-k removed the Stale label Aug 1, 2025
@achilleas-k
achilleas-k force-pushed the base-host-check/more-stuff branch 2 times, most recently from 4439844 to 8772059 Compare August 6, 2025 16:03
@github-actions

github-actions Bot commented Sep 6, 2025

Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Sep 6, 2025
@achilleas-k achilleas-k removed the Stale label Sep 9, 2025
@github-actions

Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Oct 10, 2025
This enables the kernel name customization test since we run
base-host-check on AMI builds and all-customizations is used with AMIs.
@achilleas-k
achilleas-k force-pushed the base-host-check/more-stuff branch from 8772059 to 2a8631a Compare October 10, 2025 11:16
@github-actions github-actions Bot removed the Stale label Oct 11, 2025
@github-actions

Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions

Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Dec 13, 2025
@github-actions

Copy link
Copy Markdown

This PR was closed because it has been stalled for 30+7 days with no activity.

@github-actions github-actions Bot closed this Dec 20, 2025
auto-merge was automatically disabled December 20, 2025 04:14

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants