-
Notifications
You must be signed in to change notification settings - Fork 679
Use a data volume container for persistence of IPAM etc. #2135
Conversation
|
Looks good - I wonder whether we should create a minimal image to serve as the base for this volume container though? Otherwise we'll be keeping an old version (currently ~70mb) of the |
|
Do we need to put anything in the docs for this now? I'm going to mention it when talking about persistence in the operational guide, does it need to go anywhere else? (make sure you rebase on recent master if you do because I restructured all the docs for wordepress) |
|
That's a good point about the old image. I was following the Docker page on volumes where they note that using the same image doesn't cost any disk space because the layers are shared with the containers we do use, but that won't be true after an upgrade. |
|
Might be irrelevant, but when we do |
Already implemented! |
|
I added a minimal image as suggested. Don't think you wanted to do Docs: I'll wait and see what you put in the operational guide. |
| mflag.StringVar(&datapathName, []string{"-datapath"}, "", "ODP datapath name") | ||
| mflag.StringVar(&trustedSubnetStr, []string{"-trusted-subnets"}, "", "comma-separated list of trusted subnets in CIDR notation") | ||
| mflag.StringVar(&dbPrefix, []string{"-db-prefix"}, "weave", "pathname/prefix of filename to store data") | ||
| mflag.StringVar(&dbPrefix, []string{"-db-prefix"}, "/weavedb/weave", "pathname/prefix of filename to store data") |
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.
|
LGTM, just maybe commits can be squashed. |
6cee179 to
484789c
Compare
|
Rebased/squashed. The two commits cover separate concerns. |
|
I'd like "weave launch x y z" be equivalent to "weave launch; weave connect x; weave connect y; weave connect z" as much as possible. So I think we want the union. We already have a "connect --replace" iirc, so adding a "launch --replace" seems logical. |
We provide a very small image to use for this container. Also we add an empty weavedata.db file to weave image so it doesn't crash when run without volume override
8493df4 to
0eee97b
Compare
|
See #2160 for union and |
Instead of persisting inside the
weavecontainer, use another data-only containerweavedb.Fixes #2031 and fixes #2077.
We cannot use the same data-only container as we use for
weavewait, as it needs to change when Weave is upgraded.I did choose to use the same image (i.e.weaveworks/weaveexec); nothing from the image is used so this should be unimportant.We have to move the location of the DB file(s) to a specific directory so we can mount a volume on top of that directory.
This has the effect of makingdocker run weavefail unless you supply such a volume, or a different--db-prefix.