Why does NetworkManager-dispatcher fail from Puppet but works fine from command line?

asked 2017-02-13 12:46:42 -0500

Red Cricket gravatar image

updated 2017-02-13 17:00:35 -0500

I am writing a puppet manifest for use on RHEL7 system where I have this Service resource.

service {'NetworkManager-dispatcher':
   enable  => true,
   ensure  => running,
}

But after I run 'puppet agent -t' and check on the NetworkManager-dispatcher I find that it is dead.

● NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager-dispatcher.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

Feb 13 18:02:07 mgmt-01 systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 13 18:02:07 mgmt-01 systemd[1]: Started Network Manager Script Dispatcher Service.
Feb 13 18:07:01 mgmt-01 systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 13 18:07:01 mgmt-01 systemd[1]: Started Network Manager Script Dispatcher Service.
Feb 13 18:13:31 mgmt-01 systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 13 18:13:31 mgmt-01 systemd[1]: Started Network Manager Script Dispatcher Service.
Feb 13 18:15:49 mgmt-01 systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 13 18:15:49 mgmt-01 systemd[1]: Started Network Manager Script Dispatcher Service.
Feb 13 18:19:35 mgmt-01 systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 13 18:19:35 mgmt-01 systemd[1]: Started Network Manager Script Dispatcher Service.

When I execute from the command line everything seems fine:

# systemctl -l restart NetworkManager-dispatcher
# systemctl -l status NetworkManager-dispatcher
● NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager-dispatcher.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-02-13 18:28:58 GMT; 1s ago
 Main PID: 28944 (nm-dispatcher)
   CGroup: /system.slice/NetworkManager-dispatcher.service
           └─28944 /usr/libexec/nm-dispatcher

Feb 13 18:28:58 mgmt-01 systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 13 18:28:58 mgmt-01 systemd[1]: Started Network Manager Script Dispatcher Service.

Here is some additional information that may be useful.

# puppet -V
4.5.2
# rpm -qa | grep NetworkManager
NetworkManager-1.0.6-27.el7.x86_64
NetworkManager-config-server-1.0.6-27.el7.x86_64
NetworkManager-tui-1.0.6-27.el7.x86_64
NetworkManager-libnm-1.0.6-27.el7.x86_64
NetworkManager-dispatcher-routing-rules-1.4.0-14.el7_3.noarch
NetworkManager-team-1.0.6-27.el7.x86_64

Here is some debug output:

# puppet agent -t -d > /tmp/puppet-debug.txt
# grep dispatcher /tmp/puppet-debug.txt 
Debug: Executing: '/usr/bin/systemctl is-active NetworkManager-dispatcher'
Debug: Executing: '/usr/bin/systemctl is-enabled NetworkManager-dispatcher'
Debug: Executing: '/usr/bin/systemctl unmask NetworkManager-dispatcher'
Debug: Executing: '/usr/bin/systemctl start NetworkManager-dispatcher'
Debug: Executing: '/usr/bin/systemctl is-enabled NetworkManager-dispatcher'
Notice: /Stage[main]/Controller::Secure_vrf/Service[NetworkManager-dispatcher]/ensure: ensure changed 'stopped' to 'running'
Debug: /Stage[main]/Controller::Secure_vrf/Service[NetworkManager-dispatcher]: The container Class[Controller::Secure_vrf] will propagate my refresh event
Info: /Stage[main]/Controller::Secure_vrf/Service[NetworkManager-dispatcher]: Unscheduling refresh on Service[NetworkManager-dispatcher]
edit retag flag offensive close merge delete

Comments

Can you get share debug output? (puppet agent -t -d)

stivesso gravatar imagestivesso ( 2017-02-13 16:14:26 -0500 )edit

Thanks for your response stivesso. I have added debug output. It is a large manifest (for an OpenStack Controller node) so I tried to limit the output to just where NetworkManager-dispatcher is mentioned.

Red Cricket gravatar imageRed Cricket ( 2017-02-13 17:02:17 -0500 )edit

You can try making a minimal puppet manfest (only containing the service and something to trigger it) and copy the relevant portion of the output

DarylW gravatar imageDarylW ( 2017-02-14 07:33:30 -0500 )edit

Hi Red, Can you also check the reason that Service is failing? Kindly add journalctl -u NetworkManager-dispatcher (and even journalctl -u NetworkManager ) outputs

stivesso gravatar imagestivesso ( 2017-02-17 00:48:27 -0500 )edit