Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1846587

Summary: 7.2 KVM Guest Image sshd.service not auto start after system reboot, even though it is enabled.
Product: Red Hat Enterprise Linux 7 Reporter: Jia Jian <jijia>
Component: systemdAssignee: systemd-maint
Status: CLOSED CURRENTRELEASE QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: dtardon, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
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: 2020-06-23 14:38:29 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:
Attachments:
Description Flags
systemd debug log
none
My test vm sosreport none

Description Jia Jian 2020-06-12 01:34:56 UTC
Description of problem:
7.2 KVM Guest Image sshd.service not auto start after system reboot, even though it is enabled. 

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


How reproducible:
create a vm using RHEL 7.2 KVM Guest Image.

Steps to Reproduce:

1. Download RHEL 7.2 KVM Guest Image (SHA-256 Checksum: d4f931701ab3ab61bd958dc859518978eac40cef535f7a40d4017342409c1a27):
   https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.2/x86_64/product-software

2. Create a KVM guest with the image, change root password using guestfish tool, the link is:
   https://access.redhat.com/discussions/664843

3. root login, we can see sshd.service not auto start, even though reboot system.
[root@localhost ~]# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name              
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1233/master                   
tcp6       0      0 ::1:25                  :::*                    LISTEN      1233/master 

[root@localhost ~]# systemctl is-enabled sshd.service
enabled
[root@localhost ~]# systemctl is-enabled sshd.socket 
disabled


Actual results:

sshd.service not auto start.

Expected results:

sshd.service should auto start.

Additional info:

- Tried the KCS, but not work:
        https://access.redhat.com/solutions/2534851
 
- RHEL 7.5 KVM Guest Image sshd.service could auto start.

Comment 2 Jia Jian 2020-06-15 01:59:25 UTC
Hi team, 

Any updates? 

If you need any other data, please let me know, thanks in advance.

Best regards,
Jian Jia

Comment 8 Jia Jian 2020-06-17 09:45:02 UTC
Created attachment 1697779 [details]
systemd debug log

Comment 9 Jia Jian 2020-06-17 09:45:57 UTC
Created attachment 1697780 [details]
My test vm sosreport

Comment 11 Jakub Jelen 2020-06-17 12:01:08 UTC
Only note that I found in that log related to sshd is the following:

[    4.824065] systemd[1]: Looking at job sshd-keygen.service/stop conflicted_by=no
[    4.824076] systemd[1]: Looking at job sshd-keygen.service/start conflicted_by=no
[    4.824082] systemd[1]: Fixing conflicting jobs sshd-keygen.service/stop,sshd-keygen.service/start by deleting job sshd-keygen.service/stop

then I do not see any information that it would be actually attempted to start.

sshd starts as part of multi-user.target as visible above. In your log, I see that it is queued

[    4.824535] systemd[1]: Installed new job sshd-keygen.service/start as 176
[    4.824684] systemd[1]: Installed new job multi-user.target/start as 96
[    4.824787] systemd[1]: Installed new job sshd.service/start as 175

But never executed. This does not even got to the start of sshd nor sshd-keygen so I will move this to systemd and hope systemd developers will be able to assist further.