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

Bug 1965117

Summary: [master] Post making changes to AgentServiceConfig assisted-service operator is not detecting the change and redeploying assisted-service pod
Product: OpenShift Container Platform Reporter: bjacot
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, dzager, fpercoco, masayag
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: All   
OS: Unspecified   
Whiteboard: AI-Team-Platform
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1977607 (view as bug list) Environment:
Last Closed: 2021-10-18 17:31:45 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:
Bug Depends On:    
Bug Blocks: 1977607    

Description bjacot 2021-05-26 21:34:58 UTC
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.

Comment 1 Moti Asayag 2021-06-09 11:27:10 UTC
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

Comment 2 Flavio Percoco 2021-06-14 11:41:25 UTC
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 6 errata-xmlrpc 2021-10-18 17:31:45 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.9.0 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:3759