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

545 Commits

Author SHA1 Message Date
Daniel J Walsh
72cdbef973 Merge pull request #325 from rhatdan/tests
Add new test to make sure printenv passed into container correctly
v1.9
2016-03-10 17:04:52 -05:00
Dan Walsh
768c2fabe8 Add new test to make sure printenv passed into container correctly 2016-03-10 16:46:24 -05:00
Daniel J Walsh
7182ea5e67 Merge pull request #326 from rhatdan/PWD
Set PWD environment if not currently set
2016-03-10 16:41:57 -05:00
Dan Walsh
1f9ec454c7 Set PWD environment if not currently set 2016-03-10 14:39:12 -05:00
Daniel J Walsh
4d87e07376 Merge pull request #320 from tuxdna/master
Coding Convention: E251 unexpected spaces around keyword / parameter equals
2016-03-10 14:04:08 -05:00
Saleem Ansari
abe80af59a Coding Convention: E251 unexpected spaces around keyword / parameter equals 2016-03-11 00:18:01 +05:30
Daniel J Walsh
3bb98f07bb Merge pull request #324 from rhatdan/python3
Fixes for running atomic on python3
2016-03-10 11:44:30 -05:00
Dan Walsh
39251596ea Fixes for running atomic on python3 2016-03-10 09:23:15 -05:00
Daniel J Walsh
ff44c6a949 Merge pull request #321 from baude/atomic_better_error_handling
Improve error handling with the docker-py client
2016-03-08 10:19:34 -05:00
Brent Baude
84e8a8fd74 Improve error handling with the docker-py client
In python-docker-py-1.6, the error handling improved
significantly.  When a docker object cannot be found,
say with client.inspect(), it now throws a specific
exception called NotFound instead of the old, generic
Docker error.  We have now updated some of our functions
to use the specific error because it was 'covering' other
docker client failures such as API compatibilies.

Also added a new custom Error class to handle a common
error message we used repeatidly.  The new class is
called 'DockerObjectNotFound' and will output a
consistent messages and takes the dockerobject as input.
This is most commonly used when we verify the users'
input for validity and is different that the docker
client NotFound error.
2016-03-08 08:54:18 -06:00
Daniel J Walsh
ce12128cf3 Merge pull request #316 from baude/atomic_top_no_containers
Atomic/top.py - Fix when specifying container names or ids
2016-03-04 16:04:25 -05:00
Daniel J Walsh
5c7585e7f8 Merge pull request #317 from baude/atomic_diff_rpm_versions
Atomic/diff.py Add release to version, name, and epoch of RPM
2016-03-04 16:04:12 -05:00
Brent Baude
dcbe9b5b92 Atomic/diff.py Add release to version, name, and epoch of RPM
When an RPM diff was performed between two docker objects, we
previously only store the name, version, and epoch of the RPM for
comparision.  It turns out versioning information is also done in
the release portion as well.

This addresses https://github.com/projectatomic/atomic/issues/315
2016-03-04 14:36:51 -06:00
Brent Baude
7c98bb39ea Atomic/diff.py Add release to version, name, and epoch of RPM
When an RPM diff was performed between two docker objects, we
previously only store the name, version, and epoch of the RPM for
comparision.  It turns out versioning information is also done in
the release portion as well.

This addresses https://github.com/projectatomic/atomic/issues/315
2016-03-04 14:32:53 -06:00
Brent Baude
0c68129440 Atomic/top.py - Fix when specifying container names or ids
Atomic top was broken when you passed it valid container names
or ids.  This is now fixed plus added a simple check for validate
that the names or ids are correct.

This addresses https://github.com/projectatomic/atomic/issues/314
2016-03-04 14:18:14 -06:00
Daniel J Walsh
9f801bb478 Merge pull request #309 from baude/unify_error_msgs
Unify error messages for no docker daemon (BZ #1300187)
2016-03-02 10:47:33 -05:00
Daniel J Walsh
d55419ea47 Merge pull request #311 from baude/atomic_diff_man_fix
Atomic diff man fix
2016-03-01 17:17:03 -05:00
Brent Baude
5da12a0e23 docs/atomic-diff.1.md --no-files fix
Fixing a minor mistake in the man page for atomic diff.
2016-03-01 11:07:32 -06:00
Brent Baude
be0b56c616 Unify error messages for no docker daemon (BZ #1300187)
In the case where the docker daemon is not running, each
Atomic subcommand was returning a different error message. This
PR unifies the errors messages for each subcommand.

This work was done for Bugzilla #1300187
2016-02-23 15:45:40 -06:00
Dan Walsh
a24621ecb3 Bump atomic to atomic-1.9 2016-02-22 14:51:41 -05:00
Jonathan Lebon
d14c26ba39 Merge pull request #308 from baude/verify_test_file
test_verify.sh: Actually add the file
2016-02-18 09:39:20 -05:00
Brent Baude
266deac814 test_verify.sh: Actually add the file
I forgot to add the actual test script in my
previous commit. Apologies.
2016-02-18 08:18:33 -06:00
Daniel J Walsh
0550960cb2 Merge pull request #307 from baude/verify_test
Add test for atomic verify
2016-02-17 17:37:43 -05:00
Brent Baude
3f2cec13b6 Add test for atomic verify
Added a test case to test for failure when an image has
multiple repotags and is asked to be verified by image
id.  This should result in a failure.

Also, turned verify debug off.
2016-02-17 14:38:26 -06:00
Daniel J Walsh
3b6683d81f Merge pull request #306 from baude/verify_name
Fix verify where an image is tagged more than once
2016-02-17 15:10:33 -05:00
Brent Baude
853dd872f3 Fix verify where an image is tagged more than once
In the case where an image was tagged more than once, atomic
verify would sometimes resolve the wrong fully qualified name
due to an ordering issue in one of the supporting functions.
2016-02-17 13:46:16 -06:00
Daniel J Walsh
5abdba16fb Merge pull request #303 from baude/atomic_autoversion
Atomic/client.py: Universal method for docker.Client()
2016-02-16 15:40:08 -05:00
Jonathan Lebon
77a6dd6f00 Merge pull request #305 from shishir-a412ed/disable_test_migrate
disable test_migrate.sh for atomic migrate command
2016-02-16 14:23:51 -05:00
Shishir Mahajan
d1a2eb287e disable test_migrate.sh for atomic migrate command
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-02-16 14:12:12 -05:00
Jonathan Lebon
a85d04b5d4 Merge pull request #304 from baude/help_test
Atomic/help.py: cmd_env no longer a property
2016-02-16 12:27:36 -05:00
Brent Baude
570ee912bd Atomic/help.py: cmd_env no longer a property
When the cmd_env defition had its property decorator removed,
a single call to cmd_env in help.py was missed.
2016-02-16 11:11:13 -06:00
Brent Baude
b09a1bc4d0 Atomic/client.py: Universal method for docker.Client()
All uses of docker.Client() (docker-py) now should be using
the DockerClient definition in client.py.  Any changes to the
client instantiation or function can now be changed in a
singular location.

Also, the DockerClient function has a fallback from
docker.AutoVersionClient to docker.Client using a try and
except condition.  This fixes an issue raised in:

https://github.com/projectatomic/atomic/issues/302

where atomic cannot be built due to imports when dockerd is not
running.
2016-02-16 10:41:19 -06:00
Daniel J Walsh
01bf0e0900 Merge pull request #300 from giuseppe/fix-make-f23
Atomic/atomic.py: Fix pylint error
2016-02-08 09:32:07 -05:00
Giuseppe Scrivano
d79ab6a970 Atomic/atomic.py: Fix pylint error
cmd_env is not a property, remove the decorator.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-02-08 14:44:43 +01:00
Daniel J Walsh
6f92d67bb9 Merge pull request #296 from rhatdan/master
We are not calling self.cmd_env just passing the function
2016-02-05 13:40:33 +01:00
Daniel J Walsh
3419fc2cbc Merge pull request #294 from shishir-a412ed/container_name_issue
atomic migrate: Add support for docker 1.10
2016-02-05 13:31:02 +01:00
Daniel J Walsh
9efaba438b Merge pull request #297 from baude/atomic_verify_skopeo
Removal of remote inspection from docker
2016-02-04 07:29:19 +01:00
Brent Baude
5cc1d0dd09 Removal of remote inspection from docker
We stopped carrying a patch in docker that allows for a RESTFUL
probe of remote registries.  This function is being replaced
by a new package called skopeo.

The remote_inspection def was removed from the Docker.Client
class extension in atomic.py and is replaced by a def called
util.skopeo which returns the same json-based results.
2016-02-02 13:00:59 -06:00
Shishir Mahajan
299fe3b90c atomic migrate: Add support for docker 1.10
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-02-02 11:16:53 -05:00
Dan Walsh
4d961c4417 We are not calling self.cmd_env just passing the function
This actually calls the function to setup the environment.
2016-02-01 04:29:20 +01:00
Daniel J Walsh
43bebd5647 Merge pull request #292 from TomasTomecek/use-autoversion-client
use docker.AutoVersionClient to avoid API version mismatch
2016-02-01 04:10:25 +01:00
Tomas Tomecek
4eec706716 use docker.AutoVersionClient to avoid API version mismatch
400 Client Error: Bad Request ("client is newer than server (client API version: 1.21, server API version: 1.20)")

AutoVersionClient is in docker-py since 1.1:
https://github.com/docker/docker-py/blob/master/docs/change_log.md#110

Logic around features available in docker engine since version X is very
well defined in docker-py: it won't allow you to use a feature if it's
not available in docker daemon, e.g.:
9b3b096709/docker/api/exec_api.py (L12)
2016-01-30 12:02:55 +01:00
Daniel J Walsh
c893521978 Merge pull request #288 from baude/atomic_harden_shell
atomic: harden shell invocations (1248038)
2016-01-29 14:43:57 -05:00
Brent Baude
d81e7e651e atomic: harden shell invocations (1248038)
This addresses one of the two issues raised by bugzilla
1248038 where atomic is using shell=True on its subprocess
calls which exposes a security concern.

Two new functions were added to accomplish this.  The
first is a util.chk_call which is similar to util.subp
but it uses the python function check call instead of
Popen.

The second function is atomic.sub_env_strings.  Previously,
there was env variable substitution occuring with cmd_env and
the subprocess call.  That was one upside of the shell=True
usage.  Now, prior to calling util.chk_call, we pass the
intended command to sub_env_strings and use cmd_env to
perform the variable substitution.

We will address part 2 of the security concerns, which
is the handling of LABELS as strings, in a different
PR.
2016-01-29 13:32:22 -06:00
Daniel J Walsh
b585b2343d Merge pull request #295 from shishir-a412ed/run_gotar_issue
Bugzilla: 1284877: fixes run/gotar issue
2016-01-29 10:49:22 -05:00
Shishir Mahajan
6adcff1aef Bugzilla: 1284877: fixes run/gotar issue
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-01-29 10:21:40 -05:00
Daniel J Walsh
1bc38149cd Merge pull request #291 from rhatdan/master
Remove egg-info
2016-01-26 09:39:03 -05:00
Colin Walters
ce46625ffe Merge pull request #293 from jlebon/pr/security-msgs
Atomic/run.py: rewrap security helper strings
2016-01-25 16:48:11 -05:00
Jonathan Lebon
b7b975b2c5 Atomic/run.py: rewrap security helper strings
I noticed at least one spacing issue on the latest el7 build in those
outputs. This patch reworks the layout of the strings so that it's
easier to read in the source code and to make sure that there are no
spacing issues.

Text is exactly the same, other than fixing spacing and changing "hosts
network" to "host's network".
2016-01-25 16:09:41 -05:00
Dan Walsh
03f8e94871 Remove egg-info
We want to remove this because of issues discussed in this:

https://github.com/projectatomic/atomic/issues/268
https://github.com/projectatomic/atomic/pull/180
2016-01-25 12:40:58 -05:00