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

cli: Add new state wipe-ostree subcommand #777

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

omertuc
Copy link
Contributor

@omertuc omertuc commented Sep 5, 2024

Solves #776

Right now the integration tests have some hacky code to clear out ostree stateroots (see reset_root function), it would be better if they could rely on a bootc command to take care of that for them instead

This commit adds a new state wipe-ostree subcommand to the CLI that removes all ostree deployments from the system using native ostree bindings. This makes it easier to later rm -rf the stateroots and have a clean slate for the next test.

@omertuc
Copy link
Contributor Author

omertuc commented Sep 5, 2024

Tests failing because we need to check that /ostree even exists before attempting to mount

Solves containers#776

Right now the integration tests have some hacky code to clear out
`ostree` stateroots  (see `reset_root` function), it would be better if
they could rely on a bootc command to take care of that for them instead

This commit adds a new `state wipe-ostree` subcommand to the CLI that
removes all `ostree` deployments from the system using native ostree
bindings. This makes it easier to later rm -rf the stateroots and have a
clean slate for the next test.

Signed-off-by: Omer Tuchfeld <[email protected]>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@omertuc
Copy link
Contributor Author

omertuc commented Sep 6, 2024

Is it normal for the tests to fail in this manner?

@vrothberg
Copy link
Member

TASK [check secure boot status] ************************************************
fatal: [guest]: FAILED! => changed=true
cmd:

  • mokutil
  • --sb-state
    delta: '0:00:00.003638'
    end: '2024-09-06 08:17:47.889643'
    msg: non-zero return code
    rc: 255
    start: '2024-09-06 08:17:47.886005'
    stderr: This system doesn't support Secure Boot
    stderr_lines:
    stdout: ''
    stdout_lines:

@cgwalters WDYT?

Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Nice thanks!

lib/src/deploy.rs Show resolved Hide resolved
@cgwalters cgwalters merged commit 1ba8d1e into containers:main Sep 6, 2024
30 of 34 checks passed
@cgwalters
Copy link
Collaborator

The c10s tests are busted due to https://issues.redhat.com/browse/RHEL-56025 which should hopefully get sorted out soon

stderr: This system doesn't support Secure Boot

Not sure on this one, @henrywang ?

@henrywang
Copy link
Contributor

stderr: This system doesn't support Secure Boot

Not sure on this one, @henrywang ?

Hi @cgwalters , could you please link me this log? Thanks.

@cgwalters
Copy link
Collaborator

I can't find it but @vrothberg where did you see that?

@henrywang
Copy link
Contributor

henrywang commented Sep 6, 2024

OH! I know this secure boot checking case. It's from

- name: check secure boot status

Secure boot is one of system checkings, such as bios/uefi, tpm device, partition size, and partition table.

C9s and C10s are all disabled secure boot

BOOT_ARGS="uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no"

But fedora enabled secure boot.

omertuc added a commit to omertuc/bootc that referenced this pull request Sep 6, 2024
omertuc added a commit to omertuc/bootc that referenced this pull request Sep 6, 2024
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.

4 participants