Bug 1980277

Summary: puppet-agent systemd unit not waiting for network-online.target
Product: Red Hat Satellite Reporter: Vedashree Deshpande <vdeshpan>
Component: PuppetAssignee: satellite6-bugs <satellite6-bugs>
Status: ON_QA --- QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.9.0CC: ekohlvan, pcreech, sadas, shwsingh, xaver.amberger
Target Milestone: 6.14.0Keywords: Triaged
Target Release: UnusedFlags: gtalreja: needinfo? (ekohlvan)
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: puppet-agent-7.17.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Vedashree Deshpande 2021-07-08 08:52:49 UTC
Description of problem:
 In the default systemd unit puppet.service the following constraint is configured:
After=network.target

However in a case where a teaming interface takes longer to come up, the puppet run starts before network is available and thus can't gather accurate facts.

As a workaround have copied the unit to /etc/systemd/system and overridden the constraint to:
After=network-online.target

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

Actual results:
1.) Without network-online there is no point in puppet agent running, since it can't reach the puppet master anyway, so why not wait?
2.) When puppet facts are used in the puppet run and can't be gathered accurately, this falsifies the run's outcome and thus causes configuration issues.

Comment 1 Brad Buckingham 2023-01-04 22:48:23 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 2 Ewoud Kohl van Wijngaarden 2023-01-11 16:31:56 UTC
This is solved upstream in https://github.com/puppetlabs/puppet/commit/1d65d0780ec87a1f66d4e1a92669299d1ea01f62 and landed in puppet-agent 7.17.0.

(In reply to Vedashree Deshpande from comment #0)
> As a workaround have copied the unit to /etc/systemd/system and overridden
> the constraint to:
> After=network-online.target

For future reference, it's recommended to use drop in configurations. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/assembly_working-with-systemd-unit-files_configuring-basic-system-settings#proc_extending-the-default-unit-configuration_assembly_working-with-systemd-unit-files describes this.

Comment 4 Girija Soni 2023-06-27 11:37:34 UTC
*** Bug 2213207 has been marked as a duplicate of this bug. ***