-
Notifications
You must be signed in to change notification settings - Fork 228
Revert "Use absolute in paths in salt scripts" (bsc#1253780) #11300
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
base: master
Are you sure you want to change the base?
Conversation
|
This also affects some older versions of SLES, like sles12: https://github.com/SUSE/spacewalk/issues/29295 |
|
@m-czernek I don't think this revert is needed. Thomas already fixed part of the issues, and this commit should fix the remaining missing parts: #11355 What do you think? |
|
@rjmateus Sles 12 is unrelated to this issue. As in the description, certain set of Ubuntu/Debian systems, some binaries we assume to be in I see, for example, that we hardcode I see two options basically:
Would love to hear your opinion here; for now, I'm still leaning towards reverting the full paths (especially since we use [0] https://github.com/uyuni-project/uyuni/blob/master/susemanager-utils/susemanager-sls/salt/hardware/profileupdate.sls#L157 |
vzhestkov
left a comment
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.
I would vote for reverting it.
|
@m-czernek Thank you for the detailed reply. For SLES is relatively simple to have the full path, since we can easily compute the path based on the OS. It doesn't look as a security issue, as discussed in the slack thread. So if the change in bringing more problems then the ones it fix, I think we should consider reverting it. |
This reverts commit c4f0d68.
7a397fb to
f5326bd
Compare
After looking into this a bit more, I tend to think that we don't need to revert the whole commit. There are not many places left that cause issues and it's good to be explicit where we can. There are Salt states that should work on different OSes and where we don't know the location of all invoked commands. In this case, I propose to use |
|
To bring the discussion to a single place, this is what @m-czernek wrote in #11315 as a reply to my comment to keep using the full path to snapper.
Marek raises a good point, using the same approach everywhere will make it easier to maintain the SLS files in the future. We only touch these files from time to time and I share the concern that someone will pick the wrong implementation (full path where Is everyone fine with always using |
|
I prefer to have the same approach across all calls. We need to keep consistency as much as possible to make maintenance a bit easier. |
What does this PR change?
In c4f0d68, we modified the SLS to use absolute paths. This was based on sonarcloud issue - https://github.com/SUSE/spacewalk/issues/24387
The problem is that older Ubuntu and Debian systems (that were updated and not reinstalled, e.g. 16.04 -> 18.04 -> 20.04 -> 22.04 -> 24.04) do not necessarily have
usrmergeinstalled. Usrmerge is installed by default only on new installations.This means that we cannot assume
/usr/binpath for a lot of binaries on some Debians and Ubuntus, such asuname,cat,ls, etc.Given that this change is related to sonarcloud, I propose reverting the change.
Codespace
Check if you already have a running container clicking on
GUI diff
No difference.
Before:
After:
Documentation
No documentation needed: add explanation. This can't be used if there is a GUI diff
No documentation needed: only internal and user invisible changes
Documentation issue was created: Link for SUSE Multi-Linux Manager contributors, Link for community contributors.
API documentation added: please review the Wiki page Writing Documentation for the API if you have any changes to API documentation.
(OPTIONAL) Documentation PR
DONE
Test coverage
ℹ️ If a major new functionality is added, it is strongly recommended that tests for the new functionality are added to the Cucumber test suite
No tests: add explanation
No tests: already covered
Unit tests were added
Cucumber tests were added
DONE
Links
Issue(s): #
https://github.com/SUSE/spacewalk/issues/29075
https://github.com/SUSE/spacewalk/issues/29295
Port(s): # TODO
DONE
Changelogs
Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository
If you don't need a changelog check, please mark this checkbox:
If you uncheck the checkbox after the PR is created, you will need to re-run
changelog_test(see below)Re-run a test
If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:
Before you merge
Check How to branch and merge properly!