Sync with manager
commit 91bb47d8095238efc1249153341f8a57a4fd8f92 Author: Sheng Yang <sheng.yang@rancher.com> Date: Fri Apr 24 13:35:53 2020 -0700 Longhorn v0.8.1-rc3 release Signed-off-by: Sheng Yang <sheng.yang@rancher.com>
This commit is contained in:
parent
340ed789f2
commit
85ab7c8d9d
@ -241,7 +241,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-manager
|
||||
image: longhornio/longhorn-manager:v0.8.1-rc2
|
||||
image: longhornio/longhorn-manager:master
|
||||
imagePullPolicy: Always
|
||||
securityContext:
|
||||
privileged: true
|
||||
@ -250,11 +250,11 @@ spec:
|
||||
- -d
|
||||
- daemon
|
||||
- --engine-image
|
||||
- longhornio/longhorn-engine:v0.8.1-rc2
|
||||
- longhornio/longhorn-engine:master
|
||||
- --instance-manager-image
|
||||
- longhornio/longhorn-instance-manager:v1_20200301
|
||||
- --manager-image
|
||||
- longhornio/longhorn-manager:v0.8.1-rc2
|
||||
- longhornio/longhorn-manager:master
|
||||
- --service-account
|
||||
- longhorn-service-account
|
||||
ports:
|
||||
@ -350,7 +350,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-ui
|
||||
image: longhornio/longhorn-ui:v0.8.1-rc2
|
||||
image: longhornio/longhorn-ui:master
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
@ -394,18 +394,18 @@ spec:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-longhorn-manager
|
||||
image: longhornio/longhorn-manager:v0.8.1-rc2
|
||||
image: longhornio/longhorn-manager:master
|
||||
command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done']
|
||||
containers:
|
||||
- name: longhorn-driver-deployer
|
||||
image: longhornio/longhorn-manager:v0.8.1-rc2
|
||||
image: longhornio/longhorn-manager:master
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- longhorn-manager
|
||||
- -d
|
||||
- deploy-driver
|
||||
- --manager-image
|
||||
- longhornio/longhorn-manager:v0.8.1-rc2
|
||||
- longhornio/longhorn-manager:master
|
||||
- --manager-url
|
||||
- http://longhorn-backend:9500/v1
|
||||
env:
|
||||
|
@ -41,12 +41,13 @@ exec_command() {
|
||||
|
||||
INSTANCE_MANAGER_NAME_FILTER="{.items[?(@.spec.volumeName==\"${VOLUME_NAME}\")].status.instanceManagerName}"
|
||||
INSTANCE_MANAGER_NAME=`kubectl -n ${NS} get lhe --output=jsonpath="${INSTANCE_MANAGER_NAME_FILTER}"`
|
||||
|
||||
|
||||
ENGINE_PORT_FILTER="{.items[?(@.spec.volumeName==\"${VOLUME_NAME}\")].status.port}"
|
||||
ENGINE_PORT=`kubectl -n ${NS} get lhe --output=jsonpath="${ENGINE_PORT_FILTER}"`
|
||||
|
||||
kubectl -n ${NS} exec -it ${INSTANCE_MANAGER_NAME} -- bash -c "longhorn --url localhost:${ENGINE_PORT} ${COMMAND_ARGS}"
|
||||
|
||||
LONGHORN_BIN_PATH=`kubectl -n ${NS} exec -it ${INSTANCE_MANAGER_NAME} -- bash -c "ps -eo command | grep \" ${VOLUME_NAME} \" | grep -v grep | awk '{ printf(\"%s\", \\$1)}'"`
|
||||
|
||||
kubectl -n ${NS} exec -it ${INSTANCE_MANAGER_NAME} -- bash -c "${LONGHORN_BIN_PATH} --url localhost:${ENGINE_PORT} ${COMMAND_ARGS}"
|
||||
}
|
||||
|
||||
|
||||
|
35
scripts/migrate-for-pre-070-volumes.sh
Executable file
35
scripts/migrate-for-pre-070-volumes.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NS="longhorn-system"
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: ${0} [ |-h|--help] [volume_name|--all]"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " ${0} test-vol"
|
||||
echo " ${0} --all"
|
||||
echo ""
|
||||
echo "Note: Must have Longhorn installed in "longhorn-system" namespace"
|
||||
echo ""
|
||||
exit 0
|
||||
}
|
||||
|
||||
exec_command() {
|
||||
COMMAND_ARG="${@}"
|
||||
LONGHORN_MANAGER=$(kubectl -n ${NS} get po -l "app=longhorn-manager" | tr '\000' '\n' | sed -n '2p' | awk '{print $1}')
|
||||
kubectl -n ${NS} exec -it ${LONGHORN_MANAGER} -- bash -c "longhorn-manager migrate-for-pre-070-volumes ${COMMAND_ARG}"
|
||||
}
|
||||
|
||||
|
||||
ARG=$1
|
||||
case $ARG in
|
||||
"" | "-h" | "--help")
|
||||
print_usage
|
||||
;;
|
||||
*)
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Command args number shouldn't be greater than 1"
|
||||
fi
|
||||
exec_command ${@}
|
||||
;;
|
||||
esac
|
@ -58,7 +58,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-uninstall
|
||||
image: longhornio/longhorn-manager:v0.8.1-rc2
|
||||
image: longhornio/longhorn-manager:master
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- longhorn-manager
|
||||
|
Loading…
Reference in New Issue
Block a user