-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Properly fail if a conflicting package is installed and do not install conflicting packages #3050
Conversation
Hello teddyandrieux,My role is to assist you with the merge of this Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
6bdae4c
to
6660693
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one typo in the user-facing message, the rest is more minor/internal. Otherwise LGTM 👌 !
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following reviewers are expecting changes from the author, or must review again: |
docker: null | ||
docker-ce: null | ||
containerd.io: null | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you take a look at the list provided by @Baitanik in #2989 (reply in thread) and check whether this list should be extended accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I could try with those packages, but for pip packages, it's a bit hard to check IMHO.
E.g.: Checking all dependencies of Salt installed by pip and not by system package... It's doable but not sure it's worth and honestly deserve another PR since it's really a different check to me
In salt we have a function `jinja.load_map` that retrieve a specific value from a map.jinja (same as what we do in salt SLS) but this function does not support saltenv Add a new function to retrieve information from `map.jinja` in MetalK8s context, so hardcoded map.jinja path and retrieving saltenv from version stored in the pillar Sees: saltstack/salt#59300
If some package are installed on the host where we want to deploy MetalK8s the installation does not work (e.g: containerd.io) Add a new function to check that those package are not installed on the host before deploying all the MetalK8s components. NOTE: We do not automatically uninstall the package from the host since those packages may have been installed for good reason, so just ask the user to remove those packages Fixes: #2992
Another commit already added the check for conflicting package installed on the host but we also need to exclude those packages especially for `containerd.io` because if you try to install `containerd` or `runc` it will, by default` install `containerd.io` since this one provide `containerd` and `runc` and obsoletes thoses ones. Today MetalK8s cannot work with `containerd.io` so we need to explicitly exclude this package in case one repository on the host is already configured and provide this `containerd.io` package
6660693
to
1ea12d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for these packages, I guess we can easily add some more (as the ones mentioned in #2989 (reply in thread)) later.
Note: We have some logic in this function, so `conflicting_packages` could | ||
be: | ||
- a single string `<package_name>` which is the name of the conflicting | ||
package (it means we conflict with all versions of this package) | ||
- a list `[<package_name1>, <package_name2]` with all conflicting package | ||
names (it means we conflict with all versions of those packages) | ||
- a dict `{<package1_name>: <package1_versions>, <package2_name>: <package2_versions>}` | ||
where `package_versions` could be | ||
- `None` mean we conflicting with all versions of this package | ||
- A string for a single conflicting version of this package | ||
- A list of string for multiple conflicting versions of this package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue None. Goodbye teddyandrieux. |
Component:
'salt', 'check', 'deployment'
Context:
#2992
Summary:
map.jinja
containerd.io
instead ofcontainerd
andrunc
) (NOTE that before this fix when runningcontainerd
SLS ifcontainerd.io
is available we install this one instead ofrunc
andcontainerd
)Acceptance criteria:
Bootstrap output when docker-ce installed on the host
Expansion output when docker-ce installed on this new node
Fixes: #2992