← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charm-cron-control-redirects into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-cron-control-redirects into launchpad:master.

Commit message:
charm: Redirect old cron-control URLs

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/453164

The current URLs used for cron-control on production, qastaging, and staging are "http://cron-control.lp.internal/production.ini";, "http://cron-control.qastaging.lp.internal/qastaging.ini";, and "http://cron-control.staging.lp.internal/staging.ini"; respectively.  The `launchpad-cron-control` charm just exposes `/cron.ini`, which is simpler.

However, to migrate to this, we're going to need to change DNS for `cron-control.lp.internal` etc., and it's going to be awkward to coordinate that change with also changing all the URLs to `/cron.ini`.  Redirecting the old URLs for a transitional period will simplify this.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-cron-control-redirects into launchpad:master.
diff --git a/charm/launchpad-cron-control/templates/vhosts/cron-http.conf.j2 b/charm/launchpad-cron-control/templates/vhosts/cron-http.conf.j2
index 1525ef2..a1e94e5 100644
--- a/charm/launchpad-cron-control/templates/vhosts/cron-http.conf.j2
+++ b/charm/launchpad-cron-control/templates/vhosts/cron-http.conf.j2
@@ -9,5 +9,11 @@
     <Directory "{{ www_dir }}/">
         Require all granted
     </Directory>
+
+    # XXX cjwatson 2023-10-09: Temporarily redirect old URLs until we've
+    # finished migration.
+    Redirect /production.ini /cron.ini
+    Redirect /qastaging.ini /cron.ini
+    Redirect /staging.ini /cron.ini
 </VirtualHost>