Skip to content
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

Support none parameter on NETAVARK_FW #597

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

oskarirauta
Copy link
Contributor

Passing environment valuepair NETAVARK_FW=none disables all firewall/portmapper related features leaving configuration of firewall to user.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, to pass CI you have to run cargo fmt to fix formatting issues.

Could you also add a new test file for the none driver in test/ directory?
Something like this should be enough to check

@test "check iptables driver is in use" {
RUST_LOG=netavark=info run_netavark --file ${TESTSDIR}/testfiles/simplebridge.json setup $(get_container_netns_path)
assert "${lines[0]}" "==" "[INFO netavark::firewall] Using iptables firewall driver" "iptables driver is in use"
}

make sure you set NETAVARK_FW=none

src/firewall/fwnone.rs Outdated Show resolved Hide resolved
src/firewall/fwnone.rs Outdated Show resolved Hide resolved
src/firewall/fwnone.rs Outdated Show resolved Hide resolved
@oskarirauta
Copy link
Contributor Author

@Luap99
Check if it's ok now..

@oskarirauta oskarirauta requested review from Luap99 and removed request for Luap99 February 28, 2023 14:09
@Luap99
Copy link
Member

Luap99 commented Feb 28, 2023

looks good, could you squash the commits please.

@mheon PTAL

@oskarirauta
Copy link
Contributor Author

@Luap99

Unfortunately I do not know how to do it properly- I do know how to rebase, issue is that I should had made the PR some time ago, when we talked about this on issues- now I have synced it- so there's a merge commit in between where I synced it before doing this PR-

It looks a bit like this:

  • last mainstream commit before I started working
  • my work here
  • sync with origin/master
  • cargo fmt commit
  • remove unnecessary result::
  • add firewall none test

So I could squash them to cargo fmt commit, but if I squash to sync commit, or even to my work here-commit, it will be a problem... Any good ideas, except make a new branch? That would be easiest solution for me, but if you know a "magic trick" to make it happen, I am all ears..

@mheon
Copy link
Member

mheon commented Feb 28, 2023

LGTM. I do start to wonder if we should add a way for Podman to request a specific driver so it can actually request this on a per-network basis.

@oskarirauta
Copy link
Contributor Author

@mheon I have already requested it for some time ago.. Until that, I'll go with a wrapper script.

Passing environment valuepair NETAVARK_FW=none disables all firewall/portmapper related features leaving configuration of firewall to user.

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
@oskarirauta
Copy link
Contributor Author

oskarirauta commented Mar 1, 2023

@Luap99

PR has been rebased succesfully to single commit.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, oskarirauta

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Mar 1, 2023
@Luap99
Copy link
Member

Luap99 commented Mar 1, 2023

/lgtm
/hold

@Luap99
Copy link
Member

Luap99 commented Mar 2, 2023

/hold cancel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants