Hello Arturo Borrero Gonzalez, Yuvipanda, Merlijn van Deen, jenkins-bot,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/398256
to review the following change.
Change subject: Revert "cloud: setup for attended upgrade process"
......................................................................
Revert "cloud: setup for attended upgrade process"
This reverts commit 8f9bdd5b83781fceacd86cc2122dd4802465038a.
Change-Id: Iaf6f7cff34b4c0fa74c2cab5947d27467983d264
---
M hieradata/labs.yaml
D hieradata/labs/project-proxy/common.yaml
M hieradata/labs/tools/common.yaml
M modules/apt/manifests/unattendedupgrades.pp
M modules/profile/manifests/base/labs.pp
5 files changed, 7 insertions(+), 50 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/56/398256/1
diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index 786efaa..aa078d5 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -17,8 +17,6 @@
recursor: 'labs-recursor0.wikimedia.org'
recursor_secondary: 'labs-recursor1.wikimedia.org'
-profile::base::labs::unattended_distro: 'present'
-profile::base::labs::unattended_wmf: 'present'
profile::openstack::main::version: 'liberty'
profile::openstack::base::region: "%{::site}"
profile::openstack::main::nova_controller: 'labcontrol1001.wikimedia.org'
diff --git a/hieradata/labs/project-proxy/common.yaml
b/hieradata/labs/project-proxy/common.yaml
deleted file mode 100644
index 48de25f..0000000
--- a/hieradata/labs/project-proxy/common.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-profile::base::labs::unattended_wmf: 'absent'
-profile::base::labs::unattended_updates: 'absent'
diff --git a/hieradata/labs/tools/common.yaml b/hieradata/labs/tools/common.yaml
index dba5753..c62e87a 100644
--- a/hieradata/labs/tools/common.yaml
+++ b/hieradata/labs/tools/common.yaml
@@ -1,6 +1,3 @@
-profile::base::labs::unattended_wmf: 'absent'
-profile::base::labs::unattended_updates: 'absent'
-
"profile::base::core_dump_pattern": core
classes:
- role::aptly::client
diff --git a/modules/apt/manifests/unattendedupgrades.pp
b/modules/apt/manifests/unattendedupgrades.pp
index ab22e72..c02745c 100644
--- a/modules/apt/manifests/unattendedupgrades.pp
+++ b/modules/apt/manifests/unattendedupgrades.pp
@@ -1,26 +1,13 @@
-# Manage unattended updates across cloud instances
-# Note: security updates can not be disabled (enabled by default)
-#
-# [*unattended_wmf*]
-# present/absent to enable/disable wmf packages
-#
-# [*unattended_updates*]
-# present/absent to enable/disable updates suite packages
-
-class apt::unattendedupgrades(
- $unattended_distro='present',
- $unattended_wmf='present',
- ) {
-
+class apt::unattendedupgrades($ensure=present) {
# package installation should enable security upgrades by default
package { 'unattended-upgrades':
- ensure => 'present',
+ ensure => $ensure,
}
# dpkg tries to determine the most conservative default action in case of
# conffile conflict. This tells dpkg to use that action without asking
apt::conf { 'dpkg-force-confdef':
- ensure => 'present',
+ ensure => present,
priority => '00',
key => 'Dpkg::Options::',
value => '--force-confdef',
@@ -29,36 +16,20 @@
# In case of conffile conflicts, tell dpkg to keep the old conffile without
# asking
apt::conf { 'dpkg-force-confold':
- ensure => 'present',
+ ensure => present,
priority => '00',
key => 'Dpkg::Options::',
value => '--force-confold',
}
apt::conf { 'auto-upgrades':
- ensure => 'present',
+ ensure => $ensure,
priority => '20',
key => 'APT::Periodic::Unattended-Upgrade',
value => '1',
}
- # https://wiki.debian.org/StableUpdates
- # https://www.debian.org/News/2011/20110215
- apt::conf { 'unattended-upgrades-updates':
- ensure => $unattended_distro,
- priority => '52',
- # Key with trailing '::' to append to potentially existing entry
- key => 'Unattended-Upgrade::Origins-Pattern::',
- # lint:ignore:single_quote_string_with_variables
- value => 'origin=${distro_id},codename=${distro_codename}-updates',
- # lint:endignore
- }
-
- # Unattended should update WMF packages
- # https://apt.wikimedia.org/wikimedia/
- # https://wikitech.wikimedia.org/wiki/APT_repository
apt::conf { 'unattended-upgrades-wikimedia':
- ensure => $unattended_wmf,
priority => '51',
# Key with trailing '::' to append to potentially existing entry
key => 'Unattended-Upgrade::Origins-Pattern::',
diff --git a/modules/profile/manifests/base/labs.pp
b/modules/profile/manifests/base/labs.pp
index 5e37cbc..23816b3 100644
--- a/modules/profile/manifests/base/labs.pp
+++ b/modules/profile/manifests/base/labs.pp
@@ -1,13 +1,6 @@
-class profile::base::labs(
- $unattended_wmf = hiera('profile::base::labs::unattended_wmf'),
- $unattended_updates = hiera('profile::base::labs::unattended_updates'),
- ) {
-
+class profile::base::labs {
+ include ::apt::unattendedupgrades
include ::apt::noupgrade
- class {'::apt::unattendedupgrades':
- unattended_wmf => $unattended_wmf,
- unattended_updates => $unattended_updates,
- }
# Labs instances /var is quite small, provide our own default
# to keep less records (T71604).
--
To view, visit https://gerrit.wikimedia.org/r/398256
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf6f7cff34b4c0fa74c2cab5947d27467983d264
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush <[email protected]>
Gerrit-Reviewer: Arturo Borrero Gonzalez <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits