Create last_update_export.py - #23
Open
josephoaks wants to merge 10 commits into
Open
josephoaks wants to merge 10 commits into
josephoaks wants to merge 10 commits into
Conversation
This script is designed for use in a "disconnect" environment. The host server is to do daily exports based on last build of a channel. This script looks at the list of channels, gets the ChannelLastBuildByID and checks if the date is the current date or prior and then exports that channel. Logging is provided as well to show which channels were updated in that export. The target server can then rsync the `/mnt/export` directory and run another script to execute the inter-server-sync import of the exported data.
juliogonzalez
requested review from
a team and
meaksh
and removed request for
a team
April 12, 2024 07:55
meaksh
requested changes
Apr 12, 2024
meaksh
left a comment
Member
There was a problem hiding this comment.
Thanks for this contribution!
I've added few comments that I hope it helps to get the script in shape to get merged.
Updates from the source since uploading to uyuni-tools, multiple iterations to streamline have occured. Updates include fixes from comments and further use, which include... 1) script header 2) better path management and configurable parameters 3) use of shutil.rmtree avoiding extra calls to subprocess 4) configurable days for export 5) configurable user/group 6) added the use of mgr-sycn credentials file instead of using username/password in the script.
meaksh
reviewed
Apr 15, 2024
meaksh
left a comment
Member
There was a problem hiding this comment.
Thanks for the changes! This is looking better now! Still I added some comments after your latest changes, maybe you can have a look.
meaksh
reviewed
Apr 15, 2024
updated the constants and variables, and changed the order they appear in the script
caught the datetime.date.today()
meaksh
requested changes
Apr 19, 2024
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
removed the shell=True from the subprocess.run command, missed that from the last commit after updating the command
Fixed the shebang line
meaksh
requested changes
Apr 22, 2024
fixed the command execution
updated script header to be better formatted and easier to read.
This file is part of the last_update_export.py script put forward. This file is for the initial export using the ISSv2 used in a disconnected or air-gapped environment, to do a full export instead of an incremental export as the last_update_export.py, it can also be used to add a new product channel to an air-gapped system.
Contributor
|
Sorry for the late reaction. |
Author
|
These scripts were not designed for the containerized version of SUMA. I will have to work on this. |
This file contains hidden or 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
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.
This script is designed for use in a "disconnect" environment. The host server is to do daily exports based on last build of a channel. This script looks at the list of channels, gets the ChannelLastBuildByID and checks if the date is the current date or prior and then exports that channel.
Logging is provided as well to show which channels were updated in that export.
The target server can then rsync the
/mnt/exportdirectory and run another script to execute the inter-server-sync import of the exported data.