Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3025)

Unified Diff: cmd/plugins/juju-restore/restore.go

Issue 78870043: Fix:#1295650 Failproofed rsyslog restoring script
Patch Set: Fix:#1295650 Failproofed rsyslog restoring script Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « [revision details] ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/plugins/juju-restore/restore.go
=== modified file 'cmd/plugins/juju-restore/restore.go'
--- cmd/plugins/juju-restore/restore.go 2014-03-05 19:41:34 +0000
+++ cmd/plugins/juju-restore/restore.go 2014-03-25 15:03:02 +0000
@@ -345,13 +345,18 @@
n
s/- .*(:[0-9]+)/- {{.Address}}\1/
}" $agent/agent.conf
+
+ # If we're processing a unit agent's directly
+ # and it has some relations, reset
+ # the stored version of all of them to
+ # ensure that any relation hooks will
+ # fire.
if [[ $agent = unit-* ]]
then
- sed -i -r 's/change-version: [0-9]+$/change-version: 0/' $agent/state/relations/*/* || true
+ find $agent/state/relations -type f | xargs sed -i -r 's/change-version: [0-9]+$/change-version: 0/'
fi
initctl start jujud-$agent
done
-sed -i -r 's/^(:syslogtag, startswith, "juju-" @)(.*)(:[0-9]+.*)$/\1{{.Address}}\3/' /etc/rsyslog.d/*-juju*.conf
`)
// setAgentAddressScript generates an ssh script argument to update state addresses
« no previous file with comments | « [revision details] ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b