Closed
Bug 733538
Opened 14 years ago
Closed 14 years ago
disable unnecessary services in PuppetAgain
Categories
(Infrastructure & Operations Graveyard :: CIDuty, task, P2)
Infrastructure & Operations Graveyard
CIDuty
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dustin, Assigned: kmoir)
References
Details
(Whiteboard: [puppet][cleanup])
Attachments
(3 files, 3 obsolete files)
|
2.29 KB,
patch
|
Callek
:
review+
kmoir
:
checked-in+
|
Details | Diff | Splinter Review |
|
539 bytes,
patch
|
dividehex
:
review+
kmoir
:
checked-in+
|
Details | Diff | Splinter Review |
|
806 bytes,
patch
|
Details | Diff | Splinter Review |
Things like bluetooth, avahid, etc. don't need to be running on builders. Put together a module that will disable unnecessary services, included relatively high in the 'toplevel' hierarchy.
Updated•14 years ago
|
Assignee: nobody → kmoir
Whiteboard: [puppet][cleanup]
| Assignee | ||
Comment 1•14 years ago
|
||
looked at the list of services on a slave and disabled ones that were not needed. Not sure of there are additional ones to add to the list.
Attachment #631501 -
Flags: review?(bugspam.Callek)
Comment 2•14 years ago
|
||
Comment on attachment 631501 [details] [diff] [review]
patch
Review of attachment 631501 [details] [diff] [review]:
-----------------------------------------------------------------
Ok, as we discussed in IRC I was concerned this wouldn't do as you wanted, heres what I found [TLDR; version is, this looks good]
defined(Package[]) will only match on a package that we *define* in puppet, won't matter if the package is actually installed on the slave or not (so for something like iptables, its already there), HOWEVER if we do define it, (even as ensure=>absent) this will yeild "true".
That said, service {} can manage services whether puppet handled the package or not, and works fine here even if there is a non-existing service specified.
So if the above sounds like the workflow/thought process you wanted we can move forward, otherwise we'll want a different design choice for this.
::: modules/toplevel/manifests/base.pp
@@ +12,5 @@
> include users::root
> include users::global
> include network
> include sudoers
> + include tweaks::disableservices
I'm not sure if including this in toplevel::base is worthwhile, since we could have very different service needs for slaves types vs. servers.
Especially since your patch also disables iptables.
I'm additional-review-requesting catlee for a basic "ok"/"not ok" call.
(alternate would be simply toplevel::slave)
Attachment #631501 -
Flags: review?(catlee)
Attachment #631501 -
Flags: review?(bugspam.Callek)
Attachment #631501 -
Flags: review+
| Assignee | ||
Comment 3•14 years ago
|
||
Okay, that makes sense. I compiled the list of services to disable by looking at chkconfig on a slave and noting the services that were installed but not needed. I don't have access to a server to see what services are installed. If there is a need to have different services disabled on slaves and servers, this is easy to refactor.
Comment 4•14 years ago
|
||
Comment on attachment 631501 [details] [diff] [review]
patch
Review of attachment 631501 [details] [diff] [review]:
-----------------------------------------------------------------
::: modules/toplevel/manifests/base.pp
@@ +12,5 @@
> include users::root
> include users::global
> include network
> include sudoers
> + include tweaks::disableservices
agreed. this should at least be split out into master/slave type services that we want to disable. some servers do use iptables, so disabling that is problematic.
::: modules/tweaks/manifests/disableservices.pp
@@ +7,5 @@
> + enable => false,
> + ensure => stopped,
> + }
> + }
> + }
Can you explain this pattern? It's not obvious why you're doing 'case defined(Package["X"])' {}
Attachment #631501 -
Flags: review?(catlee) → review-
| Assignee | ||
Comment 5•14 years ago
|
||
refactored patch so iptables isn't disabled on the server.
The reason that I use 'case defined(Package["X"])' {} is because if I don't Puppet fails on the client when the package isn't installed and we try to stop the service.
Attachment #631501 -
Attachment is obsolete: true
Attachment #632315 -
Flags: review?(catlee)
Comment 6•14 years ago
|
||
Comment on attachment 632315 [details] [diff] [review]
patch
ok, as discussed on irc the defined(Package... ) thing just confused us, and is not the solution to the problem, (my testing makes service{} work fine, even with a service named "foobar")
Also, I'm not a fan of "disableslaveservice" as a name, perhaps something like "disableservices::slave"//"disableservices::server"//"disableservices::common"/etc.
I admit I haven't given too much thought to this split of disableservices yet, and we might be able to get away with just making this one manifest and included from the toplevel::slave alone as well, since we don't [yet] have any puppetagain servers anyway, and I imagine each specific server might have a different list of services they want/need/etc.
([devils advocate, we do have relabs-buildbot-master.build.mtv1.mozilla.com but thats not a prod machine yet, and we don't have the buildbot-master manifests in puppetagain ready yet anyway])
Attachment #632315 -
Flags: review?(catlee) → review-
| Assignee | ||
Comment 7•14 years ago
|
||
Attachment #633120 -
Flags: review?(bugspam.Callek)
Comment 8•14 years ago
|
||
Comment on attachment 633120 [details] [diff] [review]
updated patch
>+ service { "sendmail":
>+ enable => false,
>+ ensure => stopped,
>+ }
Nit \t snuck in.
Reminder: document module ;-)
Attachment #633120 -
Flags: review?(bugspam.Callek) → review+
| Assignee | ||
Comment 9•14 years ago
|
||
This patch is better, it's more succinct, separates services by OS and disables some services on the Mac. Obviously there is a lot of work to do in higher level modules with respect to the Mac, this is covered in bug 764948.
Attachment #632315 -
Attachment is obsolete: true
Attachment #633120 -
Attachment is obsolete: true
Attachment #633282 -
Flags: review?(bugspam.Callek)
Comment 10•14 years ago
|
||
Comment on attachment 633282 [details] [diff] [review]
patch
Review of attachment 633282 [details] [diff] [review]:
-----------------------------------------------------------------
I don't have a good grasp of what services are/do/should-be-disabled for Mac systems, so in the *future* have someone give a quick skim of this for mac [imo] but I see no problem at all with this patch deploying, looks good!
Attachment #633282 -
Flags: review?(bugspam.Callek) → review+
| Assignee | ||
Comment 11•14 years ago
|
||
Comment on attachment 633282 [details] [diff] [review]
patch
Thanks for the review. For the list of services that should be disabled on a Mac I just looked at the Lion configs for disabled services. Also, I noticed on bug 762512 that bluetooth should be disabled.
Attachment #633282 -
Flags: checked-in+
| Assignee | ||
Comment 12•14 years ago
|
||
Closing
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 13•14 years ago
|
||
Screen sharing needs to be ENABLED for darwin on both builders and test slaves. Relops uses it often for things that can't be done via ssh.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 14•14 years ago
|
||
apologies for disabling it in error :-)
Attachment #633522 -
Flags: review?(jwatkins)
Comment 15•14 years ago
|
||
Comment on attachment 633522 [details] [diff] [review]
patch to renable screensharing
No worries. Looks goods now. ;-)
Attachment #633522 -
Flags: review?(jwatkins) → review+
| Assignee | ||
Updated•14 years ago
|
Attachment #633522 -
Flags: checked-in+
| Assignee | ||
Comment 16•14 years ago
|
||
.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 17•14 years ago
|
||
as listed in the old puppet configs
Updated•13 years ago
|
Product: mozilla.org → Release Engineering
Updated•8 years ago
|
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Updated•6 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•