Jira (PUP-6531) puppet service provider recognition on Ubuntu can be improved

1 view
Skip to first unread message

Nishanth Aravamudan (JIRA)

unread,
Jul 21, 2016, 6:36:06 PM7/21/16
to puppe...@googlegroups.com
Nishanth Aravamudan created an issue
 
Puppet / Improvement PUP-6531
puppet service provider recognition on Ubuntu can be improved
Issue Type: Improvement Improvement
Assignee: Kylo Ginsberg
Components: Types and Providers
Created: 2016/07/21 3:35 PM
Environment:

Ubuntu 16.04, 16.10, 17.04 etc.

Priority: Normal Normal
Reporter: Nishanth Aravamudan

It would appear that, at least for Ubuntu's service provider detection, a combination of /run/systemd/system existence and a version check are done.

Technically speaking, the version check is unnecessary, in that if systemd is detected (which /run/systemd/system is sufficient for), then no version check should be done. This way patches aren't necessary forever to puppet as systemd is the default going forward in Ubuntu releases.

Ideally, the pseudo-logic would be "if systemd is detected then use the systemd provider; else if upstart is suitable, use the upstart provider; else use the init provider", I think. That is, upstart shouldn't be used at all if systemd is detected. We are seeing a bug in the Ubuntu packages on upgrade from 14.04 -> 16.04 where the 'upstart' package is installed (so e.g., /sbin/start is present and the upstart service provider is suitable), but systemd is running – our version of puppet is a bit older in 16.04 (3.8.5) and that didn't have ubuntu listed as a potential systemd provider target. We are patching our shipped version of puppet to include that change, but from a code maintenance perspective, there are probably some improvements that can be done upstream.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Kylo Ginsberg (JIRA)

unread,
Jul 21, 2016, 6:58:07 PM7/21/16
to puppe...@googlegroups.com
Kylo Ginsberg commented on Improvement PUP-6531
 
Re: puppet service provider recognition on Ubuntu can be improved

Hi Nishanth Aravamudan! Thanks for digging into the code! Can you capture your pseudocode improvement(s) in a PR against https://github.com/puppetlabs/puppet?

Btw, wrt not requiring version patches per each version of Ubuntu, that would definitely be a nice code improvement (not just for ubuntu, but for any versioned osfamily/distro). As mentioned over in https://github.com/puppetlabs/puppet/pull/5009, one step in that direction, recently submitted, is https://github.com/puppetlabs/puppet/pull/5069.

Kylo Ginsberg (JIRA)

unread,
Jul 21, 2016, 6:58:07 PM7/21/16
to puppe...@googlegroups.com
Kylo Ginsberg assigned an issue to Unassigned
 
Change By: Kylo Ginsberg
Assignee: Kylo Ginsberg

Nishanth Aravamudan (JIRA)

unread,
Jul 21, 2016, 7:04:17 PM7/21/16
to puppe...@googlegroups.com
Nishanth Aravamudan commented on Improvement PUP-6531
 
Re: puppet service provider recognition on Ubuntu can be improved

Hi Kylo Ginsberg! Thanks for the feedback; yep, I'll try and provide something via a normal PR. I think the regex changes are good, but still too limited for saying there's a pivot point.

We also have the benefit in Ubuntu of saying this particular package of puppet is only supported on this version of Ubuntu, so we can break backwards-compat I think to fix it properly upstream will take some more thought for those that are running puppet from source/upstream on older versions of Ubuntu. Then again, I think the systemd detection on Debian-family distributions is always correct to do with just /run/systemd/system's presence.

Nishanth Aravamudan (JIRA)

unread,
Jul 21, 2016, 7:50:08 PM7/21/16
to puppe...@googlegroups.com

Nishanth Aravamudan (JIRA)

unread,
Jul 22, 2016, 9:11:28 PM7/22/16
to puppe...@googlegroups.com

The above PR now passes CI and I think is the right direction. Not sure if it could be generalized for other OSes yet or not, but I think generally the presence of /run/systemd/system is meant to indicate systemd should be used (rather than relying on any specific versions). Certainly at least for Ubuntu.

Geoff Nichols (JIRA)

unread,
Feb 3, 2017, 1:14:02 AM2/3/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
 
Change By: Geoff Nichols
Team: Agent & Platform
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Nicholas Fagerlund (JIRA)

unread,
May 16, 2017, 3:28:03 PM5/16/17
to puppe...@googlegroups.com

Nicholas Fagerlund (JIRA)

unread,
May 16, 2017, 3:29:05 PM5/16/17
to puppe...@googlegroups.com
Nicholas Fagerlund commented on Improvement PUP-6531
 
Re: puppet service provider recognition on Ubuntu can be improved

It looks like Kylo was looking at this before he left, and then it went into limbo. But we're in the process of making the backlogs usable again, so hopefully someone can get back to this soon.

Nishanth Aravamudan (JIRA)

unread,
May 16, 2017, 3:39:16 PM5/16/17
to puppe...@googlegroups.com

Ah I didn't realize Kylo had left – would explain why there was no response in my PR

I think the PR itself is still valid (and what we do on Ubuntu now). It might be something worth genericizes to more distributions, as systemd I think is consistent that /run/systemd/system existing implies it is running.

If the PR is bad or needs work, feel free to ping there or here and I'll update/iterate!

Geoff Nichols (JIRA)

unread,
Nov 5, 2017, 9:06:03 AM11/5/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
 
Change By: Geoff Nichols
Team: Platform  Core  OS
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Geoff Nichols (JIRA)

unread,
Nov 5, 2017, 9:07:03 AM11/5/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform OS Community PR

Branan Riley (JIRA)

unread,
May 11, 2018, 2:50:03 PM5/11/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: service systemd triaged type_and_provider ubuntu
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Branan Riley (JIRA)

unread,
May 15, 2018, 6:08:04 PM5/15/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Sprint: Platform OS Community PR Kanban

Josh Cooper (Jira)

unread,
Jun 9, 2021, 9:49:02 PM6/9/21
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-6531
 
Re: puppet service provider recognition on Ubuntu can be improved

Since this ticket was filed, we've modified the systemd provider to make use of defaultfor and notdefaultfor so that we don't need to bump the file every time a new version comes out. We've also confined the provider based on /proc/1/comm, see PUP-10016. So I believe all of the issues described here and I'm going to close this.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages