bwrap-oci was filling this information for us, but if we want to use
runc we need to ensure the "user" namespace is always present and that
valid uid/gid mappings exist in the OCI configuration file.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1226
Approved by: rhatdan
The feedback when deleting containers was asking the user if they
wanted to delete images, instead of containers. This updates the
feedback to use the correct terminology.
Closes: #1218
Approved by: rhatdan
we should never release the lock until the entire read+write operation
is completed as the data might have changed between the read and the
write.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1214
Approved by: baude
Change the install data format to keep a list of containers for each
image installed, so that multiple containers for the same image can be
installed and uninstalled.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1559935
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1214
Approved by: baude
when --system or --user are used, hide the warning:
Note: Switching from the 'docker' backend to the 'ostree' backend based
on the 'atomic.type' label in the image. You can use --storage to
override this behaviour.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1216
Approved by: TomSweeneyRedHat
it is not used anymore as we completely moved the pull logic to Skopeo.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1215
Approved by: baude
The inline help for `atomic containers update` currently shows
`--rebase=REBASE` which is not very helpful in terms of what kind of
argument is supposed to be passed to that flag.
This change just adds a `metavar` to show that users should pass in an
image name to the `--rebase` flag.
Closes: #1204
Approved by: giuseppe
Before, we save a docker image to a tar and use docker-archive to
perform copying image to ostree. Now, we can do that easily using
`skopeo copy docker-daemon:image:latest ostree:image@/ostree/repo`.
Therefore, changing the code to utilize that.
And since now, we are considered fully migrated to using skopeo only
path, let's also refactor the skopeo checking a bit to a higher level
logic to avoid duplication
Closes: #1180
Approved by: giuseppe
Add 3 cases to verify skopeo pulling from docker to ostree works.
The 3 cases include the following:
1: pull dockertar into ostree (custom name)
2: pull dockertar into ostree (default name)
3: pull docker image into ostree(e.g: docker:image:latest)
Also added a small change to ensure checkout are existant if
no installation of containers happens prior.
Closes: #1180
Approved by: giuseppe
Based on earlier commits, the old importing layers to ostree
will become no longer useful after the introduction of new
copying docker images using skopeo.
Therefore, those two functions will get removed
Closes: #1180
Approved by: giuseppe
Before, we used the ostree copy, and the size difference between the
docker image and ostree image is minimal. However, the skopeo way
has a different way of handling image size, making the ostree image has
noticeable size difference compared to the docker image.
Therefore, to make the test pass, we will have a relaxed threshold for
virtual size difference. Since we only have the test check against one
image, we first leave the percent difference to be 4%.
Closes: #1180
Approved by: giuseppe
Originally, we only support copying images from docker to ostree using
ostree layering copy way. But that method is a lot slower in comparison to
skopeo copy. Since nowadays skopeo already start support copying
from docker-archive to ostree, let's replace that here in order to be consistent
with the previous commit. (I.e: only support skopeo and no ostree fallback)
Also, to keep the image name from docker tar to be consistent, part of
the old functionality of extracting the tarfile was reused. The name
was read from the information inside the docker tar. Therefore, the
image name is independent from the tar file name, making the name
consistent
Lastly, the logic for using skopeo copy to ostree was refactored so
it can be reused for future skopeo copying operations
Closes: #1180
Approved by: giuseppe
Based on discussion, skopeo is assumed to include support for
ostree copy from now on.
The users will now be noted to upgrade skopeo to newest version
if their skopeo version does not support copy to ostree.
For now, looks like user will be able to use skopeo copy with ostree
after version 0.1.20, so skopeo v0.1.21 should contain the feature
1d5c681f0f
Closes: #1180
Approved by: giuseppe
do not reload the list of all the images every time we check if an image
is dangling. This makes "images list" extremely slow when used on the
Docker backend.
On my system (with ~100 images), this patch brings down the wall clock
from ~10 seconds to ~0.5 seconds:
$ /usr/bin/time -v ./atomic images list -a 2>&1 | grep "wall clock"
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:09.84
to:
$ /usr/bin/time -v ./atomic images list -a 2>&1 | grep "wall clock"
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.58
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1200
Approved by: rhatdan
atomic containers update --rebase=$TO $CONTAINER attempts to pull the
image if it is missing in the repository.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1198
Approved by: rhatdan
this code was added for pulling directly from an OSTree repository. It
wasn't never really used and it expects the image to be fully exploded
in an ostree commit without supporting OCI layers.
Dropping this part also avoid confusion with what we do with Skopeo
where "ostree:" is supported both as source and destination.
Closes: https://github.com/projectatomic/atomic/issues/1193
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1197
Approved by: rhatdan
it allows to select a different OCI runtime to use with atomic run.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1196
Approved by: rhatdan
Refactor pieces related to handling container service in
do_checkout function. Again, no functionality should be impacted.
Closes: #1188
Approved by: giuseppe
In 'do_checkout' function, we tend to make symlink when prefix is not
specified. However, that has been done twice, if prefix is not specified.
Thus remove the unused logic
Closes: #1188
Approved by: giuseppe