-
Notifications
You must be signed in to change notification settings - Fork 674
Change weavedb from an emptyDir to a hostPath volume #2967
Conversation
As discussed on Slack, this requires a similar change in the Launch Generator. |
Should we add a step to delete this directory in the tests? |
I guess so; from the point of view of ensuring that we test the same thing each time. |
Agreed 👍 |
@@ -102,7 +102,8 @@ spec: | |||
type: spc_t | |||
volumes: | |||
- name: weavedb | |||
emptyDir: {} | |||
hostPath: | |||
path: /var/lib/weave-net |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
I now think (it isn't easy to run |
0a8eb32
to
73d5204
Compare
EmptyDir has the same lifetime as the pod, whereas we want our persistence to extend past that, e.g. when Weave Net is upgraded. `weave reset` cleans out the file. We assume that /var/lib is writable.
73d5204
to
bebaa48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@brb, what do you think of these latest changes? (I'll wait for your final review before I merge) |
@@ -1634,6 +1634,7 @@ case "$COMMAND" in | |||
protect_against_docker_hang | |||
VOLUME_CONTAINERS=$(docker ps -qa --filter label=weavevolumes) | |||
[ -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 |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
emptyDir
has the same lifetime as the pod, whereas we want our persistence to extend past that, e.g. when Weave Net is upgraded.We assume that
/var/lib
is writable.Fixes #2610