aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/network_create_test.go
Commit message (Collapse)AuthorAge
* Always add the default gateway to the cni config filePaul Holzinger2020-12-16
| | | | | | | | | | | | `podman network create` should always add a gateway to the cni config. If no gateway is given use the first ip in the subnet. CNI does not require the gateway field but we need it because of network inspect. This worked with previous version but was dropped in Commit(e7a72d72fd59). Fixes #8748 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Validate that the bridge option is supportedAnders F Björklund2020-12-01
| | | | | | Thanks Luap99 for the validation suggestion Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Add integration test for the bridge optionsAnders F Björklund2020-12-01
| | | | | | Thanks Luap99 for doing the implementation Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* network connect disconnect on non-running containersbaude2020-11-30
| | | | | | | a container can connect and disconnet to networks even when not in a running state. Signed-off-by: baude <bbaude@redhat.com>
* skip ipv6 e2e tests on rootlessAntonio Ojea2020-11-10
| | | | | | | | | | | The IPv6 e2e tests on the CI for rootles mode fails because it needs the ip6tables modules loaded. Example error: stdout="", stderr="failed to list chains: running [/sbin/ip6tables -t nat -S --wait]: exit status 3: modprobe: can't change directory to '/lib/modules': No such file or directory\nip6tables v1.8.4 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)\nPerhaps ip6tables or your kernel needs to be upgraded.\n\n" Signed-off-by: Antonio Ojea <aojea@redhat.com>
* add e2e test for network with same subnetAntonio Ojea2020-11-10
| | | | | | | | add e2e test that checks that is not possible to create different networks with the same subnet, in IPv6 neither in IPv4 Signed-off-by: Antonio Ojea <aojea@redhat.com>
* enable ipv6 network configuration optionsAntonio Ojea2020-11-10
| | | | | | | | | | | | | enable the ipv6 flag in podman network to be able to create dual-stack networks for containers. This is required to be compatible with docker, where --ipv6 really means dual stack. podman, unlike docker, support IPv6 only containers since 07e3f1bba9674c0cb93a0fa260930bfebbf75728. Signed-off-by: Antonio Ojea <aojea@redhat.com>
* Merge pull request #7943 from baude/issue7807OpenShift Merge Robot2020-10-07
|\ | | | | prevent unpredictable results with network create|remove
| * prevent unpredictable results with network create|removebaude2020-10-07
| | | | | | | | | | | | | | | | | | | | due to a lack of "locking" on cni operations, we could get ourselves in trouble when doing rapid creation or removal of networks. added a simple file lock to deal with the collision and because it is not considered a performent path, use of the file lock should be ok. if proven otherwise in the future, some generic shared memory lock should be implemented for libpod and also used here. moved pkog/network to libpod/network because libpod is now being pulled into the package and it has therefore lost its generic nature. this will make it easier to absorb into libpod as we try to make the network closer to core operations. Fixes: #7807 Signed-off-by: baude <bbaude@redhat.com>
* | Attempt to turn on some more remote testsDaniel J Walsh2020-10-07
|/ | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Make the e2e test network cleanup more robust.Daniel J Walsh2020-09-30
| | | | | | | | | | | | | We need to handle removal of non existing network. This allows the `removeCNINetwork` function always to be called. This is needed by tests which are trying to remove the network manually in order to prevent flakes. Fixes #7809 Signed-off-by: Paul Holzinger <paul.holzinger@web.de> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Make all Skips specify a reasonDaniel J Walsh2020-09-29
| | | | | | Always use CGROUPV2 rather then reading from system all the time. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Remove SkipIfRootless if possible, document other callsDaniel J Walsh2020-09-27
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* e2e tests: SkipIfRemote(): add a reasonEd Santiago2020-09-23
| | | | | | | | | | | | | | | | | Now that Dan has added helpful comments to each SkipIfRemote, let's take the next step and include those messages in the Skip() output so someone viewing test results can easily see if a remote test is skipped for a real reason or for a FIXME. This commit is the result of a simple: perl -pi -e 's;(SkipIfRemote)\(\)(\s+//\s+(.*))?;$1("$3");' *.go in the test/e2e directory, with a few minor (manual) changes in wording. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Examine all SkipIfRemote functionsDaniel J Walsh2020-09-22
| | | | | | | | Remove ones that are not needed. Document those that should be there. Document those that should be fixed. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* rootless: support `podman network create` (CNI-in-slirp4netns)Akihiro Suda2020-09-09
| | | | | | | | | | | | | | | | | Usage: ``` $ podman network create foo $ podman run -d --name web --hostname web --network foo nginx:alpine $ podman run --rm --network foo alpine wget -O - http://web.dns.podman Connecting to web.dns.podman (10.88.4.6:80) ... <h1>Welcome to nginx!</h1> ... ``` See contrib/rootless-cni-infra for the design. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
* podman support for IPv6 networksAntonio Ojea2020-08-15
| | | | | | | | | | | podman containers using IPv6 were missing the default route, breaking deployments trying to use them. The problem is that the default route was hardcoded to IPv4, this takes into consideration the podman subnet IP family to generate the corresponding default route. Signed-off-by: Antonio Ojea <aojea@redhat.com>
* Switch all references to github.com/containers/libpod -> podmanDaniel J Walsh2020-07-28
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Turn on a bunch more remote testsDaniel J Walsh2020-07-22
| | | | | | We need to be more specific about the remote tests we turn off. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Change buildtag for remoteclient to remote for testingDaniel J Walsh2020-07-06
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* move go module to v2Valentin Rothberg2020-07-06
| | | | | | | | | | | | | | | With the advent of Podman 2.0.0 we crossed the magical barrier of go modules. While we were able to continue importing all packages inside of the project, the project could not be vendored anymore from the outside. Move the go module to new major version and change all imports to `github.com/containers/libpod/v2`. The renaming of the imports was done via `gomove` [1]. [1] https://github.com/KSubedi/gomove Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* add provided cni networks to spec genbaude2020-05-01
| | | | | | enable final integration tests for networking. Signed-off-by: baude <bbaude@redhat.com>
* v2networking enable commandsbaude2020-04-30
| | | | | | Enable the networking commands for v2. Signed-off-by: baude <bbaude@redhat.com>
* Force integration tests to passBrent Baude2020-04-21
| | | | | | Failing tests are now skipped and we should work from this. Signed-off-by: Brent Baude <bbaude@redhat.com>
* when removing networks for tests, force should be usedBrent Baude2020-03-20
| | | | | | when removing networks in integration tests, we should should force; otherwise if the network has containers associated with it, it will fail to remove. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Refactor tests when checking for error exit codesJhon Honce2019-10-16
| | | | | | | Rather than checking for non-zero, we need to check for >0 to distinguish between timeouts and error exit codes. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* podman network create: validate user inputMrigank Krishan2019-10-04
| | | | | | | Disallow invalid/confusing names such as '../bar' or 'foo ' Closes #4184 Signed-off-by: Mrigank Krishan <mrigankkrishan@gmail.com>
* podman network createbaude2019-09-09
initial implementation of network create. we only support bridging networks with this first pass. Signed-off-by: baude <bbaude@redhat.com>