-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network: add support for podman network update
and --network-dns-server
#16732
network: add support for podman network update
and --network-dns-server
#16732
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4c0c158
to
7c657d4
Compare
919fa64
to
d3bf94d
Compare
a45ceb5
to
f728618
Compare
@cevich Podman CI is using older netavark and aardvark any idea how can i use https://github.com/containers/netavark/releases/tag/v1.4.0 and https://github.com/containers/aardvark-dns/releases/tag/v1.4.0 in CI |
Other tests are failing because c/common is broken as same reason here: #16733 |
f728618
to
4c2feff
Compare
4e324b8
to
ceb5943
Compare
podman network update
and --network-dns-server
podman network update
and --network-dns-server
30f33c5
to
ae52ef0
Compare
Okay newly added tests pass with latest |
Since I'll be out on PTO for a few weeks, if you notice the packages have been released into Fedora updates-testing (F37) and updates (F36), please feel free to open up a c/automation_images PR. Most of the time it works, when it doesn't, it fails horribly and there's probably no hope so just give up 😁 |
@@ -41,6 +43,56 @@ var _ = Describe("Podman run networking", func() { | |||
|
|||
}) | |||
|
|||
It("podman verify network scoped DNS server and also verify updating network dns server", func() { | |||
// TODO: Unskip after https://github.com/containers/podman/pull/16525 | |||
Skip("TODO: unskip after https://github.com/containers/podman/pull/16525") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed this passes with latest nv/av but being skipped for now since CI does not contains latest nv/av.
cmd/podman/networks/update.go
Outdated
if err != nil { | ||
return err | ||
} | ||
fmt.Printf("%s", name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this debug or intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentional we together decided that on network update
success command must return network update , see: #16732 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use Println()
, it is missing a final newline sorry for not spotting this earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay done.
|
||
networkUpdateOptions := entities.NetworkUpdateOptions{} | ||
if err := json.NewDecoder(r.Body).Decode(&networkUpdateOptions); err != nil { | ||
utils.Error(w, http.StatusBadRequest, fmt.Errorf("failed to decode request JSON payload: %w", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK, I'm on the fence. Maybe?
utils.Error(w, http.StatusBadRequest, fmt.Errorf("failed to decode request JSON payload: %w", err)) | |
utils.Error(w, http.StatusBadRequest, fmt.Errorf("failed to decode JSON request payload: %w", err)) |
51c9eaa
to
bf4f71a
Compare
LGTM |
* 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` * containers/netavark#497 * containers/aardvark-dns#252 * containers/netavark#503 [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R <[email protected]>
bf4f71a
to
882cd17
Compare
/lgtm |
@Luap99 @TomSweeneyRedHat PTAL |
/hold cancel |
podman network update <networkupdate>
--network-dns-server
topodman network create
Extends podman to support recently added features in
netavark
andaardvark-dns
network_dns_servers
netavark#497network scoped dns servers
aardvark-dns#252netavark update
command netavark#503[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]