Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99dbfe4

Browse files
committed
Adds recover_origin task to Fabric
Whilst we can fail the site to mirrors easily using Fabric, we can't restoreas easily - at least, it's not a super-quick Fabric script.This makes it a nice quick fix. The logic is as follows: - Re-enable Puppet on the affected class - Run Puppet, with some degree of verbosity for confidence - This should restore thewww.gov.uk Nginx vhost - This should restart Nginx because the configuration has changed - Prints a success messageChanges the fail_to_mirror success message to point to using this task infuture to recover back to origin from the mirrors.
1 parent301b034 commit99dbfe4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎incident.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ def fail_to_mirror():
1010
nginx.disable_vhost("www.gov.uk")
1111
nginx.force_restart()
1212
print("Disabled Puppet and www.gov.uk vhost, remember to re-enable and re-run puppet to restore previous state")
13+
14+
@task
15+
@roles('class-cache')
16+
defrecover_origin():
17+
"""Recovers GOV.UK to serve from origin after incident.fail_to_mirror has been invoked"""
18+
puppet.enable()
19+
puppet.agent("--test")
20+
print("Puppet has been re-enabled, has run and the site should now be serving from origin as normal.")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp