Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
d19e6dec
Commit
d19e6dec
authored
8 years ago
by
Matthew Mosesohn
Browse files
Options
Downloads
Patches
Plain Diff
speed up etcd preupgrade check
parent
ccdb72a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/etcd/tasks/pre_upgrade.yml
+7
-1
7 additions, 1 deletion
roles/etcd/tasks/pre_upgrade.yml
with
7 additions
and
1 deletion
roles/etcd/tasks/pre_upgrade.yml
+
7
−
1
View file @
d19e6dec
...
...
@@ -34,6 +34,11 @@
command
:
"
{{
docker_bin_dir
}}/docker
rm
-f
{{item}}"
with_items
:
"
{{etcd_proxy_container.stdout_lines}}"
-
name
:
"
Pre-upgrade
|
see
if
etcdctl
is
installed"
stat
:
path
:
"
{{
bin_dir
}}/etcdctl"
register
:
etcdctl_installed
-
name
:
"
Pre-upgrade
|
check
if
member
list
is
non-SSL"
command
:
"
{{
bin_dir
}}/etcdctl
--no-sync
--peers={{
etcd_access_addresses
|
regex_replace('https','http')
}}
member
list"
register
:
etcd_member_list
...
...
@@ -41,6 +46,7 @@
delay
:
3
until
:
etcd_member_list.rc !=
2
run_once
:
true
when
:
etcdctl_installed.stat.exists
failed_when
:
false
-
name
:
"
Pre-upgrade
|
change
peer
names
to
SSL"
...
...
@@ -48,4 +54,4 @@
{{ bin_dir }}/etcdctl --no-sync --peers={{ etcd_access_addresses | regex_replace('https','http') }} member list |
awk -F"[: =]" '{print "{{ bin_dir }}/etcdctl --peers={{ etcd_access_addresses | regex_replace('https','http') }} member update "$1" https:"$7":"$8}' | bash
run_once
:
true
when
:
'
etcd_member_list.rc
==
0
and
"http://"
in
etcd_member_list.stdout'
when
:
'
etcdctl_installed.stat.exists
and
etcd_member_list.rc
==
0
and
"http://"
in
etcd_member_list.stdout'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment