Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

stable on-disk format #1132

Closed
2 of 3 tasks
alban opened this issue Jul 13, 2015 · 9 comments
Closed
2 of 3 tasks

stable on-disk format #1132

alban opened this issue Jul 13, 2015 · 9 comments

Comments

@alban
Copy link
Member

alban commented Jul 13, 2015

When users create pods with rkt version n, the next version n+1 must be able to run them.

I don't know if we need to implement anything for this. Can you think of anything we miss for that?

@alban
Copy link
Member Author

alban commented Jul 13, 2015

/cc @philips : do you have an idea already how to proceed with this?

@eyakubovich
Copy link
Contributor

I think it's critical for images/CAS to be really stable. Stability of prepared and exited containers is desirable but it also needs to have the flexibility to evolve. If I upgrade rkt, I'd hate to have to purge all my downloaded images but re-running prepare is not bad. However rkt run-prepared should be able to error out with appropriate message.

The situation with GC is more complex. If I upgrade rkt, I still need to be able to GC old exited pods. When GC was just rm -rf $POD_DIR, things were easy. Now that we have gc stage1 entry point and overlayfs unmounting, things are tricky.

@alban
Copy link
Member Author

alban commented Jul 14, 2015

Good point about the CAS. Should we introduce a format version for things like /var/lib/rkt/cas/db in order to detect that it has been written by a future format?

At the moment, GC belongs to stage1. And we will have a stage1 based on lkvm soon. So we might have some pods started with the traditional stage1 and some pods started with the lkvm stage1. When using rkt gc, do we use the stage1/gc used to prepare/run the pod, or do we use the stage1/gc as specified in the option rkt gc --stage1-image=? It seems we need to do the former, so stage1/gc knows the correct method to GC the pod.

What should we do with valid images according to an old appc/spec but now invalid due to the spec change? See #1140.

@iaguis
Copy link
Member

iaguis commented Aug 3, 2015

We already have a database schema migration (#706) and we used it successfully for #1181 (thanks @sgotti!).

So to ensure stability for the CAS we need to make sure we don't remove any of the other directories (/var/lib/rkt/cas/{blob,imagelocks,imageManifest,tree,treestorelocks}) or make any destructive changes to them.

For garbage-collecting older pods, we need to be careful and have the right fallbacks. For example, we try to unmount the overlay fs but if it's already unmounted we continue the process.

For things like #1140 (failed parsing because of a spec update) we discussed having a permissive Pod/Image manifest parser that we'd call if the normal parser fails. In this way, we can get enough infomation to give a good error message ("appName", "podUUID", "acVersion"...). This parser should probably live in appc/spec.

@krnowak
Copy link
Collaborator

krnowak commented Aug 12, 2015

@iaguis, @alban - a last-ditch parser to review for you - appc/spec#476

alban added a commit to endocode/rkt that referenced this issue Aug 14, 2015
alban added a commit to endocode/rkt that referenced this issue Aug 14, 2015
alban added a commit to endocode/rkt that referenced this issue Aug 14, 2015
@alban
Copy link
Member Author

alban commented Aug 18, 2015

Documentation was added via #1271. The rest is pending on appc/spec. Moving to next milestone.

@alban
Copy link
Member Author

alban commented Sep 28, 2015

It seems the only remaining task is #1471 (last-ditch manifest parser).

@jonboulle
Copy link
Contributor

#1471 landed so I think we can tentatively call this closed. Is the doc up to date?

@alban
Copy link
Member Author

alban commented Sep 28, 2015

Is the doc up to date?

Yes, I don't think it changed recently. The documentation is in on-disk-format.md.

Closing.

@alban alban closed this as completed Sep 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants