Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
63ae7a02
Commit
63ae7a02
authored
Nov 16, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Nov 16, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36783 from mml/migrate-debug
Automatic merge from submit-queue Add debug logging to all etcd migration operations.
parents
5b95099e
fd289c2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
migrate-if-needed.sh
cluster/images/etcd/migrate-if-needed.sh
+5
-3
No files found.
cluster/images/etcd/migrate-if-needed.sh
View file @
63ae7a02
...
@@ -113,11 +113,13 @@ start_etcd() {
...
@@ -113,11 +113,13 @@ start_etcd() {
local
ETCDCTL_CMD
=
"
${
ETCDCTL
:-
/usr/local/bin/etcdctl-
${
START_VERSION
}}
"
local
ETCDCTL_CMD
=
"
${
ETCDCTL
:-
/usr/local/bin/etcdctl-
${
START_VERSION
}}
"
local
API_VERSION
=
"
$(
echo
${
START_STORAGE
}
|
cut
-c5-5
)
"
local
API_VERSION
=
"
$(
echo
${
START_STORAGE
}
|
cut
-c5-5
)
"
if
[
"
${
API_VERSION
}
"
=
"2"
]
;
then
if
[
"
${
API_VERSION
}
"
=
"2"
]
;
then
ETCDCTL_CMD
=
"
${
ETCDCTL_CMD
}
--endpoint=http://127.0.0.1:
${
ETCD_PORT
}
set"
ETCDCTL_CMD
=
"
${
ETCDCTL_CMD
}
--
debug --
endpoint=http://127.0.0.1:
${
ETCD_PORT
}
set"
else
else
ETCDCTL_CMD
=
"
${
ETCDCTL_CMD
}
--endpoints=http://127.0.0.1:
${
ETCD_PORT
}
put"
ETCDCTL_CMD
=
"
${
ETCDCTL_CMD
}
--endpoints=http://127.0.0.1:
${
ETCD_PORT
}
put"
fi
fi
${
ETCD_CMD
}
--name
=
"etcd-
$(
hostname
)
"
\
${
ETCD_CMD
}
\
--name
=
"etcd-
$(
hostname
)
"
\
--debug
\
--data-dir
=
${
DATA_DIRECTORY
}
\
--data-dir
=
${
DATA_DIRECTORY
}
\
--listen-client-urls
http://127.0.0.1:
${
ETCD_PORT
}
\
--listen-client-urls
http://127.0.0.1:
${
ETCD_PORT
}
\
--advertise-client-urls
http://127.0.0.1:
${
ETCD_PORT
}
\
--advertise-client-urls
http://127.0.0.1:
${
ETCD_PORT
}
\
...
@@ -153,7 +155,7 @@ if [ "${CURRENT_VERSION}" = "2.2.1" -a ! -d "${BACKUP_DIR}" ]; then
...
@@ -153,7 +155,7 @@ if [ "${CURRENT_VERSION}" = "2.2.1" -a ! -d "${BACKUP_DIR}" ]; then
echo
"Backup etcd before starting migration"
echo
"Backup etcd before starting migration"
mkdir
${
BACKUP_DIR
}
mkdir
${
BACKUP_DIR
}
ETCDCTL_CMD
=
"/usr/local/bin/etcdctl-2.2.1"
ETCDCTL_CMD
=
"/usr/local/bin/etcdctl-2.2.1"
ETCDCTL_API
=
2
${
ETCDCTL_CMD
}
backup
--data-dir
=
${
DATA_DIRECTORY
}
\
ETCDCTL_API
=
2
${
ETCDCTL_CMD
}
--debug
backup
--data-dir
=
${
DATA_DIRECTORY
}
\
--backup-dir
=
${
BACKUP_DIR
}
--backup-dir
=
${
BACKUP_DIR
}
echo
"Backup done in
${
BACKUP_DIR
}
"
echo
"Backup done in
${
BACKUP_DIR
}
"
fi
fi
...
...
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