Bug 1563566

Summary: Make sure storage.k8s.io/v1beta1 API is enabled in 3.10
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: StorageAssignee: Jan Safranek <jsafrane>
Status: CLOSED WORKSFORME QA Contact: Liang Xia <lxia>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, aos-storage-staff, piqin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-13 13:57:47 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 Jan Safranek 2018-04-04 08:10:10 UTC
This is a TODO issue to make sure we have storage.k8s.io/v1beta1 enabled and accessible in OpenShift 3.10 by default - it's needed by CSI.

This should work out of the box, without any configuration:

$ oc create -f - <<EOF
apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttachment
metadata:
  name: first
spec:
  attacher: csi-mock
  source:
    persistentVolumeName: mypv
  nodeName: 127.0.0.1

EOF

$ oc get volumeattachment
NAME      CREATED AT
first     2018-04-04T08:06:38Z

$ curl -k https://127.0.0.1:6443/apis/storage.k8s.io/
{
  "kind": "APIGroup",
  "apiVersion": "v1",
  "name": "storage.k8s.io",
  "versions": [
    {
      "groupVersion": "storage.k8s.io/v1",
      "version": "v1"
    },
    {
      "groupVersion": "storage.k8s.io/v1beta1", <--- THIS IS IMPORTANT
      "version": "v1beta1"
    }
  ],
  "preferredVersion": {
    "groupVersion": "storage.k8s.io/v1",
    "version": "v1"
  },
  "serverAddressByClientCIDRs": null
}

(use real API server address/port instead of 127.0.0.1:6443.

Note that this tests just presence and usability of the API, we do not expect that the external attacher attaches something somewhere! PV "mypv" and node "127.0.0.1" does not need to exist.



Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

Comment 1 Liang Xia 2018-04-08 07:51:37 UTC
I can see that storage.k8s.io/v1beta1 exist without any configuration.

# openshift version
openshift v3.10.0-0.16.0
kubernetes v1.9.1+a0ce1bc657
etcd 3.2.16


# curl -k https://10.240.0.14:8443/apis/storage.k8s.io/
{
  "kind": "APIGroup",
  "apiVersion": "v1",
  "name": "storage.k8s.io",
  "versions": [
    {
      "groupVersion": "storage.k8s.io/v1",
      "version": "v1"
    },
    {
      "groupVersion": "storage.k8s.io/v1beta1",
      "version": "v1beta1"
    }
  ],
  "preferredVersion": {
    "groupVersion": "storage.k8s.io/v1",
    "version": "v1"
  },
  "serverAddressByClientCIDRs": null
}


However, I can not create VolumeAttachment.
# oc create -f - <<EOF
apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttachment
metadata:
  name: first
spec:
  attacher: csi-mock
  source:
    persistentVolumeName: mypv
  nodeName: 127.0.0.1

EOF
error: unable to recognize "STDIN": no matches for storage.k8s.io/, Kind=VolumeAttachment

Comment 2 Jan Safranek 2018-04-13 13:57:47 UTC
Yeah, I checked 3.10 and it has v1beta1 API enabled and VolumeAttachment works there. I am closing this bug, CSI is going to be tested properly in trello cards and Polarion.