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
Support systems with transactional updates #156
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If base product registration fails we swallow the error message and it is only available in the log file. We correctly exit with error code 1. Provide the error message we get from the underlying registration tool used on stderr.
On SUSE Micro systems with a RO root filesystem we need to use the transactional-update register command to complete the registration. SUSEConnect disables itself in this situation and produces and error. Signed-off-by: Robert Schweikert <rjschwei@suse.com>
If zypper is instructed to operate on a different root with the "--root" argument the credentials are also expected to be found in this seperate root tree. WE need to accomodate this redirection.
When running the tests with pytest only we need to properly set the path to the current location to find the modules we want to import. While the path calculation was alreday part of the test, the created path was not properly inserted into the environment.
To support a transactional system we need to look at the process table to see if zypper is operating on a directory other than the default root path. A new function was added to retrieve the target path form the zypper command line. Test the various command line options.
jesusbv
reviewed
May 9, 2024
jesusbv
reviewed
May 9, 2024
THe command generation for registration had to be split, no need to have a variable for a fixed value when it is used only once.
apozsuse
reviewed
May 9, 2024
apozsuse
approved these changes
May 9, 2024
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.
Other than the minor comments, LGTM
jesusbv
approved these changes
May 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On systems that have a read-only root filesystem and transactional updates
SUSEConnect
disables itself and we need to call thetransactional-update register
command in order to complete system registration. This is not true for transactional-update systems that have a read-write root filesystem. Therefore we need to look at the mount options of the filesystem. On a read-only setup zypper is called to work on a specific directory and we have to take this into account when handling credentials.