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

optional --destination param on mount #203

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

ransomw1c
Copy link
Contributor

following up on a request from @galvare2 , these changes allow omitting the --destination on bundle mount (and bundle mount new).

when omitted, a subpath of system's /tmp directory is constructed by golang's io/ioutil.

@ransomw1c ransomw1c force-pushed the d20190612-optdestination--wip branch from 9434555 to faa4fc8 Compare June 12, 2019 20:41
@ransomw1c ransomw1c changed the title [wip] optional --destination param on mount optional --destination param on mount Jun 12, 2019
@ransomw1c ransomw1c marked this pull request as ready for review June 12, 2019 20:41

var consumableStorePath string
if bundleOptions.DataPath == "" {
consumableStorePath, err = ioutil.TempDir("", "datamon-mount-destination")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the bundle hash and write the bundle descriptor last or write a done marker file. The next time we can skip downloading the files and reused the json files downloaded.. ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the bundle descriptor and filelists are written to disk at the same time it's used to initialize the in-memory structures. #218 contains the change to read ${destination}/.datamon/ folder from disk into in-memory structures.

since this implementation places the destination in a temporary directory that might vanish after the process exits, it's not clear where the reusable json files are to be stored... i suppose creating a subdirectory of ${HOME}/.datamon, say ${HOME}/.datamon/meta-cache, is a reasonable option?

creating a new issue to document the intent of these changes seems more likely to me than including them in this diff.

@kerneltime
Copy link
Contributor

Needs conflict resolution..

@ransomw1c ransomw1c force-pushed the d20190612-optdestination--wip branch from 1ffb94e to c903721 Compare June 24, 2019 18:05
Signed-off-by: Ransom Williams <rwilliams@oneconcern.com>
@ransomw1c ransomw1c force-pushed the d20190612-optdestination--wip branch from a8278d8 to 26c6c36 Compare June 24, 2019 18:58
@ransomw1c ransomw1c merged commit 53f301b into master Jun 24, 2019
@ransomw1c ransomw1c deleted the d20190612-optdestination--wip branch June 24, 2019 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants