summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* Merge pull request #8543 from mheon/no_syslog_trueOpenShift Merge Robot2020-12-02
|\ | | | | Do not use "true" after "syslog" in exit commands
| * Do not use "true" after "syslog" in exit commandsMatthew Heon2020-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of being interpreted as an argument to the boolean flag, the 'true' is being intepreted as the Podman command to be run - so we're trying to run `podman true`, which does not exist. This causes the cleanup command to fail when `--log-level=debug` is set, so containers are not cleaned up or removed. This problem is easily reproduced with any command combining the `--rm`, `-d`, and `--log-level=debug` flags - the command will execute and exit, but the container will not be removed. Separate, but worth looking into later: the errors we get on trying `podman true` with any flags are terrible - if you just type `podman true` you get a quite sane "Unrecognized command" error, but if you try `podman true --rm` you get an "unknown flag --rm" error - which makes very little sense given the command itself doesn't exist. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Add podman network create option for bridge mtuAnders F Björklund2020-12-01
| | | | | | | | Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* | Merge pull request #8541 from rhatdan/manOpenShift Merge Robot2020-12-01
|\ \ | | | | | | Fix potential race condition in testing
| * | Fix potential race condition in testingDaniel J Walsh2020-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The It("podman wait to pause|unpause condition"... test is flaking every so often when a messages is sent in the second function to a channel. It is my believe that in between the time the first function sends a message to the channel and before it closes the channel the second errChan=make() has happened. This would mean that the fist function closes the second errChan, and then when the second function sends a message to the second errChan, it fails and blows up with the error you are seeing. By creating a different variable for the second channel, we eliminate the race. Fixes: https://github.com/containers/podman/issues/6518 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #8505 from Luap99/network-labelsOpenShift Merge Robot2020-12-01
|\ \ \ | |_|/ |/| | podman network label support
| * | podman network label supportPaul Holzinger2020-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add label support for podman network create. Use the `args` field in the cni config file to store the podman labels. Use `podman_labels` as key name and store the labels as map[string]string. For reference: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md#args-in-network-config https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md#network-configuration Example snippet: ``` ... "args": { "podman_labels": { "key1":"value1", "key2":"value2" } } ... ``` Make podman network list support several filters. Supported filters are name, plugin, driver and label. Filters with different keys work exclusive. Several label filters work exclusive and the other filter keys are working inclusive. Also adjust the compat api to support labels in network create and list. Breaking changes: - podman network ls -f shortform is used for --filter instead --format This matches docker and other podman commands (container ps, volume ps) - libpod network list endpoint filter parameter is removed. Instead the filters paramter should be used as json encoded map[string][]string. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | | Merge pull request #8126 from matejvasek/impl-apiv2-archiveOpenShift Merge Robot2020-12-01
|\ \ \ | |_|/ |/| | Implement containers/{id or name}/archive api
| * | not forcing unmountMatej Vasek2020-11-19
| | | | | | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * | add commentMatej Vasek2020-11-19
| | | | | | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * | fix: unmount container without forceMatej Vasek2020-11-19
| | | | | | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * | style: wslMatej Vasek2020-11-19
| | | | | | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * | fix lintMatej Vasek2020-11-19
| | | | | | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * | Implement containers/{id or name}/archiveMatej Vasek2020-11-19
| | | | | | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | | Merge pull request #8400 from rhatdan/varlinkOpenShift Merge Robot2020-12-01
|\ \ \ | | | | | | | | Remove varlink support from podman
| * | | Remove varlink support from PodmanDaniel J Walsh2020-11-26
| | |/ | |/| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #8427 from rhatdan/psOpenShift Merge Robot2020-12-01
|\ \ \ | | | | | | | | Handle ps container created field as a time.Time
| * | | Handle ps container created field as a time.TimeDaniel J Walsh2020-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current code we were translating the created time from a time.Time to a unix epoch, this was leading to a loss of precession, and some unexpected results where the sorting order of containers was misordered because of the precession loss. If we pass around created as time.Time, we do not loose the precission. Fixes: https://github.com/containers/podman/issues/8414 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #8465 from rhatdan/pullOpenShift Merge Robot2020-11-30
|\ \ \ \ | | | | | | | | | | Document docker transport is the only supported remote transport
| * | | | Document docker transport is the only supported remote transportDaniel J Walsh2020-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to improve errors when users use the wrong transport in certain cases we stutter, in other cases we don't give enough information. Remove stutters when failing to pull remote images, because of lack of support. Fix errors returned by reference.Parse to wrap in image that was being checked. Fixes: https://github.com/containers/podman/issues/7116 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | | Merge pull request #8514 from Luap99/revert-8410-fix-multiple-networksOpenShift Merge Robot2020-11-30
|\ \ \ \ \ | | | | | | | | | | | | Revert "Allow multiple --network flags for podman run/create"
| * | | | | Revert "Allow multiple --network flags for podman run/create"Luap992020-11-30
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in issue #8507 this commit contains a breaking change which is not wanted in v2.2. We can discuss later if we want this in 3.0 or not. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | | | | Merge pull request #8230 from mheon/port_net_host_conflictOpenShift Merge Robot2020-11-30
|\ \ \ \ \ | | | | | | | | | | | | Ensure that --net=host/pod/container conflicts with -p
| * | | | | Ensure that --net=host/pod/container/none warn with -pMatthew Heon2020-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting port mappings only works when CNI is configuring our network (or slirp4netns, in the rootless case). This is not the case with `--net=host`, `--net=container:`, and joining the network namespace of the pod we are part of. Instead of allowing users to do these things and then be confused why they do nothing, let's match Docker and return a warning that your port mappings will do nothing. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | | | | Merge branch 'master' into patch-1jortkoopmans2020-11-30
|\ \ \ \ \ \ | | |/ / / / | |/| | | |
| * | | | | Add support for persistent volume claims in kube filesAlban Bedel2020-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In k8s a persistent volume claim (PVC) allow pods to define a volume by referencing the name of a PVC. The PVC basically contains criterias that k8s then use to select which storage source it will use for the volume. Podman only provide one abtracted storage, the named volumes, and create them if they don't exists yet. So this patch simply use a volume with the name of the PVC. Signed-off-by: Alban Bedel <albeu@free.fr>
| * | | | | Prepare support in kube play for other volume types than hostPathAlban Bedel2020-11-27
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the simple map of names to paths with a map of names to a struct to allow passing more parameters. Also move the code to parse the volumes to its own file to avoid making the playKubePod() function overly complex. Finally rework the kube volumes test to also be ready to support more volume types. Signed-off-by: Alban Bedel <albeu@free.fr>
| * | | | Merge pull request #8487 from riyad/fix-ping-typoOpenShift Merge Robot2020-11-26
| |\ \ \ \ | | | | | | | | | | | | REST API v2 - ping - fix typo in header
| | * | | | REST API v2 - ping - fix typo in headerRiyad Preukschas2020-11-25
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
| * | | | | Merge pull request #8486 from riyad/improve-ping-api-compatOpenShift Merge Robot2020-11-26
| |\ \ \ \ \ | | | | | | | | | | | | | | REST API v2 - ping - remove newline from response to improve Docker compatibility
| | * | | | | REST API v2 - ping - remove newline from response to improve Docker ↵Riyad Preukschas2020-11-25
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatibility Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
| * / / / / Do not validate the volume source path in specgenPaul Holzinger2020-11-26
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The volume src path should not be validated in specgen since the remote client also uses that part and the path must only exists on the server. This now fails later and only on the server and not the client. I don't think I can add a test for this because the CI runs server and client always on the same vm. Fixes #8473 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
| * | | | Refactor compat container create endpointJhon Honce2020-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make endpoint compatibile with docker-py network expectations * Update specgen helper when called from compat endpoint * Update godoc on types * Add test for network/container create using docker-py method * Add syslog logging when DEBUG=1 for tests Fixes #8361 Signed-off-by: Jhon Honce <jhonce@redhat.com>
| * | | | Merge pull request #8409 from mlegenovic/masterOpenShift Merge Robot2020-11-23
| |\ \ \ \ | | | | | | | | | | | | Docker compat API fixes
| | * | | | [WIP] Docker compat API fixesMilivoje Legenovic2020-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are the first fixes that are needed for development environments like Eclipse or IntelliJ that have Docker plug-ins and use the Docker API to speak with container engine (#7857) Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
| * | | | | Merge pull request #8263 from rhatdan/restartOpenShift Merge Robot2020-11-23
| |\ \ \ \ \ | | |/ / / / | |/| | | | Allow containers to --restart on-failure with --rm
| | * | | | Allow containers to --restart on-failure with --rmDaniel J Walsh2020-11-20
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * | | | | Merge pull request #8429 from psakar/fix-json-capabilitiesOpenShift Merge Robot2020-11-21
| |\ \ \ \ \ | | | | | | | | | | | | | | APIv2 - strip CAP_ prefix from capabilities in inspect container json
| | * | | | | APIv2 - strip CAP_ prefix from capabilities in jsonPetr Sakař2020-11-20
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | strip prefix "CAP_" from capabilities in json generated by container inspect operation Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
| * | | | | Merge pull request #8410 from Luap99/fix-multiple-networksOpenShift Merge Robot2020-11-21
| |\ \ \ \ \ | | | | | | | | | | | | | | Allow multiple --network flags for podman run/create
| | * | | | | Allow multiple --network flags for podman run/createPaul Holzinger2020-11-20
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We allow a container to be connected to several cni networks but only if they are listed comma sperated. This is not intuitive for users especially since the flag parsing allows multiple string flags but only would take the last value. see: spf13/pflag#72 Also get rid of the extra parsing logic for pods. The invalid options are already handled by `pkg/specgen`. A test is added to prevent a future regression. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
| * | | | | Merge pull request #8423 from psakar/fix-8418OpenShift Merge Robot2020-11-20
| |\ \ \ \ \ | | |_|/ / / | |/| | | | REST API v2 - list of images - mandatory Created attribute
| | * | | | REST API v2 - list of images - mandatory Created attributePetr Sakař2020-11-20
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes https://github.com/containers/podman/issues/8418 created attribute is missing for images with created datetime set to 0 Unix time (January 1, 1970 UTC) because 0 is considered as default value, and thus attribute was ommited because of 'omitempty' flag Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
| * | | | Merge pull request #8406 from jwhonce/issues/8390OpenShift Merge Robot2020-11-20
| |\ \ \ \ | | |_|_|/ | |/| | | Make podman service log events
| | * | | Make podman service log eventsJhon Honce2020-11-19
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Log endpoint calls at level Info * Ensure API server started at level Info Fixes #8390 Signed-off-by: Jhon Honce <jhonce@redhat.com>
| * / / Document containers.conf settings for remote connectionsDaniel J Walsh2020-11-19
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we don't document which end of the podman-remote client server operations uses the containers.conf. This PR begins documenting this and then testing to make sure the defaults follow the rules. Fixes: https://github.com/containers/podman/issues/7657 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / / squashjortkoopmans2020-11-25
|/ / | | | | | | Signed-off-by: jortkoopmans <jort@jabo-solutions.eu>
* | Merge pull request #8391 from baude/networkconnectdisconnectOpenShift Merge Robot2020-11-19
|\ \ | | | | | | add network connect|disconnect compat endpoints
| * | add network connect|disconnect compat endpointsbaude2020-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this enables the ability to connect and disconnect a container from a given network. it is only for the compatibility layer. some code had to be refactored to avoid circular imports. additionally, tests are being deferred temporarily due to some incompatibility/bug in either docker-py or our stack. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #8379 from rhatdan/remote2OpenShift Merge Robot2020-11-18
|\ \ \ | | | | | | | | Remove build \!remote flags from test phase 2