-
Notifications
You must be signed in to change notification settings - Fork 721
guestagent: remove iptables watcher for rootful nerdctl (v2.1.6) #4107
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
Conversation
f65e842 to
3152f8c
Compare
3152f8c to
017d9d5
Compare
https://github.com/containerd/nerdctl/releases/tag/v2.1.6 Signed-off-by: Akihiro Suda <[email protected]>
This commit significantly simplifies the guestagent, by removing the complex and non-robust iptables watcher that had existed solely for `sudo nerdctl`. This iptables watcher is no longer needed since nerdctl v2.1.6, as it exposes proper `/proc/net` entries even for rootful containers. See containerd/nerdctl PR 4526. Fix issue 4085 Signed-off-by: Akihiro Suda <[email protected]>
017d9d5 to
bdeff40
Compare
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.
Thanks, LGTM
I've been running hack/bats/extras/port-monitor.bats with both docker and default templates. The docker test failed once, but succeeded on retries. This is a known issue:
❯ time TEMPLATE=docker ./lib/bats-core/bin/bats -T extras/port-monitor.bats
port-monitor.bats
✓ Verify that the container is working [5073]
✗ Stop and restart the container multiple times [6497]
(from function `assert_success' in file lib/bats-assert/src/assert_success.bash, line 45,
from function `verify_port' in file extras/port-monitor.bats, line 51,
in test file extras/port-monitor.bats, line 66)
`verify_port' failed
...
-- command failed --
status : 7
output :
--| } | ||
|
|
||
| func (a *agent) LocalPorts(ctx context.Context) ([]*api.IPPort, error) { | ||
| func (a *agent) LocalPorts(_ context.Context) ([]*api.IPPort, error) { |
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.
The _ is only needed when you mix named and unnamed parameters.
| func (a *agent) LocalPorts(_ context.Context) ([]*api.IPPort, error) { | |
| func (a *agent) LocalPorts(context.Context) ([]*api.IPPort, error) { |
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.
Linter doesn't allow that
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.
Are you sure?
❯ GOOS=linux golangci-lint run pkg/guestagent/...
0 issues.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.
IIRC CI failed without that, but I could be wrong
This commit significantly simplifies the guestagent, by removing the complex and non-robust iptables watcher that had existed solely for
sudo nerdctl.This iptables watcher is no longer needed since nerdctl v2.1.6, as it exposes proper
/proc/netentries even for rootful containers.See:
Fix #4083
Fix #4085
Fix #4094