Created attachment 1887373 [details] cloud init modal Created attachment 1887373 [details] cloud init modal Description of problem: If the template doesn’t have a cloud-init user, the username input field should be empty and have descriptive text: “User: default cloud init is cloud-user”. Otherwise the input should be pre-populated with value from template. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Start customized VM creation flow 2. Open Scripts tab 3. Click Edit in Cloud-init section Actual results: Expected results: Additional info:
Regarding the text: Default cloudinit username is 'cloud-user' 1. If the template has no username set in cloud-init data, we can say the default cloudinit username is 'cloud-user'. 2. If the template has username set, such as for Fedora/Centos template, the text should be: - fedora: Default cloudinit username is 'fedora' - centos: Default cloudinit username is 'centos'
hi all the fix in https://github.com/kubevirt-ui/kubevirt-plugin/pull/617 add a help message: """ Default cloudinit username is 'cloud-user' """ In comment#1 we suggested to guess the default user name using the OS name, but this is also not correct, because a. we have no documentation we can relay on that the source image will always use this default user name if the OS is known. b. the boot source we use may not have the same username as the one we guess IMHO best solution will be to send users to the image creator for information about the default user name if it's not available, for example: """ The user's login name, if left empty the default username defined by the boot source image will be used """ or """ The user's login name, default username will be used if left empty, for RHEL8 default user name is 'cloud-user' learn more [2] """ RHEL9 does not document a default username [3], so we should not assume it's the same as in RHEL8 Guohua WDYT ? [1] https://cloudinit.readthedocs.io/en/latest/topics/examples.html?highlight=username#including-users-and-groups [2] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_and_managing_cloud-init_for_rhel_8/index#changing-a-default-user-name-with-cloud-init_configuring-cloud-init [3] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_managing_cloud-init_for_rhel_9/introduction-to-cloud-init_cloud-content#cloud-init-configuration_introduction-to-cloud-init
(In reply to Yaacov Zamir from comment #2) > hi all > the fix in https://github.com/kubevirt-ui/kubevirt-plugin/pull/617 add a > help message: > """ Default cloudinit username is 'cloud-user' """ > > In comment#1 we suggested to guess the default user name using the OS name, > but this is also not correct, because > a. we have no documentation we can relay on that the source image will > always use this default user name if the OS is known. > b. the boot source we use may not have the same username as the one we guess > > IMHO best solution will be to send users to the image creator for > information about the default user name if it's not available, for example: > """ The user's login name, if left empty the default username defined by the > boot source image will be used """ > or > """ The user's login name, default username will be used if left empty, for > RHEL8 default user name is 'cloud-user' learn more [2] """ > > RHEL9 does not document a default username [3], so we should not assume it's > the same as in RHEL8 > > Guohua WDYT ? As we synced on slack, let's removing the hint and make the username field required, thanks! > > [1] > https://cloudinit.readthedocs.io/en/latest/topics/examples. > html?highlight=username#including-users-and-groups > [2] > https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/ > html-single/configuring_and_managing_cloud-init_for_rhel_8/index#changing-a- > default-user-name-with-cloud-init_configuring-cloud-init > [3] > https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/ > html/configuring_and_managing_cloud-init_for_rhel_9/introduction-to-cloud- > init_cloud-content#cloud-init-configuration_introduction-to-cloud-init
I agree, so to fix this BZ: a - remove the hint b - make the field required c - in places the UI assume a username and it's missing, we will show some "Not available" or empty as needed ( do not guess it's "cloud-user", if missing )
verified on v4.12.0-88
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 Virtualization 4.11.0 Images security and bug fix 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:6526