Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
francois
slapos
Commits
9b6a631a
Commit
9b6a631a
authored
Oct 13, 2016
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resilient: makes promises more understandable
parent
a1b5e0ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+2
-2
stack/resilient/instance-pull-backup.cfg.in
stack/resilient/instance-pull-backup.cfg.in
+10
-4
stack/resilient/pbsready-import.cfg.in
stack/resilient/pbsready-import.cfg.in
+4
-4
No files found.
stack/resilient/buildout.cfg
View file @
9b6a631a
...
...
@@ -50,7 +50,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg
md5sum =
a13be3bd76d6a52b6527c7035ba33a06
md5sum =
10264fe1cfb7ebe567d50ebabbd93a43
mode = 0644
[pbsready-export]
...
...
@@ -66,7 +66,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg
md5sum = 3
892f86fcf850511dc0e6e4983b1961a
md5sum = 3
ef8f98ff013f06fcd81bba18872e561
mode = 0644
[template-replicated]
...
...
stack/resilient/instance-pull-backup.cfg.in
View file @
9b6a631a
...
...
@@ -8,7 +8,7 @@ parts =
cron-entry-logrotate
pbs-sshkeys-authority
sshkeys-openssh
backup-
transfer
-integrity-promise
backup-
checksum
-integrity-promise
resilient-genstatrss-wrapper
pbs-push-history-log
backup-signature-link
...
...
@@ -264,7 +264,7 @@ monitor-username = $${htpasswd:username}
#--
#-- Resiliency promises.
[backup-
transfer
-integrity-promise]
[backup-
checksum
-integrity-promise]
recipe = slapos.recipe.template:jinja2
template = inline:
#!${dash:location}/bin/dash
...
...
@@ -276,9 +276,15 @@ template = inline:
if [ -z "$backup_signature" ]; then
exit 0;
else
diff "proof.signature" "$backup_signature";
diff -q "proof.signature" "$backup_signature";
if [ "$?" -eq 0 ]; then
exit 0;
else
echo "Signature file is not the same before and after transfer"
exit 1
fi
fi
rendered = $${basedirectory:promises}/backup-
transfer-integrity-promise
rendered = $${basedirectory:promises}/backup-
checksum-integrity
mode = 700
[resilient-genstatrss-wrapper]
...
...
stack/resilient/pbsready-import.cfg.in
View file @
9b6a631a
...
...
@@ -26,7 +26,7 @@ parts =
check-backup-integrity-on-notification
import-on-notification
backup-
transfer
-integrity-promise
backup-
checksum
-integrity-promise
resilient-publish-connection-parameter
backup-signature-link
...
...
@@ -78,7 +78,7 @@ recipe = slapos.cookbook:notifier.callback
on-notification-id = $${slap-parameter:on-notification}
callback = $${post-notification-run:output}
[backup-
transfer
-integrity-promise]
[backup-
checksum
-integrity-promise]
recipe = slapos.recipe.template:jinja2
template = inline:
#!/${bash:location}/bin/bash
...
...
@@ -90,10 +90,10 @@ template = inline:
exit 1;
fi
else
# If file doesn't exist, promise should raise false positive
# If file doesn't exist, promise should
nt
raise false positive
exit 0;
fi
rendered = $${basedirectory:promises}/backup-
transfer-integrity-promise
rendered = $${basedirectory:promises}/backup-
checksum-integrity
mode = 700
###########
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment