Ask Your Question
1

puppet is trying to use systemd to start my service rather than the command that I specified

asked 2017-05-09 22:30:33 -0500

rful011 gravatar image

This used to work on our old (2.7) puppet system but when I moved the code over to 4.x it does not anymore. My code is included in with a lot of other stuff that I don't control including all the default set up for OS etc. I suspect that something is being set somewhere that is telling puppet to always use systemd as the provider for Ubuntu systems.

    service {
  "argus.$sensor":
    start   => "/home/sensors/bin/run-service argus  $sensor start", 
    restart => "/home/sensors/bin/run-service argus  $sensor restart",
    stop    => "/home/sensors/bin/run-service argus  $sensor stop",
    status  => "/home/sensors/bin/run-service argus  $sensor status",
    ensure  => running;
}

We are trying to figure out what would cause this.

edit retag flag offensive close merge delete

Comments

1

I believe if you explicitly set your provider, it should respect that. Usually when using the start/restart/stop/status commands, you should use the 'base' provider https://docs.puppet.com/puppet/latest/types/service.html#service-provider-base

DarylW gravatar imageDarylW ( 2017-05-10 08:38:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-05-16 23:04:23 -0500

ramindk gravatar image

I'd try setting the provider manually to see if that helps. https://docs.puppet.com/puppet/latest...

perhaps base, init, or service.

service { "argus.$sensor":
  ensure   => running,
  provider => base,
  # etc etc
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-05-09 22:30:33 -0500

Seen: 58 times

Last updated: May 16