Skip to content
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

tests/ignition: Modify qemufailure to include bootfs test #3647

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

c4rt0
Copy link
Member

@c4rt0 c4rt0 commented Oct 18, 2023

See: #2953

@openshift-ci
Copy link

openshift-ci bot commented Oct 18, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@c4rt0 c4rt0 requested a review from jlebon October 18, 2023 11:57
@c4rt0
Copy link
Member Author

c4rt0 commented Oct 18, 2023

The current state of things:

=== RUN   coreos.ignition.failure
=== RUN   coreos.ignition.failure/ignition
=== RUN   coreos.ignition.failure/bootfs
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: eff5788a-9ac9-468d-bcaf-36772cb07bb4
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

--- FAIL: coreos.ignition.failure (133.80s)
    --- PASS: coreos.ignition.failure/ignition (10.13s)
    --- FAIL: coreos.ignition.failure/bootfs (121.67s)
            qemufailure.go:57: timed out waiting for initramfs error: context deadline exceeded

mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
@c4rt0
Copy link
Member Author

c4rt0 commented Oct 26, 2023

Currently getting an error:

=== RUN   coreos.unique.boot.failure
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 96b87cc8-1dd9-4044-950e-e13567f18b4d
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

qemu-img: /var/tmp/mantle-qemu2849552875/disk2018417766: 'file' driver requires '/srv/tmp' to be a regular file
Could not open backing image.
--- FAIL: coreos.unique.boot.failure (2.02s)
        qemufailure.go:58: exit status 1
FAIL, output in _kola_temp/qemu-2023-10-26-1416-5229
Error: open _kola_temp/qemu-2023-10-26-1416-5229/properties.json: no such file or directory
2023-10-26T14:16:43Z cli: open _kola_temp/qemu-2023-10-26-1416-5229/properties.json: no such file or directory

@c4rt0 c4rt0 force-pushed the add_kola_tests branch 2 times, most recently from 9b09876 to e919872 Compare October 31, 2023 18:40
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 1, 2023

@jlebon Can you please revise the latest changes?

@c4rt0 c4rt0 self-assigned this Nov 1, 2023
@c4rt0 c4rt0 marked this pull request as ready for review November 1, 2023 13:33
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 7, 2023

Currently timing out:


[2023-11-07T12:08:27.253Z]         qemufailure.go:59: timed out waiting for initramfs error: context deadline exceeded

I've seen this behaviour here before when modifying BackingFile.

@c4rt0
Copy link
Member Author

c4rt0 commented Nov 8, 2023

/retest

mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 10, 2023

Updated the PR, this should verify that there is only one boot filesystem attached to the device. In order to make sure that the initramfs failure was related to the coreos-unique-boot.service I am checking the consolefile - curious to know if there is a better way to do it?
Appreciate an early review, but we (with @cverna) will start to work on the second test to use ignition config which creates a second boot file system.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Some comments, but this is looking really good now. Nice work!

mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
@c4rt0 c4rt0 force-pushed the add_kola_tests branch 3 times, most recently from 9b89a62 to 236f749 Compare November 20, 2023 17:03
@c4rt0 c4rt0 force-pushed the add_kola_tests branch 2 times, most recently from 7b43858 to 84602fa Compare November 22, 2023 10:05
Copy link
Member Author

@c4rt0 c4rt0 left a comment

Choose a reason for hiding this comment

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

resolved

mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 22, 2023

/retest-required

1 similar comment
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 22, 2023

/retest-required

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

This is looking close! coreos.ignition.failure is failing on RHCOS; possibly the error message is different there?

mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 23, 2023

This is looking close! coreos.ignition.failure is failing on RHCOS; possibly the error message is different there?

@jlebon - Thank you for all the comments and your time reviewing this issue!

mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Outdated Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
mantle/kola/tests/ignition/qemufailure.go Show resolved Hide resolved
See: coreos#2953

tests/ignition: Use ignition config to create a second bootfs

Co-authored-by: JB Trystram <[email protected]>

mantle/kola: Create functions to grep for patterns
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 23, 2023

/retest

@jbtrystram
Copy link
Contributor

When we were getting that working we ran into the issue where the test was passing, because it returned an error too early.
As the test returns an error, could we add a way to check the content to avoid false positive results ?

@c4rt0
Copy link
Member Author

c4rt0 commented Nov 27, 2023

When we were getting that working we ran into the issue where the test was passing, because it returned an error too early. As the test returns an error, could we add a way to check the content to avoid false positive results ?

I think during our meeting @jlebon referred to this comment

@c4rt0
Copy link
Member Author

c4rt0 commented Nov 27, 2023

Just for reference... changing the search string indeed fails the test as expected:

--- FAIL: coreos.unique.boot.failure (11.04s)
        qemufailure.go:69: pattern 'Error: System has 77 devices with a filesystem labeled 'booot'' in file '/var/tmp/mantle-qemu3317302958/console.log3137230128' not found
FAIL, output in _kola_temp/qemu-2023-11-27-1605-5449
Error: harness: test suite failed
2023-11-27T16:05:24Z cli: harness: test suite failed

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work!

err = nil
resultingError := inst.WaitAll(ctx)
if resultingError == nil {
resultingError = fmt.Errorf("ignition unexpectedly succeeded")
Copy link
Member

Choose a reason for hiding this comment

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

I guess this error should probably be more generic now, since it's testing more than just Ignition failures. E.g. maybe just

initramfs unexpectedly succeeded

And the function name could be more specific, e.g. verifyInitramfsFailure().

But not worth a respin.

@jlebon
Copy link
Member

jlebon commented Nov 27, 2023

/retest

@jlebon jlebon enabled auto-merge (rebase) November 27, 2023 17:04
@c4rt0
Copy link
Member Author

c4rt0 commented Nov 27, 2023

Awesome! Thanks @jlebon and @jbtrystram for all the help!

@jlebon jlebon merged commit 0249856 into coreos:main Nov 27, 2023
2 checks passed
@c4rt0 c4rt0 deleted the add_kola_tests branch November 27, 2023 19:41
@jlebon
Copy link
Member

jlebon commented Nov 28, 2023

Looks like we still have some issues to iron out. See #3669 and #3670.

@c4rt0
Copy link
Member Author

c4rt0 commented Nov 28, 2023

Looks like we still have some issues to iron out. See #3669 and #3670.

I will gladly look at both.

@jbtrystram
Copy link
Contributor

/test all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants