Giter Club home page Giter Club logo

Comments (13)

ikapelyukhin avatar ikapelyukhin commented on May 31, 2024

Here's how SMT implements this:

# smt-repos -h
   ...
   --delete                    : delete the repository from disk

from rmt.

lagartoflojo avatar lagartoflojo commented on May 31, 2024

Instead of actually implementing a "delete" command, we could print out where the repos are on the disk when the user calls repos disable or products disable. That gives users the chance to quickly remove the files if they want to.

from rmt.

thutterer avatar thutterer commented on May 31, 2024

#127 (comment) could be done as part of #94

from rmt.

tmuntaner avatar tmuntaner commented on May 31, 2024

@lagartoflojo I'm not sure if we want to do this with deduplication in place.

If a user deletes a directory that has a package used in symlinks, other products using that symlink could be broken. This would be fixed in the next mirror, but I'm not sure if we should find that "downtime" acceptable.

from rmt.

ikapelyukhin avatar ikapelyukhin commented on May 31, 2024

@tmuntaner but there are no symlinks? It's only hardlink or copy.

from rmt.

tmuntaner avatar tmuntaner commented on May 31, 2024

@ikapelyukhin You're right, you can ignore my previous comment ^_^

from rmt.

NeimadTL avatar NeimadTL commented on May 31, 2024

Hi guys, I'd like to take this one as @thutterer suggested me last time on #202 . Can somebody tell me where to start please ?

from rmt.

ikapelyukhin avatar ikapelyukhin commented on May 31, 2024

@NeimadTL At the moment there's no way to remove repositories that are no longer needed (repositories that are disabled for mirroring). Another issue is that repositories accumulate old packages over time: new versions of packages come out, repository metadata references new packages only -- which means that old packages become effectively inaccessible by client machines, but they are still stored on the disk of RMT server.

There are 3 possible things you could do:

  1. The quick-and-dirty solution: when repository is being disabled, print the path to it on disk, so that the user can remove it manually. However, during mirroring all file names and checksums are stored in the DB (for creating hardlinks). This solution wouldn't address cleaning up the DB (that's the "dirty" bit).
  2. Implement a new rmt-cli repos clean command that would go through the directories stored on the disk and remove the ones that aren't mirrored, as well as clean up entries in the DB.
  3. Implement a new rmt-cli repos clean command that would go through the mirrored repositories and remove files that aren't referenced by the metadata anymore, as well as clean up entries in the DB.

That's the overview of things from my perspective. Please feel free to ask questions, you can also reach me on IRC, RocketChat or via email.

Thanks, Ivan.

from rmt.

NeimadTL avatar NeimadTL commented on May 31, 2024

Hi @ikapelyukhin, thank you for your guidance. I think I'll definitely have a lot more questions so I'll reach out to you one way or another tomorrow. No need to ask them here.

from rmt.

tmuntaner avatar tmuntaner commented on May 31, 2024

Hello @NeimadTL,

I just wanted to check in with you to see if you're still interested in working on this. If not, I'll create a task for the team to take over.

Thanks

from rmt.

NeimadTL avatar NeimadTL commented on May 31, 2024

I have to admit that I've put on the the side because I wanted to do too much things at the same time. I don't how a gem is organized in general and I don't know the RMT project in particular. Is that possible to give me one or two weeks to deal with it please ? if you have deadlines, I understand.

from rmt.

tmuntaner avatar tmuntaner commented on May 31, 2024

@lagartoflojo Do you think we can close this issue with the latest changes made to RMT?

from rmt.

lagartoflojo avatar lagartoflojo commented on May 31, 2024

Solved by #595

from rmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.