2017-02-13 54 views
0

我正在寫一個在RHEL7系統上使用的puppet清單,我擁有這個服務資源。爲什麼NetworkManager-dispatcher從Puppet失敗,但從命令行工作正常?

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

木偶版本:

# puppet -V 
4.5.2 

但是在我運行「傀儡代理-t」和檢查NetworkManager的,調度員我發現它已經死了。

● 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. 
+1

您可以包含Puppet代理/應用程序日誌,最好使用--debug顯示服務已啓動? –

+0

我正在做與@DominicCleal相同的請求,但也想在Puppet正在對服務進行更改時查看網絡管理器的'journalctl'。 –

回答

0

RHEL7使用systemd管理服務。 你錯過了提到你的木偶版本。

也許你需要

provider => 'systemd' 

屬性添加到您的服務資源。

+0

謝謝我添加我的木偶版本的問題,並會給你一個嘗試的建議。 –

+0

這並沒有傷害,但它並沒有解決NetworkManager-dispatcher在「puppet agent -t」執行後死亡的問題。 –

相關問題