Bug 1896178

Summary: [Edge] Creating RHEL for edge image with user doesn't create home directory or SSH key
Product: Red Hat Enterprise Linux 8 Reporter: Brian Smith <briasmit>
Component: osbuild-composerAssignee: Achilleas Koutsou <akoutsou>
Status: CLOSED ERRATA QA Contact: Yi He <yih>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: akoutsou, leiwang, obudai, perobins, tgunders, xiaofwan, yih
Target Milestone: rcKeywords: Triaged
Target Release: 8.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: 2021-11-09 18:46:58 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:

Description Brian Smith 2020-11-09 21:49:52 UTC
Description of problem:
After using Image Builder on RHEL 8.3 to create a RHEL for Edge image with a user account, and then building a system using the image, the home directory for the user is not present.  If a SSH public key was specified for the user in Image Builder, the key is also not present.  


Version-Release number of selected component (if applicable):  RHEL 8.3 GA


How reproducible:
Everytime

Steps to Reproduce:
1. Create RHEL for Edge image with RHEL 8.3 image builder
2. Specify that it should create a user with a SSH public key 
3. Build a RHEL for edge machine with resulting image

Actual results:
Can login with account using a password, but get message that home directory doesn't exist.   The SSH public key file is also not created.  


Expected results:
Home directory is created, as well as SSH public key.

Comment 1 Brian Lane 2021-01-25 16:43:36 UTC
lorax-composer has been replaced with osbuild-composer in 8.4, could you give this a try with a current 8.4 nightly and see if it still has the same problem?

Comment 2 Brian Smith 2021-02-04 19:10:43 UTC
Same issue when using Image Builder on system built from RHEL-8.4.0-20210129.n.0-x86_64-dvd1.iso.   Specified a user should be created in the Blueprint (with SSH key).  Built RHEL for Edge system from image, and the user account is created, but no home directory is created.  

$ rpm -qa | grep osbuild
osbuild-composer-worker-26-1.el8.x86_64
osbuild-selinux-23-2.el8.noarch
osbuild-23-2.el8.noarch
osbuild-ostree-23-2.el8.noarch
python3-osbuild-23-2.el8.noarch
osbuild-composer-26-1.el8.x86_64

$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 Beta (Ootpa)

Comment 3 Brian Lane 2021-02-04 21:17:07 UTC
Can you attach the logs from the build? You can get them by running 'composer-cli compose logs UUID' from the cmdline.

Comment 7 Yi He 2021-03-19 01:48:58 UTC
Verifying this bug in the latest build. 

Name         : osbuild
Version      : 27
Release      : 1.el8
Architecture : noarch
Size         : 209 k
Source       : osbuild-27-1.el8.src.rpm
Repository   : @System
From repo    : RHEL-8-NIGHTLY-AppStream
Summary      : A build system for OS images
URL          : https://github.com/osbuild/osbuild
License      : ASL 2.0
Description  : A build system for OS images

Comment 8 Yi He 2021-03-21 12:39:24 UTC
This bug is not fixed in the latest build.

[root@builder ~]# rpm -qa|grep osbuild
osbuild-selinux-27-1.el8.noarch
osbuild-composer-28.1-1.el8.x86_64
osbuild-ostree-27-1.el8.noarch
python3-osbuild-27-1.el8.noarch
osbuild-composer-worker-28.1-1.el8.x86_64
osbuild-composer-core-28.1-1.el8.x86_64
osbuild-27-1.el8.noarch


The image type I used is rhel-edge-commit, but from the commit that fixed this bug, the fix seems are for two new supported types: rhel-edge-container and rhel-edge-installer, but not for type rhel-edge-commit, which is the type that this bug reported on.

https://github.com/osbuild/osbuild-composer/pull/1244/commits/1b0e9e3c33818973e11cc1246c1dd1e398136941


@akoutsou Can you please confirm this? And if so, when will the fix apply to type rhel-edge-commit?

Comment 9 Achilleas Koutsou 2021-03-24 15:58:26 UTC
This wont be fixed for 8.4 but the use cases should be covered by the new image types: rhel-edge-container and rhel-edge-installer.

Comment 11 Xiaofeng Wang 2021-08-04 08:30:16 UTC
Pre-verified on the following build:
 osbuild                                      noarch  29-1.20210630gitace07f2.20210630gitace07f2.el8
 osbuild-composer                             x86_64  30-1.20210702git4391f3c.el8                   
 osbuild-composer-core                        x86_64  30-1.20210702git4391f3c.el8                   
 osbuild-composer-worker                      x86_64  30-1.20210702git4391f3c.el8                   
 osbuild-ostree                               noarch  29-1.20210630gitace07f2.20210630gitace07f2.el8
 osbuild-selinux                              noarch  29-1.20210630gitace07f2.20210630gitace07f2.el8

Comment 15 Xiaofeng Wang 2021-08-31 13:59:17 UTC
Verified with the following packages:
osbuild-composer-worker-33-1.el8.x86_64
osbuild-35-1.el8.noarch
osbuild-composer-core-33-1.el8.x86_64
osbuild-selinux-35-1.el8.noarch
osbuild-composer-33-1.el8.x86_64
osbuild-ostree-35-1.el8.noarch
python3-osbuild-35-1.el8.noarch

Comment 17 errata-xmlrpc 2021-11-09 18:46:58 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 (osbuild bug fix and enhancement 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/RHBA-2021:4273