Page MenuHomePhabricator

config issue when creating multiple wg interfaces at the same time.
Closed, ResolvedPublicBUG


set interfaces wireguard wg0 address ''
set interfaces wireguard wg0 peer rt-2 allowed-ips ''
set interfaces wireguard wg0 peer rt-2 endpoint ''
set interfaces wireguard wg0 peer rt-2 pubkey 'QwY01u5Vfoh/haCAgBx0R1k/eOgzYM0kAgHdW4MSulk='

set interfaces wireguard wg1 address ''
set interfaces wireguard wg1 peer rt-1 allowed-ips ''
set interfaces wireguard wg1 peer rt-1 endpoint ''
set interfaces wireguard wg1 peer rt-1 pubkey 'AwY01u5Vfoh/haCAgBx0R1k/eOgzYM0kAgHdW4MSulk='


[ interfaces wireguard wg1 ]
Can't set IP on wg1

[[interfaces wireguard wg1]] failed
Commit failed

If the config is being entered per interface, no issues.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close

Event Timeline

hagbard created this task.Oct 30 2018, 4:09 PM
hagbard claimed this task.
syncer triaged this task as Normal priority.
hagbard added a subscriber: runar.Oct 30 2018, 4:24 PM

All right, node.tag gets called twice. In the first round both interfaces are being configured correctly, then the parser calls it again (node.tag) and of course the IP already exists, so the error is valid from a script perspective.
Related to the issue @runar reported:

runar added a comment.Oct 30 2018, 5:15 PM

This is exactly the same issue i reported in T786, for every interface thats created the script runs its full processing.. when 10 interfaces are created it tries to execute it 10 times and so on. I have purposed a fix for this behaveor in T786 and there is a PR ( on this. Another thing that could be done to fix this is to fix the underlaying vbash code that makes this happen, but i think that is a larger task.

pasik added a subscriber: pasik.Nov 7 2018, 9:46 AM