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
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
Levin Zimmermann
slapos
Commits
8bb71e51
Commit
8bb71e51
authored
Jul 15, 2022
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repan: add cluster if not exists yet
parent
cdcc1000
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+1
-1
software/repman/templates/repman-manager.sh.in
software/repman/templates/repman-manager.sh.in
+12
-0
No files found.
software/repman/buildout.hash.cfg
View file @
8bb71e51
...
...
@@ -58,7 +58,7 @@ md5sum = c203f40a58386310a433b58fd345a341
[repman-manager-sh.in]
_update_hash_filename_ = templates/repman-manager.sh.in
md5sum =
5d22f599b39c25c285d0e9c02e7074a3
md5sum =
a4e5bb1f5dfe52f6ba17e3a029f4f130
[dbjobs-in]
_update_hash_filename_ = templates/dbjobs.in
...
...
software/repman/templates/repman-manager.sh.in
View file @
8bb71e51
...
...
@@ -59,12 +59,24 @@ activate_proxy () {
fi
}
check_add () {
NAME=$1
STATUS=$(curl -H "Authorization: Bearer ${TOKEN}" -o /dev/null -w "%{http_code}" {{ secure_url }}/api/clusters/$NAME)
if [ $STATUS != 200 ]; then
# if cluster doesn't exists we add it
curl -H "Authorization: Bearer ${TOKEN}" \
{{ secure_url }}/api/clusters/actions/add/$NAME
fi
}
TOKEN=$(get_token | {{ jq_bin }} -r '.token')
# Always reload cluster configuration to apply recent changes
{% for name in cluster_name_list -%}
check_add {{ name }}
# reload {{ name }} settings
echo "Reloading settings for {{ name }}..."
curl -H "Authorization: Bearer ${TOKEN}" \
{{ secure_url }}/api/clusters/{{ name }}/settings/actions/reload
...
...
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