{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/662","repository_url":"https://api.github.com/repos/vmware/docker-volume-vsphere","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/662/comments","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/662/events","html_url":"https://github.com/vmware/docker-volume-vsphere/issues/662","id":186046489,"number":662,"title":"Corrupted metadata file should be handled gracefully and not terminate operations","user":{"login":"msterin","id":4379889,"avatar_url":"https://avatars.githubusercontent.com/u/4379889?v=3","gravatar_id":"","url":"https://api.github.com/users/msterin","html_url":"https://github.com/msterin","followers_url":"https://api.github.com/users/msterin/followers","following_url":"https://api.github.com/users/msterin/following{/other_user}","gists_url":"https://api.github.com/users/msterin/gists{/gist_id}","starred_url":"https://api.github.com/users/msterin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msterin/subscriptions","organizations_url":"https://api.github.com/users/msterin/orgs","repos_url":"https://api.github.com/users/msterin/repos","events_url":"https://api.github.com/users/msterin/events{/privacy}","received_events_url":"https://api.github.com/users/msterin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"govint","id":15854712,"avatar_url":"https://avatars.githubusercontent.com/u/15854712?v=3","gravatar_id":"","url":"https://api.github.com/users/govint","html_url":"https://github.com/govint","followers_url":"https://api.github.com/users/govint/followers","following_url":"https://api.github.com/users/govint/following{/other_user}","gists_url":"https://api.github.com/users/govint/gists{/gist_id}","starred_url":"https://api.github.com/users/govint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govint/subscriptions","organizations_url":"https://api.github.com/users/govint/orgs","repos_url":"https://api.github.com/users/govint/repos","events_url":"https://api.github.com/users/govint/events{/privacy}","received_events_url":"https://api.github.com/users/govint/received_events","type":"User","site_admin":false},"assignees":[{"login":"govint","id":15854712,"avatar_url":"https://avatars.githubusercontent.com/u/15854712?v=3","gravatar_id":"","url":"https://api.github.com/users/govint","html_url":"https://github.com/govint","followers_url":"https://api.github.com/users/govint/followers","following_url":"https://api.github.com/users/govint/following{/other_user}","gists_url":"https://api.github.com/users/govint/gists{/gist_id}","starred_url":"https://api.github.com/users/govint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govint/subscriptions","organizations_url":"https://api.github.com/users/govint/orgs","repos_url":"https://api.github.com/users/govint/repos","events_url":"https://api.github.com/users/govint/events{/privacy}","received_events_url":"https://api.github.com/users/govint/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-10-29T00:05:54Z","updated_at":"2016-10-30T06:28:20Z","closed_at":null,"body":"Today if metadata file is not complete (e.g. missing created-by, which may happen in diffent error paths) , getVMDK returns error. Since docker runs \"get()\" command before anything else, that blocks operations like `remove` or inspect.  This was found when fixing #661 \r\n\r\nI think it would be much better if `vol_info` simply returned \"N/A\" or \"Unknown\" or \"Failed to get\" for fields it cannot fill for any reason. This would still check for volume existence first in getVMDK , and all admin commands (inspect/ls) would keep working.\r\n\r\nExample of blocked operations: \r\n\r\n```\r\nroot@photon-1uL8XNsuB [ ~ ]# docker volume ls \r\nDRIVER              VOLUME NAME\r\nvmdk                ty1\r\nroot@photon-1uL8XNsuB [ ~ ]# docker volume inspect ty1\r\n[]\r\nError response from daemon: get ty1: VolumeDriver.Get: Failed to get disk details for /vmfs/volumes/datastore1/dockvols/ty1.vmdk ('created-by')\r\nroot@photon-1uL8XNsuB [ ~ ]# docker volume inspect ty1\r\n[]\r\nError response from daemon: get ty1: VolumeDriver.Get: Failed to get disk details for /vmfs/volumes/datastore1/dockvols/ty1.vmdk ('created-by')\r\nroot@photon-1uL8XNsuB [ ~ ]# docker volume rm ty1\r\nError response from daemon: get ty1: VolumeDriver.Get: Failed to get disk details for /vmfs/volumes/datastore1/dockvols/ty1.vmdk ('created-by')\r\n```\r\n\r\nAssigning to @govint to take a look first, and decide the best way to handle it. \r\n"},"comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments/257134642","html_url":"https://github.com/vmware/docker-volume-vsphere/issues/662#issuecomment-257134642","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/662","id":257134642,"user":{"login":"govint","id":15854712,"avatar_url":"https://avatars.githubusercontent.com/u/15854712?v=3","gravatar_id":"","url":"https://api.github.com/users/govint","html_url":"https://github.com/govint","followers_url":"https://api.github.com/users/govint/followers","following_url":"https://api.github.com/users/govint/following{/other_user}","gists_url":"https://api.github.com/users/govint/gists{/gist_id}","starred_url":"https://api.github.com/users/govint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govint/subscriptions","organizations_url":"https://api.github.com/users/govint/orgs","repos_url":"https://api.github.com/users/govint/repos","events_url":"https://api.github.com/users/govint/events{/privacy}","received_events_url":"https://api.github.com/users/govint/received_events","type":"User","site_admin":false},"created_at":"2016-10-30T06:28:20Z","updated_at":"2016-10-30T06:28:20Z","body":"Taking a step back, the current behavior isn't really bad. First of all how did the meta-data get corrupted? Unless there is a code path or some sort of intentional tampering of the KV store there is no  way to corrupt the KV store file. Prefer to identify the code path or workflow that can corrupt the KV and fix that.\r\n\r\nAnd if the KV store is corrupt then pretty much that volume isn't usable or shouldn't be usable thereafter.\r\n\r\nOr we can move the volume KV to the SQL DB."}}
{"actor":{"display_login":"govint"}}