Skip to content
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

Purge unmanaged repositories/blob stores #60

Open
bmagistro opened this issue Jul 13, 2023 · 4 comments
Open

Purge unmanaged repositories/blob stores #60

bmagistro opened this issue Jul 13, 2023 · 4 comments

Comments

@bmagistro
Copy link

As a user, I would like to be able to set a flag to remove unmanaged repositories and/or blob stores to ensure older/removed items are also removed from nexus.

@wandenberg
Copy link
Owner

Hi @bmagistro. Can you explain a bit better what is your request?
At first thought, I would say that there isn't a way to know if a blob store is no longer needed, nor if a repository is no longer needed.
You can setup some cleanup tasks on Nexus, to handle content.
And you can declare the repository on your puppet and set "ensure: absent" and the puppet will try to remove the repository.
Would that work for you?

@bmagistro
Copy link
Author

So lets say I had a managed repo but removed it from the manifest, it is still there but not managed. In that case, I want an option to clean up the "unmanaged" repos that might exist. So in our case, we only want managed repos to exist. Setting them to absent requires knowing an unmanaged repo exists. I hope this helps.

@wandenberg
Copy link
Owner

I see your point. But this kind of configuration is extremely dangerous.
It can delete something not really by desire.
The expected approach when you are "unmanaging" something with puppet is to before removing it from the manifest, to run puppet once with the absent configuration and then remove it from the manifest.
Other than that, to have such kind of configuration, it would be necessary some way to know what is on the nexus and not at puppet catalog, delete these repositories, and then their blobstore that might still be in usage by some other resource.
The dangerous and the complexity to have such configuration does not pay the price of properly decommission the repository using the absent.
But feel free to contribute with the configuration. If it is safe enough, I will incorporate at the main code.

@bmagistro
Copy link
Author

I completely understand the concern and that this can be quite destructive. This style/idea of purging un-managed items exists in other modules -- typically around configuration files. In our case, we hit the scenario of people dropping it from the manifest and we forget it exists till logging in/browsing and wonder why this is there/un-managed.

Knowing you are open to the idea of this, we may try to find some time to work on a pr to enable this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants