717 Commits

Author SHA1 Message Date
fc4a47e0e7 Merge pull request #11617 from ashley-cui/ssh
[NO TESTS NEEDED] Add username flag for machine ssh
2021-09-18 06:43:03 -04:00
e3e9e5175f Add username flag for machine ssh
allow users to specify what username to use when ssh-ing into the vm.
If the username flag is set, the username will be the flag value. If the
flag is not set and the the vm name is specified, the default user of
the vm will be used. if the flag is not set, and the vm name is not
specified, then the username of the default connection will be used.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-17 13:33:56 -04:00
08e1bb54c3 Merge pull request #11607 from Luap99/ipvlan
CNI: add ipvlan driver support and macvlan modes
2021-09-17 10:45:18 -04:00
9a5987cf6a Merge pull request #11603 from rhatdan/truncate
Add no-trunc support to podman-events
2021-09-17 07:02:52 -04:00
62350fed61 [CI:DOCS] markdown cleanup
* podman-inspect: make references be live links, not a static
  list. Also, remove container- and image-inspect, because
  those are NOPs.

* podman-pull: add a missing right-paren

* podman-search, podman: remove unwanted indentation from
  some file descriptions. Markdown indentation renders as
  one very very long line, requiring the user to use a
  horizontal scroll bar to read the text. I searched
  using grep '^    ' and eyeball-looking for text that
  doesn't look like one-line code examples, and see
  no more, but eyeball checks are fragile.

One bug remains: MyST renders mailto: links uglily. I can find
no way to fix this other than patching the source code.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-16 15:59:14 -06:00
4216f7b7f4 Add no-trunc support to podman-events
Standardize on no-trunc through the code.
Alias notruncate where necessary.

Standardize on the man page display of no-trunc.

Fixes: https://github.com/containers/podman/issues/8941

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-16 09:41:29 -04:00
aee0ab98cd CNI: add ipvlan driver
Add support for the ipvlan cni plugin. This allows us to create,
inspect and list ipvlan networks correctly.

Fixes #10478

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-16 15:37:34 +02:00
c20f61148c CNI: network create support macvlan modes
Support setting the macvlan mode with `podman network create -d macvlan
--opt mode=bridge`. This will correctly set the specified macvlan mode
in the cni conflist file.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-16 14:53:33 +02:00
5f41ffdd19 Merge pull request #11322 from Luap99/network-libpod
Wire network interface into libpod
2021-09-15 16:11:14 -04:00
85e8fbf7f3 Wire network interface into libpod
Make use of the new network interface in libpod.

This commit contains several breaking changes:
- podman network create only outputs the new network name and not file
  path.
- podman network ls shows the network driver instead of the cni version
  and plugins.
- podman network inspect outputs the new network struct and not the cni
  conflist.
- The bindings and libpod api endpoints have been changed to use the new
  network structure.

The container network status is stored in a new field in the state. The
status should be received with the new `c.getNetworkStatus`. This will
migrate the old status to the new format. Therefore old containers should
contine to work correctly in all cases even when network connect/
disconnect is used.

New features:
- podman network reload keeps the ip and mac for more than one network.
- podman container restore keeps the ip and mac for more than one
  network.
- The network create compat endpoint can now use more than one ipam
  config.

The man pages and the swagger doc are updated to reflect the latest
changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-15 20:00:20 +02:00
3e77f960f6 Set default storage from containers.conf for temporary images
Fixes: https://github.com/containers/podman/issues/11107

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-15 10:43:51 -04:00
4b6ffda31c Merge pull request #11409 from cdoern/podVolumes
Pod Volumes Support
2021-09-15 09:10:12 -04:00
4dd7bfdfaa Merge pull request #11556 from afbjorklund/distribution-info
Show variant and codename of the distribution
2021-09-15 06:25:00 -04:00
5cafb6d18d Fix example in podman machine init man page
Fixes #11582

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-15 11:06:08 +02:00
38c5f6721f Show variant and codename of the distribution
Along with the name (id) and the version(_id)

But only show the information if is available

Examples: Fedora CoreOS, Ubuntu Focal

[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-14 17:44:42 +02:00
84005330aa Pod Volumes Support
added support for the --volume flag in pods using the new infra container design.
users can specify all volume options they can with regular containers

resolves #10379

Signed-off-by: cdoern <cdoern@redhat.com>
2021-09-14 08:32:07 -04:00
a55e2a00fc rootfs: Add support for rootfs-overlay and bump to buildah v1.22.1-0.202108
Allows users to specify a readonly rootfs with :O, in exchange podman will create a writable overlay.

bump builah to v1.22.1-0.20210823173221-da2b428c56ce

[NO TESTS NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-09-14 13:31:39 +05:30
a8875faca1 [CI:DOCS] Remove short 'a' option from all-tags
The short option 'a' for the --all-tags option in the pull
page is not valid, remove it.

Addresses: #11536

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-09-13 09:27:57 -04:00
ec3037062d Merge pull request #11513 from Luap99/unshare
podman unshare keep exit code
2021-09-11 17:26:35 -04:00
5e9758fd5f Merge pull request #11323 from umohnani8/init
Add init containers to generate and play kube
2021-09-10 13:44:47 -04:00
f5e4ffb5e4 Add init containers to generate and play kube
Kubernetes has a concept of init containers that run and exit before
the regular containers in a pod are started. We added init containers
to podman pods as well. This patch adds support for generating init
containers in the kube yaml when a pod we are converting had init
containers. When playing a kube yaml, it detects an init container
and creates such a container in podman accordingly.
Note, only init containers created with the init type set to "always"
will be generated as the "once" option deletes the init container after
it has run and exited. Play kube will always creates init containers
with the "always" init container type.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-10 09:37:46 -04:00
d2e10a71d6 podman unshare keep exit code
In case the command inside the podman unshare env failed podman unshare
always exits with 125 and prints `Error: exit status 125`. This is a
bad user experience and makes it difficult to use in scripts which could
expect certain exit codes.
This commit makes sure podman unshare uses the same exit code as the
command and does not print the useless `exit status X` message.

Also to match podman run/exec it should return 126 for EPERM
and 127 for ENOENT.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-10 15:30:25 +02:00
a4cc32c2c5 Fix missing args in name in example
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2021-09-10 15:50:02 +09:00
23527374c4 Merge pull request #11492 from rhatdan/man
[CI:DOCS] Fix spacing on --userns options in docs
2021-09-09 08:15:15 -04:00
2f967b81cb Add logDriver to podman info
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-08 17:53:04 -04:00
cee689af1e Fix spacing on --userns options in docs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-08 15:23:02 -04:00
558ba1b99e Merge pull request #11468 from Luap99/play-kube-slirp
fix play kube --network options
2021-09-08 13:55:21 +02:00
f18ccbcc0f fix play kube --network options
Commit 092902b45555 introduced advanced network options for podman play
kube. However this never worked because it unconditionally set the
network mode to bridge after it parsed the network option.

Added a test to ensure the correct mode is set.

Truly fixes #10807

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-08 10:09:28 +02:00
30d0cc3cca Merge pull request #11427 from flouthoc/kube-pod-logs
kube: Add support for `podman pod logs`.
2021-09-07 18:39:45 +02:00
3d02cfb5e0 network create: add warning for deprecated macvlan flag
The macvlan driver is not deprecated, only the --macvlan flag is.
Remove the flag from the man page since it is deprecated and add a
warning to podman network create if it is used.

[NO TESTS NEEDED]

Fixes #11400

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-07 10:24:10 +02:00
11fc0e5540 kube: Add support for podman pod logs
Following PR adds support for `kubectl` like `pod logs` to podman.
Usage `podman pod logs <podIDorName` gives a stream of logs for all
the containers within the pod with **containername** as a field.

Just like **`kubectl`** also supports `podman pod logs -c ctrIDorName podIDorName`
to limit the log stream to any of the specificied container which belongs to pod.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-05 16:24:49 +05:30
c36322382a Merge pull request #11368 from giuseppe/fix-man-format
[CI:DOCS] fix indentation for userns modes
2021-09-01 15:24:24 -04:00
f9a689f3ed generate systemd: clarify limitations of --new
`generate systemd --new` is looking at the "create command" of the
container/pod which is simply the os.Args at creation time.

It does not work on containers or pods created via the REST API since
the create command is not set.  `--new` does work on such containers and
pods since there is no reliable way to reverse-map their configs to
command-line arguments of podman.

Fixes: #11370
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-01 08:50:03 +02:00
d674eb41e4 [CI:DOCS] podman cp: highlight globbing and multi-file copy
`podman cp` does not allow for globbing or filtering copied data in any
form.  `docker cp` does not either, so Podman remains compatible.  Due
to a number of requests, highlight how users can effectively achieve
that by means of chaining with tools such as xargs(1) or find(1), or by
making use of `podman mount`.

Closes: #11346
Closes: #11194
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-31 17:30:58 +02:00
375c3a7b3c docs: fix indentation for userns modes
Closes: https://github.com/containers/podman/issues/11364

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-08-31 13:18:33 +02:00
d28e85741f InfraContainer Rework
InfraContainer should go through the same creation process as regular containers. This change was from the cmd level
down, involving new container CLI opts and specgen creating functions. What now happens is that both container and pod
cli options are populated in cmd and used to create a podSpecgen and a containerSpecgen. The process then goes as follows

FillOutSpecGen (infra) -> MapSpec (podOpts -> infraOpts) -> PodCreate -> MakePod -> createPodOptions -> NewPod -> CompleteSpec (infra) -> MakeContainer -> NewContainer -> newContainer -> AddInfra (to pod state)

Signed-off-by: cdoern <cdoern@redhat.com>
2021-08-26 16:05:16 -04:00
94c37d7d47 Merge pull request #11298 from baude/kubeupdown
teardown play kube
2021-08-26 13:58:44 -04:00
70caa63e7c Merge pull request #11318 from jmguzik/volume-ls-prune-docs
[CI:DOCS] Add filter params description to volume list/prune docs
2021-08-26 13:01:44 -04:00
1e6d1e5c6b Add filter params description to volume list/prune docs
Description adjusted to the standard seen in other man pages.
[CI:DOCS]

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-08-26 17:09:06 +02:00
18da5b0bf6 Merge pull request #11208 from ashley-cui/streams
[NO TESTS NEEDED] Allow setting of machine stream and image path from containers.conf
2021-08-26 10:13:08 -04:00
d5507704e9 volumes: Add volume import to allow importing contents on tar into volume
Following feature makes sure that users can load contents of external
tarball into the podman volumes.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-26 14:14:14 +05:30
1e176923b1 teardown play kube
add the ability for play kube to tear down based on the yaml used to
play it.  it is indicated by --down in the play kube command.  volumes
are NOT deleted during the teardown.  pods and their containers are
stopped and removed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-24 14:26:14 -05:00
3f22e52964 Allow setting of machine stream and image path from containers.conf
Default is "testing"

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-08-24 14:18:55 -04:00
90cf78b199 Merge pull request #11290 from flouthoc/volume-export
volumes: Add support for `volume export` which allows exporting content to  external path.
2021-08-23 14:01:20 -04:00
6a3741598c Merge pull request #11205 from Shivkumar13/shivkumar-tls-fix
Support for --tls-verify flag in podman-run & podman-create
2021-08-23 13:44:19 -04:00
edddfe8c4f volumes: Add support for exporting volumes to external tar
Adds support for transferring data between systems and backing up systems.
Use cases: recover from disasters or move data between machines.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-23 20:42:41 +05:30
319c85e89e Support for --tls-verify flag in podman run & podman create
Signed-off-by: Shivkumar13 <sople@redhat.com>
2021-08-21 00:54:13 +05:30
cd40c875ac Add ability to build images in play kube
When playing a kube YAML file, it can be desirable to be able to build
an image on the fly.  This is good for development of an image and YAML
files and somewhat mocks what compose does.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-18 09:55:24 -05:00
bef26f2582 rename oneshot initcontainers to once
after the init containers pr merged, it was suggested to use `once`
instead of `oneshot` containers as it is more aligned with other
terminiology used similarily.

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-12 12:57:15 -05:00
404488a087 Run codespell to fix spelling
[NO TESTS NEEDED] Just fixing spelling.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-11 16:41:45 -04:00