Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
slapos-mynij-dev
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
...
@@ -50,7 +50,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in
url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg
output = ${buildout:directory}/pbsready-import.cfg
md5sum =
a13be3bd76d6a52b6527c7035ba33a06
md5sum =
10264fe1cfb7ebe567d50ebabbd93a43
mode = 0644
mode = 0644
[pbsready-export]
[pbsready-export]
...
@@ -66,7 +66,7 @@ mode = 0644
...
@@ -66,7 +66,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg
output = ${buildout:directory}/instance-pull-backup.cfg
md5sum = 3
892f86fcf850511dc0e6e4983b1961a
md5sum = 3
ef8f98ff013f06fcd81bba18872e561
mode = 0644
mode = 0644
[template-replicated]
[template-replicated]
...
...
stack/resilient/instance-pull-backup.cfg.in
View file @
9b6a631a
...
@@ -8,7 +8,7 @@ parts =
...
@@ -8,7 +8,7 @@ parts =
cron-entry-logrotate
cron-entry-logrotate
pbs-sshkeys-authority
pbs-sshkeys-authority
sshkeys-openssh
sshkeys-openssh
backup-
transfer
-integrity-promise
backup-
checksum
-integrity-promise
resilient-genstatrss-wrapper
resilient-genstatrss-wrapper
pbs-push-history-log
pbs-push-history-log
backup-signature-link
backup-signature-link
...
@@ -264,7 +264,7 @@ monitor-username = $${htpasswd:username}
...
@@ -264,7 +264,7 @@ monitor-username = $${htpasswd:username}
#--
#--
#-- Resiliency promises.
#-- Resiliency promises.
[backup-
transfer
-integrity-promise]
[backup-
checksum
-integrity-promise]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = inline:
template = inline:
#!${dash:location}/bin/dash
#!${dash:location}/bin/dash
...
@@ -276,9 +276,15 @@ template = inline:
...
@@ -276,9 +276,15 @@ template = inline:
if [ -z "$backup_signature" ]; then
if [ -z "$backup_signature" ]; then
exit 0;
exit 0;
else
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
fi
rendered = $${basedirectory:promises}/backup-
transfer-integrity-promise
rendered = $${basedirectory:promises}/backup-
checksum-integrity
mode = 700
mode = 700
[resilient-genstatrss-wrapper]
[resilient-genstatrss-wrapper]
...
...
stack/resilient/pbsready-import.cfg.in
View file @
9b6a631a
...
@@ -26,7 +26,7 @@ parts =
...
@@ -26,7 +26,7 @@ parts =
check-backup-integrity-on-notification
check-backup-integrity-on-notification
import-on-notification
import-on-notification
backup-
transfer
-integrity-promise
backup-
checksum
-integrity-promise
resilient-publish-connection-parameter
resilient-publish-connection-parameter
backup-signature-link
backup-signature-link
...
@@ -78,7 +78,7 @@ recipe = slapos.cookbook:notifier.callback
...
@@ -78,7 +78,7 @@ recipe = slapos.cookbook:notifier.callback
on-notification-id = $${slap-parameter:on-notification}
on-notification-id = $${slap-parameter:on-notification}
callback = $${post-notification-run:output}
callback = $${post-notification-run:output}
[backup-
transfer
-integrity-promise]
[backup-
checksum
-integrity-promise]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = inline:
template = inline:
#!/${bash:location}/bin/bash
#!/${bash:location}/bin/bash
...
@@ -90,10 +90,10 @@ template = inline:
...
@@ -90,10 +90,10 @@ template = inline:
exit 1;
exit 1;
fi
fi
else
else
# If file doesn't exist, promise should raise false positive
# If file doesn't exist, promise should
nt
raise false positive
exit 0;
exit 0;
fi
fi
rendered = $${basedirectory:promises}/backup-
transfer-integrity-promise
rendered = $${basedirectory:promises}/backup-
checksum-integrity
mode = 700
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