我正在写一个用于RHEL7系统的木偶清单,我有这个服务资源。
service {'NetworkManager-dispatcher':
enable => true,
ensure => running,
}
Puppet版本:
# puppet -V
4.5.2
但是在我运行了木偶代理人之后。并检查NetworkManager-dispatcher我发现它已经死了。
● 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.
当我从命令行执行时,一切似乎都很好:
# 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.
答案 0 :(得分:0)
RHEL7使用systemd来管理服务。 你错过了提到你的木偶版本。
也许你需要添加
provider => 'systemd'
属性为您的服务资源。