Page MenuHomeVyOS Platform

nat66: commit fails/hangs on non existing interface
Closed, ResolvedPublic

Description

Reproduce

Assuming there is NO tun0 interface

set nat66 source rule 1 outbound-interface tun0
set nat66 source rule 1 source prefix fc00:25:f1cd:11:1::/80
set nat66 source rule 1 translation address 2001:2002:d9d1:e2a4:1::/80
vyos@vyos# commit
[ nat66 ]
WARNING: rule "1" interface "tun0" does not exist on this system
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2021-09-26 12:54:09
Image version:    VyOS 1.4-rolling-202109210610
Release train:    sagitta

Built by:         [email protected]
Built on:         Tue 21 Sep 2021 06:10 UTC
Build UUID:       0975b7c3-751b-44ce-aa93-d838283a6950
Build commit ID:  b40705531c334c

Architecture:     x86_64
Boot via:         installed image
System type:      VMware guest

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 3f 67 73 77 df c4 80-42 c9 42 af ff 15 de 0b
Hardware UUID:    73673f42-df77-80c4-42c9-42afff15de0b

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/nat66.py", line 173, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/nat66.py", line 161, in apply
    cmd('systemctl restart ndppd')
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: systemctl restart ndppd
returned:
exit code: 1

noteworthy:
cmd 'systemctl restart ndppd'
returned (out):

returned (err):
Job for ndppd.service failed because a timeout was exceeded.
See "systemctl status ndppd.service" and "journalctl -xe" for details.

[[nat66]] failed
Commit failed

Also the process tree shows that the commit hangs b/c of ndppd startup

root        1846  0.0  0.1  13320  7748 ?        Ss   Sep25   0:00 sshd: /usr/sbin/sshd -f /run/sshd/sshd_config -D [listener] 0 of 10-100 startups
root       30641  0.0  0.2  14732  8888 ?        Ss   12:51   0:00  \_ sshd: cpo [priv]
cpo        30730  0.0  0.1  14984  5752 ?        S    12:51   0:00  |   \_ sshd: cpo@pts/0
cpo        30731  0.1  0.1   8252  5156 pts/0    Ss   12:51   0:00  |       \_ -vbash
cpo        30864  0.5  0.1   8912  6048 pts/0    S    12:52   0:00  |           \_ vbash
cpo        31085  0.2  0.2  22380  9176 pts/0    S+   12:52   0:00  |               \_ /opt/vyatta/sbin/my_commit
root       31099  0.0  0.1  11140  5200 pts/0    S+   12:52   0:00  |                   \_ sudo sh -c  /usr/libexec/vyos/conf_mode/nat66.py
root       31100  1.5  2.9 129648 119192 pts/0   S+   12:52   0:00  |                       \_ python3 /usr/libexec/vyos/conf_mode/nat66.py
root       31108  0.0  0.0  10068  3892 pts/0    S+   12:52   0:00  |                           \_ systemctl restart ndppd
root       31109  0.0  0.0  13108  2572 pts/0    S+   12:52   0:00  |                               \_ /bin/systemd-tty-ask-password-agent --watch

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202109210610
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po triaged this task as Normal priority.Sep 26 2021, 10:55 AM
c-po created this task.
c-po created this object in space S1 VyOS Public.
c-po claimed this task.