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

Enable strict elemental-setup #2216

Closed
2 of 5 tasks
frelon opened this issue Oct 25, 2024 · 1 comment · Fixed by #2201
Closed
2 of 5 tasks

Enable strict elemental-setup #2216

frelon opened this issue Oct 25, 2024 · 1 comment · Fixed by #2201
Assignees
Labels

Comments

@frelon
Copy link
Contributor

frelon commented Oct 25, 2024

The current behavior when including a broken yip config in a system is to ignore any errors and only show errors in journal for the elemental-setup-<stage>.

We should consider enabling the --strict flag to actually show the elemental-setup-<stage> as failed when a configuration is broken (or a command fails).

An initial list of tests to verify the intended behavior, feedback welcome:

This means that an unparseable yip-config will make all elemental-setup-* services show up as failed in systemd, but the system will still boot correctly.

This example yip config will only show elemental-setup-boot as failed:

stages:
  boot:
    commands:
      - exit 2
@frelon frelon linked a pull request Oct 25, 2024 that will close this issue
@frelon frelon self-assigned this Oct 25, 2024
@frelon frelon added this to Elemental Oct 25, 2024
@frelon frelon moved this to 🏃🏼‍♂️ In Progress in Elemental Oct 25, 2024
@davidcassany davidcassany self-assigned this Nov 5, 2024
@davidcassany
Copy link
Contributor

The question here I what is broken yip. I can imagine three different categories (probably there are more):

  • invalid yaml
  • valid yaml but invalid scheme
  • wrong command (e.g. exit 1 or a command line with a typo)

Invalid yaml IMHO should only cause the file to be ignored and report the unmarshal error to journal.

Wrong command should simply execute everything, including all pending steps and report the error to journal and systemd, causing the offending stage to fail but continue with the boot.

With an invalid scheme I am not sure what it meant to happen what actually happens today in terms of yip.
For now I am trying to code the integration test I had in mind for degraded services.

@github-project-automation github-project-automation bot moved this from 🏃🏼‍♂️ In Progress to ✅ Done in Elemental Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants