rancher / convoy

A Docker volume plugin, managing persistent container volumes.
Apache License 2.0
1.31k stars 135 forks source link

Support sync() and fsfreeze() #197

Closed peebles closed 7 years ago

peebles commented 7 years ago

The VFS and EBS drivers will do a syscall.Sync() before creating a snapshot. For the EBS driver a new option has been added: ebs.fsfreeze which is false by default. If set to true, will execute a /sbin/freeze just after the sync() and just before the snapshot is created, and will unfreeze after the snapshot has been created.

peebles commented 7 years ago

I just fixed the merge conflicts by merging your latest master with mine, then merging my master with fsfreeze and pushed it. Not sure now how this gets handled with this pull request.

yasker commented 7 years ago

I guess you should do a git rebase instead? The last commit seems odd.

peebles commented 7 years ago

Uh, it seems to be ok now, right?

yasker commented 7 years ago

I meant, this commit shouldn't exist https://github.com/rancher/convoy/pull/197/commits/e6ed2447b1c6a450c24eb2d282f2bad6d0cb84f2

So I think what should be done are:

  1. Pull the latest master from Convoy
  2. Run git rebase from your branch to it. It probably will result in a conflict, fix it as a part of your commits.
  3. Continue as everything solved. And push it.
peebles commented 7 years ago

I am not exactly sure what you want me to do. I don't want to screw it up! Here is my .git/config:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
[remote "origin"]
    url = git@github.com:peebles/convoy.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "fsfreeze"]
    remote = origin
    merge = refs/heads/fsfreeze
[remote "upstream"]
    url = https://github.com/rancher/convoy.git
    fetch = +refs/heads/*:refs/remotes/upstream/*

Here's what I have done so far:

git fetch upstream
git checkout master
git merge upstream/master

Now ... what are the commands I should do now?

yasker commented 7 years ago

Maybe this article will help: https://www.atlassian.com/git/tutorials/merging-vs-rebasing

I think you should do git rebase upstream/master instead of git merge upstream/master.

The former put your change at the top of current upstream/master, instead of merge (which has a special meaning in the context of git) them together.

peebles commented 7 years ago

Then my master is already screwed up then. Because after everything I did yesterday, I pushed to my repo. How do I recover?

yasker commented 7 years ago

The easy way is, fork another branch from upstream/master, and git cherry-pick your commits from your old branch into it.

peebles commented 7 years ago

I resubmitted the pull request.

By the way, the new "ebs.defaultencrypted" does not seem to work. If set, does not encrypt volumes. I took a brief glance at the go code and it does not appear to be used. ebs.defaultkmskeyid does work and I've used that to test encrypted volumes.

yasker commented 7 years ago

Close this in favor of #198