+++ This bug was initially created as a clone of Bug #2038818 +++ Description of problem: I have large saved hash:ip set (>200000 entries). systemctl restart ipset works more than 10 minutes and timed out. Version-Release number of selected component (if applicable): ipset-service-7.1-1.el8.noarch How reproducible: Steps to Reproduce: 1. Create set with 200000+ entries 2. Save it - /usr/libexec/ipset/ipset.start-stop save 3. systemctl restart ipset Actual results: systemctl timed out on service start. Expected results: Set restored. Quickly.
This is the solution as agreed upon in the original ticket: --- a/ipset.start-stop +++ b/ipset.start-stop @@ -257,7 +257,13 @@ load() { CLEAN_FILES="${CLEAN_FILES} ${mangled}" chmod 600 "${mangled}" - awk '/^(add|create) ('"${conflicts}"')/ { printf "%s ",$1; system("echo '${salt}'" $2 " | md5sum | head -c31"); $1=""; $2=""; print; next} {print}' "${merged}" > "${mangled}" + cat "${merged}" > "${mangled}" + IFS='|' + for set in ${conflicts}; do + new_name=$(echo "${salt}${set}" | md5sum | head -c31) + echo "s/^(add|create) $set /\1 $new_name /" + done | sed -i -r -f - "${mangled}" + unset IFS if ! ipset_restore "${mangled}"; then err "Failed to restore configured sets" exit 1
@Phil, Can you forward this change to rawhide so it can be propagated into fedora-next (and c9s eventually). Thanks in advance.
Hi Nicolas, (In reply to Nicolas Chauvet (kwizart) from comment #2) > Can you forward this change to rawhide so it can be propagated into > fedora-next (and c9s eventually). > > Thanks in advance. I don't own the package in Fedora, so it's up to Eric to push the change. Regarding C9S/RHEL9, progress is tracked in Bug 2043008.
(In reply to Phil Sutter from comment #3) > Hi Nicolas, > > (In reply to Nicolas Chauvet (kwizart) from comment #2) > > Can you forward this change to rawhide so it can be propagated into > > fedora-next (and c9s eventually). > > > > Thanks in advance. > > I don't own the package in Fedora, so it's up to Eric to push the change. > Regarding C9S/RHEL9, progress is tracked in Bug 2043008. If someone opens a PR at https://src.fedoraproject.org/rpms/ipset I can review/merge.
Turns out the reported issue is not present in Fedora as its init script is much simpler. I'll therefore repurpose this ticket to push RHEL's init script into Fedora - this should help at least with the next sync.