Bug 1805261 - Failed to config operator env
Summary: Failed to config operator env
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.3.z
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.3.z
Assignee: Kevin Rizza
QA Contact: yhui
URL:
Whiteboard:
Depends On: 1805258
Blocks: 1805262
TreeView+ depends on / blocked
 
Reported: 2020-02-20 15:18 UTC by Nick Hale
Modified: 2020-04-08 07:40 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1805258
: 1805262 (view as bug list)
Environment:
Last Closed: 2020-04-08 07:39:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1262 0 None None None 2020-04-08 07:40:03 UTC

Comment 1 Evan Cordell 2020-03-25 21:39:42 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1751443#c37

Please see this comment on the 4.5 bug. Can we verify that is not the issue?

It is stymieing that this works for us every time we test. I would like to find a consistent way to reproduce, or determine that we've been miscommunicating about the feature (see the linked comment).

Comment 4 yhui 2020-03-27 06:13:33 UTC
Cluster version is 4.3.0-0.nightly-2020-03-26-045409.
[hui@localhost test-run]$ oc exec catalog-operator-54d9d5674-s2jkv -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.13.0
git commit: 5ff376fd8c14bf6a99b314ad402ceb5641f71fdd

The test procedure is same as description.

Actual results:

[hui@localhost 1751443]$ oc get deployment etcd-operator -o yaml -n default|grep "\- command" -A 30
      - command:
        - etcd-operator
        - --create-crd=false
        - $(ARGS1)
        - $(ARGS2)
        env:
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: ARGS1
          value: -v=4
        - name: EMPTY_ENV
        image: quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2

The newly added env is added to deployment spec. 
Then check the env var $(ARGS1) in the command is replaced by its value -v=4.

[hui@localhost 1751443]$ oc get pods
NAME                             READY   STATUS    RESTARTS   AGE
etcd-operator-869c4bd946-llgr7   3/3     Running   0          21s

[hui@localhost 1751443]$ oc rsh etcd-operator-869c4bd946-llgr7
Defaulting container name to etcd-operator.
Use 'oc describe pod/etcd-operator-869c4bd946-llgr7 -n default' to see all of the containers in this pod.
/ $ ps -elf |cat
PID   USER     TIME   COMMAND
    1 etcd-ope   0:00 etcd-operator --create-crd=false -v=4 $(ARGS2)   # The env var $(ARGS1) is replaced by its value -v=4.
   14 etcd-ope   0:00 /bin/sh -c TERM="xterm-256color" /bin/sh
   20 etcd-ope   0:00 /bin/sh
   21 etcd-ope   0:00 /bin/sh -c TERM="xterm-256color" /bin/sh
   27 etcd-ope   0:00 /bin/sh
   28 etcd-ope   0:00 ps -elf
   29 etcd-ope   0:00 cat

The env var $(ARGS1) is replaced by its value -v=4 in the command. It is what we expected.
Mark the bug verified.

Comment 6 errata-xmlrpc 2020-04-08 07:39:51 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/RHBA-2020:1262


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