Page MenuHomePhabricator

cloudgw: syntax error in nftables config if using sets with intervals and some element overlaps an interval
Closed, ResolvedPublic

Description

I detected this error:

aborrero@cloudgw1001:~ $ sudo nft -f /etc/nftables/main.nft
In file included from /etc/nftables/main.nft:9:1-36:
/etc/nftables/001_cloudgw_puppet.nft:30:21-33: Error: conflicting intervals specified
                    185.15.56.161 ,
                    ^^^^^^^^^^^^^~
In file included from /etc/nftables/main.nft:9:1-36:
/etc/nftables/001_cloudgw_puppet.nft:9:9-20: Error: Could not process rule: File exists
    set dmz_cidr_set {
        ^^^^^^^^^^^^

This is because the set contains both 185.15.56.161 and 185.15.56.0/24, and they overlap.

Event Timeline

aborrero changed the task status from Open to In Progress.Sep 15 2023, 10:30 AM
aborrero triaged this task as High priority.
aborrero moved this task from Backlog to Doing on the User-aborrero board.

Mentioned in SAL (#wikimedia-cloud) [2023-09-15T10:32:57Z] <arturo> faiolver cloudgw1001 into cloudgw1002, investigating a nftables syntax error (T346432)

Change 957895 had a related patch set uploaded (by Arturo Borrero Gonzalez; author: Arturo Borrero Gonzalez):

[operations/puppet@production] cloudgw: enable set auto-merge

https://gerrit.wikimedia.org/r/957895

Change 957901 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] Add auto-merge to nftables sets where needed

https://gerrit.wikimedia.org/r/957901

Change 957895 merged by Arturo Borrero Gonzalez:

[operations/puppet@production] cloudgw: enable set auto-merge

https://gerrit.wikimedia.org/r/957895

aborrero claimed this task.

Change 957901 merged by Muehlenhoff:

[operations/puppet@production] Add auto-merge to nftables sets where needed

https://gerrit.wikimedia.org/r/957901