pre-up for custom config is executed after VRF executor
EasyNetDev opened this issue · comments
Hi,
There is a reason why ifupdonw-ng is executing VRF executor before the predefined pre-up scripts in config?
Example:
auto nat64
iface nat64
description NAT64
pre-up /sbin/ip tuntap add mode tun user root group root nat64
post-down /sbin/ip link delete nat64
vrf internet
Output:
...
ifupdown: nat64: attempting to run pre executor for phase create
ifupdown: nat64: attempting to run post executor for phase create
ifupdown: nat64: attempting to run vrf executor for phase create
/usr/libexec/ifupdown-ng/vrf
+ [ -n ]
+ exit 0
ifupdown: nat64: attempting to run link executor for phase pre-up
/usr/libexec/ifupdown-ng/link
ifupdown: nat64: attempting to run pre executor for phase pre-up
ifupdown: nat64: attempting to run post executor for phase pre-up
ifupdown: nat64: attempting to run vrf executor for phase pre-up
/usr/libexec/ifupdown-ng/vrf
+ [ -n internet ]
+ handle_member
+ /sbin/ip link set nat64 master internet
Cannot find device "nat64"
+ exit 0
/sbin/ip tuntap add mode tun user root group root nat64
/bin/run-parts /etc/network/if-pre-up.d
ifupdown: nat64: attempting to run link executor for phase up
/usr/libexec/ifupdown-ng/link
+ IF_LINK_OPTIONS=
+ [ -n ]
+ [ -n ]
+ ip link set up dev nat64
+ [ ]
ifupdown: nat64: attempting to run pre executor for phase up
ifupdown: nat64: attempting to run post executor for phase up
ifupdown: nat64: attempting to run vrf executor for phase up
/usr/libexec/ifupdown-ng/vrf
+ exit 0
/bin/run-parts /etc/network/if-up.d
ifupdown: nat64: attempting to run link executor for phase post-up
/usr/libexec/ifupdown-ng/link
ifupdown: nat64: attempting to run pre executor for phase post-up
ifupdown: nat64: attempting to run post executor for phase post-up
ifupdown: nat64: attempting to run vrf executor for phase post-up
/usr/libexec/ifupdown-ng/vrf
+ exit 0
Executors run by default before any of the local steps are run.
Actually, imo the solution here is to turn running pre-up/up/down/post-down scripts into their own executor.