Faidon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/61079
Change subject: Ceph: fix more radosgw order of dependencies
......................................................................
Ceph: fix more radosgw order of dependencies
Upstart jobs are picky, and the Apache puppet module is just weird.
Let's give this a shot for now.
Change-Id: I7ff446fcccfaa89d21e3f803eb49e34d8f4e44f4
---
M modules/ceph/manifests/radosgw.pp
M modules/ceph/templates/radosgw/vhost.erb
2 files changed, 28 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/79/61079/1
diff --git a/modules/ceph/manifests/radosgw.pp
b/modules/ceph/manifests/radosgw.pp
index 754e3a7..67b10b3 100644
--- a/modules/ceph/manifests/radosgw.pp
+++ b/modules/ceph/manifests/radosgw.pp
@@ -8,13 +8,26 @@
ensure => present,
}
+ file { '/var/lib/ceph/radosgw/ceph-radosgw':
+ ensure => directory,
+ owner => 'root' ,
+ group => 'root',
+ require => Package['radosgw'],
+ }
+ file { '/var/lib/ceph/radosgw/ceph-radosgw/done':
+ ensure => present,
+ owner => 'root',
+ group => 'root',
+ require => File['/var/lib/ceph/radosgw/ceph-radosgw'],
+ }
+
service { 'radosgw id=radosgw':
ensure => 'running',
hasrestart => true,
# upstart status is broken with id= ...
status => '/usr/bin/pgrep radosgw',
provider => 'upstart',
- require => Package['radosgw'],
+ require => File['/var/lib/ceph/radosgw/ceph-radosgw/done'],
}
$id = 'client.radosgw'
@@ -31,6 +44,8 @@
file { '/etc/logrotate.d/radosgw':
ensure => present,
source => 'puppet:///modules/ceph/logrotate-radosgw',
+ owner => 'root',
+ group => 'root',
}
class { 'apache':
@@ -44,12 +59,10 @@
file { '/etc/apache2/sites-available/radosgw':
ensure => present,
+ owner => 'root',
+ group => 'root',
content => template('ceph/radosgw/vhost.erb'),
- require => [
- Package['apache2'],
- Apache::Mod['fastcgi'],
- Apache::Mod['rewrite'],
- ],
+ require => Package['apache2'],
notify => Service['apache2'],
}
file { '/etc/apache2/sites-enabled/radosgw':
@@ -66,10 +79,14 @@
file { '/var/www/monitoring':
ensure => directory,
+ owner => 'root',
+ group => 'root',
require => Package['apache2'],
}
file { '/var/www/monitoring/frontend':
ensure => present,
+ owner => 'root',
+ group => 'root',
content => "OK\n",
require => File['/var/www/monitoring'],
}
diff --git a/modules/ceph/templates/radosgw/vhost.erb
b/modules/ceph/templates/radosgw/vhost.erb
index 2e29db9..4f634c7 100644
--- a/modules/ceph/templates/radosgw/vhost.erb
+++ b/modules/ceph/templates/radosgw/vhost.erb
@@ -1,7 +1,10 @@
StartServers 5
ServerLimit 50
MaxClients 800
+
+<IfModule mod_fastcgi.c>
FastCgiExternalServer /var/www/dummyradosgw.fcgi -socket /run/radosgw.sock
+</IfModule>
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"" proxy_combined
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"" proxy_debug
@@ -12,10 +15,12 @@
ServerSignature Off
DocumentRoot /var/www/
+ <IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/server-status
RewriteCond %{REQUEST_URI} !^/monitoring/frontend$
RewriteRule ^/(.*) /dummyradosgw.fcgi?params=$1&%{QUERY_STRING}
[E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+ </IfModule>
<IfModule mod_fastcgi.c>
<Directory /var/www/>
--
To view, visit https://gerrit.wikimedia.org/r/61079
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ff446fcccfaa89d21e3f803eb49e34d8f4e44f4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits