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

iso-manager script should fail fast with clear error message when bad archive entries are detected in bootstrap.yaml #3079

Closed
thomasdanan opened this issue Feb 3, 2021 · 0 comments · Fixed by #3081
Assignees
Labels
complexity:easy Something that requires less than a day to fix priority:high High priority issues, should be worked on ASAP (after urgent issues), not postponed severity:medium Medium impact (usability) on live deployments topic:lifecycle Issues related to upgrade or downgrade of MetalK8s topic:operations Operations-related issues

Comments

@thomasdanan
Copy link
Contributor

Component:

'iso-manager'

Why this is needed:

When upgrading to a new metalk8s version, we first need to import the new metalk8s.iso.
When doing so, the iso-manager script may fail with the following error:

Rendering SLS 'metalk8s-2.7.0-dev:metalk8s.salt.master.installed' failed: Problem running salt function in Jinja template: Failed to run isoinfo: isoinfo: No such file or directory. Cannot open 'metalk8s.iso'. Cannot open SCSI driver. isoinfo: No such file or directory. Unable to open metalk8s.iso; line 34

Actually, this is because of the bootstrap.yaml file was having a bad entry (a relative path to an iso) in the archives section.
Don't really know how this entry was added to the config file but since it can be edited manually, it may happen that bad archive entries are present in the file.

What should be done:

In such a situation, the iso-manager script should abort immediately and provide the administrator with a clear error message for him to understand that the bootstrap.yaml contains some wrong archive entries and that it should be removed.
Ideally, the iso-manager script starts with listing the archive entries and make sure they are all valid (i.e. they point to existing iso file on disk). If one of them is not valid it failed and displays the error message.

Implementation proposal (strongly recommended):

Test plan:

@thomasdanan thomasdanan added topic:operations Operations-related issues topic:lifecycle Issues related to upgrade or downgrade of MetalK8s priority:high High priority issues, should be worked on ASAP (after urgent issues), not postponed severity:medium Medium impact (usability) on live deployments labels Feb 3, 2021
@alexandre-allard alexandre-allard self-assigned this Feb 3, 2021
@alexandre-allard alexandre-allard added the complexity:easy Something that requires less than a day to fix label Feb 3, 2021
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Also ensure that archive names are not splitted on
space which was not the case.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Check that MetalK8s archive paths point
to existing file and if not print a clear
error message

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Also ensure that archive names are not splitted on
space which was not the case.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Check that MetalK8s archive paths point
to existing file and if not print a clear
error message

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Also ensure that archive names are not splitted on
space which was not the case.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Check that MetalK8s archive paths point
to existing file and if not print a clear
error message

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Also ensure that archive names are not splitted on
space which was not the case.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
Check that MetalK8s archive paths point
to existing file and if not print a clear
error message

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 3, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 4, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 5, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 5, 2021
Check that all configured archives are valid path
pointing to valid MetalK8s archives, to fail early.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 8, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 8, 2021
Check that all configured archives are valid path
pointing to valid MetalK8s archives, to fail early.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 10, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 10, 2021
Check that all configured archives are valid path
pointing to valid MetalK8s archives, to fail early.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 10, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 10, 2021
Check that all configured archives are valid path
pointing to valid MetalK8s archives, to fail early.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 11, 2021
This way we get rid of shell logic and we can
check for archive validity.

Refs: #3079
alexandre-allard added a commit that referenced this issue Feb 11, 2021
Check that all configured archives are valid path
pointing to valid MetalK8s archives, to fail early.

Refs: #3079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:easy Something that requires less than a day to fix priority:high High priority issues, should be worked on ASAP (after urgent issues), not postponed severity:medium Medium impact (usability) on live deployments topic:lifecycle Issues related to upgrade or downgrade of MetalK8s topic:operations Operations-related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants