-
Notifications
You must be signed in to change notification settings - Fork 26
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
rsync to stagingyum per distro #381
Conversation
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.
The idea behind sync a whole version is that it's atomic. For Debian (where we have multiple directories) we join the paths:
/usr/bin/rsync -avPx ${deb_paths.join(' ')} ${target_path} |
That way it's a single atomic action and everything gets promoted as one. You don't have the risk (*) that EL9 is newer than EL8 because the network failed after EL9 was done.
I still think that we should solve it similar to theforeman/foreman-infra#1994 instead. I'll leave some comments there.
- Technically, everything can crash, but you minimize the risk
55a167c
to
0bbef5c
Compare
While the above excerpt looks like it, we don't do that. The place where we actually call rsync methods from is here: jenkins-jobs/theforeman.org/pipelines/lib/packaging.groovy Lines 186 to 197 in d78f0f3
And You can also see it in Jenkins where we have separate "push-{version}-{os}" steps for stage→prod: And "{os}-{version}" for packaging → stage: |
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 was playing a bit with it and didn't finish it yesterday, but in theforeman/foreman-infra#1994 (comment) I wrote down my findings.
The short version is to add trailing slashes, so my recommendation is to rsync ${collection}/${version}/ ${user}@${host}:rsync_cache/${target}/${version}/
0bbef5c
to
31ff9f9
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.
I didn't test this out end-to-end, but since it's what I recommended based on local testing I approve :)
The rsync script on web01 needs the version to exist on the rsync target in order to properly know what release to work with. In order to include the release we need to rsync per OS rather than one command for the whole version.