Bug 1311868

Summary: No tags for dynamic provisioned volume in AWS
Product: OKD Reporter: Chao Yang <chaoyang>
Component: StorageAssignee: Jan Safranek <jsafrane>
Status: CLOSED CURRENTRELEASE QA Contact: Jianwei Hou <jhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, bchilds
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 17:14:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chao Yang 2016-02-25 09:00:36 UTC
Description of problem:
No tags for dynamic provisioned volume in AWS 

Version-Release number of selected component (if applicable):
oc v1.1.3-267-g0842757
kubernetes v1.2.0-alpha.7-703-gbc4550d


How reproducible:
Always

Steps to Reproduce:
1.Create a dynamic provision pv using below pvc json file
{
  "kind": "PersistentVolumeClaim",
  "apiVersion": "v1",
  "metadata": {
    "name": "claim2",
    "annotations": {
        "volume.alpha.kubernetes.io/storage-class": "foo"
    }
  },
  "spec": {
    "accessModes": [
      "ReadWriteOnce"
    ],
    "resources": {
      "requests": {
        "storage": "3Gi"
      }
    }
  }
}

2.Check pv is created 
[root@ip-172-18-14-29 /]# oc get pv
NAME           CAPACITY   ACCESSMODES   STATUS    CLAIM            REASON    AGE
pv-aws-5kvs1   3Gi        RWO           Bound     default/claim2             11m

3.Check pv tag in AWS web console

Actual results:
There is no tag in AWS web console

Expected results:
There should be some tags in AWS web console, like PV.name , PVC.name

Additional info:
I0225 02:25:58.901647    3286 aws.go:480] Zone not specified in configuration file; querying AWS metadata service
I0225 02:25:59.111626    3286 aws.go:605] AWS cloud - no tag filtering

Comment 1 Jan Safranek 2016-02-25 16:52:13 UTC
Indeed, created AWS volumes do not have any tags. I can see the provisioning controller assigns them, but AWS volume plugin does *not* pass them to AWS in pkg/volume/aws_ebs/aws_util.go

Comment 2 Jan Safranek 2016-02-26 09:05:30 UTC
So, Kubernetes as in v1.2.0-alpha.7-703-gbc4550d does not tag AWS volumes (broken by commit 1ae1db60272afb70b17dbaa6a43bfe1ccc4a0aad). I fixed it by commit 1d0b1c227b85a836988bedf15fd3f12c1e372a3f, but it's not in OpenShift yet.

I'll ask around if there is planned another Kubernetes rebase before OpenShift 3.2

Comment 3 Jan Safranek 2016-02-26 16:05:46 UTC
It looks like there *is* planned rebase to Kubernetes 1.2 before OpenShift 3.2. This bug will be fixed with it. I'll mark it as "modified" - we have a fix upstream and it should merge to OpenShift automatically.

Comment 4 Jan Safranek 2016-03-15 14:31:26 UTC
OpenShift rebase is in progress, watch https://github.com/openshift/origin/pull/7975. After that, tags should be working.

Comment 5 Chao Yang 2016-03-21 07:29:53 UTC
Verification is passed on below version

openshift v1.1.4-67-gd03c21f
kubernetes v1.2.0-beta.1-28-g148dd34
etcd 2.2.5

After create pvc, a pv is provisioned, and the tag is created on aws web console 
 Name
 kubernetes-dynamic-pv-a