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 2131524

Summary: sshd starts before the network is online
Product: Red Hat Enterprise Linux 9 Reporter: Frank Büttner <bugzilla>
Component: opensshAssignee: Dmitry Belyavskiy <dbelyavs>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: jjelen
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
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-10-06 15:57:41 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 Frank Büttner 2022-10-02 07:06:50 UTC
Description of problem:
The service will starts, before the network setup is completed.

Version-Release number of selected component (if applicable):
openssh-server-8.7p1-10.el9_0.x86_64


How reproducible:
Every time

Steps to Reproduce:
1. start the server

Actual results:
sshd don't come up at the first start, because the binding ip address is nor ready. This comes from the fact, that the network is not complete online at this time.

Expected results:
That sshd will run.


Additional info:
Easy fix, change After=network.target sshd-keygen.target to
After=network-online.target sshd-keygen.target.
That it will starts on its first try.

Comment 1 Dmitry Belyavskiy 2022-10-06 15:57:41 UTC
Dear Frank,

Thank you for raising this issue!

There are pretty good reasons not to use network-online.target as an universal solution. See the definition of it in https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

It's not a Red Hat specific practice - e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982950 is the similar problem in Debian.

https://bugzilla.redhat.com/show_bug.cgi?id=1936538#c22 provides what we consider a proper recommendation for custom setups similar to yours.

Hope this helps.

*** This bug has been marked as a duplicate of bug 1936538 ***