Conversation
04c872c to
46b9b42
Compare
f7e3d11 to
307260e
Compare
|
Corresponding changes to meta-lmp foundriesio/meta-lmp#429 |
doanac
left a comment
There was a problem hiding this comment.
I think most of the comments were fixed as I kept reading on in the PR. The biggest thing I found missing was a little more info in a couple of the commit messages about what was happening on the filesystem.
I'm pull this onto a test device and kick the tires today.
| LOG_ERROR << image_uri; | ||
|
|
||
| const Uri uri{Uri::parseUri(image_uri)}; | ||
| const std::string tag{uri.registryHostname + '/' + uri.repo + ':' + uri.digest.shortHash()}; |
There was a problem hiding this comment.
shortHash scares me cause it its just a fixed slice of the first $x character. It could have collisions. I guess its pretty safe in this context. Just want to double check it makes sense here?
There was a problem hiding this comment.
This is just an image tag. It doesn't play any functional role, it could be an empty as it is now or any other random value.
Unfortunately, skopeo doesn't allow to specify "destination" by using the full sha256 (@sha256:<>), what actually leads to unnecessary fetch of a newly exported/loaded image manifest by the docker daemon regardless of the image presence in the docker store. It's not critical since just a manifest is fetched, but I'll try to fix/improve on the next iteration, it will require patching of the skopeo or even dockers source code.
var/rootdirs/home/fio# cat /var/lib/docker/image/overlay2/repositories.json | jq
{
"Repositories": {
"hub.foundries.io/msul-dev01/app-05": {
"hub.foundries.io/msul-dev01/app-05:5f80d09": "sha256:36264a214873ebd01966c95be4c53ae879f67361a5ae5c2b89dc14faf3b0b760",
"hub.foundries.io/msul-dev01/app-05@sha256:5f80d09611ee4f0ba07e7318f9c2970a2d8d0ca84e187e99eae971189a207a71": "sha256:36264a214873ebd01966c95be4c53ae879f67361a5ae5c2b89dc14faf3b0b760"
}
}
}
The first record "hub.foundries.io/msul-dev01/app-05:5f80d09" is added by aklite/skopeo, the second is added by dockerd. Once we teach skopeo/dockerd to accept the full sha256 hash (not just a tag) then we will eliminate the unnecessary image manifest pull.
|
config |
01cdf9c to
4648e38
Compare
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Use the the same test suite for testing aklite configured with ComposeAppEngine and RestorableAppEngine. Signed-off-by: Mike Sul <[email protected]>
Make use of the restorable app engine if `reset_apps` are set in configuration. Make sure aklite checks and pulls an union of reset and compose apps. Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Properly remove Apps&images for both use-cases, composeapp and restorableapp engines. Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
4648e38 to
dcd5f81
Compare
@doanac So, I think, it's ready to be merged. This is corresponding changes to meta-lmp foundriesio/meta-lmp#429. |
skopeoto pull images from Registry(ies);/var/lib/dockerand/var/sota/compose-apps;/var/lib/dockerand/var/sota/compose-appsare removed then Apps&images are restored from the local store.