summaryrefslogtreecommitdiff
path: root/libpod
Commit message (Collapse)AuthorAge
* attach: move cgo bits to a different fileGiuseppe Scrivano2019-07-02
| | | | | | move the cgo bits to a separate file to allow building without cgo. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #3324 from marcov/detach-keys-configurableOpenShift Merge Robot2019-07-01
|\ | | | | libpod: specify a detach keys sequence in libpod.conf
| * libpod: fix hang on container start and attachMarco Vedovati2019-06-26
| | | | | | | | | | | | | | | | | | | | When a container is attached upon start, the WaitGroup counter may never be decremented if an error is raised before start, causing the caller to hang. Synchronize with the start & attach goroutine using a channel, to be able to detect failures before start. Signed-off-by: Marco Vedovati <mvedovati@suse.com>
| * libpod: specify a detach keys sequence in libpod.confMarco Vedovati2019-06-26
| | | | | | | | | | | | Add the ability of specifying a detach keys sequence in libpod.conf Signed-off-by: Marco Vedovati <mvedovati@suse.com>
* | Merge pull request #3422 from nalind/no-layer-imagesOpenShift Merge Robot2019-06-28
|\ \ | | | | | | Handle images which contain no layers
| * | Handle images which contain no layersNalin Dahyabhai2019-06-26
| | | | | | | | | | | | | | | | | | | | | This fixes some of our handling of images which have no layers, i.e., those whose TopLayer is set to an empty value. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | | rootless: enable linger if /run/user/UID not existsGiuseppe Scrivano2019-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at least on Fedora 30 it creates the /run/user/UID directory for the user logged in via ssh. This needs to be done very early so that every other check when we create the default configuration file will point to the correct location. Closes: https://github.com/containers/libpod/issues/3410 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #3442 from baude/removelibpodfrommainphase2OpenShift Merge Robot2019-06-27
|\ \ \ | | | | | | | | libpod removal from main (phase 2)
| * | | libpod removal from main (phase 2)baude2019-06-27
| |/ / | | | | | | | | | | | | | | | this is phase 2 for the removal of libpod from main. Signed-off-by: baude <bbaude@redhat.com>
* | | runtime: do not attempt to use global conf fileGiuseppe Scrivano2019-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | we had a regression where the rootless user tried to use the global configuration file. We should not try to use the global configuration when running in rootless but only cherry-pick some settings from there when creating the file for the first time. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | runtime: use GetRootlessUID() to get rootless uidGiuseppe Scrivano2019-06-27
| | | | | | | | | | | | | | | | | | otherwise it won't work in a user namespace. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #3429 from cevich/strip_crio_conmonOpenShift Merge Robot2019-06-27
|\ \ \ | |/ / |/| | Remove refs to crio/conmon
| * | Remove refs to crio/conmonChris Evich2019-06-26
| | | | | | | | | | | | | | | | | | | | | | | | Conmon has moved out of cri-o and into it's own dedicated repository. This commit updates configuration and definitions which referenced the old cri-o based paths. Signed-off-by: Chris Evich <cevich@redhat.com>
* | | stats: fix cgroup path for rootless containersGiuseppe Scrivano2019-06-26
| | | | | | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | libpod: use pkg/cgroups instead of containerd/cgroupsGiuseppe Scrivano2019-06-26
| |/ |/| | | | | | | | | use the new implementation for dealing with cgroups. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #3419 from baude/removelibpodfrommainphase1OpenShift Merge Robot2019-06-26
|\ \ | | | | | | remove libpod from main
| * | remove libpod from mainbaude2019-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the compilation demands of having libpod in main is a burden for the remote client compilations. to combat this, we should move the use of libpod structs, vars, constants, and functions into the adapter code where it will only be compiled by the local client. this should result in cleaner code organization and smaller binaries. it should also help if we ever need to compile the remote client on non-Linux operating systems natively (not cross-compiled). Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #3417 from mheon/fix_play_kube_portsOpenShift Merge Robot2019-06-25
|\ \ \ | |_|/ |/| | Only include ports in one container in Kube YAML
| * | Only include ports in one container in Kube YAMLMatthew Heon2019-06-24
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This likely broke when we made containers able to detect that they shared a network namespace and grab ports from the dependency container - prior to that, we could grab ports without concern for conflict, only the infra container had them. Now, all containers in a pod will return the same ports, so we have to work around this. Fixes #3408 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #3332 from rhatdan/cgroupmanagerOpenShift Merge Robot2019-06-25
|\ \ | | | | | | Correctly identify the defaults for cgroup-manager
| * | Correctly identify the defaults for cgroup-managerDaniel J Walsh2019-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we report cgroupmanager default as systemd, even if the user modified the libpod.conf. Also cgroupmanager does not work in rootless mode. This PR correctly identifies the default cgroup manager or reports it is not supported. Also add homeDir to correctly get the homedir if the $HOME is not set. Will attempt to get Homedir out of /etc/passwd. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #3401 from mheon/templating_is_dumbOpenShift Merge Robot2019-06-25
|\ \ \ | |_|/ |/| | Fix inspect --format '{{.Mounts}}.
| * | Fix gofmtMatthew Heon2019-06-21
| | | | | | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
| * | Adjust names to match struct tags in InspectMatthew Heon2019-06-21
| | | | | | | | | | | | | | | | | | | | | | | | In Go templating, we use the names of fields, not the JSON struct tags. To ensure templating works are expected, we need the two to match. Signed-off-by: Matthew Heon <mheon@redhat.com>
| * | Fix inspect --format '{{.Mounts}}.Matthew Heon2019-06-21
| | | | | | | | | | | | | | | | | | | | | | | | Go templating is incapable of dealing with pointers, so when we moved to Docker compatible mounts JSON, we broke it. The solution is to not use pointers in this part of inspect. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Merge pull request #3412 from mheon/fix_ps_sync_segfaultOpenShift Merge Robot2019-06-24
|\ \ \ | | | | | | | | Fix a segfault in 'podman ps --sync'
| * | | Fix a segfault in 'podman ps --sync'Matthew Heon2019-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't properly populating the container's OCI Runtime in Batch(), causing segfaults on attempting to access it. Add a test to make sure we actually catch cases like this in the future. Fixes #3411 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | | rootless: add an entry to /etc/hosts when using slirp4netnsGiuseppe Scrivano2019-06-24
|/ / / | | | | | | | | | | | | | | | Closes: https://github.com/containers/libpod/issues/3405 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #3399 from astronouth7303/patch-1OpenShift Merge Robot2019-06-22
|\ \ \ | | | | | | | | Add /usr/local/{s,}bin to conmon paths
| * | | runtime.go: Add /usr/local/{s,}binJamie Bliss2019-06-21
| |/ / | | | | | | | | | Signed-off-by: Jamie Bliss <jamie@ivyleav.es>
* / / Add additional debugging when refreshing locksMatthew Heon2019-06-21
|/ / | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Merge pull request #3378 from mheon/multiple_runtimesOpenShift Merge Robot2019-06-21
|\ \ | | | | | | Begin adding support for multiple OCI runtimes
| * | Properly initialize container OCI runtimeMatthew Heon2019-06-20
| | | | | | | | | | | | | | | | | | | | | Use name of the default runtime, instead of the OCIRuntime config option, which may include a full path. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Handle containers whose OCIRuntime fields are pathsMatthew Heon2019-06-20
| | | | | | | | | | | | | | | | | | | | | Try and locate the right runtime by using the basename of the path. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Properly handle OCI runtime being set to a pathMatthew Heon2019-06-20
| | | | | | | | | | | | | | | | | | This is done by the --runtime flag, and as such, by all our CI. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Print container's OCI runtime in `inspect`Matthew Heon2019-06-19
| | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Make a missing OCI runtime nonfatalMatthew Heon2019-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may want to ship configurations including more than one runtime configuration - for example, crun and runc and kata, all configured. However, we don't want to make these extra runtimes hard requirements, so let's not fatally error when we can't find their executables. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Begin adding support for multiple OCI runtimesMatthew Heon2019-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Podman containers to request to use a specific OCI runtime if multiple runtimes are configured. This is the first step to properly supporting containers in a multi-runtime environment. The biggest changes are that all OCI runtimes are now initialized when Podman creates its runtime, and containers now use the runtime requested in their configuration (instead of always the default runtime). Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Build cgo files with -Wall -WerrorSascha Grunert2019-06-21
| | | | | | | | | | | | | | | | | | | | | | | | To avoid unnecessary warnings and errors in the future I'd like to propose building all cgo related sources with `-Wall -Werror`. This commit fixes some warnings which came up in `shm_lock.c`, too. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | | Make configuration validation not require a DB commitMatthew Heon2019-06-20
| | | | | | | | | | | | | | | | | | | | | If there are missing fields, we still require a commit, but that should not happen often. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Avoid a read-write transaction on DB initMatthew Heon2019-06-20
| | | | | | | | | | | | | | | | | | | | | | | | Instead, use a less expensive read-only transaction to see if the DB is ready for use (it probably is), and only fire the expensive RW transaction if absolutely necessary. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Spoof json-file logging supportPeter Hunt2019-06-19
| | | | | | | | | | | | | | | | | | For docker scripting compatibility, allow for json-file logging when creating args for conmon. That way, when json-file is supported, that case can be easily removed. Signed-off-by: Peter Hunt <pehunt@redhat.com>
* | | Merge pull request #3358 from mheon/use_disk_specOpenShift Merge Robot2019-06-18
|\ \ \ | |/ / |/| | Swap to using the on-disk spec for inspect mounts
| * | Swap to using the on-disk spec for inspect mountsMatthew Heon2019-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When available, using the on-disk spec will show full mount options in use when the container is running, which can differ from mount options provided in the original spec - on generating the final spec, for example, we ensure that some form of root propagation is set. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #3352 from mheon/inspect_config_to_libpodOpenShift Merge Robot2019-06-18
|\ \ \ | |/ / |/| | Move the Config portion of Inspect into libpod
| * | Move the Config portion of Inspect into libpodMatthew Heon2019-06-17
| | | | | | | | | | | | | | | | | | | | | | | | While we're at it, rewrite how we populate it. There were several potential segfaults in the optional spec.Process block, and a few fields not being populated correctly versus 'docker inspect'. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Merge pull request #3257 from weirdwiz/loadOpenShift Merge Robot2019-06-17
|\ \ \ | | | | | | | | Add warning while untagging an image podman-load
| * | | Add warning while untagging an image podman-loadDivyansh Kamboj2019-06-04
| | | | | | | | | | | | | | | | Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
* | | | Merge pull request #3297 from rhatdan/systemdOpenShift Merge Robot2019-06-17
|\ \ \ \ | |_|/ / |/| | | Accidently removed /run/lock from systemd mounts
| * | | Accidently removed /run/lock from systemd mountsDaniel J Walsh2019-06-11
| | | | | | | | | | | | | | | | | | | | | | | | This is blowing up systemd containers on Ubuntu. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>