Bug 1795561

Summary: unknown field "passwd" in io.openshift.machineconfiguration.v1.MachineConfig.spec.config
Product: OpenShift Container Platform Reporter: Olimp Bockowski <obockows>
Component: Machine Config OperatorAssignee: Erica von Buelow <evb>
Status: CLOSED ERRATA QA Contact: Michael Nguyen <mnguyen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.zCC: amurdaca, evb
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1797797 1798667 (view as bug list) Environment:
Last Closed: 2020-02-26 05:52:30 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: 1798667    
Bug Blocks:    

Description Olimp Bockowski 2020-01-28 10:40:31 UTC
Description of problem:

It looks like before it was working without any problems: 
https://github.com/openshift/machine-config-operator/blob/master/docs/Update-SSHKeys.md
However, for 4.2 it doesn't.
According to latest ./manifests/machineconfig.crd.yaml, CRD allows "passwd". However, when I apply the above to openshift 4.2.13 (and I have reported that for 16 it's the same) there is validation error:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(MachineConfig.spec.config): unknown field "passwd" in io.openshift.machineconfiguration.v1.MachineConfig.spec.config

Moreover
[ obockows.csb  ~ ] $ oc explain MachineConfig.spec.config.passwd
error: field "passwd" does not exist

When I look at the latest 4.2 image for machine-config-operator: 
https://access.redhat.com/containers/?architecture=#/registry.access.redhat.com/openshift4/ose-machine-config-operator/images/v4.2.15-202001171551
In it's Dockerfile I see it uses:
ENV SOURCE_GIT_COMMIT=31fed93186c9f84708f5cdfd0227ffe4f79b31cd
This commit is in the branch: release-4.2 of course 

passwd was added in commit 13bf7e976536a81e97823ca0c0d173897828e5ac
And it was merged in d3fc1811ffab59e36dd41a4d05718434ec6f0045, that is part of master & release-4.3 but not _not_ 4.2


Version-Release number of selected component (if applicable):
4.2.x

How reproducible:
always

Steps to Reproduce:
1. deploy
2. try to modify ssh or run: oc explain MachineConfig.spec.config.passwd
3. create MachineConfig / look at oc explain output

Actual results:
Fails

Expected results:
It's working properly

Additional info:
The repository looks suspicious to me. I found some quirks and I will share as a private comment.

Comment 1 Antonio Murdaca 2020-01-28 10:50:06 UTC
Can you share the full machineconfig that you're using as part of adding a new user? is this just related to the crd oc explain or you're saying you're unable to add a user with the passwd field of the machineconfig?

Comment 2 Antonio Murdaca 2020-01-28 10:52:53 UTC
Ok I think this is just about the CRD openapi, what you described has indeed been introduced post 4.2 with https://github.com/openshift/machine-config-operator/pull/1234, therefore master, release-4.4 and release-4.3 have it.


We can go ahead and backport this to 4.2 and possibly 4.1 afterwards.

Erica, can you open 4.1 and 4.2 backports for https://github.com/openshift/machine-config-operator/pull/1234?

Comment 12 errata-xmlrpc 2020-02-26 05:52:30 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, 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/RHBA-2020:0523

Comment 13 Red Hat Bugzilla 2023-09-18 00:20:01 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days