Skip to content

Mount refactor subcommands#181

Closed
Szubie wants to merge 32 commits intobravetools:masterfrom
Szubie:mount-refactor-subcommands
Closed

Mount refactor subcommands#181
Szubie wants to merge 32 commits intobravetools:masterfrom
Szubie:mount-refactor-subcommands

Conversation

@Szubie
Copy link
Collaborator

@Szubie Szubie commented Oct 13, 2022

Branching off from #180

This is an example showcasing how brave mount might work with subcommands. It may not be necessary at the moment, but if any further expansion happens it might become necessary to avoid excessive argument overloading. Perhaps it has better clarity in some cases?

brave mount <source> <target> #used for actual mounting
brave mount list              #list all mounts across all units
brave mount list <unit>       #list all mounts for a specific unit

If we were to handle the strange command mentioned in #180, where a new volume is created and then mounted to several other containers perhaps we could add a further subcommand for that with varargs

brave mount volume <unit:/target> [...<unit:/target]

Szubie added 30 commits October 7, 2022 16:43
…ory - if cleanup succeeds, err will be set to nil, causing later panic
…. Prefix with brave_ to make bravetools-mounted devices discoverable later. Benefit of reduced collision probability and ability to find device name in future given the unit name and path.
… cleanup of shared mount of err on mulitpass
…nal logic of trimming leading/trailing slashes if present.
…arlier in process to prevent mismatch between expected device path and actual
…this avoids potential clashes between basenames and also allows mounting the same folder to multiple different mount points
… from output - abstracting away that implementation detail from user, who should operate on paths directly
…volumes onto units. Refactor creation and deletion of these volumes to use the LXD API client - faster, improved error handling and less verbose.
@Szubie Szubie mentioned this pull request Oct 13, 2022
@Szubie
Copy link
Collaborator Author

Szubie commented Oct 14, 2022

Closing in favour of #180

@Szubie Szubie closed this Oct 14, 2022
@Szubie Szubie deleted the mount-refactor-subcommands branch October 27, 2022 14:33
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

Successfully merging this pull request may close these issues.

1 participant