Description of problem: When adding a day 2 worker with an illegal role (not master, worker, auto-assign), the agent resource shows that specsynced is successful. However, the agentclusterinstall shows backend error for specsynced. The agent should report the backend error instead of success. Release image: 4.11.0-rc.1 Snapshot: 2.1.0-DOWNANDBACK-2022-07-08-09-45-12 Steps to Reproduce: 1. Set bmac.agent-install.openshift.io/role BMH annotation to invalid role in day 2 worker 2. Create BMH resource Actual results: Agent registers and says it is ready to begin the installation Expected results: Agent validations are failing and specsynced reports "Illegal role defined"
I'm not sure that it's an actual issue, the error is on a cluster level, for example if you set 5 hosts as masters in day1 how will we know which of the hosts are invalid? So we enable to set roles to the agent and let the cluster validations to handle it. Closing this ticket, if you disagree and you think that we should improve the UX feel free to reopen.
Talked with Trey about it, reopening this issue. Looks like user is able to put boostrap in the role and host doesn't return an error in this case. i would expect to see a sync error
moved to 2.6.1 we will add webhook validation
Verified on 2.2.0-DOWNANDBACK-2022-10-19-15-57-21 $ oc get agent 520291c1-c628-4dde-8790-6c713f10b341 -o json | jq -r '.status.conditions[]|select(.type=="SpecSynced")' { "lastTransitionTime": "2022-10-21T12:33:05Z", "message": "The Spec could not be synced due to backend error: Requested role (bootstrap) is invalid for host 520291c1-c628-4dde-8790-6c713f10b341 from infraEnv fe006351-cb4b-4670-88c5-628d29cad8df", "reason": "BackendError", "status": "False", "type": "SpecSynced" }