Add an optional --storage flag to the following commands:
- images delete
- info
- mount
- verify
- version
If specified, the command will only look at the specified storage
(ostree/docker) for the image to perform the action. If not
specified, the command will look through both ostree/docker for
the image (as it was before). However, if the storage is not
specified and the image exists in both ostree and docker, the
command will error and prompt the user to specify. Image inspection
also no longer forces the user to delete/rename one or the other.
This is meant to address the duplicate naming issue (where a user
can have an image in both ostree and docker with the same name).
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #720
Approved by: giuseppe
Several long-term issues existed for verify including some
munging of information between layers under certain
conditions. This PR addresses these issues by simplifying
the way things are to be inspected.
Example output as follows:
```
$ atomic verify docker.io/library/busybox
$ atomic verify docker.io/ubuntu
docker.io/ubuntu:latest contains the following images:
NAME LOCAL VERSION REMOTE VERSION DIFFERS
docker.io/ubuntu:latest 44776f55294a30e89d6a f753707788c5c100f194 Yes
registry.access.redhat.com/rhel7/rsyslog:latest contains the following images:
NAME LOCAL VERSION REMOTE VERSION DIFFERS
rhel7/rsyslog rhel7/rsyslog-7.2-21 rhel7/rsyslog-7.2-29 Yes
rhel7/rhel rhel7/rhel-7.2-56 rhel7/rhel-7.2-104 Yes
$
```
Closes: #714
Approved by: baude
The atomic image version subcommand was broken. Among the issues
was it called the wrong method, attempted to obtain the image
if not locally present, and outputted incorrect information. Some
of the problems were described in:
https://github.com/projectatomic/atomic/issues/708
The version method has been redone to obtain the correct information. It
no longer attempts to obtain the image if not present. It raises an
error.
Also, moved the version method into info and performed a pep8 clean up.
Example output now appears like:
```
atomic --debug version -r docker.io/busybox
IMAGE NAME VERSION IMAGE ID
10.3.11.254:5000/baude/busybox:latest None e02e811dd08f
Tag: docker.io/busybox:latest
Tag: localhost:5000/busybox:latest
atomic --debug version -r registry.access.redhat.com/rhel7/rsyslog
IMAGE NAME VERSION IMAGE ID
registry.access.redhat.com/rhel7/rsyslog:latest rhel7/rsyslog-7.2-21 53f20e902da7
registry.access.redhat.com/rhel7.2:7.2-56 rhel7/rhel-7.2-56 1a9b3357bac5
```
Closes: #710
Approved by: baude
Atomic Host variants do not have groff (and most likely never will since
it would pull in a lot of Perl packages). Print out a nicer error if
we're on AH, and make sure to skip that test.
Closes: #684
Approved by: cgwalters
Raise an error if there are more images matching the same prefix.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #683
Approved by: rhatdan
Save labels from docker manifest into ostree, so when a user invokes
'atomic version' on a system image, the metadata info is displayed,
same as docker images.
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #679
Approved by: giuseppe
Add missing interfaces.
Fix functions to return text, rather then displaying directly.
Change atomic_client.py to take input from command line. These args are translated into function calls in python.
Add tests scripts in tests/integration/dbus directory
Closes: #668
Approved by: rhatdan
Wrap atomic run/stop with systemctl start/stop for system
containers. This way the user can directly use the atomic
CLI for the full container cycle. In addition, the equivalent
functionality already exists for docker containers, so it
makes sense to allow system containers to start/stop in a
similar fashion.
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #651
Approved by: rhatdan
store the full image name, registry included, when pulling an image.
Some characters in the url are not usable for the name of an OSTree
ref, so escape them with '_'. This change breaks old images already
pulled.
use "rm -rf /ostree/repo/refs/heads/ociimage" and pull the images
again.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #620
Approved by: cgwalters
Change the status in "atomic containers list" to display systemd
state instead of runc state. This way system containers match user
containers. Another reason for the switch is that systemctl
start/stop creates/destroys a runc container every time instead of
using the same container, so systemd gives better indication of
container status.
Also expand the states to be:
- running: container is running correctly
- inactive: container is stopped/newly created and ready to run
- failed: either systemd service or container process failed
instead of just "exited" and "running" as before.
Add tests and fix to test-image originally by Giuseppe.
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #619
Approved by: giuseppe
It is useful in case of reverting to an old version. We may want to
do this automatically, without any manual intervention.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #596
Approved by: rhatdan
Interactive users or deployment systems may want to perform
configuration before starting. For example, I may want to configure
the flannel data in etcd before starting flannel.
This topic comes up a lot in the RPM/deb worlds too; most RPM
distributions are inconsistent about this, whereas Debian basically
never starts a service on package install.
I think also it's better to teach admins to use systemd for service
management directly.
(This commit also changes things so we only `enable` on initial install,
which is a minor tweak)
Closes: #584
Approved by: rhatdan
As we add more commands related to containers, IE Trim, we need to make
containers be a subcommand and add verbs like list, and trim
Closes: #579
Approved by: giuseppe
Allow images to have an additional /exports/tmpfiles.template file that
specifies what directories/files must be present on the host.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #559
Approved by: rhatdan
Change "Missing layer" to "Pulling layer" to make it look less like
an error and more like an action during "atomic pull".
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #560
Approved by: cgwalters
/var/lib/containers/atomic is for exploded containers, do not store
gomtree manifests there.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #549
Approved by: cgwalters
Now that we have a proper version tracking for the images and the
installed containers, we can skip update if the latest version is
already used.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #549
Approved by: cgwalters
Add --rootfs=ROOTFS to atomic install, which allows users to specify
an existing exploded container or existing rootfs location as ROOTFS.
The existing rootfs will be used as a read-only rootfs for the new
container to be installed, and therefore the new container would
only contain configuration files. (Note: currently all system
containers must have a read-only rootfs by default).
A use case for this would be using existing container's rootfs
through NFS, etc to serve as the rootfs for many containers running
the same image. This avoids duplicate storage of having a container
on each machine in a cluster.
A user can update only the remote container's config file parameters
with 'atomic update', and uninstalling a remote container does not
affect the rootfs specified in ROOTFS.
Closes: #527
Approved by: giuseppe
Integrate go-mtree tool into atomic CLI command, `atomic verify -V <imagename>`.
(Note that `gomtree` is still in development and thus we would need some way of
obtaining updated gomtree binaries) When a user does an atomic pull,
validation manifests for that system image's layers are created and stored in
/var/lib/atomic. When user does `atomic verify -V <system image>`, these manifests
are then validated against the image that is on disk (which would be stored in ostree).
Signed-off-by: Stephen Chung <schung@redhat.com>
Closes: #531
Approved by: rhatdan
It was broken by some recent refactoring, add some tests to catch
these cases.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #515
Approved by: cgwalters
To find the ID for an image, try in order:
1) Digest from the docker.manifest metadata
2) $SHA if $SHA in ociimage/$SHA is a valid checksum
3) OSTree commit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #506
Approved by: rhatdan
Add the following sub-commands to "atomic images list"
--all: show all images, including intermediate images
--filter: filter output based on given filters
--quiet: only display image IDs
and corresponding bash auto-complete, tests, and documentation.
Closes: #502
Approved by: rhatdan
do not fail the test if the returned labels are not in the same order as
expected.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #503
Approved by: cgwalters
gaYQToQv5ILtvl6kukQUP8msJs4JtTDULkW7fQYPwCtjhmFTbFAOFSnj0j3fnz/Q
sm8YNA2kdrtWYnbFTCR5EwA+nYoajim8OwZlVb6ewutGHpMeK6n+p9OVaTI06qfE
ZMpkJTZPzr0zT1/ysSf8SYmQMqgMOO5Z9t32jFZEpedRKNmjEjhL+aNTi2Z6XX6E
UfFYUGxBjoxkkWWSgY1zu6S6/Lq5C1vae5i+GzZc70OT2qE2i+lM9EM2JDdbiGZq
INBZKllYfbjoQE0gPsbWEghMmBMsx0vw04NVV184oCyTBhnaog5NyXmvmNgZocKU
ftUEK862t9S2MCBSg4gN0jenbQD/uhBBpRsfZFXbBwCQgiGkPC+XppN+FPAf27Ag
SoK4WWw4whgLvCK4CwuYD7XyWryWq6JHZPpqvuXjBIT1vIwmm4WBR3TG8Lx0/1Jj
Izc2hO2v+7USWjEAioDKYI7Kpllvnsb2fvvpxcWBDi7Q21pYxWXNJWZHmRYNpEZ6
EYlmoAjoBEt1iomBfHMTuwKF0vUYM9EXZ+exkQXNnQ/lQXfRZODt4gZTKKNN9Exo
6XU6RT5tZozsheKS+v0xDPWjSnlORySs8s+XrKa0KNOjM87pedwQDJcSJ3WYh7C2
483/CSCFnGBW+bbhYGbI
=tmNr
-----END PGP SIGNATURE-----
Revert "Migrate script should now work since we are after docker-1.10"
It breaks the tests suite
This reverts commit 7fcd49ebdd.
Closes: #497
Approved by: jlebon