Merge pull request #2967 from weaveworks/issues/2610-host-volume
Change weavedb from an emptyDir to a hostPath volume
This commit is contained in:
commit
0c89bbb8df
4 files changed
+7
-3
No files matched your search
@@ -117,6 +117,7 @@ post_start_actions &
|
|||||||
/home/weave/weaver $EXTRA_ARGS --port=6783 $(router_bridge_opts) \
|
/home/weave/weaver $EXTRA_ARGS --port=6783 $(router_bridge_opts) \
|
||||||
--host-root=$HOST_ROOT \
|
--host-root=$HOST_ROOT \
|
||||||
--http-addr=$HTTP_ADDR --status-addr=$STATUS_ADDR --docker-api='' --no-dns \
|
--http-addr=$HTTP_ADDR --status-addr=$STATUS_ADDR --docker-api='' --no-dns \
|
||||||
|
--db-prefix="/weavedb/weave-net" \
|
||||||
--ipalloc-range=$IPALLOC_RANGE $NICKNAME_ARG \
|
--ipalloc-range=$IPALLOC_RANGE $NICKNAME_ARG \
|
||||||
--ipalloc-init $IPALLOC_INIT \
|
--ipalloc-init $IPALLOC_INIT \
|
||||||
--conn-limit=$CONN_LIMIT \
|
--conn-limit=$CONN_LIMIT \
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ spec:
|
|||||||
type: spc_t
|
type: spc_t
|
||||||
volumes:
|
volumes:
|
||||||
- name: weavedb
|
- name: weavedb
|
||||||
emptyDir: {}
|
hostPath:
|
||||||
|
path: /var/lib/weave
|
||||||
- name: cni-bin
|
- name: cni-bin
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /opt
|
path: /opt
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ spec:
|
|||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
volumes:
|
volumes:
|
||||||
- name: weavedb
|
- name: weavedb
|
||||||
emptyDir: {}
|
hostPath:
|
||||||
|
path: /var/lib/weave
|
||||||
- name: cni-bin
|
- name: cni-bin
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /opt
|
path: /opt
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ docker_run_options() {
|
|||||||
|
|
||||||
exec_options() {
|
exec_options() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
setup|setup-cni|launch)
|
setup|setup-cni|launch|reset)
|
||||||
echo -v /:/host -e HOST_ROOT=/host
|
echo -v /:/host -e HOST_ROOT=/host
|
||||||
;;
|
;;
|
||||||
# All the other commands that may create the bridge and need machine id files.
|
# All the other commands that may create the bridge and need machine id files.
|
||||||
@@ -1602,6 +1602,7 @@ case "$COMMAND" in
|
|||||||
protect_against_docker_hang
|
protect_against_docker_hang
|
||||||
VOLUME_CONTAINERS=$(docker ps -qa --filter label=weavevolumes)
|
VOLUME_CONTAINERS=$(docker ps -qa --filter label=weavevolumes)
|
||||||
[ -n "$VOLUME_CONTAINERS" ] && docker rm -v $VOLUME_CONTAINERS >/dev/null 2>&1 || true
|
[ -n "$VOLUME_CONTAINERS" ] && docker rm -v $VOLUME_CONTAINERS >/dev/null 2>&1 || true
|
||||||
|
rm -f $HOST_ROOT/var/lib/weave/weave-netdata.db >/dev/null 2>&1 || true
|
||||||
destroy_bridge
|
destroy_bridge
|
||||||
for LOCAL_IFNAME in $(ip link show | grep v${CONTAINER_IFNAME}pl | cut -d ' ' -f 2 | tr -d ':') ; do
|
for LOCAL_IFNAME in $(ip link show | grep v${CONTAINER_IFNAME}pl | cut -d ' ' -f 2 | tr -d ':') ; do
|
||||||
ip link del ${LOCAL_IFNAME%@*} >/dev/null 2>&1 || true
|
ip link del ${LOCAL_IFNAME%@*} >/dev/null 2>&1 || true
|
||||||
|
|||||||
Reference in new issue
Block a user