-
Notifications
You must be signed in to change notification settings - Fork 116
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
Block the Remote
removal if it is referred by a Distribution
#5802
Comments
I don't think this would be that easy, we have already discussed this topic. See this PR for more #2836 |
😲 thank you for the reference! |
I can see the analogy. But honestly, I would say this is a totally different scope. |
Yes, I agree with @mdellweg. These two issues are not related and do not concern the same use case. Please, reassess its importance once again, @git-hyagi. |
Would not consumption from distribution also fail if it had a repo referenced and it got removed? Also, tangentially related. How do you proceed in this case: |
Sure. This one is a good start for one of the individual cases.
Well UserA deliberately shared their remote with UserB. If there's a conflict, they need to talk. After all remotes are first level objects to the user. Remote artifacts are deeply hidden within the internal architecture. That is what renders these cases different for me. |
To be honest I personally think we should not add these restrictions, as we make things less flexible and RBAC on top of that makes things even worse.
Just because someone has a read scope on my object I am going to lose the full control over my object? That sounds a bit too much. And what about those user who have read access to remote but use it solely at sync POST operation?
|
Well at the moment UserA onwning the remote can break UserB's workflow by deleting the remote without even being notified. I would say that is worse. Specifically for userB coming back from a 2 weeks leave being completely astonished and having a hard time pulling all the post mortem information together. |
You don't usually pass body that could contain |
What you're describing is more like shared and exclusive locking logic, which I don't think it should be applied here. |
Is your feature request related to a problem? Please describe.
If we remove a remote that is linked to a distribution, trying to pull non-synced content may fail.
Describe the solution you'd like
We could define the
on_delete
ofDistribution
remote
attribute asmodels.Protect
pulpcore/pulpcore/app/models/publication.py
Line 659 in 1672b3f
as a safeguard to ensure that there is no associated Distribution before removing the Remote.
Additional context
This is related to pulp/pulp_container#1729
The text was updated successfully, but these errors were encountered: