1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-05 09:44:59 +01:00

1749 Commits

Author SHA1 Message Date
Daniel J Walsh
d5f3f19c4f Merge pull request #1261 from rhatdan/master
Deprecate atomic and point users at Podman
2020-10-09 13:47:49 -04:00
Daniel J Walsh
587408052a Update README.md
Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
2020-10-09 13:47:09 -04:00
Daniel J Walsh
32003bc470 Update README.md
Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
2020-10-09 13:46:38 -04:00
Daniel J Walsh
2a0ea859e8 Deprecate atomic and point users at Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-09 09:30:54 -04:00
Giuseppe Scrivano
b507039153 atomic: honor UNINSTALL after stop of a container
Honor the UNINSTALL label after the specified container was stopped.

Introduced by: 18959843d5

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1576285

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1242
Approved by: rhatdan
2018-06-28 07:48:53 +00:00
Giuseppe Scrivano
4cf54d1e7a syscontainers: use XDG_DATA_HOME instead of XDG_DATA_DIR
Adapt to the change of location in podman and buildah.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1243
Approved by: rhatdan
2018-06-28 07:48:44 +00:00
Giuseppe Scrivano
6ce51fd4ec tests: skip system containers test if skopeo copy to ostree fails
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1244
Approved by: rhatdan
2018-06-27 13:19:55 +00:00
Giuseppe Scrivano
88d476b1f0 papr.sh: use Fedora 28
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1244
Approved by: rhatdan
2018-06-27 13:19:55 +00:00
Giuseppe Scrivano
c209b79543 Vagrantfile: update to f28
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1244
Approved by: rhatdan
2018-06-27 13:19:55 +00:00
Giuseppe Scrivano
5a342e32cd docker: restore uninstall when no container name is specified
write_install does not write twice the same container id/name.

Closes: https://github.com/projectatomic/atomic/issues/1217

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1219
Approved by: rhatdan
2018-06-11 18:50:58 +00:00
Giuseppe Scrivano
f37679eb93 syscontainers: honor XDG_DATA_DIR when specified
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1240
Approved by: rhatdan
2018-06-09 11:31:54 +00:00
Daniel J Walsh
fd92a389bc Merge pull request #1239 from giuseppe/skopeo-error-full
util: if the Skopeo error is empty, print the full stderr
2018-06-08 05:07:10 -04:00
Giuseppe Scrivano
f6617611ca util: if the Skopeo error is empty, print the full stderr
Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1583731

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-07 23:32:57 +02:00
Giuseppe Scrivano
18959843d5 atomic: uninstall checks for container existance before rm'ng it
a container might be deleted by the stop label, if it was started with
--rm.  Check for its presence before attempting to delete it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1576285

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1235
Approved by: rhatdan
2018-05-10 16:46:30 +00:00
Giuseppe Scrivano
e045e8baef syscontainers: --user uses runc by default
bwrap-oci can still be used with the --runtime option.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1226
Approved by: rhatdan
2018-04-26 15:55:43 +00:00
Giuseppe Scrivano
31f47af1f7 syscontainers: configure the user namespace for the user case
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
2018-04-26 15:55:43 +00:00
Giuseppe Scrivano
32084fe7f4 syscontainers: use --rootless for the default user spec file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1226
Approved by: rhatdan
2018-04-26 15:55:43 +00:00
Giuseppe Scrivano
1544f0d208 syscontainers: do not use systemd cgroups for the user case
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1226
Approved by: rhatdan
2018-04-26 15:55:43 +00:00
Giuseppe Scrivano
60fe095ca5 overlay: reintroduce error when using 'rw'
the error message was mistakenly dropped with commit:

7179eab364

Closes: https://github.com/projectatomic/atomic/issues/1222

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1223
Approved by: rhatdan
2018-04-19 10:04:10 +00:00
Giuseppe Scrivano
b9d4ef7a07 tests: skip test_storage.sh if there are no extents available
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1227
Approved by: jlebon
2018-04-18 12:21:20 +00:00
Giuseppe Scrivano
c029f84495 papr: use Fedora 27
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1227
Approved by: jlebon
2018-04-18 12:21:20 +00:00
Giuseppe Scrivano
ee63a4be01 docker: propagate args from uninstall to stop
so that it is possible to uninstall a running container:

Closes: https://github.com/projectatomic/atomic/issues/1221

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1229
Approved by: rhatdan
2018-04-16 17:53:26 +00:00
Giuseppe Scrivano
b5c4a37ff6 util: correctly set the error from Skopeo
$ atomic install --system --system-package=no registry.fedoraproject.org/f28/etcd
Error reading manifest latest in registry.fedoraproject.org/f28/etcd: manifest unknown: manifest unknown

Closes: https://github.com/projectatomic/atomic/issues/1224

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1228
Approved by: rhatdan
2018-04-16 16:39:45 +00:00
Micah Abbott
2fd08606a9 containers: fix feedback when deleting containers
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
2018-03-30 13:20:12 +00:00
Giuseppe Scrivano
6820f8f3b5 install: avoid several races with file lock
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
2018-03-27 13:06:11 +00:00
Giuseppe Scrivano
ba23e76924 install: support multiple containers per image
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
2018-03-27 13:06:11 +00:00
Dirk Boye
119f1236bb Do not call any selinux methods if selinux is disabled
Closes: #1213
Approved by: giuseppe
2018-03-27 12:26:54 +00:00
Giuseppe Scrivano
56c32aeca3 install: hide warning if --system or --user is used
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
2018-03-26 13:19:54 +00:00
Giuseppe Scrivano
ab5453da97 dockertar-sha256-helper: drop it
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
2018-03-24 15:46:55 +00:00
Steve Milner
490ba97c80 syscontainers: Add more docstrings
Signed-off-by: Steve Milner <smilner@redhat.com>

Closes: #1210
Approved by: giuseppe
2018-03-14 17:22:46 +00:00
Eldar Yusupov
21c11ebdc6 syscontainers: use util.Decompose in _parse_imagename
It also fixes an issue with incorrectly parsing postgres:9.6
as (postgres:9.6, postgres, 9:6).

Closes: #1206
Approved by: giuseppe
2018-03-13 10:44:22 +00:00
Micah Abbott
a8bace279c containers: add metavar for rebase option
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
2018-03-09 06:24:49 +00:00
Ruixin Bao
634368ad94 syscontainer: add skopeo copy for docker-daemon
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
2018-03-02 15:21:32 +00:00
Ruixin Bao
c1676437b2 test: add pull test to verify skopeo
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
2018-03-02 15:21:32 +00:00
Ruixin Bao
e97d3f7935 syscontainer: remove unused functions
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
2018-03-02 15:21:32 +00:00
Ruixin Bao
0fc987e8c2 test/syscontainer: relax the virtual size check between images
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
2018-03-02 15:21:32 +00:00
Ruixin Bao
9e12c96105 syscontainer: replace docker to ostree copy method
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
2018-03-02 15:21:32 +00:00
Ruixin Bao
de5b1d527c syscontainer: remove of fallback version of skopeo
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
2018-03-02 15:21:32 +00:00
Ruixin Bao
6a3bb3fb46 syscontainer: let uninstall fail when name specified
Based on discussion https://github.com/projectatomic/atomic/issues/1199#issuecomment-369153184,
we want to disallow user to specify --name option for uninstalling system containers.

Instead, we should encourage user to delete container using atomic
containers delete or atomic uninstall NAME.

Closes: https://github.com/projectatomic/atomic/issues/1199

Closes: #1202
Approved by: giuseppe
2018-03-02 08:45:26 +00:00
Giuseppe Scrivano
83fce8f33a images: add cache for dangling images
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
2018-02-28 14:42:34 +00:00
Giuseppe Scrivano
ca5d43a5fe syscontainers: rebase pulls the image when missing
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
2018-02-27 11:33:31 +00:00
Giuseppe Scrivano
873f0b6aaf syscontainers: drop pull from a remote ostree
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
2018-02-26 13:57:52 +00:00
Giuseppe Scrivano
d9fd59d547 docs, install: fix path for runc and bwrap-oci
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1196
Approved by: rhatdan
2018-02-23 15:15:05 +00:00
Giuseppe Scrivano
df2c209c27 run: add option --runtime
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
2018-02-23 15:15:05 +00:00
Brent Baude
d36c015e7e Merge pull request #1192 from baude/1.22
1.22
v1.22
2018-02-21 08:13:33 -06:00
baude
a0dcf85d15 1.22
Signed-off-by: baude <bbaude@redhat.com>
2018-02-21 08:12:31 -06:00
Ruixin Bao
aae6249aa5 syscontainer: refactor container service part in do_checkout
Refactor pieces related to handling container service in
do_checkout function. Again, no functionality should be impacted.

Closes: #1188
Approved by: giuseppe
2018-02-20 16:06:50 +00:00
Ruixin Bao
c8dbbd866f syscontainer: remove unused logic
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
2018-02-20 16:06:50 +00:00
Ruixin Bao
5e9ed74858 syscontainer: small refactor for getting exports
Refactor the part that we get the exports path. No
functionality change should happen

Closes: #1188
Approved by: giuseppe
2018-02-20 16:06:50 +00:00
Giuseppe Scrivano
6ce83c45e5 syscontainers: raise an error when run --name= is used
It is not supported by the OSTree storage.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1186
Approved by: baude
2018-02-19 16:03:47 +00:00