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

Add kola tests for unique bootfs work #2953

Closed
jlebon opened this issue Jun 28, 2022 · 5 comments
Closed

Add kola tests for unique bootfs work #2953

jlebon opened this issue Jun 28, 2022 · 5 comments
Assignees
Labels
jira for syncing to jira

Comments

@jlebon
Copy link
Member

jlebon commented Jun 28, 2022

We've added new services in coreos/fedora-coreos-config#1269 and coreos/fedora-coreos-config#1540 which verify that there is only one boot filesystem. We currently don't have CI that exercises them.

Add tests for these. I see at least one for each:

  1. we attach a block device which has a pre-existing boot filesystem on it, and verify that coreos-unique-boot.service fails as expected.
  2. we boot with an Ignition config which creates a second boot filesystem and verify that coreos-ignition-unique-boot.service fails as expected.

We have at least one test already which verifies Ignition failure in the initrd (see qemufailure.go). Using that code as a base for the new tests would be a good starting point.

@jlebon
Copy link
Member Author

jlebon commented Sep 21, 2023

For 1., note that you can make a dummy e.g. ext4 filesystem ahead of time using e.g.:

$ truncate -s 1G fakeboot
$ mkfs.ext4 -L boot fakeboot

(But called from golang.)

For 2., it'd be interesting to enhance the external test harness to handle expected initrd failures. E.g. we could have a new directive like initrd-failure: "Error: System has 2 devices with a filesystem labeled 'boot'" that tells kola to verify that the initrd did fail and that the journal has that error string and if so, mark the test as passed.

That would also allow us to convert coreos.ignition.failure to an external test.

@c4rt0
Copy link
Member

c4rt0 commented Sep 21, 2023

Thanks, this clarifies some of my questions indeed!

c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Oct 12, 2023
@c4rt0
Copy link
Member

c4rt0 commented Oct 12, 2023

The above isn't functional, I uploaded it just to set a starting point and discuss my concerns.
1.

verify that coreos-unique-boot.service fails

Is it enough for me to create an additional fakeboot partition? I saw the module-setup.sh just not sure if I understand it correctly?

@c4rt0
Copy link
Member

c4rt0 commented Oct 12, 2023

cc @jlebon

c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Oct 17, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Oct 18, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Oct 18, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 1, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 1, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 7, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 8, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 10, 2023
c4rt0 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 22, 2023
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 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 23, 2023
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 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 23, 2023
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 added a commit to c4rt0/coreos-assembler that referenced this issue Nov 23, 2023
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
jlebon pushed a commit that referenced this issue Nov 27, 2023
See: #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

c4rt0 commented Nov 27, 2023

Fixed by: #3647

@c4rt0 c4rt0 closed this as completed Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira
Projects
None yet
Development

No branches or pull requests

2 participants