Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5402

systemd: Puppet agent starts before network-online.target is reached

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • PUP 3.7.2, PUP 4.8.0
    • PUP 7.17.0
    • None
    • Puppet 3.7.2 on Ubuntu 15.04 with NetworkManager and DHCP Enviroment

    • Phoenix
    • 2
    • Phoenix 2022-04-27
    • jps-help
    • Bug Fix
    • Hide
      Now, Puppet Agent will wait for network-online.target and will not attempt to contact Puppet Server before having network connectivity. Prior, Puppet Agent on Ubuntu 15.04 used to start with a multi-user.target and if using NetworkManager with DHCP, the agent will try to apply configuration before network connection is up resulting in printing several errors to the logs.
      Show
      Now, Puppet Agent will wait for network-online.target and will not attempt to contact Puppet Server before having network connectivity. Prior, Puppet Agent on Ubuntu 15.04 used to start with a multi-user.target and if using NetworkManager with DHCP, the agent will try to apply configuration before network connection is up resulting in printing several errors to the logs.

    Description

      On Ubuntu 15.04 the puppet agent starts with multi-user.target.
      Due to this if using NetworkManager with DHCP, the agent tries to apply configuration before network connection is up resulting in printing several errors to the logs.

      Changing the puppet.service file and moving the symlink from /etc/systemd/system/multi-user.target.wants/puppet.service to /etc/systemd/system/network-online.target.wants/puppet.service is fixing the problem.

      Content of edited puppet.service file:

      [Unit]
      Description=Puppet agent
      Wants=network-online.target
      After=network-online.target
       
      [Service]
      Type=forking
      PIDFile=/run/puppet/agent.pid
      ExecStart=/usr/bin/puppet agent
       
      [Install]
      WantedBy=network-online.target
      

      Attachments

        Issue Links

          Activity

            People

              aria.li Aria Li
              m.gaetje Marcel Gätje
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support