Bug 2065288 - Day-2 ignition override is ignored
Summary: Day-2 ignition override is ignored
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Infrastructure Operator
Version: rhacm-2.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: rhacm-2.6
Assignee: Mat Kowalski
QA Contact: Chad Crum
Derek
URL:
Whiteboard:
Depends On:
Blocks: 2068050
TreeView+ depends on / blocked
 
Reported: 2022-03-17 15:26 UTC by Mat Kowalski
Modified: 2022-10-03 20:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2070949 (view as bug list)
Environment:
Last Closed: 2022-10-03 20:21:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 3524 0 None Merged Bug 2065288: Add support for Ignition overrides for day2 worker 2022-06-14 12:32:16 UTC
Github stolostron backlog issues 20819 0 None None None 2022-03-17 15:41:46 UTC
Red Hat Issue Tracker MGMTBUGSM-201 0 None None None 2022-03-17 15:38:02 UTC

Description Mat Kowalski 2022-03-17 15:26:41 UTC
+++ PROBLEM DESCRIPTION

Ignition override available via `bmac.agent-install.openshift.io/ignition-config-overrides` annotation or `/v2/infra-envs/{infra_env_id}/hosts/{host_id}/ignition` endpoint is being currently ignored for day-2 workers.

By design the ignition provided by the override should be merged with the default template embedded in the service. What happens is that those do work for following

* discovery ISO
* day-1 master
* day-1 worker

and do not work for 

* day-2 worker

The override is transparently ignored so that the user is not aware of it happening.

+++ PROBLEM EXAMPLE

Applying the following override

"""
{
  "config": "{\"ignition\": {\"version\": \"3.1.0\"}, \"storage\": {\"files\": [{\"path\": \"/tmp/example\", \"contents\": {\"source\": \"data:text/plain;base64,aGVscGltdHJhcHBlZGluYXN3YWdnZXJzcGVj\"}}]}}"
}
"""

we have a resulting day-2 worker ignition rendered as

"""
{
  "config": "{\"ignition\":{\"config\":{\"merge\":[{\"source\":\"http://api.test-infra-cluster-fb61821c.redhat.com:22624/config/worker\",\"verification\":{}}],\"replace\":{\"verification\":{}}},\"proxy\":{},\"security\":{\"tls\":{}},\"timeouts\":{},\"version\":\"3.1.0\"},\"passwd\":{},\"storage\":{\"files\":[{\"group\":{},\"overwrite\":true,\"path\":\"/etc/hostname\",\"user\":{\"name\":\"root\"},\"contents\":{\"source\":\"data:,chocobomb-1\",\"verification\":{}},\"mode\":420}]},\"systemd\":{}}"
}
"""

+++ EXPECTED BEHAVIOUR

In the example above we expect the rendered day-2 worker ignition to look as follows

"""
{
  "config": "{\"ignition\":{\"config\":{\"merge\":[{\"source\":\"http://api.test-infra-cluster-fb61821c.redhat.com:22624/config/worker\",\"verification\":{}}],\"replace\":{\"verification\":{}}},\"proxy\":{},\"security\":{\"tls\":{}},\"timeouts\":{},\"version\":\"3.1.0\"},\"passwd\":{},\"storage\":{\"files\":[{\"group\":{},\"path\":\"/tmp/example\",\"user\":{},\"contents\":{\"source\":\"data:text/plain;base64,aGVscGltdHJhcHBlZGluYXN3YWdnZXJzcGVj\",\"verification\":{}}},{\"group\":{},\"overwrite\":true,\"path\":\"/etc/hostname\",\"user\":{\"name\":\"root\"},\"contents\":{\"source\":\"data:,chocobomb-3\",\"verification\":{}},\"mode\":420}]},\"systemd\":{}}"
}
"""


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