这是indexloc提供的服务,不要输入任何密码
Skip to content

Test fixes for imageboot and Hyperdisk requirements #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jdieter
Copy link
Contributor

@jdieter jdieter commented Jul 16, 2025

This PR contains a couple of fixes for various tests. More detailed descriptions are in the commit messages.

Copy link

Hi @jdieter. Thanks for your PR.

I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ChaitanyaKulkarni28
Copy link
Member

/ok-to-test

jdieter added 2 commits July 16, 2025 18:04
…ired

We have a number of places where we check if a hyperdisk is required for a
machine type, but each check is slightly different.  In the last commit, a
new function, `HyperdiskNeeded` was added to the hotattach test that has
the most comprehensive check on whether or not a hyperdisk is required.

This commit moves that function to utils/test_utils.go and updates all the
other places where we need a hyperdisk to use that function, giving us one
source of truth as to whether or not a hyperdisk is required for a machine
type.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
In Rocky 8, when a reboot command is sent, the connection is often
terminated before being properly disconnected, which is read as an error in
this test.  By checking whether the error message contains "signal:
terminated" and only raising an error if it doesn't, we ensure that the
test gets past this step.

There is a second problem where a good number of the instance types don't
reboot quickly enough to kill the test before the fatal error "marker file
does not exist" is triggered.  By adding a one minute sleep, we ensure that
the fatal error is only triggered if the guest hasn't rebooted within 60
seconds.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
copybara-service bot pushed a commit that referenced this pull request Jul 16, 2025
--
e5cf739 by Jonathan Dieter <jdieter@ciq.com>:

Generalize HyperdiskNeeded function so it's used everywhere it's required

We have a number of places where we check if a hyperdisk is required for a
machine type, but each check is slightly different.  In the last commit, a
new function, `HyperdiskNeeded` was added to the hotattach test that has
the most comprehensive check on whether or not a hyperdisk is required.

This commit moves that function to utils/test_utils.go and updates all the
other places where we need a hyperdisk to use that function, giving us one
source of truth as to whether or not a hyperdisk is required for a machine
type.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>

--
75218f6 by Jonathan Dieter <jdieter@ciq.com>:

Fix imageboot test to handle a couple of error conditions

In Rocky 8, when a reboot command is sent, the connection is often
terminated before being properly disconnected, which is read as an error in
this test.  By checking whether the error message contains "signal:
terminated" and only raising an error if it doesn't, we ensure that the
test gets past this step.

There is a second problem where a good number of the instance types don't
reboot quickly enough to kill the test before the fatal error "marker file
does not exist" is triggered.  By adding a one minute sleep, we ensure that
the fatal error is only triggered if the guest hasn't rebooted within 60
seconds.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
FUTURE_COPYBARA_INTEGRATE_REVIEW=#243 from jdieter:test-fixes 75218f6
PiperOrigin-RevId: 783927210
copybara-service bot pushed a commit that referenced this pull request Jul 16, 2025
--
e5cf739 by Jonathan Dieter <jdieter@ciq.com>:

Generalize HyperdiskNeeded function so it's used everywhere it's required

We have a number of places where we check if a hyperdisk is required for a
machine type, but each check is slightly different.  In the last commit, a
new function, `HyperdiskNeeded` was added to the hotattach test that has
the most comprehensive check on whether or not a hyperdisk is required.

This commit moves that function to utils/test_utils.go and updates all the
other places where we need a hyperdisk to use that function, giving us one
source of truth as to whether or not a hyperdisk is required for a machine
type.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>

--
75218f6 by Jonathan Dieter <jdieter@ciq.com>:

Fix imageboot test to handle a couple of error conditions

In Rocky 8, when a reboot command is sent, the connection is often
terminated before being properly disconnected, which is read as an error in
this test.  By checking whether the error message contains "signal:
terminated" and only raising an error if it doesn't, we ensure that the
test gets past this step.

There is a second problem where a good number of the instance types don't
reboot quickly enough to kill the test before the fatal error "marker file
does not exist" is triggered.  By adding a one minute sleep, we ensure that
the fatal error is only triggered if the guest hasn't rebooted within 60
seconds.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
FUTURE_COPYBARA_INTEGRATE_REVIEW=#243 from jdieter:test-fixes 75218f6
PiperOrigin-RevId: 783927210
The `c3` family doesn't actually require a hyperdisk, but it doesn't
support standard disks, so, given that there's no way to specify a minimum
disk type in the test suite, let's just make the tests require a hyperdisk.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
copybara-service bot pushed a commit that referenced this pull request Jul 21, 2025
--
e5cf739 by Jonathan Dieter <jdieter@ciq.com>:

Generalize HyperdiskNeeded function so it's used everywhere it's required

We have a number of places where we check if a hyperdisk is required for a
machine type, but each check is slightly different.  In the last commit, a
new function, `HyperdiskNeeded` was added to the hotattach test that has
the most comprehensive check on whether or not a hyperdisk is required.

This commit moves that function to utils/test_utils.go and updates all the
other places where we need a hyperdisk to use that function, giving us one
source of truth as to whether or not a hyperdisk is required for a machine
type.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>

--
75218f6 by Jonathan Dieter <jdieter@ciq.com>:

Fix imageboot test to handle a couple of error conditions

In Rocky 8, when a reboot command is sent, the connection is often
terminated before being properly disconnected, which is read as an error in
this test.  By checking whether the error message contains "signal:
terminated" and only raising an error if it doesn't, we ensure that the
test gets past this step.

There is a second problem where a good number of the instance types don't
reboot quickly enough to kill the test before the fatal error "marker file
does not exist" is triggered.  By adding a one minute sleep, we ensure that
the fatal error is only triggered if the guest hasn't rebooted within 60
seconds.

Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
FUTURE_COPYBARA_INTEGRATE_REVIEW=#243 from jdieter:test-fixes 75218f6
PiperOrigin-RevId: 783927210
copybara-service bot pushed a commit that referenced this pull request Jul 21, 2025
PiperOrigin-RevId: 785480460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants