{"action":"created","issue":{"url":"https://api.github.com/repos/docker/distribution/issues/1375","repository_url":"https://api.github.com/repos/docker/distribution","labels_url":"https://api.github.com/repos/docker/distribution/issues/1375/labels{/name}","comments_url":"https://api.github.com/repos/docker/distribution/issues/1375/comments","events_url":"https://api.github.com/repos/docker/distribution/issues/1375/events","html_url":"https://github.com/docker/distribution/pull/1375","id":127729518,"number":1375,"title":"Issue #1138 - Fix filesystem driver's Move across mount points","user":{"login":"dalsh","id":495022,"avatar_url":"https://avatars.githubusercontent.com/u/495022?v=3","gravatar_id":"","url":"https://api.github.com/users/dalsh","html_url":"https://github.com/dalsh","followers_url":"https://api.github.com/users/dalsh/followers","following_url":"https://api.github.com/users/dalsh/following{/other_user}","gists_url":"https://api.github.com/users/dalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/dalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalsh/subscriptions","organizations_url":"https://api.github.com/users/dalsh/orgs","repos_url":"https://api.github.com/users/dalsh/repos","events_url":"https://api.github.com/users/dalsh/events{/privacy}","received_events_url":"https://api.github.com/users/dalsh/received_events","type":"User","site_admin":false},"labels":[{"id":202025387,"url":"https://api.github.com/repos/docker/distribution/labels/dco/no","name":"dco/no","color":"ededed","default":false},{"id":202209438,"url":"https://api.github.com/repos/docker/distribution/labels/status/2-code-review","name":"status/2-code-review","color":"f9d0c4","default":false},{"id":239735041,"url":"https://api.github.com/repos/docker/distribution/labels/status/needs-attention","name":"status/needs-attention","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-01-20T17:01:18Z","updated_at":"2017-01-13T14:55:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/distribution/pulls/1375","html_url":"https://github.com/docker/distribution/pull/1375","diff_url":"https://github.com/docker/distribution/pull/1375.diff","patch_url":"https://github.com/docker/distribution/pull/1375.patch"},"body":"This is a first attempt at fixing issue #1138. \n\nFilesystem storage driver is currently not able to move files across mount points. I tested the following fix in such conditions and it works, but I can see two potential issues with it :\n- The file copy is made at the actual destination path. As mentioned by @stevvooe in the issue comments, it should be copied to a temporary location before issuing another os.Rename. Should a new temporary path be declared in paths.go ? Or is it enough to copy to destFile.tmp before issuing a rename from destFile.tmp to destFile ?\n- What if Move is called to move a directory ? In that case, I guess the old implementation works fine since os.Rename will move a file or a directory transparently. However trying to copy a directory will crash lamely. Should we detect that case and process it adequately ? That would require making a new directory at the destination location and copying it's content recursively, making the Move function kind of bloated I think\n"},"comment":{"url":"https://api.github.com/repos/docker/distribution/issues/comments/272461813","html_url":"https://github.com/docker/distribution/pull/1375#issuecomment-272461813","issue_url":"https://api.github.com/repos/docker/distribution/issues/1375","id":272461813,"user":{"login":"GordonTheTurtle","id":10620046,"avatar_url":"https://avatars.githubusercontent.com/u/10620046?v=3","gravatar_id":"","url":"https://api.github.com/users/GordonTheTurtle","html_url":"https://github.com/GordonTheTurtle","followers_url":"https://api.github.com/users/GordonTheTurtle/followers","following_url":"https://api.github.com/users/GordonTheTurtle/following{/other_user}","gists_url":"https://api.github.com/users/GordonTheTurtle/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonTheTurtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonTheTurtle/subscriptions","organizations_url":"https://api.github.com/users/GordonTheTurtle/orgs","repos_url":"https://api.github.com/users/GordonTheTurtle/repos","events_url":"https://api.github.com/users/GordonTheTurtle/events{/privacy}","received_events_url":"https://api.github.com/users/GordonTheTurtle/received_events","type":"User","site_admin":false},"created_at":"2017-01-13T14:55:24Z","updated_at":"2017-01-13T14:55:24Z","body":"<!-- AUTOMATED:POULE:DCO-EXPLANATION -->\nPlease sign your commits following these rules:\nhttps://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work\nThe easiest way to do this is to amend the last commit:\n~~~console\n$ git clone -b \"1138-fix-filesystem-move-across-mount-points\" git@github.com:dalsh/distribution.git somewhere\n$ cd somewhere\n$ git rebase -i HEAD~842354319168\neditor opens\nchange each 'pick' to 'edit'\nsave the file and quit\n$ git commit --amend -s --no-edit\n$ git rebase --continue # and repeat the amend for each commit\n$ git push -f\n~~~\n\nAmending updates the existing PR. You **DO NOT** need to open a new one.\n"}}
{"actor":{"display_login":"GordonTheTurtle"}}