diff --git a/modules/gerritbot/files/gerritbot_channel_config.yaml b/modules/gerritbot/files/gerritbot_channel_config.yaml index 4513d2bee4..b8229b8f12 100644 --- a/modules/gerritbot/files/gerritbot_channel_config.yaml +++ b/modules/gerritbot/files/gerritbot_channel_config.yaml @@ -29,6 +29,7 @@ openstack-infra: - openstack/requirements branches: - master + - feature/gearman openstack-dev: events: diff --git a/modules/openstack_project/files/zuul/gearman-logging.conf b/modules/openstack_project/files/zuul/gearman-logging.conf new file mode 100644 index 0000000000..3f51406e9a --- /dev/null +++ b/modules/openstack_project/files/zuul/gearman-logging.conf @@ -0,0 +1,39 @@ +[loggers] +keys=root,gear + +[handlers] +keys=console,debug,normal + +[formatters] +keys=simple + +[logger_root] +level=WARNING +handlers=console + +[logger_gear] +level=DEBUG +handlers=debug,normal +qualname=gear + +[handler_console] +level=WARNING +class=StreamHandler +formatter=simple +args=(sys.stdout,) + +[handler_debug] +level=DEBUG +class=logging.handlers.TimedRotatingFileHandler +formatter=simple +args=('/var/log/zuul/gearman-server-debug.log', 'midnight', 1, 30,) + +[handler_normal] +level=INFO +class=logging.handlers.TimedRotatingFileHandler +formatter=simple +args=('/var/log/zuul/gearman-server.log', 'midnight', 1, 30,) + +[formatter_simple] +format=%(asctime)s %(levelname)s %(name)s: %(message)s +datefmt= diff --git a/modules/openstack_project/files/zuul/logging.conf b/modules/openstack_project/files/zuul/logging.conf index 8b76da2663..8d084eeca5 100644 --- a/modules/openstack_project/files/zuul/logging.conf +++ b/modules/openstack_project/files/zuul/logging.conf @@ -1,5 +1,5 @@ [loggers] -keys=root,zuul,gerrit +keys=root,zuul,gerrit,gear [handlers] keys=console,debug,normal @@ -17,10 +17,15 @@ handlers=debug,normal qualname=zuul [logger_gerrit] -level=DEBUG +level=INFO handlers=debug,normal qualname=gerrit +[logger_gear] +level=DEBUG +handlers=debug,normal +qualname=gear + [handler_console] level=WARNING class=StreamHandler diff --git a/modules/openstack_project/manifests/zuul_dev.pp b/modules/openstack_project/manifests/zuul_dev.pp index e2fe5fb3fa..4d551cb4f0 100644 --- a/modules/openstack_project/manifests/zuul_dev.pp +++ b/modules/openstack_project/manifests/zuul_dev.pp @@ -24,11 +24,6 @@ class openstack_project::zuul_dev( sysadmins => $sysadmins, } - # co-host gearman-job-server - class { 'gearman': - listen => '::', - } - class { '::zuul': vhost_name => $vhost_name, gerrit_server => $gerrit_server, @@ -59,6 +54,12 @@ class openstack_project::zuul_dev( notify => Exec['zuul-reload'], } + file { '/etc/zuul/gearman-logging.conf': + ensure => present, + source => 'puppet:///modules/openstack_project/zuul/gearman-logging.conf', + notify => Exec['zuul-reload'], + } + class { '::recheckwatch': gerrit_server => $gerrit_server, gerrit_user => $gerrit_user, diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 45bcfac7c4..4efc5e0264 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -21,6 +21,7 @@ class zuul ( $vhost_name = $::fqdn, $serveradmin = "webmaster@${::fqdn}", $gearman_server = '127.0.0.1', + $internal_gearman = true, $jenkins_server = '', $jenkins_user = '', $jenkins_apikey = '', diff --git a/modules/zuul/templates/zuul.conf.erb b/modules/zuul/templates/zuul.conf.erb index b92b55855b..e1b1771813 100644 --- a/modules/zuul/templates/zuul.conf.erb +++ b/modules/zuul/templates/zuul.conf.erb @@ -1,6 +1,10 @@ [gearman] server=<%= gearman_server %> +[gearman_server] +start=<%= internal_gearman %> +log_config=/etc/zuul/gearman-logging.conf + [jenkins] server=<%= jenkins_server %> user=<%= jenkins_user %>