grinferno
grinferno

Reputation: 534

Service is already enabled, and is dead

I have the following states:

copy_over_systemd_service_files:
  file.managed:
    - name: /etc/systemd/system/consul-template.service
    - source: salt://mesos/files/consul-template.service
    - owner: consul

start_up_consul-template_service:
  service.running:
    - name: consul-template
    - enable: True
    - restart: True
    - require:
      - file: copy_over_systemd_service_files
    - watch:
      - /etc/systemd/system/consul-template.service

when I run my state file I get the following error:

ID: start_up_consul-template_service
Function: service.running
    Name: consul-template
  Result: False
 Comment: Service consul-template is already enabled, and is dead
 Started: 17:27:38.346659
Duration: 2835.888 ms
 Changes:

I'm not sure what this means. All I want to do is restart the service once it's been copied over and I've done this before without issue. Looking back through the stack trace just shows that Salt ran systemctl is-enabled consult-template

Upvotes: 0

Views: 2277

Answers (1)

grinferno
grinferno

Reputation: 534

I think I was over complicating things. Instead I'm doing this:

consul-template:
  service.running:
    - require:
      - file: copy_over_systemd_service_files
    - watch:
      - /etc/systemd/system/consul-template.service

Upvotes: 1

Related Questions