Simplify concept of "default file store"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dmedia |
Fix Released
|
High
|
Jason Gerard DeRose |
Bug Description
As we charge ahead to that glorious day when we bless Dmedia as "production ready", I've been keeping my eye out for poor design decisions that I don't want us to have to live with.
Although after we declare Dmedia production ready we still might make incompatible changes to the schema, etc, we will only do so with an extremely well tested way of losslessly migrating the user's data. As incompatible changes will become so expensive to make, we want to be aggressive about eliminating warts now while it's still cheap and easy.
One of the warts I want to fix is the overly complicated idea of a "default file store". In a pro setting (say when used by a DIT), Dmedia will be managing several entire hard drives. They could be removable, or internal drives mounted in /srv/ or some such. But the key is you work with storage entire drives at a time, and the .dmedia dir would be in the root directory of each drive's file system. I think our design here is very good.
Then there is the special case of the "default file store" on your system drive. Currently there are 3 states for the default store. It can be "shared" meaning it uses /home/.dmedia, or "private" meaning it uses /home/username/
Changes I want to make:
* Remove use of /home/.dmedia altogether. Originally this was a stop-gap for us when using Dmedia at UDS, because it was handy for multiple user accounts to be able to access these files, plus I was using ecryptfs for my user folder, which has a fairly big performance overhead. At some point we might add some kind of "shared" file store back into Dmedia, but for now I think it's not worth the complexity. So this means we remove the dmedia.postinst script that creates this directory, and we change Core to no longer use this location.
* Move the "private" file store location from ~/.dmedia to ~/.local/
* Remove the "none" state, make it so the default store is *always* present. The whole reason for "none" was so you could have the importer only create copies on your removable drives, and not fill up a small internal HDD or SSD. But I think this was the wrong approach. Instead, I think the default store should *always* be in the storage pool, but with added control over which drives the importer uses. Right now the importer is kinda dumb and will create a copy on every connected file store.
Related branches
- James Raymond: Approve
-
Diff: 668 lines (+233/-250)8 files modifieddebian/dmedia.postinst (+0/-10)
dmedia-cli (+3/-3)
dmedia-service (+6/-14)
dmedia/core.py (+66/-36)
dmedia/tests/base.py (+5/-0)
dmedia/tests/test_core.py (+118/-186)
dmedia/tests/test_util.py (+26/-1)
dmedia/util.py (+9/-0)
Changed in dmedia: | |
assignee: | nobody → Jason Gerard DeRose (jderose) |
status: | Triaged → In Progress |
Changed in dmedia: | |
status: | In Progress → Fix Committed |
Changed in dmedia: | |
status: | Fix Committed → Fix Released |