Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 216971c

Browse files
committed
Merge pull request alphagov#139 from alphagov/bugfix-incident-fail-script
Fix bug in `incident.fail_to_mirror`
2 parents 812ecaf + 6667396 commit 216971c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

incident.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from fabric.api import *
2+
from fabric.tasks import execute
23
import nginx
34
import puppet
45

@@ -7,8 +8,9 @@
78
def fail_to_mirror():
89
"""Fails the site to the mirror by stopping nginx on the cache nodes"""
910
puppet.disable("Fabric fail_to_mirror task invoked")
10-
nginx_kill()
11-
print("Disabled Puppet and www.gov.uk vhost, remember to re-enable and re-run puppet to restore previous state")
11+
execute(nginx.kill)
12+
print('Disabled Puppet and switched off Nginx.')
13+
print('Run `incident.recover_origin` to start serving from origin again.')
1214

1315
@task
1416
@roles('class-cache')

0 commit comments

Comments
 (0)