Skip to content

Commit c59bedf

Browse files
committed
Merge pull request alphagov#133 from alphagov/stop_nginx_to_fail_to_mirror
Stop nginx to fail to mirror
2 parents d0b0c01 + 0afe100 commit c59bedf

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

incident.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
@task
66
@roles('class-cache')
77
def fail_to_mirror():
8-
"""Fails the site to the mirror"""
8+
"""Fails the site to the mirror by stopping nginx on the cache nodes"""
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

nginx.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ def gracefulrestart():
1515
gracefulstop()
1616
start()
1717

18-
@task
19-
def disable_vhost(vhost_filename):
20-
"""Disable a vhost by removing its symlink from /etc/nginx/sites-enabled"""
21-
sudo('rm -f /etc/nginx/sites-enabled/%s' % vhost_filename)
22-
2318
@task
2419
def kill():
2520
"""Shut down Nginx immediately without waiting for it to finish running"""

0 commit comments

Comments
 (0)