MM related changes

Adrian Reber adrian at lisas.de
Fri Jun 12 08:26:34 UTC 2015


I have a few MM related ansible changes which I would like to get
reviewed before committing them.

 * The crawler logs are now on mm-crawler01 - relative simple change

 * Increase cache time for mirrorlist - This tries to increase the cache
   time from 2 minutes to 6 hours for the mirrorlist. I have tested it
   on a local varnish installation and it seems to work.

 * Use the new api interface for Nagios checks - This changes two nagios
   checks to use the api interface which performs a much simpler
   database query.

		Adrian

commit 477f2ac02e30be805eacffda47c7c926f25bc892
Author: Adrian Reber <adrian at lisas.de>
Date:   Fri Jun 12 08:20:24 2015 +0000

    The crawler logs are now on mm-crawler01

diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager.conf
index 44987a1..8ea3700 100644
--- a/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager.conf
+++ b/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager.conf
@@ -4,8 +4,8 @@ SetEnv force-proxy-request-1.0 1
 SetEnv proxy-nokeepalive 1
 </Location>
 
-ProxyPass {{localpath}}/crawler http://bapp02/mirrormanager/crawler
-ProxyPassReverse {{localpath}}/crawler http://bapp02/mirrormanager/crawler
+ProxyPass {{localpath}}/crawler http://mm-crawler01/mirrormanager/crawler
+ProxyPassReverse {{localpath}}/crawler http://mm-crawler01/mirrormanager/crawler
 
 ProxyPass {{localpath}} {{proxyurl}}{{remotepath}}
 ProxyPassReverse {{localpath}} {{proxyurl}}{{remotepath}}

commit 8e09f5a37620c52265aa83305c99173f9e982d76
Author: Adrian Reber <adrian at lisas.de>
Date:   Fri Jun 12 08:13:17 2015 +0000

    Increase cache time for mirrorlist
    
    The mirrorlist which can be viewed in the browser used to be generated
    once or twice per day with MM1. This is listed is now cached in varnish
    but only for two minutes. This patch increases the cache time to 6 hours.

diff --git a/roles/varnish/files/proxy.vcl b/roles/varnish/files/proxy.vcl
index 0fd5aa6..6d2f340 100644
--- a/roles/varnish/files/proxy.vcl
+++ b/roles/varnish/files/proxy.vcl
@@ -303,5 +303,6 @@ sub vcl_recv {
 sub vcl_backend_response {
     if (bereq.url ~ "^/mirrormanager/mirrors") {
         unset beresp.http.set-cookie;
+        set beresp.ttl = 6h;
     }
 }

commit 498f16861fbde5190b6d4fbab731185fb01c7662
Author: Adrian Reber <adrian at lisas.de>
Date:   Fri Jun 12 07:28:38 2015 +0000

    MM: Use the new api interface for Nagios checks
    
    The newly introduced api interface provides a way to query the MM
    frontend for availability which only performs a minimal database query.
    Using this interface should reduce the load on the frontend and the
    database.

diff --git a/roles/nagios_server/files/nagios-external/services/websites.cfg b/roles/nagios_server/files/nagios-external/services/websites.cfg
index 55ad34a..0787e53 100644
--- a/roles/nagios_server/files/nagios-external/services/websites.cfg
+++ b/roles/nagios_server/files/nagios-external/services/websites.cfg
@@ -145,7 +145,7 @@ define service {
 define service {
   host_name             209.132.181.16-phx2, 85.236.55.6-internetx, proxy03.fedoraproject.org, 152.19.134.142-ibiblio, proxy06.fedoraproject.org, 213.175.193.206-bodhost, 67.203.2.67-coloamerica, 66.135.62.187-serverbeach
   service_description   mirrors.fedoraproject.org - publiclist
-  check_command         check_website_ssl!admin.fedoraproject.org!/mirrormanager/!Fedora Public Active Mirrors
+  check_command         check_website_ssl!admin.fedoraproject.org!/mirrormanager/api/mirroradmins/?name=dl.fedoraproject.org!admins
   use                   websitetemplate
 }
 
diff --git a/roles/nagios_server/files/nagios/services/websites.cfg b/roles/nagios_server/files/nagios/services/websites.cfg
index 1beda33..101c115 100644
--- a/roles/nagios_server/files/nagios/services/websites.cfg
+++ b/roles/nagios_server/files/nagios/services/websites.cfg
@@ -46,7 +46,7 @@ define service {
 define service {
   host_name             mm-frontend01,mm-frontend01.stg
   service_description   mm-publiclist-internal
-  check_command         check_website!localhost!/mirrormanager/
+  check_command         check_website!localhost!/mirrormanager/api/mirroradmins/?name=dl.fedoraproject.org
   use                   internalwebsitetemplate

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20150612/2b2ed1da/attachment.sig>


More information about the infrastructure mailing list