Bug 1977607

Summary: [4.8.0] Post making changes to AgentServiceConfig assisted-service operator is not detecting the change and redeploying assisted-service pod
Product: OpenShift Container Platform Reporter: David Zager <dzager>
Component: assisted-installerAssignee: David Zager <dzager>
assisted-installer sub component: Deployment Operator QA Contact: bjacot
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, asegurap, bjacot, dzager, fpercoco, masayag
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: All   
OS: Unspecified   
Whiteboard: AI-Team-Platform
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1965117 Environment:
Last Closed: 2021-07-27 23:13:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1965117    
Bug Blocks:    

Description David Zager 2021-06-30 07:32:06 UTC
+++ This bug was initially created as a clone of Bug #1965117 +++

Description of problem:
Post an assisted-service operator and assisted service deployment.  If the end user makes a change to the AgentServiceConfig the operator is not redeploying the assisted-service pod.

What is being noticed is that the AgentServiceConfig is being updated.  The assisted-service configmap is getting the updated values.  When you ssh into the assisted-service pod the environment variable is still pointing to the old environment values.


How reproducible:
100%

Steps to Reproduce:
1: Deploy assisted-service-operator + hive + other pre-reqs
2: Create AgentServiceConfig with osImages
3: Modify AgentServiceConfig osImages ... maybe modify 4.8 to be a new 
   version/url/rootFSUrl combo?
4: Check that the assisted-service configmap has been updated
5: Check `OPENSHIFT_VERSIONS` on the assisted-service pod's environment (you'll probably have to get shell access since it won't be specified on the deployment anymore)

Actual results:
Assisted service pod is still holding onto the old environment variable

Expected results:
The operator to detect a change and redeploy the pod.

Workaround for this problem is to delete the assisted service pod manually and let the operator redeploy with the new values.

--- Additional comment from masayag on 20210609T11:27:10

another option instead of deleting the pod manually is to restart the assisted-service deployment as suggested in [1]:
oc rollout restart deployment/assisted-service

[1] https://github.com/openshift/assisted-service/blob/master/docs/operator.md#specifying-environmental-variables-via-configmap

--- Additional comment from fpercoco on 20210614T11:41:25

We had a conversation about this a few days ago, and I wanted to directly reflect my feedback in this BZ. I believe we should be managing this workflow. That is, AgentServiceConfig is the state we want to be deployed in. Therefore, the operator controller should guarantee that the Assisted Service deployment is restarted on changes to the AssistedServiceConfig.

Comment 5 errata-xmlrpc 2021-07-27 23:13:47 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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-2021:2438