Bug 1840220 - [CNV-2.4] node-maintenance-operator failing to create deployment - invalid format of manifest
Summary: [CNV-2.4] node-maintenance-operator failing to create deployment - invalid fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: SSP
Version: 2.4.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.4.0
Assignee: Michael Moser
QA Contact: zhe peng
URL:
Whiteboard:
: 1840214 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-26 15:02 UTC by Lukas Bednar
Modified: 2020-07-28 19:10 UTC (History)
7 users (show)

Fixed In Version: hco-bundle-registry-container-v2.3.0-254, node-maintenance-operator-container-v2.4.0-21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-28 19:10:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt node-maintenance-operator pull 82 0 None closed fix WATCH_NAMESPACE env variable in container spec of generated CSV 2020-09-08 08:46:16 UTC
Red Hat Product Errata RHSA-2020:3194 0 None None None 2020-07-28 19:10:18 UTC

Description Lukas Bednar 2020-05-26 15:02:17 UTC
Description of problem:

  - lastTransitionTime: "2020-05-26T14:55:17Z"
    lastUpdateTime: "2020-05-26T14:55:17Z"
    message: 'install strategy failed: Deployment.apps "node-maintenance-operator"
      is invalid: spec.template.spec.containers[0].env[0].valueFrom: Invalid value:
      "": may not be specified when `value` is not empty'
    phase: Failed
    reason: InstallComponentFailed
  lastTransitionTime: "2020-05-26T14:55:17Z"
  lastUpdateTime: "2020-05-26T14:55:17Z"
  message: 'install strategy failed: Deployment.apps "node-maintenance-operator" is
    invalid: spec.template.spec.containers[0].env[0].valueFrom: Invalid value: "":
    may not be specified when `value` is not empty'

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


How reproducible: 100


Steps to Reproduce:
1. Deploy CNV
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Simone Tiraboschi 2020-05-26 15:06:00 UTC
This is on node-maintenance operator.

In the deployment we have:
      - name: node-maintenance-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: node-maintenance-operator
          strategy: {}
          template:
            metadata:
              creationTimestamp: null
              labels:
                name: node-maintenance-operator
            spec:
              affinity:
                nodeAffinity:
                  requiredDuringSchedulingIgnoredDuringExecution:
                    nodeSelectorTerms:
                    - matchExpressions:
                      - key: node-role.kubernetes.io/master
                        operator: Exists
              containers:
              - env:
                - name: WATCH_NAMESPACE
                  value: openshift-cnv
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.annotations['olm.targetNamespaces']
                - name: POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: OPERATOR_NAME
                  value: node-maintenance-operator
                image: registry-proxy.engineering.redhat.com/rh-osbs/container-native-virtualization-node-maintenance-operator@sha256:a1e3b968feca5de5e43e8ae086904cc779391385ca6867222a614dd719e448dd
                imagePullPolicy: Always
                name: node-maintenance-operator
                resources: {}
              serviceAccountName: node-maintenance-operator
              tolerations:
              - effect: NoSchedule
                key: node-role.kubernetes.io/master


and the issue is definitively here:
                - name: WATCH_NAMESPACE
                  value: openshift-cnv
                  valueFrom:

Comment 2 Simone Tiraboschi 2020-05-26 15:39:20 UTC
*** Bug 1840214 has been marked as a duplicate of this bug. ***

Comment 7 Michael Moser 2020-05-27 10:14:14 UTC
thanks, looking into it.

Comment 8 Michael Moser 2020-05-27 11:43:01 UTC
Hi,
I submitted PR to fix this bug https://github.com/kubevirt/node-maintenance-operator/pull/82 @ksimone could you please review?

Comment 9 Michael Moser 2020-05-28 03:13:23 UTC
I submitted this change to the master version, that effects version v0.6.0 of the CSV. My question is do  we need to backport this change to previous versions of the CSV as well?

Comment 10 Michael Moser 2020-05-28 03:14:24 UTC
the PR has not been approved yet.

Comment 11 Michael Moser 2020-05-30 18:07:26 UTC
the PR has been merged now. https://github.com/kubevirt/node-maintenance-operator/pull/82

Comment 13 zhe peng 2020-07-09 08:25:36 UTC
verify with build :
$ virtctl version
Server Version: version.Info{GitVersion:"v0.30.3", GitCommit:"bf49699ddf2639f5d40d8cff5db49be632a165bd", GitTreeState:"clean", BuildDate:"2020-07-01T01:28:15Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}

CNV can be deployed successfully.
check node-maintenance operator:
$ oc get deployment node-maintenance-operator -n openshift-cnv -o yaml
....
 - env:
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
....
the value is removed. move to verified.

Comment 16 errata-xmlrpc 2020-07-28 19:10:07 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, 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/RHSA-2020:3194


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