Bug 1548163
| Summary: | RFE - Cannot use vsphere volume for registry during installation | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | davis phillips <dphillip> |
| Component: | Installer | Assignee: | davis phillips <dphillip> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Gan Huang <ghuang> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.9.0 | CC: | aos-bugs, ghuang, jokerman, mgugino, mmccomas |
| Target Milestone: | --- | Keywords: | NeedsTestCase |
| Target Release: | 3.10.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
The registry can now be deployed using vSphere storage backend by configuring the following variables.
openshift_hosted_registry_storage_kind=vsphere
openshift_hosted_registry_storage_access_modes=['ReadWriteOnce']
openshift_hosted_registry_storage_annotations=['volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/vsphere-volume']
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-07-31 12:59:59 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: | |||
| Bug Depends On: | 1572873, 1586366, 1588281 | ||
| Bug Blocks: | |||
|
Description
davis phillips
2018-02-22 21:05:29 UTC
In openshift-ansible-3.10.0-0.48.0 Documentation PR - https://github.com/openshift/openshift-docs/pull/9855 Tested in openshift-ansible-3.10.0-0.67.0.git.107.1bd1f01.el7.noarch.rpm
The pvc is on pending status because the `storageClassName` is empty. We should remove the parameter if no particular storage class defined.
# oc get pvc -o yaml
apiVersion: v1
items:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/vsphere-volume
creationTimestamp: 2018-06-13T07:47:58Z
finalizers:
- kubernetes.io/pvc-protection
name: regpv-claim
namespace: default
resourceVersion: "3761"
selfLink: /api/v1/namespaces/default/persistentvolumeclaims/regpv-claim
uid: 1760fe1e-6ede-11e8-8ef7-0050569f947a
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5G
storageClassName: ""
status:
phase: Pending
kind: List
metadata:
resourceVersion: ""
selfLink: ""
Hey Gan, The persistent volume claim template checks for claim.storageClass. https://github.com/openshift/openshift-ansible/blob/release-3.10/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2#L21-L23 Perhaps we should also check to see if the var is len > 0. Can I see your inventory file for testing this? Looks like I traced it down with this: https://github.com/dav1x/openshift-ansible/blob/f39bf7ee86004bf67c8f3cad41f6e06fc241d304/roles/lib_utils/action_plugins/generate_pv_pvcs_list.py#L129-L130 Although that var test wasn't a part of my PR. >>> tmpl = """{% if sc|length <= 0 %} {{sc|length}} is <= 0{% else %} {{sc|length}} > 0{% endif %}""" >>> template = Template(tmpl) >>> print template.render({"sc": ""}) 0 is <= 0 >>> print template.render({"sc": "dynamic"}) 7 > 0 Here is a PR to address: https://github.com/openshift/openshift-ansible/pull/8854 Looks like I traced it down with this: https://github.com/dav1x/openshift-ansible/blob/f39bf7ee86004bf67c8f3cad41f6e06fc241d304/roles/lib_utils/action_plugins/generate_pv_pvcs_list.py#L129-L130 Although that var test wasn't a part of my PR. >>> tmpl = """{% if sc|length <= 0 %} {{sc|length}} is <= 0{% else %} {{sc|length}} > 0{% endif %}""" >>> template = Template(tmpl) >>> print template.render({"sc": ""}) 0 is <= 0 >>> print template.render({"sc": "dynamic"}) 7 > 0 Here is a PR to address: https://github.com/openshift/openshift-ansible/pull/8854 https://github.com/openshift/openshift-ansible/pull/8858 for release-3.10 In openshift-ansible-3.10.2-1 and later Verified in openshift-ansible-3.10.8-1.git.230.830efc0.el7.noarch.rpm My inventory file: # cat inventory <--snip--> openshift_cloudprovider_kind=vsphere openshift_cloudprovider_vsphere_username=xxxx openshift_cloudprovider_vsphere_password=xxxx openshift_cloudprovider_vsphere_host=10.66.xx.xx openshift_cloudprovider_vsphere_datacenter=Datacenter openshift_cloudprovider_vsphere_datastore=datastore1 openshift_hosted_registry_storage_kind=vsphere openshift_hosted_registry_storage_access_modes=["ReadWriteOnce"] openshift_hosted_registry_storage_annotations=["volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/vsphere-volume"] |