Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1815198

Summary: Setting installPlanApproval: Automatic does not automatically approve
Product: OpenShift Container Platform Reporter: nate stephany <nstephan>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED NOTABUG Docs Contact:
Severity: unspecified    
Priority: unspecified CC: vdinh
Version: 4.3.z   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-23 20:13:58 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:

Description nate stephany 2020-03-19 18:27:33 UTC
Description of problem:
When creating a subscription via CLI and setting installPlanApproval: Automatic, the resulting InstallPlan still requires manual approval


Version-Release number of selected component (if applicable):
OCP 4.3.5
NFD operator 4.3.0 (for testing)


How reproducible:
100%


Steps to Reproduce:
1. Create subscription with content show below
2. oc get ip -A
3.

Actual results:
New installplan created with manual approval


Expected results:
Installplan should be set to automatic approval

Additional info:

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: nfd
  namespace: openshift-operators
spec:
  channel: "4.3"
  installPlanApproval: Automatic
  name: nfd
  source: redhat-operators
  sourceNamespace: openshift-marketplace


[nstephan@bastion nfd-operator]$ oc get ip -A
NAMESPACE             NAME            CSV                                  APPROVAL   APPROVED
openshift-operators   install-7dtz8   etcdoperator.v0.9.4-clusterwide      Manual     true
openshift-operators   install-7tgjf   container-security-operator.v1.0.1   Manual     true
openshift-operators   install-dvg84   nfd.4.3.5-202003020549               Manual     false

Comment 1 Vu Dinh 2020-03-20 14:11:27 UTC
Hey Nate,

I want to ask if you can check if there are other `Subscription` that exist in the same namespace and also check `installPlanApproval` in those `Subscription` to see if they are set to `Manual` or `Automatic`. As OLM resolves all `Subscription` in the same namespace as a set for dependency resolution, one `Subscription` is set to `Manual` will force all `Subscription` in the same namespace to be `Manual`.

Thanks,
Vu

Comment 2 nate stephany 2020-03-23 19:20:50 UTC
Yes, there are a couple of other in the `openshift-operators` namespace with `installPlanApproval: Manual`.

Comment 3 Vu Dinh 2020-03-23 20:13:58 UTC
Hey Nate,

Then this is an expected behavior. As all subscriptions in the same namespace will be processed together by OLM for dependency resolution, one Manual subscription will resolve into all InstallPlans will have manual approval. You will need to convert all manual subscription into automatic approval. You can also install in different namespace that doesn't have manual subscription.

Vu