Bug 1795561 - unknown field "passwd" in io.openshift.machineconfiguration.v1.MachineConfig.spec.config [NEEDINFO]
Summary: unknown field "passwd" in io.openshift.machineconfiguration.v1.MachineConfig....
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.2.z
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.2.z
Assignee: Erica von Buelow
QA Contact: Michael Nguyen
URL:
Whiteboard:
Depends On: 1798667
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-28 10:40 UTC by Olimp Bockowski
Modified: 2020-02-26 05:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1797797 1798667 (view as bug list)
Environment:
Last Closed: 2020-02-26 05:52:30 UTC
Target Upstream Version:
amurdaca: needinfo? (evb)
obockows: needinfo? (amurdaca)


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift machine-config-operator pull 1435 None closed [release-4.2] bug 1795561: machineconfig.crd.yaml: add passwd schema 2020-04-14 03:00:48 UTC
Red Hat Product Errata RHBA-2020:0523 None None None 2020-02-26 05:52:37 UTC

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@obockows.brq.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


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