564 Commits

Author SHA1 Message Date
05c76f739c Add default libpod config file
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
e7296152f8 Add ability to dump config to file as TOML
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
abd2ae7a0c Change conmon and runtime paths to arrays
This allows more graceful handling of multiple paths in a config
file.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
ff9da1fb3f Update containers/storage to fix locking bug
Update to commit hash 1e5ce40cdb84ab66e26186435b1273e04b879fef

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #451
Approved by: rhatdan
2018-03-06 01:15:32 +00:00
649e4f07a3 Run gofmt and lint just for one Go version
Also, "make docs" is part of "make all" so the step was being repeated.

Signed-off-by: Álex González <agonzalezro@gmail.com>

Closes: #449
Approved by: mheon
2018-03-05 18:16:25 +00:00
4f4a78abb4 networking.go tweak iptables functions
Took duplicated code and merged it into the helper function so only a single
exec was executed.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #446
Approved by: mheon
2018-03-03 19:45:24 +00:00
c187538b9e Merge pull request #444 from mheon/bump_0_3_1
Bump to v0.3.1 and v0.3.2-dev
2018-03-02 15:39:03 -05:00
bd7de5d5dd Bump to v0.3.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-02 15:38:34 -05:00
98b95ff47f Bump to v0.3.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.3.1
2018-03-02 15:38:34 -05:00
3a9977083d Merge pull request #443 from baude/iptablesdns
allow DNS resolution in containers
2018-03-02 15:29:16 -05:00
e4dca05a31 allow DNS resolution in containers
Until https://github.com/containernetworking/plugins/pull/75 is merged
upstream, we are using iptables to manually allow DNS resolution in
containers that run bridged mode networking.  We also remove the rule
in the networkwork tear down.

Resolves issue: #390

Signed-off-by: baude <bbaude@redhat.com>
2018-03-02 14:24:54 -06:00
497190db1b Adjust podman logs error message for clarity
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #441
Approved by: rhatdan
2018-03-02 19:58:15 +00:00
11143676fa Disable FFJSON for container structs
We were seeing unmarshal segfaults with it on

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #440
Approved by: baude
2018-03-02 19:20:26 +00:00
5518cd2194 Fix SQL syntax error
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #440
Approved by: baude
2018-03-02 19:20:26 +00:00
d1abdebdcd Remove unused existing IP addresses function
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #440
Approved by: baude
2018-03-02 19:20:26 +00:00
cd670ff839 Fix gofmt & golint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #440
Approved by: baude
2018-03-02 19:20:26 +00:00
02c6ba9949 Use more reliable function for parsing CNI result
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #440
Approved by: baude
2018-03-02 19:20:26 +00:00
edb1609c61 Update DB to hold CNI network information
Replace our old IP and Subnet fields in state with CNI types that
contain a lot more information. Retrieve these structs from the
CNI plugins themselves.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #440
Approved by: baude
2018-03-02 19:20:26 +00:00
29d650a379 Include error in error message
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #438
Approved by: rhatdan
2018-03-02 16:34:20 +00:00
3639859622 Instead of erroring on exit file not being found, warn
Erroring can cause us to get into an state where a container
which has no exit file cannot be shown in PS, cannot be removed,
etc.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #438
Approved by: rhatdan
2018-03-02 16:34:20 +00:00
0c4a276a04 podman logs -f: does not detect container stop or rm
If a container stops, we should stop the logging capability and
gracefully exit. However, if the container pauses, we should allow
the log to continue.

Resolves issue: #435
Signed-off-by: baude <bbaude@redhat.com>

Closes: #437
Approved by: baude
2018-03-02 15:51:58 +00:00
656840c992 test/README.md: fix path to the tests suite
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #436
Approved by: rhatdan
2018-03-02 13:41:07 +00:00
546463964e Fix issue with podman logs on fresh containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #434
Approved by: baude
2018-03-01 23:25:41 +00:00
c5dc7f81fc Replace usage of runc with runtime
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
fa5f99effa Convert exec session tracking to use a dedicated struct
This will behave better if we need to add anything to it at a
later date - we can add fields to the struct without breaking
existing BoltDB databases.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
83d7ae6506 Fix gofmt & golint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
780baec1d9 Relax locking in Exec()
This allows containers to be used by `ps` and other commands
while they have ongoing exec sessions. Concurrent exec should
also work but is not tested.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
f02a9cd975 Handle removing containers with active exec sessions
For containers without --force set, an error will be returned

For containers with --force, all pids in the container will be
stopped, first with SIGTERM and then with SIGKILL after a timeout
(this mimics the behavior of stopping a container).

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
70baafc1c7 Ensure that Cleanup() will not run on active containers
This ensures that containers with active exec sessions will not
have storage unmounted under them or network namespaces destroyed

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
8b87a17f56 Add tracking for exec session IDs
Exec sessions now have an ID generated and assigned to their PID
and stored in the database state. This allows us to track what
exec sessions are currently active.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:51 +00:00
aea4f24919 Remove now-unused runc launch code
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:50 +00:00
345bfafee2 Rework exec to enable splitting to retrieve exec PID
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:50 +00:00
2a0c949b9b Add tracking for container exec sessions to DB
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:50 +00:00
920b66707e Small fixes to container Exec
Fix an error message, and always set Privileged if the container
is also privileged.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #412
Approved by: baude
2018-03-01 21:17:50 +00:00
11091041c2 docs/podman-info.1.md update man page
update man page with example outputs.  tidy up the man page
where applicable.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #429
Approved by: rhatdan
2018-03-01 17:59:08 +00:00
cb7b0edc5b Fix checks for configuration keys in the DB
Currently, we will error if the DB is configured with the default
containers/storage config, and then opened by a libpod which has
explicitly set the defaults. This is due to us using an empty
config by default (to tell c/storage to use its defaults).

This patch changes our handling so that unset storage config
(using the default) and explicitly setting the defaults are both
compatible.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #423
Approved by: baude
2018-03-01 14:16:55 +00:00
e038393cf5 Remove unused vendor github.com/coreos/pkg
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
4e20f8c434 Remove unused vendor github.com/mrunalp/fileutils
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
2537d0dd00 Remove unused vendor gopkg.in/fsnotify.v1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
b2a5d5aa5a Remove unused vendor github.com/containerd/console
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
d6ed9451dc Remove unused dependency vendor gopkg.in/tomb.v1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
72b975ee3b Remove unused runc files
We no longer use runc code to read network I/O usage. This lets
us remove a lot of vendored code.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
b1ae92fa67 Update containers/storage
New pinned commit is 477e551dd493e5c80999d3690d3a201fd26ba2f1

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #425
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
33d63429e4 Merge pull request #428 from baude/coproutdir
copr outdir
2018-02-28 19:44:41 -06:00
17266e9c75 copr outdir
Signed-off-by: baude <bbaude@redhat.com>
2018-02-28 19:43:55 -06:00
db388c23ea Fix travis notifications
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #424
Approved by: mheon
2018-02-28 22:15:13 +00:00
fd388a7da9 podman info add registries
add registries and insecure registries to the podman info output.  this gives us
some capatibility with other container runtimes.

Resolves issue #420

Signed-off-by: baude <bbaude@redhat.com>

Closes: #422
Approved by: mheon
2018-02-28 21:26:46 +00:00
3d5cb8e223 Merge pull request #419 from baude/coprgit
Re-enable copr builds
2018-02-28 13:18:09 -06:00
45478b7843 Re-enable copr builds
New structure for copr builds which hopefully is more stable

Signed-off-by: baude <bbaude@redhat.com>
2018-02-28 13:08:35 -06:00
85ece8a01f Tweak info time format
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #397
Approved by: rhatdan
2018-02-28 18:06:50 +00:00