Distro puppet on Ubuntu Vivid broken; any plans for Puppetlabs to release their own packages?

83 views
Skip to first unread message

Victor Danilchenko

unread,
May 4, 2015, 2:54:05 PM5/4/15
to puppet...@googlegroups.com
Hi guys,

The Puppet that comes with Ubuntu Vivid (3.7.2) is broken -- it doesn't correctly resolve whether a service is an Upstart service, so e.g. any mysql service notification will fail when trying to restart a service (some other services fail too). This is because the 'service' Puppet type is trying to invoke /sbin/{start,stop,status,restart,reload} scripts, which fail. So basically Puppet issues 'reload mysql', when it should be issuing 'service mysql reload'

There's an easy work-around -- I have written a simple script that emulates old-style service init behavior, and symlinked it into /sbin/ as appropriate; however, this dirty hack may cause problems down the road, so I really would rather avoid it.

I am hoping that an official Puppetlabs release for Vivid might fix the problem. Do you guys know when/if it's coming? I keep checking in https://apt.puppetlabs.com/, but there's nothing there still...

Alternatively, does anyone know how to make the stock distro Puppet package resolve the service type correctly?


BTW, in case anyone cares, here's my work-around script -- I put it at /usr/local/bin/initWrapper:

#!/bin/bash

commandName
=$(basename $0)
serviceName
=$1

service
"$serviceName" "$commandName"

Then you just replace the symlinks at /sbin/{start,stop,status,restart,reload} with symlinks to this new script... Now the puppet manifests finish running fine.

However, this work-around strikes me as dangerous, so I don't recommend anyone use it.

Christopher Wood

unread,
May 4, 2015, 3:26:21 PM5/4/15
to puppet...@googlegroups.com
On Mon, May 04, 2015 at 07:54:05AM -0700, Victor Danilchenko wrote:
> Hi guys,
>
> The Puppet that comes with Ubuntu Vivid (3.7.2) is broken -- it doesn't
> correctly resolve whether a service is an Upstart service, so e.g. any mysql
> service notification will fail when trying to restart a service (some other
> services fail too). This is because the 'service' Puppet type is trying to
> invoke /sbin/{start,stop,status,restart,reload} scripts, which fail. So
> basically Puppet issues 'reload mysql', when it should be issuing 'service
> mysql reload'
>
> There's an easy work-around -- I have written a simple script that emulates
> old-style service init behavior, and symlinked it into /sbin/ as
> appropriate; however, this dirty hack may cause problems down the road, so
> I really would rather avoid it.
>
> I am hoping that an official Puppetlabs release for Vivid might fix the
> problem. Do you guys know when/if it's coming? I keep checking in
> https://apt.puppetlabs.com/, but there's nothing there still...
>
> Alternatively, does anyone know how to make the stock distro Puppet package
> resolve the service type correctly?

Sounds like you may want to specify the provider or do something conditional for a resource default? You can also specify start/stop/restart options, as defaults or per-service.

http://docs.puppetlabs.com/references/latest/type.html#service-attributes

https://docs.puppetlabs.com/puppet/latest/reference/lang_defaults.html


> BTW, in case anyone cares, here's my work-around script -- I put it at
> /usr/local/bin/initWrapper:
>
> #!/bin/bash
>
> commandName=$(basename $0)
> serviceName=$1
>
> service "$serviceName" "$commandName"
>
> Then you just replace the symlinks at
> /sbin/{start,stop,status,restart,reload} with symlinks to this new
> script... Now the puppet manifests finish running fine.
>
> However, this work-around strikes me as dangerous, so I don't recommend
> anyone use it.
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/afb567dd-37f1-436e-bb38-4aa678b55e69%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Victor Danilchenko

unread,
May 4, 2015, 4:32:28 PM5/4/15
to puppet...@googlegroups.com
I can't... the service invocation is done by the MySQL pupperlabs module (yes, I did grab the latest master, same problem); though it doesn't happen only there, some other modules fail in the same way, so it's not specifically MySQL module problem.

It seems the provider autodetection is malfunctioning...

Michael Stahnke

unread,
May 4, 2015, 4:57:28 PM5/4/15
to puppet...@googlegroups.com
Can you file a ticket on that? I'd like to claim I'll remember to assign it out from a mailing list post, but I probably won't. 

If we have a ticket, I'll see if we can get somebody to look at it. 

--

Victor Danilchenko

unread,
May 7, 2015, 6:04:12 PM5/7/15
to puppet...@googlegroups.com
OK, I filed a bug PUP-4540. The short of it is, apparenlty Puppet apparently incorrectly detects some services (like mysql and cups) as Upstart services, and tries to manage them using the Upstart commands (/sbin/{start,stop,restart,reload,status}) -- but detects other services (e.g. apache2) normally, and manages them correctly, using the old-style init commands ('service mysql restart' and somesuch).

This is the case on Ubuntu Vivid and the stock Puppet that ships with it, 3.7.2. Ubuntu Trusty works fine.
Reply all
Reply to author
Forward
0 new messages