서비스는 실제로 초기화 스크립트이지만 시스템은 시스템 경고로 관리됩니다.

서비스는 실제로 초기화 스크립트이지만 시스템은 시스템 경고로 관리됩니다.

수동으로 실행하면 systemctl start example.service시작되지만 ansible의 일부로 자동으로 시작되지는 않지만 동일한 구성을 가진 다른 애플리케이션이 시작됩니다. 경고는 무엇을 The service is actually an init script but the system is managed by systemd의미합니까? 실행된 다른 응용프로그램에는 이 경고가 없습니다.

Ansable 스크립트:

- name: Enable service
  service: name=example enabled=yes

Ansable의 로그:

TASK [provision-app : Enable service] ***********************
Sunday 08 December 2019  17:25:42 +0000 (0:00:01.100)       0:00:28.007 ******* 
 [WARNING]: The service (example) is actually an init script but
the system is managed by systemd

서비스 파일:

/run/systemd/generator.late/example.service
/run/systemd/generator.late/runlevel5.target.wants/example.service
/run/systemd/generator.late/runlevel4.target.wants/example.service
/run/systemd/generator.late/runlevel3.target.wants/example.service
/run/systemd/generator.late/runlevel2.target.wants/example.service

.서비스 파일:

# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/example
Description=SYSV: Application Suite
Before=runlevel2.target
Before=runlevel3.target
Before=runlevel4.target
Before=runlevel5.target
After=network-online.target
After=network.service

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/rc.d/init.d/example start

시스템 제어 상태:

   Loaded: loaded (/etc/rc.d/init.d/example; bad; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

ベストアンサー1

OP에 대한 실제 답변은 아닐 수도 있지만 Google이 동일한 오류 메시지 때문에 나를 여기로 데려왔으므로 여기에 결과를 게시하겠습니다.

커널을 5.4에서 5.8로 업데이트했을 때 Ansible 모듈이 동일한 경고 및 메시지 와 함께 실패하기 service시작했습니다 .systemdThe service (your_service_name) is actually an init script but the system is managed by systemdService is in unknown state

일부 변경 사항을 수용하려면 시스템 버전을 업그레이드해야 하는 것으로 나타났습니다. 내 경우 Ubuntu에서는 systemd 245.4-4ubuntu3이 작동하지 않지만 245.4-4ubuntu3.5는 작동합니다(포커스 업데이트에서).

빠른 확인:

systemctl show sshd | grep ActiveState
Failed to parse bus message: Invalid argument

잘못된 매개변수 출력이 나타나면 업데이트하세요.

원천:https://bugzilla.redhat.com/show_bug.cgi?id=1853736

おすすめ記事