Skip to content

Commit 1f92ba6

Browse files
committed
Stop Nginx to fail to mirror
...rather than deleting a virtual host and restarting nginx. We made this task more selective in 338b449 to prevent the Assets virtual host from being disabled [1]. Since then, we now support failover for `assets.digital.cabinet-office.gov.uk` [2], so this is no longer an issue. Prefer stopping nginx entirely as it's the simplest thing to do and means we're not coupling this task to our Nginx virtual host configuration. [1]: alphagov#21 (comment) [2]: https://github.gds/gds/cdn-configs/commit/8ca1877f55806f6d2f5ce3fb0d95b0142b7fa503#diff-e2f1431e532ca56328341b841c0cdaaf
1 parent d0b0c01 commit 1f92ba6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

incident.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
def fail_to_mirror():
88
"""Fails the site to the mirror"""
99
puppet.disable("Fabric fail_to_mirror task invoked")
10-
nginx.disable_vhost("www.gov.uk")
11-
nginx.force_restart()
10+
nginx_kill()
1211
print("Disabled Puppet and www.gov.uk vhost, remember to re-enable and re-run puppet to restore previous state")
1312

1413
@task

0 commit comments

Comments
 (0)