1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 03:45:28 +01:00

18 Commits

Author SHA1 Message Date
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
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
Giuseppe Scrivano
25a5a15a31 util.py: add function for retrieving the known proc capabilities
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1119
Approved by: ashcrow
2017-10-26 13:38:40 +00:00
Steve Milner
2760e30296 Atomic/util.py: Add no_proxy
http_proxy and https_proxy are currently supported in /etc/atomic.conf.
This change adds no_proxy support. no_proxy is for urls which should
not go through a proxy.

Closes: #999
Approved by: baude
2017-05-13 00:47:55 +00:00
Brent Baude
12d674f26e util: Don't try to create directories at module import time
We shouldn't do anything at module import time, as that happens during builds,
where we don't want to touch the host system (and may not have privileges to do
so).

This required some refactoring of the locking code too, as simply
instantiating the decorator was creating files too.

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

Closes: #966
Approved by: rhatdan
2017-04-13 19:29:39 +00:00
Brent Baude
1b216a4919 Atomic/install.py: Record installs for later use
When installing an image, we now write a small bit of json
to /var/lib/atomic/install.json.  The json format is:

{
	<image_name>: {
			     id: <image_id>,
			     install_date: <install_date_in_utc
			 }
}

This will be used in update, run, etc to ensure that any image
with an INSTALL label is first installed.

Closes: #950
Approved by: giuseppe
2017-03-28 19:10:57 +00:00
Aaron Weitekamp
df95392e3b fix re module bug
Closes: #891
Approved by: rhatdan
2017-02-14 15:14:13 +00:00
Brent Baude
edb87bfdea Fixup trust tests
There is a python bug that in 2.7.5 that is causing
the unittest failures on centos_atomic.  The bug
is related to how regex is compiled and used.

Adding a simple decorator to skip tests that fail
because of that in the trust tests.

Closes: #848
Approved by: baude
2017-01-25 21:15:34 +00:00
Aaron Weitekamp
8df71d7c6a extend image URI validation
Closes: #819
Approved by: rhatdan
2017-01-10 15:49:28 +00:00
Aaron Weitekamp
6dfc3ccd87 Validate reg input to trust add cmd
Signed-off-by: Aaron Weitekamp <aweiteka@redhat.com>

Closes: #816
Approved by: rhatdan
2017-01-09 13:58:16 +00:00
Jonathan Lebon
75726671d8 test_util.py: adapt for newer sepolicies
In Fedora 25, the default container context changed to
'container_file_t'. Adapt the unit test accordingly.

Closes: #766
Approved by: rhatdan
2016-11-22 19:27:43 +00:00
Brent Baude
4aa4318c29 decompose: Add ability to decompose image w/digest
Adding the ability to decompose an input image "name" that
includes a digest. For example:

docker.io/library/fedora@sha256:64a02df6aac27d1200c2572fe4b9949f1970d05f74d367ce4af994ba5dc3669e

Also, reword the decompose method in a Decompose class.  This simplifies the use of
decomposition and allows for growth.

Example usage:
   registry, repo, image, tag, digest = Decompose("docker.io/library/busybox:latest").all
   repo = Decompose("docker.io/library/busybox:latest").repo
   digest = Decompose("docker.io/fedora@sha256:64a02df6aac27d1200c2...67ce4af994ba5dc3669e").digest

Closes: #701
Approved by: rhatdan
2016-10-13 12:23:37 +00:00
Brent Baude
adc8956f50 Allow pull from registry not in docker conf
We now allow pulls from registries that are not in
the docker configuration file.  This altered our
decompose method a bit.  We now check the registry
in decompose to see if it resolves on the network.
If so, then we use it.

Closes: #693
Approved by: baude
2016-10-11 13:23:58 +00:00
Brent Baude
e83c2c5dd8 Atomic.util: More robust decompose
Colleagues asked for decompose to be improved to where it took
an image name and broke it into registry, repo, image, and tag.
It also should mimic docker's implementation where 'library' is a known
exception

Also added unittests for decompose.  Removed a singular glob  test
as it is no longer valid

Closes: #677
Approved by: rhatdan
2016-10-05 17:00:11 +00:00
Giuseppe Scrivano
018aee2175 util: improve error message when the file does not exist
We hit this a few times when trying to execute system containers on a
system without runc installed.

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

Closes: #529
Approved by: rhatdan
2016-08-10 15:08:33 +00:00
Dan Walsh
b700c5afad Should not prepend dock* 2015-11-16 17:15:42 -05:00
William Temple
6bf94dd979 Allow arbitrary files in test images.
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-21 16:38:04 -04:00
William Temple
844cc4512d New test framework.
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-10 14:09:37 -04:00