60 Commits

Author SHA1 Message Date
16007e4370 fix typo in podman-network-create.1.md
gateway ip in the description doesnt match the provided command

Signed-off-by: Qori El-Hafizh <57665201+qrhfz@users.noreply.github.com>
2024-08-25 12:05:33 +00:00
249474a84e drop support for "pasta" as a network name
The pasta network mode has been added in podman v4.4 and this causes a
conflict with named networks that could also be called "pasta". To not
break anything we had special logic to prefer the named network over the
network mode. Now with 5.0 we can break this and remove this awkward
special handling from the code.

Containers created with 4.X that use a named network pasta will also
continue to work fine, this chnage will only effect the creation of new
containers with a named network pasta and instead always used the
network mode pasta. We now also block the creation of networks with the
name "pasta".

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-05 13:57:24 +01:00
108d2bc430 docs: make CNI removal explicit
The docs were rather vague about the deprecation of CNI, make it clear
that we are going to remove it with 5.0 as we decided to do that in our
planning.

Also while looking at the podman network create docs I noticed
--ipam-driver dhcp was still documented as not supported with netavark
so I fixed that as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-11-06 10:45:59 +01:00
ca9efb0cda network: document ports and macvlan interaction
The network backend will ignore ports for macvlan and ipvlan networks so
they do not do anything. No warning or error is shown because containers
may be later connected to a bridge network in which case they would be
useful.

Fixes #17927

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-19 17:04:29 +02:00
be823b3880 Add documentation for the vrf option on netavark
Signed-off-by: André Cirne <dumahk21@gmail.com>
2023-09-28 09:44:47 +01:00
b5ce0ab2de Fix language, typos and markdown layout
[NO NEW TESTS NEEDED]

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-24 11:18:25 +02:00
3d6bc2f865 Fix markdown in docs for podman-network-create
Signed-off-by: iczero <iczero4@gmail.com>
2023-07-18 13:49:41 -07:00
85d9361332 network create: document --internal better
When using --internal for macvlan/ipvlan networks we simply do not add a
default gateway/route. Make this clear in the docs.

Fixes #18914

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-13 13:23:21 +02:00
e292748534 network create --ip-range allow for custom range
The backend allows for any start/end ip in the subnet. There is no
reason to limit the cli to only CIDR subnets. This allows for much more
flexibility.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-16 17:57:17 +02:00
af7555e0dd network-create: document new bclim option
see https://github.com/containers/common/pull/1474

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-13 11:48:15 +02:00
8bf168cc13 Add ability to set static routes
add routes using the --route flag.
the no_default_route option in --opt prevents a default route from
getting added automatically.

Signed-off-by: Jan Hendrik Farr <github@jfarr.cc>
2023-06-12 10:31:59 +02:00
685c736185 source code comments and docs: fix typos, language, Markdown layout
- fix a/an before noun
- fix loose -> lose
- fix "the the"
- fix lets -> let's
- fix Markdown layout
- fix a few typos
- remove unnecessary text in troubleshooting.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-05-22 07:52:16 +02:00
32c2cea0f9 Remove future tense from man pages
Remove all will, would, could, should and use present tense.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-16 15:10:33 -04:00
d905e412e8 Fix simple typo in podman-network-create.md
Found a typo today while reading documentation.

Simple enough change :-) 

Signed-off-by: Mike Eisemann <me@michaeleisemann.com>

Signed-off-by: AndroidKitKat <me@michaeleisemann.com>
2023-04-26 12:14:19 -04:00
b526839a4e docs: update podman-network-create.1
- add information about netavark plugins
- add missing arguments to options the require an arg
- document that container dns is only supported with bridge

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-11 17:04:42 +02:00
ed99a979ce network create: add --interface-name
Allow users to customize the network_interface option is the network
config. For bridge this allows users to change the bridge name and for
maclvan it will be the same as `--opt parent=...`.
However the main reason for this option is to allow netavark plugins to
make use of it. I demoed the host-device plugin which makes use of this
as an example. While we could let users set them via --opt it is more
natural to just use the field which is designed for that purpose.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-11 17:04:33 +02:00
7f5fc04b4b Doc update for docker network options via CLI
Doc update to support docker-specific network create options via CLI

Closes: #15830

Signed-off-by: T K Chandra Hasan <t.k.chandra.hasan@ibm.com>
2023-02-21 21:48:17 +05:30
ec4ab08c8b [CI:DOCS] Cleanup some man pages to display options with line breaks
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-08 14:46:44 -05:00
882cd17f83 network: add support for podman network update and --network-dns-server
* Add support for `podman network update <>`

```console
network update

Description:
  update networks for containers and pods

Usage:
  podman network update [options] NAME

Examples:
  podman network update podman1

Options:
      --dns-add stringArray      add network level nameservers
      --dns-drop stringArray   remove network level nameservers
```

* Add support for `--network-dns-server` to `podman network create`

Extends podman to support recently added features in `netavark` and
`aardvark-dns`

* https://github.com/containers/netavark/pull/497
* https://github.com/containers/aardvark-dns/pull/252
* https://github.com/containers/netavark/pull/503

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-12 20:19:14 +05:30
a6b375f8d7 Merge pull request #16791 from beeblebrox3/patch-1
[CI:DOCS] Fix typo on network docs
2022-12-17 05:27:25 -05:00
fa4b346182 update podman-network-create for clarity
Add `sudo`  to the example of macvlan creation  for clarity

Signed-off-by: Luís Henrique Faria <luish.faria@gmail.com>
2022-12-15 19:10:14 -03:00
1cc22631f6 Merge pull request #16773 from ygalblum/network_ignore
Network Create: Add --ignore flag to support idempotent script
2022-12-15 14:27:25 -05:00
bddd3f5b5f Network Create: Add --ignore flag to support idempotent script
Add --ignore flag to the command line
Add a new parameter to the NetworkCreate interface in pkg/domain for CreateOptions
Add a new API Network CreateWithOptions in pkg/bindings
Remote API - Add a query parameter to set the ignore flag
Kube - use the IgnoreIfExists flag when creating the default network instead of handling the failure
Add e2e tests
Update man page for podman-network-create

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-15 10:58:54 +02:00
fe3d3256ee Fix typo on network docs
On the last example of the page there a `#` instead of `$` like the other ones.

Signed-off-by: Luís Henrique Faria <luish.faria@gmail.com>
2022-12-08 20:23:12 -03:00
7665bbc127 Remove 'you' from man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-07 09:29:29 -05:00
2df0d9da94 Add information on metrics to the network create docs
Add documentation on the new Netavark option, `metric`, used to
set default route preference for containers joined to multiple
networks.

[NO NEW TESTS NEEDED]

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-11-28 13:22:03 -05:00
a1b32866cc Fix language. Mostly spelling a -> an
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-11-20 19:41:06 +01:00
dceaa7603f docs: deprecate pasta network name
Since pasta is now considered a network mode using it as network name
causes a conflict. For now we will prefer the named network but in a
future major version bump we want to remove this and just use pasta(1).

The docs should reflect that this name is considered deprecated.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-14 16:14:47 +01:00
63c779a857 Fix manpage headers
Signed-off-by: Andrew Denton <adenton@redhat.com>
2022-09-06 09:37:13 -07:00
cbdda4e56e docs: remove CNI word where it is not applicable
Most network commands/features work with both netavark and CNI. When
we added added netavark most docs were not vetted and thus still use CNI
network, it should just say network.

Fixes #14990

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-22 13:46:28 +02:00
5763217296 document isolate option for network create
[CI:DOCS]

document the podman network create -o=isolate which allows networks to cut themselves off
from external connections.

resolves #5805

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-18 11:32:13 -04:00
ad7c54e13a man page checker: enforce stricter options format
Followup to #14906, in which a nonexistent option was found
in a man page. The xref script was designed to catch that,
but I was too lax in my parsing: the option was documented
using wrong syntax, and the script didn't catch it.

Solution: do not allow *any* unrecognized cruft in the
option description lines. And fix all improperly-written
entries to conform to the rule:

    **--option**=*value(s)*

Two asterisks around option, which must have two dashes. One
asterisk around value(s).

This is going to cause headaches for some people adding new
options, but I don't think I can fix that: there are many
factors that make an unparseable line. Adding 'hint' code
would make the script even more complex than it is. I have
to assume that our contributors are smart enough to look
at surrounding context and figure out the right way to
specify options.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-14 06:35:51 -06:00
df394b5218 Allow podman pod create to accept name argument
I am constantly attempting to add the podname to the last
argument to podman pod create. Allowing this makes it match
podman volume create and podman network create.

It does not match podman container create, since podman container create
arguments specify the arguments to run with the container.

Still need to support the --name option for backwards compatibility.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-24 13:17:02 -04:00
784a13f577 network create: add support for ipam-driver none
Add a new flag to set the ipam-driver. Also adds a new ipam driver none
mode which only creates interfaces but does not assign addresses.

Fixes #13521

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-11 11:09:15 +02:00
9b0c8d23bd man pages: sort flags, and keep them that way
Command flags (OPTIONS) in man pages have to date been in
haphazard order. Sometimes that order is sensible, e.g.,
most-important options first, but more often they're
just in arbitrary places. This makes life hard for users.

Here, I update the man-page-check Makefile script so it
checks and enforces alphabetical order in OPTIONS sections.
Then -- the hard part -- update all existing man pages to
conform to this requirement.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-23 13:49:42 -06:00
29f24ff68e [CI:DOCS]: Mention netavark limitations for macvlan/ipvlan drivers
The example is also improved to add the --subnet option, this option is required with netavark, else you get:
    Error: macvlan driver needs at least one subnet specified, DHCP is not supported with netavark

Signed-off-by: Clayton Craft <clayton@craftyguy.net>
2022-03-15 13:08:24 -07:00
4a166c8b63 podman network: add documentation for netavark
Add some docs about the different network backends. Also remove the CNI
word from network since we refer to either a netavark or CNI config.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-15 16:46:23 +01:00
6961d91206 network create: allow multiple subnets
podman network create --subnet, --gateway and --ip-range can now be
specified multiple times to join the network to more than one subnet.
This is very useful if you want to use a dual stack network and assign a
fixed ipv4 and ipv6 subnet. The order of the options is important here,
the first --gateway/--ip-range will be assigned to the first subnet and
so on.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-27 16:38:39 +01:00
8099a61b64 [CI:DOCS] Fix typos and improve language
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 19:34:36 +01: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
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
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
d5527c3304 System tests: deal with crun 0.20.1
crun 0.20.1 changed an error message that we relied on. Deal
with it by accepting the old and new message.

Also (unrelated): sneak in some doc fixes to get rid of
nasty go-md2man warnings that have crept into man pages.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-06-09 10:15:12 -06:00
30e731ecc8 Revert escaped double dash man page flag syntax
Commit 800a2e2d35 introduced a way to disable the conversion of `--`into
an en dash on docs.podman.io, so the ugly workaround of escaping the
dashes is no longer necessary.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-07 18:30:00 +02:00
bc48211924 Fix long option format on docs.podman.io
Escape the two dashes, otherwise they are combined into one long dash.
I tested that this change is safe and still renders correctly on github
and with the man pages.

This commit also contains a small change to make it build locally.
Assuming you have the dependencies installed you can do:
```
cd docs
make html
```
Preview the html files in docs/build/html with
`python -m http.server 8000 --directory build/html`.

Fixes containers/podman.io#373

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-29 14:38:25 +02:00
dfa9a340ad Makefile: make bin/* real targets!
Backstory: every time you run 'make podman' or even
just 'make', you get a full recompile. This is sub-ideal.

Cause: I don't really know. It looks complicated. #5017
introduced a .PHONY for bin/podman, for reasons not
explained in the PR. Then, much later, #5880 well-
intentionedly but improperly tweaked the 'find'
command used in defining SOURCES, adding a -prune
but without the corresponding and required -print.
Let's just say, it was an unfortunate cascade of events.

This PR fixes the SOURCES definition and removes the
highly-undesired .PHONY from podman & podman-remote,
making it so you can type 'make' and, oh joy, not
build anything if it's current. The way 'make' is
supposed to work.

Why fix this now? Because my PR (#9209) was failing in CI,
in the Validate step:

    Can't exec "./bin/podman": No such file or directory at hack/xref-helpmsgs-manpages line 223.

It failed even on Re-run, and only passed once I force-pushed
the PR (with no changes, just a new commit SHA). I have no idea
why bin/podman wasn't built, and I have zero interest in pursuing
that right now, but the proper solution is to add bin/podman as
a Makefile dependency for that particular test. So done.

While I'm at it, fix what is pretty clearly a typo in a .PHONY

And, finally, fix a go-md2man warning introduced in #9189

[NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-03 05:49:17 -07:00
e11d8f15e8 add macvlan as a supported network driver
instead of using the --macvlan to indicate that you want to make a
macvlan network, podman network create now honors the driver name of
*macvlan*.  Any options to macvlan, like the parent device, should be
specified as a -o option.  For example, -o parent=eth0.

the --macvlan option was marked as deprecated in the man page but is
still supported for the duration of 3.0.

Signed-off-by: baude <bbaude@redhat.com>
2021-02-01 14:42:38 -06:00
393a8f0261 disable dnsname when --internal
when doing a network creation, the dnsname plugin should be disabled
when the --internal bool is set.  a warning is displayed if this
happens and docs are updated.

Signed-off-by: baude <bbaude@redhat.com>
2021-01-25 08:51:15 -06:00
7f1be76b5c Add podman network create option for bridge vlan
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00