{"action":"opened","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44536","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44536/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44536/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44536/events","html_url":"https://github.com/kubernetes/kubernetes/issues/44536","id":221995921,"number":44536,"title":"Volume's attachments is None after nova attach volume to vm ","user":{"login":"FengyunPan","id":19662444,"avatar_url":"https://avatars0.githubusercontent.com/u/19662444?v=3","gravatar_id":"","url":"https://api.github.com/users/FengyunPan","html_url":"https://github.com/FengyunPan","followers_url":"https://api.github.com/users/FengyunPan/followers","following_url":"https://api.github.com/users/FengyunPan/following{/other_user}","gists_url":"https://api.github.com/users/FengyunPan/gists{/gist_id}","starred_url":"https://api.github.com/users/FengyunPan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FengyunPan/subscriptions","organizations_url":"https://api.github.com/users/FengyunPan/orgs","repos_url":"https://api.github.com/users/FengyunPan/repos","events_url":"https://api.github.com/users/FengyunPan/events{/privacy}","received_events_url":"https://api.github.com/users/FengyunPan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-16T07:26:38Z","updated_at":"2017-04-16T07:26:38Z","closed_at":null,"body":"**What happened**:\r\nThe event of pod:\r\n----------------\r\nEvents:\r\n  FirstSeen\tLastSeen\tCount\tFrom\t\t\tSubObjectPath\tType\t\tReason\t\tMessage\r\n  ---------\t--------\t-----\t----\t\t\t-------------\t--------\t------\t\t-------\r\n  22s\t\t22s\t\t1\t{default-scheduler }\t\t\tNormal\t\tScheduled\tSuccessfully assigned test2 to da-kk73n6cdy4-0-z5nbegh6ltn6-kube-minion-gka5gie7czuk\r\n  20s\t\t20s\t\t1\t{controller-manager }\t\t\tWarning\t\tFailedMount\tFailed to attach volume \"v2222222222222\" on node \"da-kk73n6cdy4-0-z5nbegh6ltn6-kube-minion-gka5gie7czuk\" with: volume 09c678bf-2f86-41b1-85c6-92d366a612b9 is not attached to 8574841d-caf1-4283-b27c-0aa926fea5ee\r\n  17s\t\t17s\t\t1\t{controller-manager }\t\t\tWarning\t\tFailedMount\tFailed to attach volume \"v2222222222222\" on node \"da-kk73n6cdy4-0-z5nbegh6ltn6-kube-minion-gka5gie7czuk\" with: Expected HTTP response code [200] when accessing [POST http://172.20.0.2:8774/v2/035bf9cd68ad41dfa7d57e2a7b9691ca/servers/8574841d-caf1-4283-b27c-0aa926fea5ee/os-volume_attachments], but got 400 instead\r\n{\"badRequest\": {\"message\": \"Invalid volume: volume '09c678bf-2f86-41b1-85c6-92d366a612b9' status must be 'available'. Currently in 'in-use'\", \"code\": 400}}\r\n  3s\t3s\t1\t{kubelet da-kk73n6cdy4-0-z5nbegh6ltn6-kube-minion-gka5gie7czuk}\tspec.containers{busybox}\tNormal\tPulled\tContainer image \"172.100.200.208/google_containers/busybox:latest\" already present on machine\r\n------------------\r\nAnd the log of controllermanager:\r\n----\r\nI0416 03:28:27.392876       1 attacher.go:96] Attach operation successful: volume \"7d26405d-2355-4f0a-954e-ae970deba3c2\" attached to node \"8574841d-caf1-4283-b27c-0aa926fea5ee\".\r\nI0416 03:28:27.688517       1 attacher.go:105] Attach volume \"7d26405d-2355-4f0a-954e-ae970deba3c2\" to instance \"8574841d-caf1-4283-b27c-0aa926fea5ee\" failed with volume 7d26405d-2355-4f0a-954e-ae970deba3c2 is not attached to 8574841d-caf1-4283-b27c-0aa926fea5ee\r\n----\r\n----\r\nI0416 03:28:28.273078       1 reconciler.go:202] Started AttachVolume for volume \"kubernetes.io/cinder/7d26405d-2355-4f0a-954e-ae970deba3c2\" to node \"da-kk73n6cdy4-0-z5nbegh6ltn6-kube-minion-gka5gie7czuk\"\r\nE0416 03:28:31.077823       1 openstack_volumes.go:66] Failed to attach 7d26405d-2355-4f0a-954e-ae970deba3c2 volume to 8574841d-caf1-4283-b27c-0aa926fea5ee compute\r\nI0416 03:28:31.078355       1 attacher.go:98] Attach volume \"7d26405d-2355-4f0a-954e-ae970deba3c2\" to instance \"8574841d-caf1-4283-b27c-0aa926fea5ee\" failed with Expected HTTP response code [200] when accessing [POST http://172.20.0.2:8774/v2/035bf9cd68ad41dfa7d57e2a7b9691ca/servers/8574841d-caf1-4283-b27c-0aa926fea5ee/os-volume_attachments], but got 400 instead\r\n{\"badRequest\": {\"message\": \"Invalid volume: volume '7d26405d-2355-4f0a-954e-ae970deba3c2' status must be 'available'. Currently in 'in-use'\", \"code\": 400}}\r\n----\r\n**What you expected to happen**:\r\nno \"Failed xxx\" message.\r\n \r\n**How to reproduce it** (as minimally and precisely as possible):\r\ncreate a pod which attach a cinder volume\r\n\r\n**Anything else we need to know**:\r\nVolume's attachments is None after nova attach volume to vm \r\n[root@node-1 ~]#  cinder show e3c597d0-f48c-4e60-ad04-56955999aa4b \r\n+---------------------------------------+--------------------------------------+\r\n|                Property               |                Value                 |\r\n+---------------------------------------+--------------------------------------+\r\n|              attachments              |                  []                  |\r\n|           availability_zone           |                 nova                 |\r\n|                bootable               |                false                 |\r\n|          consistencygroup_id          |                 None                 |\r\n|               created_at              |      2017-04-16T05:32:48.000000      |\r\n|              description              |                 None                 |\r\n|               encrypted               |                False                 |\r\n|                   id                  | e3c597d0-f48c-4e60-ad04-56955999aa4b |\r\n|                metadata               |                  {}                  |\r\n|            migration_status           |                 None                 |\r\n|              multiattach              |                False                 |\r\n|                  name                 |                  p1                  |\r\n|         os-vol-host-attr:host         |           cinder@ceph#ceph           |\r\n|     os-vol-mig-status-attr:migstat    |                 None                 |\r\n|     os-vol-mig-status-attr:name_id    |                 None                 |\r\n|      os-vol-tenant-attr:tenant_id     |   035bf9cd68ad41dfa7d57e2a7b9691ca   |\r\n|   os-volume-replication:driver_data   |                 None                 |\r\n| os-volume-replication:extended_status |                 None                 |\r\n|           replication_status          |               disabled               |\r\n|                  size                 |                  1                   |\r\n|              snapshot_id              |                 None                 |\r\n|              source_volid             |                 None                 |\r\n|                 status                |              available               |\r\n|                user_id                |   9be887b61d794482bee9af2306440418   |\r\n|              volume_type              |                 None                 |\r\n+---------------------------------------+--------------------------------------+\r\n[root@node-1 ~]#  nova volume-attach 8574841d-caf1-4283-b27c-0aa926fea5ee e3c597d0-f48c-4e60-ad04-56955999aa4b; cinder show e3c597d0-f48c-4e60-ad04-56955999aa4b\r\n+----------+--------------------------------------+\r\n| Property | Value                                |\r\n+----------+--------------------------------------+\r\n| device   | /dev/vdi                             |\r\n| id       | e3c597d0-f48c-4e60-ad04-56955999aa4b |\r\n| serverId | 8574841d-caf1-4283-b27c-0aa926fea5ee |\r\n| volumeId | e3c597d0-f48c-4e60-ad04-56955999aa4b |\r\n+----------+--------------------------------------+\r\n+---------------------------------------+--------------------------------------+\r\n|                Property               |                Value                 |\r\n+---------------------------------------+--------------------------------------+\r\n|              attachments              |                  []                  |\r\n|           availability_zone           |                 nova                 |\r\n|                bootable               |                false                 |\r\n|          consistencygroup_id          |                 None                 |\r\n|               created_at              |      2017-04-16T05:32:48.000000      |\r\n|              description              |                 None                 |\r\n|               encrypted               |                False                 |\r\n|                   id                  | e3c597d0-f48c-4e60-ad04-56955999aa4b |\r\n|                metadata               |                  {}                  |\r\n|            migration_status           |                 None                 |\r\n|              multiattach              |                False                 |\r\n|                  name                 |                  p1                  |\r\n|         os-vol-host-attr:host         |           cinder@ceph#ceph           |\r\n|     os-vol-mig-status-attr:migstat    |                 None                 |\r\n|     os-vol-mig-status-attr:name_id    |                 None                 |\r\n|      os-vol-tenant-attr:tenant_id     |   035bf9cd68ad41dfa7d57e2a7b9691ca   |\r\n|   os-volume-replication:driver_data   |                 None                 |\r\n| os-volume-replication:extended_status |                 None                 |\r\n|           replication_status          |               disabled               |\r\n|                  size                 |                  1                   |\r\n|              snapshot_id              |                 None                 |\r\n|              source_volid             |                 None                 |\r\n|                 status                |              attaching               |\r\n|                user_id                |   9be887b61d794482bee9af2306440418   |\r\n|              volume_type              |                 None                 |\r\n+---------------------------------------+--------------------------------------+\r\n[root@node-1 ~]#  cinder show e3c597d0-f48c-4e60-ad04-56955999aa4b  \r\n+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\r\n|                Property               |                                                                                                                                  Value                                                                                                                                  |\r\n+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\r\n|              attachments              | [{u'server_id': u'8574841d-caf1-4283-b27c-0aa926fea5ee', u'attachment_id': u'e5bde9f2-8651-4ab9-a828-5c54405ae5bd', u'host_name': None, u'volume_id': u'e3c597d0-f48c-4e60-ad04-56955999aa4b', u'device': u'/dev/vdi', u'id': u'e3c597d0-f48c-4e60-ad04-56955999aa4b'}] |\r\n\r\n-------------------------\r\nI get the attachments of volume twice, the first value is diffrent from the second value.\r\nwhen the status of volume is 'attaching', the attachments of volume is \"\".\r\n\r\n"}}
{"actor":{"display_login":"FengyunPan"}}