Well, first of all I think the title of this post won’t entirely reflect its content. However, I need to go ahead and post this now.

At work, We’ve been having issues with cups service not running on some Kubuntu 14.04 desktops. This should not happen since even if cups service is dead, we have Puppet agent running on each machine

to check and make sure that ‘cups’ is running else will be automatically restarted.

Here’s the snippet of cups::service manifest:

I still don’t know what cause cups to die or terminated. However, when that happens, I manually check

cups service by running:

According to the output, it looks like cups is still running. But if instead I run:

To fix this cups issue, cups service needs to be started:

It seems the upstart service used on Kubuntu to check status for cups is broken. Surprisingly, I haven’t found

any bugs report about this yet. Maybe this problem is unique to my environment; or maybe I should file a bug myself!

Anyway, a work around is force Puppet to start cups service with init.d instead of using upstart. In Puppet, we can do this by setting the provider attribute of service resource.

The above Puppet code works fine with Puppet agent 3.8.4. The bad news is, this doesn’t work with Puppet agent 4.3.0.

Here’s how I found out that provider => init doesn’t work with Puppet agent 4.3.0:

Fortunately, I found a common provider which works on both older and new version of Puppet agent. It’s called ‘debian’!

Here’s a revised cups service manifest:

Well, that’s it. If you have any comments or suggestions, do let me know.