Speed up ipset entries changes
We now use --add-entries-from-file and --remove-entries-from-file to
change firewalld ipset. Adding or removing entries one by one was really
slow.
This pull request is based on https://github.com/42wim/puppet-firewalld/blob/04683b46cbe6e6a925c585283941cc363752aceb/lib/puppet/provider/firewalld_ipset/firewall_cmd.rb first pull request was here: jfroche/puppet-firewalld#4
What is the format of the files that feed this function?
@Rovanion some example:
ipset::set:
some_name:
type: hash:net
hashsize: 1024
family: inet6
manage_entries: true
set:
- 2a02:2c40::1
- 2a02:2c40::2
# We have a wrapper around firewalld module, should be similar
wrapped::firewalld::rich_rules:
allow_from_some_name:
zone: public
family: ipv6
source:
ipset: some_name
service: some_service
action: accept
# cat /etc/firewalld/ipsets/some_name.xml
<?xml version="1.0" encoding="utf-8"?>
<ipset type="hash:net">
<option name="hashsize" value="1024"/>
<option name="family" value="inet6"/>
<entry>2a02:2c40::1</entry>
<entry>2a02:2c40::2</entry>
</ipset>
Dear @jfroche, thanks for the PR!
This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
Dear @jfroche, thanks for the PR!
This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
Dear @jfroche, thanks for the PR!
This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
Dear @jfroche, thanks for the PR!
This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
Dear @jfroche, thanks for the PR!
This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
@dhoppe would you like us to fix the merge conflicts?
@jovandeginste That would be great. Thank you very much.
rebased on master branch
Are we speaking about using /tmp during unittest not being secure ?
ping @ghoneycutt
I was mistaken, for the test it seems fine.
can we pick this PR up again, @ghoneycutt ?
Can we get --add-entries-from-file and --remove-entries-from-file functionality in this module (obviously still keep the --add-entry and --remove-entry functionality) over the line please and in the latest version.
Can you rebase off head for the CI?