Page MenuHomeVyOS Platform

Dynamic DNS configuration cannot be deleted
Closed, ResolvedPublicBUG

Description

It is impossible to completely delete dynamic DNS service.

How to reproduce:

set service dns dynamic interface eth0 service namecheap host-name 'host1'
set service dns dynamic interface eth0 service namecheap login 'user1'
set service dns dynamic interface eth0 service namecheap password 'passwd1'
commit
delete service dns
commit

After the last commit:

[ service dns dynamic ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/dynamic_dns.py", line 281, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/dynamic_dns.py", line 261, in apply
    if os.path.exists(dyndns['cache_file']):
TypeError: 'NoneType' object is not subscriptable

delete [ service dns dynamic ] failed
[[]] failed
Commit failed
copy failed [/opt/vyatta/config/tmp/tmp_3423/work/.unionfs][/opt/vyatta/config/tmp/new_config_3423/.unionfs]
Failed to generate committed config

Details

Difficulty level
Unknown (require assessment)
Version
1.2-rolling-201912051341
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

zsdc changed the task status from Open to Confirmed.Dec 5 2019, 7:40 PM
zsdc created this task.

@zsdc Maybe Incorrect file location. "ddclient.pid"

root@1:/home/vyos# cat /etc/ddclient/ddclient.conf | grep pid
pid=/var/run/ddclient/ddclient.pid
root@1:/home/vyos# 
root@1:/home/vyos# file /var/run/ddclient/ddclient.pid
/var/run/ddclient/ddclient.pid: cannot open `/var/run/ddclient/ddclient.pid' (No such file or directory)
root@1:/home/vyos# 
root@1:/home/vyos# file /var/run/ddclient.pid
/var/run/ddclient.pid: ASCII text
root@1:/home/vyos#
[email protected]# sudo cat /usr/libexec/vyos/conf_mode/dynamic_dns.py | grep ddclient.pid
pid_file = r'/var/run/ddclient/ddclient.pid'
[edit]
# sudo journalctl -xe
ddclient[3488]: WARNING:  file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword 'ip' = ''

[email protected]# sudo cat /var/cache/ddclient/ddclient.cache
## ddclient-3.9.0
## last updated at Fri Dec  6 10:23:16 2019 (1575627796)
atime=1575627796,host=host1,ip=,mtime=0,status=failed,warned-min-error-interval=0,warned-min-interval=0,wtime=0 host1
[edit]
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:10 PM