A mirror or redirect target can be deleted while the source still uses it. The commit is accepted, the source keeps a filter to a missing device (mirred (Egress Mirror to device *)), and after save and a reboot the source interface is lost.
Steps (stock 7216e748b, mirror egress and redirect):
set interfaces dummy dum2 address '10.206.2.1/32' commit set interfaces ethernet eth1 mirror egress 'dum2' commit delete interfaces dummy dum2 commit # accepted save reboot
After the reboot /tmp/vyos-config-status is 1:
vyos-configd[799]: [interfaces_ethernet] Requested mirror interface "dum2" does not exist! vyos-config[1156]: Configuration error
The whole eth1 node, addresses included, is gone. Without the delete the same config boots clean.
Since T7886 such deletes are refused for other references (e.g. protocols ospf interface), but the mirror ingress, mirror egress (include/interface/mirror.xml.i) and redirect (include/interface/redirect.xml.i) leaves lack <dependency kind="interface" alert="error"/>.
Proposed fix, tested: add that element to the three leaves. With it, the delete is refused for mirror ingress, mirror egress, redirect and a VLAN target:
Node: "interfaces dummy dum2" is required by: "interfaces ethernet eth1 mirror egress" delete [ interfaces dummy dum2 ] failed Commit failed
Legitimate deletes (mirror with target, source, re-pointed mirror) are still accepted.
PR #5517 (head ac1186bf8) does not change this. The steps use a dummy because on stock a tunnel or VLAN target fails at boot even without a delete (T6393).