From 2b30f04e8c18067f5a932d104caf4eba9a016897 Mon Sep 17 00:00:00 2001
From: "James E. Blair" <jeblair@openstack.org>
Date: Sun, 16 Dec 2012 11:31:23 -0800
Subject: [PATCH] Fix some zuul config errors.

Update the status URL that is left in gerrit.
Don't push zuul refs to gerrit.
Don't proxy git requests to zuul in the apache config.

Change-Id: I578383d8bcec63b8581dc1a8b50405ad7e7070a5
Reviewed-on: https://review.openstack.org/18195
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
---
 modules/openstack_project/manifests/zuul.pp | 3 ++-
 modules/zuul/templates/zuul.vhost.erb       | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/openstack_project/manifests/zuul.pp b/modules/openstack_project/manifests/zuul.pp
index 5b542ed83f..f38abf7a6d 100644
--- a/modules/openstack_project/manifests/zuul.pp
+++ b/modules/openstack_project/manifests/zuul.pp
@@ -30,7 +30,8 @@ class openstack_project::zuul(
     gerrit_user          => $gerrit_user,
     zuul_ssh_private_key => $zuul_ssh_private_key,
     url_pattern          => $url_pattern,
-    push_change_refs     => true
+    push_change_refs     => false,
+    status_url           => "http://${::fqdn}/",
   }
 
   file { '/etc/zuul/layout.yaml':
diff --git a/modules/zuul/templates/zuul.vhost.erb b/modules/zuul/templates/zuul.vhost.erb
index 1c5351ed96..2dda185652 100644
--- a/modules/zuul/templates/zuul.vhost.erb
+++ b/modules/zuul/templates/zuul.vhost.erb
@@ -9,6 +9,7 @@
 
   RewriteEngine on
   RewriteRule /zuul/status http://127.0.0.1:8001/status [P]
+  RewriteCond %{REQUEST_URI} !^/p/
   RewriteRule / http://127.0.0.1:8001/status [P]
 
   SetEnv GIT_PROJECT_ROOT /var/lib/zuul/git/