-
Notifications
You must be signed in to change notification settings - Fork 164
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
When publishing a ContentViewVersion to a LifeCycleEnvironment it would be helpful to have a way to wait for SmartProxy/Capsule synchronization to finish #1609
Comments
We have code for waiting for tasks: foreman-ansible-modules/plugins/module_utils/foreman_helper.py Lines 1180 to 1192 in d743378
So we could expose that as a However, the problem will be to find out which task to wait for. As far as I know, the "sync proxies" task is triggered asynchronously from the publish/promote tasks, so there is no reference when the publish task is done what to wait on next. Ideally, Katello would tell us what it spawned, so we can optionally wait on that. If it doesn't, we'd have to resort to a search, but that can be unreliable :/ |
From what I can see in the API, nothing tells us where the CapsuleSync tasks originate from...
The Promote task does not tell us which CapsuleSync task it spawned either...
The ContentViewVersion has a reference to the latest task associated with it, but it is the Promote Task not the CapsuleSync... So wherever I look in the API the information does not seem to be present... |
I've opened https://projects.theforeman.org/issues/36434 as an RFE for Katello. |
Ok, that would indeed be the best possible way to search for the capsule sync task. This would allow to search for all capsule sync tasks running after the Promote and wait on all of them. My guess is that after the RFE implemented the search could be refined to have more pin-point waiting. |
Hello, is there a way to know what is the status of this? |
Hello @evgeni no news about the state of this request ? |
There would be news in here, if I'd have any to share ;-) That said, it is on my todo list, but not in the "today" or "this week" buckets :( |
The reason I am asking is because I could get my employer to assign someone to make a PR for this feature. This RFE served two purposes:
|
#1656 has been merged and we now have a module for waiting on tasks, thanks @JGodin-C2C! Now my question would be: should we consider this issue sufficiently done, or shall we add an explicit "wait on proxy sync" example, or even wait until https://projects.theforeman.org/issues/36434 is implemented? (I personally lean towards the example route, but I am no BDFL ;)) |
SUMMARY
In a use-case where we use a load-balanced setup of SmartProxies to distribute content, we want to use a single playbook to manage the ContentViewVersion promotion and the update of the machines to have a consistent and reproducible way to perform updates on clusters.
This way we can perform all preparations for update, safety checks, and reboots in the playbook, and not need manual validation that the SmartProxies are synchronized.
However, since the Capsule Synchronization task is asynchronous to ContentViewVersion Promotions.
ISSUE TYPE
Currently there is no "native" way to chain ContentViewVersion Promotion and updating of the machines automatically when SmartProxies are involved.
A helper action to wait for completion of SmartProxy synchronization (or a generic way to wait for Foreman Task(s) completion) would help greatly in that case. It is involved to wait this in pure ansible, so I personnally think that it makes sense to have it in this repository.
The text was updated successfully, but these errors were encountered: