Bug 1840220
| Summary: | [CNV-2.4] node-maintenance-operator failing to create deployment - invalid format of manifest | ||
|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Lukas Bednar <lbednar> |
| Component: | SSP | Assignee: | Michael Moser <mmoser> |
| Status: | CLOSED ERRATA | QA Contact: | zhe peng <zpeng> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 2.4.0 | CC: | cnv-qe-bugs, ksimon, mmoser, ncredi, oyahud, stirabos, zpeng |
| Target Milestone: | --- | ||
| Target Release: | 2.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-07-28 19:10:07 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: | |||
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:
*** Bug 1840214 has been marked as a duplicate of this bug. *** thanks, looking into it. Hi, I submitted PR to fix this bug https://github.com/kubevirt/node-maintenance-operator/pull/82 @ksimone could you please review? 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? the PR has not been approved yet. the PR has been merged now. https://github.com/kubevirt/node-maintenance-operator/pull/82 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.
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 |
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: