[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: apache2: hard restart to release old ports
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/400207 ) Change subject: apache2: hard restart to release old ports .. apache2: hard restart to release old ports A `service apache2 restart` does not release any TCP ports which were already bound by a running apache2 process. Forcing a hard restart via `service apache2 stop && service apache2 start` will release the ports and make them for use by other programs (e.g. nginx). Bug: T183692 Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72 --- M puppet/modules/apache/manifests/init.pp 1 file changed, 13 insertions(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/apache/manifests/init.pp b/puppet/modules/apache/manifests/init.pp index bcbb314..3095d5b 100644 --- a/puppet/modules/apache/manifests/init.pp +++ b/puppet/modules/apache/manifests/init.pp @@ -20,7 +20,19 @@ file { '/etc/apache2/ports.conf': content => template('apache/ports.conf.erb'), require => Package['apache2'], -notify => Service['apache2'], +notify => [ +Exec['apache2 release ports'], +Service['apache2'], +], +} + +# T183692: A normal restart of Apache2 will not release bound ports. We +# need to trigger a hard restart to fix that. +exec { 'apache2 release ports': +command => '/usr/sbin/service apache2 stop', +onlyif => '/usr/sbin/service apache2 status', +refreshonly => true, +notify => Service['apache2'], } # Set EnableSendfile to 'Off' to work around a bug with Vagrant. -- To view, visit https://gerrit.wikimedia.org/r/400207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: stretch-migration Gerrit-Owner: BryanDavisGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: apache2: hard restart to release old ports
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400207 ) Change subject: apache2: hard restart to release old ports .. apache2: hard restart to release old ports A `service apache2 restart` does not release any TCP ports which were already bound by a running apache2 process. Forcing a hard restart via `service apache2 stop && service apache2 start` will release the ports and make them for use by other programs (e.g. nginx). Bug: T183692 Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72 --- M puppet/modules/apache/manifests/init.pp 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/07/400207/1 diff --git a/puppet/modules/apache/manifests/init.pp b/puppet/modules/apache/manifests/init.pp index bcbb314..2856915 100644 --- a/puppet/modules/apache/manifests/init.pp +++ b/puppet/modules/apache/manifests/init.pp @@ -20,7 +20,16 @@ file { '/etc/apache2/ports.conf': content => template('apache/ports.conf.erb'), require => Package['apache2'], -notify => Service['apache2'], +notify => Exec['apache2 release ports'], +} + +# T183692: A normal restart of Apache2 will not release bound ports. We +# need to trigger a hard restart to fix that. +exec { 'apache2 release ports': +command => '/usr/sbin/service apache2 stop', +onlyif => '/usr/sbin/service apache2 status', +refreshonly => true, +notify => Service['apache2'], } # Set EnableSendfile to 'Off' to work around a bug with Vagrant. -- To view, visit https://gerrit.wikimedia.org/r/400207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: stretch-migration Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits