Bug 2090873 - HostPathProvisioner deployment creates invalid yaml
Summary: HostPathProvisioner deployment creates invalid yaml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Installation
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.3
Assignee: Simone Tiraboschi
QA Contact: Satyajit Bulage
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-26 18:34 UTC by Chandler Wilkerson
Modified: 2022-07-20 16:01 UTC (History)
4 users (show)

Fixed In Version: hco-bundle-registry-container-v4.10.3-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-20 16:01:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hostpath-provisioner-operator pull 230 0 None Merged Use array: "string" for "spec.storagePools.pvcTemplate.accessModes" in alm-examples 2022-06-06 08:40:04 UTC
Github kubevirt hostpath-provisioner-operator pull 238 0 None Merged [release-v0.12] Use array: "string" for "spec.storagePools.pvcTemplate.accessModes" in alm-examples 2022-06-13 14:13:51 UTC
Red Hat Product Errata RHEA-2022:5675 0 None None None 2022-07-20 16:01:27 UTC

Description Chandler Wilkerson 2022-05-26 18:34:31 UTC
Description of problem:
Using console to create HostPathProvisioner deployment fails on selecting "Create" with:

Error
Fix the following errors:

    Error "Invalid value: "string": spec.storagePools.pvcTemplate.accessModes in body must be of type array: "string"" for field "spec.storagePools.pvcTemplate.accessModes".

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

How reproducible:
Always

Steps to Reproduce:
1. Install OpenShift Virtualization 4.10.0
2. Instantiate OpenShift Virtualization HCO
3. Attempt to instantiate HostPathProvisioner via console

Actual results:

Error with following message and yaml generated:

Error
Fix the following errors:

    Error "Invalid value: "string": spec.storagePools.pvcTemplate.accessModes in body must be of type array: "string"" for field "spec.storagePools.pvcTemplate.accessModes".


---
apiVersion: hostpathprovisioner.kubevirt.io/v1beta1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  storagePools:
    - pvcTemplate:
        resources:
          requests:
            storage: 50Gi
        accessModes: ReadWriteOnce
      name: local
      path: /var/hpvolumes
  workload:
    nodeSelector:
      kubernetes.io/os: linux
  imagePullPolicy: IfNotPresent


Expected results:

Above steps should generate the following yaml per error message:

apiVersion: hostpathprovisioner.kubevirt.io/v1beta1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  storagePools:
    - pvcTemplate:
        resources:
          requests:
            storage: 50Gi
        accessModes: 
        - ReadWriteOnce
      name: local
      path: /var/hpvolumes
  workload:
    nodeSelector:
      kubernetes.io/os: linux
  imagePullPolicy: IfNotPresent

Additional info:

Comment 1 Simone Tiraboschi 2022-06-06 08:39:15 UTC
https://github.com/kubevirt/hostpath-provisioner-operator/pull/230 should be backported also to branch

Comment 2 Simone Tiraboschi 2022-06-06 08:40:37 UTC
... to branch release-v0.12

Comment 3 Simone Tiraboschi 2022-06-13 14:14:40 UTC
Waiting for the first build for v4.10.3

Comment 4 Satyajit Bulage 2022-07-01 08:43:42 UTC
I am able to see the expected content in the yaml file.
See attached file.

Comment 12 errata-xmlrpc 2022-07-20 16:01:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Virtualization 4.10.3 Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:5675


Note You need to log in before you can comment on or make changes to this bug.