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 1980277 - puppet-agent systemd unit not waiting for network-online.target
Summary: puppet-agent systemd unit not waiting for network-online.target
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Puppet
Version: 6.9.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: 6.14.0
Assignee: satellite6-bugs
QA Contact: Gaurav Talreja
URL:
Whiteboard:
: 2213207 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-08 08:52 UTC by Vedashree Deshpande
Modified: 2023-11-08 14:17 UTC (History)
5 users (show)

Fixed In Version: puppet-agent-7.17.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:17:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-17434 0 None None None 2023-06-14 17:40:19 UTC
Red Hat Issue Tracker SAT-18785 0 None None None 2023-07-14 10:22:14 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:17:48 UTC

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. ***

Comment 8 Gaurav Talreja 2023-08-22 10:37:50 UTC
VERIFIED.

Tested on Satellite 6.14.0 Snap 12.0
Version: puppet-agent-7.21.0-1.el8sat.x86_64

# systemctl cat puppet.service
...
[Unit]
Description=Puppet agent
Documentation=man:puppet-agent(8)
Wants=basic.target
After=basic.target network.target network-online.target
...


# systemctl list-dependencies puppet.service --after
...
● ├─network-online.target
● │ ├─cloud-init.service
● │ ├─NetworkManager-wait-online.service
● │ └─network.target
● │   ├─NetworkManager.service
● │   └─network-pre.target
● │     ├─cloud-init-local.service
● │     ├─firewalld.service
● │     └─nftables.service
● ├─network.target
● │ ├─NetworkManager.service
● │ └─network-pre.target
● │   ├─cloud-init-local.service
● │   ├─firewalld.service
● │   └─nftables.service
...

Comment 11 errata-xmlrpc 2023-11-08 14:17:34 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.14 security and bug fix update), 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-2023:6818


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