user180940
user180940

Reputation: 354

Upstart start exits with status 1 so Chef aborts run

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?

Upvotes: 0

Views: 43

Answers (1)

coderanger
coderanger

Reputation: 54249

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.

Upvotes: 1

Related Questions