[MediaWiki-commits] [Gerrit] base: remove initcwnd if-up.d hook for = oneiric - change (operations/puppet)

2014-02-11 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/112697

Change subject: base: remove initcwnd if-up.d hook for = oneiric
..

base: remove initcwnd if-up.d hook for = oneiric

We currently have an if-up.d hook to set the TCP initial congestion
window to 10*MSS on all boxes, but this is currently unneeded on all of
our recent boxes. Linux upstream made 10 the default with commit
442b9635c, which is included since 2.6.39, way before any of our precise
systems.

As checking for a running kernel is kind of evil, make the check
conditional to lsbdistcodename, and remove the if-up hook in everything
post-oneiric (natty = 2.6.38, oneiric = 3.0).

Change-Id: Idfe83887b5601fe1c02766ea6d7121a2bf516ef4
---
M modules/base/manifests/init.pp
1 file changed, 18 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/112697/1

diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp
index 96c4b6d..d3e36f0 100644
--- a/modules/base/manifests/init.pp
+++ b/modules/base/manifests/init.pp
@@ -360,18 +360,25 @@
 class base::tcptweaks {
 Class[base::puppet] - Class[base::tcptweaks]
 
-file { '/etc/network/if-up.d/initcwnd':
-ensure  = present,
-content = template('base/initcwnd.erb'),
-mode= '0555',
-owner   = 'root',
-group   = 'root',
-}
+# unneeded since Linux 2.6.39, i.e. Ubuntu 11.10 Oneiric Ocelot
+if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '11.10')  0 
{
+file { '/etc/network/if-up.d/initcwnd':
+ensure  = present,
+content = template('base/initcwnd.erb'),
+mode= '0555',
+owner   = 'root',
+group   = 'root',
+}
 
-exec { '/etc/network/if-up.d/initcwnd':
-require = File['/etc/network/if-up.d/initcwnd'],
-subscribe   = File['/etc/network/if-up.d/initcwnd'],
-refreshonly = true,
+exec { '/etc/network/if-up.d/initcwnd':
+require = File['/etc/network/if-up.d/initcwnd'],
+subscribe   = File['/etc/network/if-up.d/initcwnd'],
+refreshonly = true,
+}
+} else {
+file { '/etc/network/if-up.d/initcwnd':
+ensure  = absent,
+}
 }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/112697
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfe83887b5601fe1c02766ea6d7121a2bf516ef4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] base: remove initcwnd if-up.d hook for = oneiric - change (operations/puppet)

2014-02-11 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: base: remove initcwnd if-up.d hook for = oneiric
..


base: remove initcwnd if-up.d hook for = oneiric

We currently have an if-up.d hook to set the TCP initial congestion
window to 10*MSS on all boxes, but this is currently unneeded on all of
our recent boxes. Linux upstream made 10 the default with commit
442b9635c, which is included since 2.6.39, way before any of our precise
systems.

As checking for a running kernel is kind of evil, make the check
conditional to lsbdistcodename, and remove the if-up hook in everything
post-oneiric (natty = 2.6.38, oneiric = 3.0).

Change-Id: Idfe83887b5601fe1c02766ea6d7121a2bf516ef4
---
M modules/base/manifests/init.pp
1 file changed, 18 insertions(+), 11 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp
index 96c4b6d..d3e36f0 100644
--- a/modules/base/manifests/init.pp
+++ b/modules/base/manifests/init.pp
@@ -360,18 +360,25 @@
 class base::tcptweaks {
 Class[base::puppet] - Class[base::tcptweaks]
 
-file { '/etc/network/if-up.d/initcwnd':
-ensure  = present,
-content = template('base/initcwnd.erb'),
-mode= '0555',
-owner   = 'root',
-group   = 'root',
-}
+# unneeded since Linux 2.6.39, i.e. Ubuntu 11.10 Oneiric Ocelot
+if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '11.10')  0 
{
+file { '/etc/network/if-up.d/initcwnd':
+ensure  = present,
+content = template('base/initcwnd.erb'),
+mode= '0555',
+owner   = 'root',
+group   = 'root',
+}
 
-exec { '/etc/network/if-up.d/initcwnd':
-require = File['/etc/network/if-up.d/initcwnd'],
-subscribe   = File['/etc/network/if-up.d/initcwnd'],
-refreshonly = true,
+exec { '/etc/network/if-up.d/initcwnd':
+require = File['/etc/network/if-up.d/initcwnd'],
+subscribe   = File['/etc/network/if-up.d/initcwnd'],
+refreshonly = true,
+}
+} else {
+file { '/etc/network/if-up.d/initcwnd':
+ensure  = absent,
+}
 }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/112697
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfe83887b5601fe1c02766ea6d7121a2bf516ef4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits