Bug 2213207

Summary: systemd: Puppet Agent starts before network-online.target is reached
Product: Red Hat Satellite Reporter: Satyajit Das <sadas>
Component: PuppetAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: gisoni, gtalreja, rlavi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
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: 2023-06-27 11:37:34 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 Satyajit Das 2023-06-07 13:14:05 UTC
Description of problem:
Puppet Agent now waits for network-online.target and does not attempt to contact Puppet Server before having network connectivity. If client is using NetworkManager with DHCP, the agent tried to apply configuration before the network connection was up, resulting in printing several errors to the logs.


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

Name        : puppet-agent
Version     : 7.16.0
Release     : 2.el8sat
Architecture: x86_64
Install Date: Tue 06 Jun 2023 06:48:17 PM IST
Group       : System Environment/Base
Size        : 112250823
License     : See components
Signature   : RSA/SHA256, Tue 28 Jun 2022 01:57:31 AM IST, Key ID 199e2f91fd431d51
Source RPM  : puppet-agent-7.16.0-2.el8sat.src.rpm
Build Date  : Fri 13 May 2022 06:04:25 PM IST
Build Host  : x86-039.build.eng.bos.redhat.com



How reproducible:

100%


Steps to Reproduce:
1. Install and configure puppet agent on the client host.
2. Reboot the client host


Actual results:

May 26 19:32:20 client puppet-agent[2554]: Starting Puppet client version 7.16.0
May 26 19:32:20 client puppet-agent[3150]: Connection to https://satellite.example.com:8140/puppet/v3 failed, trying next route: Request to https://satellite.example.com:8140/puppet/v3 failed after 0.001 seconds: Failed to open TCP connection to satellite.example.com:8140 (getaddrinfo: Name or service not known)
May 26 19:32:20 client puppet-agent[3150]: Wrapped exception:
May 26 19:32:20 client puppet-agent[3150]: Failed to open TCP connection to satellite.example.com:8140 (getaddrinfo: Name or service not known)
May 26 19:32:20 client puppet-agent[3150]: No more routes to fileserver


Expected results:

The service configuration file /usr/lib/systemd/system/puppet.service:
After=basic.target network.target

This is the default version of this configuration, I suggest reconsidering these settings and adding network-online.target to the default configuration file, especially since puppet can't really work without network access.

Additional info:

Same is raised and addressed by puppet labs in the below BZ.

https://tickets.puppetlabs.com/browse/PUP-5402

Comment 1 Girija Soni 2023-06-27 11:37:34 UTC

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