1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-05 18:45:01 +01:00
Commit Graph

561 Commits

Author SHA1 Message Date
Joe 'Zonker' Brockmeier
e79708d88d Rename COPYING to LICENSING
Propose changing to LICENSING to prevent confusion.
2016-04-13 17:48:42 -04:00
Daniel J Walsh
fcada952a2 Merge pull request #342 from rhatdan/docker-latest
Allow user to specify alternative docker executables.
2016-04-13 10:32:16 -04:00
Dan Walsh
ddc8dd68f0 Allow user to specify alternative docker executables.
This will allow us to support docker-latest
2016-04-13 08:53:19 -04:00
Daniel J Walsh
4299cbc273 Merge pull request #343 from baude/atomic_scanner_custom_args
Atomic/scan.py: Custom docker args
2016-04-13 07:48:17 -04:00
Brent Baude
d9347d048b Atomic/scan.py: Custom docker args
Added the ability to define custom docker args in the plugin
configuration files for things like bind mounting dirs from
the host to the scanner image.

When parsing the atomic scan json files, we can now handle
'Vulnerabilities' or 'Results' for keys.

Added a --debug switch to the base atomic command to allow for
more specifics when an unwanted exception is raised.

Fixed minor bug where if no image/container is provided, the
scanner would still execute.
2016-04-12 15:18:02 -05:00
Dan Walsh
8dd63e4336 install openscap config in /etc/atomic.d
Closes: #341
Approved by: rhatdan
2016-04-07 14:56:41 +00:00
Colin Walters
7eb2f72867 CONTRIBUTING.md: New file
Closes: #278

Closes: #337
Approved by: cgwalters
2016-04-07 14:45:39 +00:00
Daniel J Walsh
32819dc913 Merge pull request #330 from baude/atomic_new_scan
Implement generic scanning in Atomic
2016-04-07 10:40:09 -04:00
Brent Baude
6ed4994b0d Implement generic scanning in Atomic
As more scanners besides openscap become available, atomic
can now begin to leverage them.  The new scan function has
been broken out into its on file (scan.py).

The scan command itself now defaults to openscap but can
also be switched to blackduck with --scanner.

Atomic now can use a configuration file which is stored
in /etc/atomic.conf.  The location of the atomic conf
file can be overriden with the environment variable
'ATOMIC_CONF'.  In the case of the scan function,
we need the scanner defined in the configuration file
as well as the fully qualified image name and the
scan arguments.  Optionally, you can provide additional
custom docker arguments for the scanner as well
2016-04-07 09:33:00 -05:00
Daniel J Walsh
7b244d5796 Merge pull request #340 from baude/atomic_no_docker
Atomic/top.py Make sure dockerd is running
2016-04-07 10:09:40 -04:00
Brent Baude
48767a4f4d Atomic/top.py Make sure dockerd is running
Using self.ping(), we now check to make sure the docker
daemon is running before executing any code to display
atomic top.

This fixes a followup bug reported in:

https://bugzilla.redhat.com/show_bug.cgi?id=1300187#c5
2016-04-07 08:08:39 -05:00
Daniel J Walsh
93cb8d9e01 Fix shell expansion on commands.
Prior to dropping shell=true, shell expansion on run/install/uninstall was

working, now we break in the case of a command like



LABEL INSTALL 'bash -c "echo foo foo foo"'



Adding shlex.split rather then standard split will break this command into

['bash', '-c', '"echo foo foo foo"']



Which will be executed correctly.
2016-04-05 10:54:41 -04:00
Daniel J Walsh
1241a24876 Merge pull request #335 from cgwalters/host-unlock
host: Pass through unlock -> ostree admin unlock
2016-04-04 12:00:17 -04:00
Colin Walters
1365590b9f host: Pass through unlock -> ostree admin unlock
It's nicer for branding the command.  The more correct thing would be
to add it to the rpm-ostree daemon and pass through there, but we have
more important problems to fix for the production code path.  This is
just for local development, so the slightly dirty way is just fine.
2016-04-04 11:25:03 -04:00
Daniel J Walsh
cd1db7d82f Merge pull request #322 from baude/skopeo_qualified
Use fully-qualified image name in info() and verify()
2016-03-30 10:09:05 -04:00
Brent Baude
d67849a602 Use fully-qualified image name in info() and verify()
We now use the fully qualified image name (if not provided)
when dealing with atomic info and verify.  This is because
skopeo requires a fq image name to do remote inspection. As
an upside, it also makes atomic a little more user friendly
as well.

tests/integration/test_info.sh

Temporarly disabled a test due to an issue with skopeo
2016-03-21 09:05:28 -05:00
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