Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 2099620 - Starting or Restarting foreman.socket will raise a harmless "TCP_NODELAY failed: Operation not supported" error in Red Hat Satellite 6.9/6.10/6.11
Summary: Starting or Restarting foreman.socket will raise a harmless "TCP_NODELAY fail...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.10.6
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.12.0
Assignee: Evgeni Golov
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-21 10:56 UTC by Sayan Das
Modified: 2022-11-16 13:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:34:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35089 0 Normal Closed Starting or Restarting foreman.socket will raise a harmless "TCP_NODELAY failed: Operation not supported" error in Red H... 2022-08-25 14:35:11 UTC
Red Hat Issue Tracker SAT-12737 0 None None None 2022-09-06 00:43:55 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:24 UTC

Description Sayan Das 2022-06-21 10:56:31 UTC
Description of problem:

When we try to start the foreman.service, It triggers the startup of foreman.socket at the backend. 

During this startup, we get to see "TCP_NODELAY failed: Operation not supported" printed in the system logs which is harmless in nature but unexpected to see.



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

Red Hat Satellite 6.9
Red Hat Satellite 6.10
Red Hat Satellite 6.11


How reproducible:

Always

Steps to Reproduce:

1. Install a Satellite 6.9\6.10\6.11

2. Try; 

  # for i in stop start; do systemctl $i foreman.socket; sleep 5; done

  or simply # systemctl restart foreman.socket
  
  or
  
  # foreman-maintain service stop
  # foreman-maintain service start

3. Monitor /var/log/messages or check the status of foreman.socket using systemctl


Actual results:

Jun 21 16:17:37 satellite.example.com systemd[1]: TCP_NODELAY failed: Operation not supported
Jun 21 16:17:37 satellite.example.com systemd[1]: Starting Foreman HTTP Server Accept Sockets.
Jun 21 16:17:37 satellite.example.com systemd[1]: Listening on Foreman HTTP Server Accept Sockets.


Expected results:

No "TCP_NODELAY failed: Operation not supported" message


Additional info:

The foreman.socket is actually a UNIX socket but it includes a TCP option in it i.e. "NoDelay=true" which is a TCP only option

# grep NoDelay /usr/share/foreman/extras/systemd/foreman.socket /usr/lib/systemd/system/foreman.socket
/usr/share/foreman/extras/systemd/foreman.socket:NoDelay=true
/usr/lib/systemd/system/foreman.socket:NoDelay=true

# man 7 tcp | grep TCP_NODELAY -A4 | tail -6
--
       TCP_NODELAY
              If  set,  disable  the  Nagle  algorithm.  This means that segments are always sent as soon as possible, even if there is only a small amount of data.
              When not set, data is buffered until there is a sufficient amount to send out, thereby avoiding the frequent sending of small packets,  which  results
              in  poor  utilization of the network.  This option is overridden by TCP_CORK; however, setting this option forces an explicit flush of pending output,
              even if TCP_CORK is currently set.


But since we explicily mention "NoDelay" to "True" , When the unix socket starts, It tries to honor that option but fails because TCP_NODELAY is tcp only option. 


Workaround:

* Edit /etc/systemd/system/foreman.socket.d/installer.conf and add "NoDelay=false" at the end of the file

# cat /etc/systemd/system/foreman.socket.d/installer.conf
[Socket]
ListenStream=
ListenStream=/run/foreman.sock
SocketUser=apache
SocketMode=0600
NoDelay=false

* systemctl daemon-reload

* systemctl restart foreman.socket


Unless, my explanation is wrong or missing some important part and due to some reason, NoDelay should always be set to true in the case of foreman.socket,  I will suggest having this properly handled by satellite-installer and set "NoDelay=false" in /etc/systemd/system/foreman.socket.d/installer.conf .

Comment 1 Evgeni Golov 2022-06-21 11:09:30 UTC
Created redmine issue https://projects.theforeman.org/issues/35089 from this bug

Comment 2 Bryan Kearney 2022-06-21 12:04:49 UTC
Upstream bug assigned to egolov

Comment 3 Bryan Kearney 2022-06-21 12:04:51 UTC
Upstream bug assigned to egolov

Comment 4 Bryan Kearney 2022-06-21 16:04:54 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35089 has been resolved.

Comment 5 Gaurav Talreja 2022-07-22 08:04:10 UTC
Hi, 

Tested on Satellite 6.12.0 Snap 3.0

Steps followed:
# foreman-maintain service restart --only foreman.socket
OR
# systemctl restart foreman.socket
# tail -f /var/log/messages
Jul 21 18:00:25 satellite.example.com systemd[1]: Closed Foreman HTTP Server Accept Sockets.
Jul 21 18:00:25 satellite.example.com systemd[1]: Stopping Foreman HTTP Server Accept Sockets.
Jul 21 18:00:25 satellite.example.com systemd[1]: foreman.socket: TCP_NODELAY failed: Operation not supported
Jul 21 18:00:25 satellite.example.com systemd[1]: Starting Foreman HTTP Server Accept Sockets.
Jul 21 18:00:25 satellite.example.com systemd[1]: Listening on Foreman HTTP Server Accept Sockets.


# grep NoDelay /usr/share/foreman/extras/systemd/foreman.socket /usr/lib/systemd/system/foreman.socket
grep: /usr/share/foreman/extras/systemd/foreman.socket: No such file or directory
/usr/lib/systemd/system/foreman.socket:NoDelay=true

In this case, it appears the issue is still present, and /etc/systemd/system/foreman.socket.d/installer.conf does not contain "NoDelay=false"
Also, /usr/share/foreman/extras/systemd/foreman.socket along with systemd/ directory does not exist in RHEL8 for both 6.12 and 6.11, is that expected?


Thanks,
Gaurav

Comment 6 Evgeni Golov 2022-08-08 07:28:16 UTC
The Foreman redmine is marked as being fixed in 3.4, not in 3.3, so this is not in "snap_6.12.0_1.0" (thus removing that flag).

If y'all want this in 6.12, you gotta pick it.

Comment 7 Gaurav Talreja 2022-09-27 21:45:49 UTC
Verified.

Tested on Satellite 6.12.0 Snap 12.0

1. # grep NoDelay /etc/systemd/system/foreman.socket.d/installer.conf
    NoDelay=false
2. # foreman-maintain service restart --only foreman.socket
OR
# systemctl restart foreman.socket
3. Verify /var/log/messages doesn't contain any message like "TCP_NODELAY failed: Operation not supported" after restart


Observation:
In /etc/systemd/system/foreman.socket.d/installer.conf, a "NoDelay=false" line is added which fixes this messages which is handled by satellite-installer.
In addition, I tried setting this to "true" and the installer always resets it to "false" again.

In comment 5, I mentioned "NoDelay=true" in below files which is still there, but it seems it doesn't cause any issues

# grep NoDelay /usr/share/foreman/extras/systemd/foreman.socket /usr/lib/systemd/system/foreman.socket
grep: /usr/share/foreman/extras/systemd/foreman.socket: No such file or directory
/usr/lib/systemd/system/foreman.socket:NoDelay=true

Comment 11 errata-xmlrpc 2022-11-16 13:34:13 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: Satellite 6.12 Release), 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:8506


Note You need to log in before you can comment on or make changes to this bug.