0

I am deploying a server using Chef 11.10; the operating system is Amazon Linux AMI 2016.03 (we use EC2/OpsWorks), which uses Upstart.

In our recipe we trigger a start of the server, because we need it running to issue some configuration commands. Unfortunately, this fail if the server is already running because in that case sudo start <job> returns 1 instead of 0 (i.e. it's not idempotent).

It looks like Chef is not handling this case, or not checking if the server is already running.

What would be an easy way to fix this?

user180940
  • 324
  • 1
  • 18

1 Answers1

1

11.4 is something like 3 or 4 years old at this point. Please try with a non-ancient version to see if we've fixed this at some point in the last half-decade.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • it's actually 11.10, I updated the question. That said, I'll try and investigate – user180940 Mar 28 '17 at 21:54
  • Same problem, we're 2-3 weeks from the release of Chef 13 just to give you context, and Chef 12 was a now-infamously long release cycle. – coderanger Mar 28 '17 at 22:14