Bug 2081201

Summary: cloud-init User check for Windows VM refuses to accept capitalized usernames
Product: OpenShift Container Platform Reporter: Chandler Wilkerson <cwilkers>
Component: Console Kubevirt PluginAssignee: Yaacov Zamir <yzamir>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: cnv-qe-bugs, glekner, gouyang
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:09:59 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: 2091402    

Description Chandler Wilkerson 2022-05-03 03:11:54 UTC
Description of problem:
With a Win2k19 image, trying to set up cloudbase-init, using the wizard to create a VM with cloud-init yields an error trying to provision the default (for cloudbase-init) "Admin" user with error: "Username is required. must be a valid OS username"

Version-Release number of selected component (if applicable):
4.10.0

How reproducible:
Always

Steps to Reproduce:
1. Create Windows (2k19) VM with wizard
2. Customize VM and visit Advanced pane
3. Click cloud-init
4. Try to set User to "Admin"

Actual results:
"Username is required. must be a valid OS username"

Expected results:
Wizard understands capitalized usernames are valid in Windows OSes

Additional info:
Cloudbase-init default example case is to create a new administrator user called "Admin"

Comment 1 Gilad Lekner 2022-05-17 06:53:02 UTC
this is fixed in latest nightly.
please check @cwilkers

Comment 2 Chandler Wilkerson 2022-05-18 14:59:50 UTC
Do you need for me to test it in nightly before it can be put into a release, or will it be released in 4.10.1?
I don't quite have capacity at the moment to reinstall to a nightly.

Comment 3 Guohua Ouyang 2022-05-25 08:31:02 UTC
(In reply to Chandler Wilkerson from comment #2)
> Do you need for me to test it in nightly before it can be put into a
> release, or will it be released in 4.10.1?
> I don't quite have capacity at the moment to reinstall to a nightly.

QE will test it.

Comment 4 Guohua Ouyang 2022-05-26 03:07:52 UTC
(In reply to Gilad Lekner from comment #1)
> this is fixed in latest nightly.
> please check @cwilkers

The issue does not exist on kubevirt-ui, but exists on openshift/console.

Comment 5 Yaacov Zamir 2022-05-29 09:38:06 UTC
did you try a linx vm ?
it looks like the bug is for linux vm as well ?

Comment 6 Guohua Ouyang 2022-05-30 02:28:47 UTC
(In reply to Yaacov Zamir from comment #5)
> did you try a linx vm ?
> it looks like the bug is for linux vm as well ?
It's a bug for linux VM as well.

Comment 7 Guohua Ouyang 2022-05-30 02:42:00 UTC
verified the bug for both windows and linux vm on master, it accepts username like "Administrator".

Comment 8 Chandler Wilkerson 2022-05-31 16:34:42 UTC
Apologies, but I am confused by the wording of the last update to this BZ.

To be clear, in Linux VMs, capitalized usernames are not valid, in Windows, they are. 

The UI needs to allow a capitalized username for Windows based VMs, and raise an error if one is tried for a Linux VM.

Comment 10 errata-xmlrpc 2022-08-10 11:09:59 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 (Important: OpenShift Container Platform 4.11.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-2022:5069