Page MenuHomeVyOS Platform

rename dynamic dns interface breaks ddclient.cache permissions
Closed, ResolvedPublicBUG

Description

once committing an interface rename under:

services dns dynamic
rename interface eth0.400 to interface pppoe0

the ddclient cache file becomes unaccesible by the ddclient service although the file does have (RW) permissions.

once renaming the interface it is not possible to delete or run show status of the dynamic dns interface.

the errors that shows up:

delete service dns dynamic 
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

by renaming the interface back to the original interface and committing the error still occurs.

it seems like there's a permissions issue with the ddclient.cache file.
However:
when setting the permissions to 666 the same issue occurs.
when the file is deleted it's recreated but with 600 permissions.

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.5
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Behavior change

Event Timeline

masterit created this task.Sep 1 2020, 11:55 PM
pasik added a subscriber: pasik.Sep 2 2020, 8:42 AM
c-po added a comment.Sep 3 2020, 6:16 PM

This also happens on service deletion

c-po closed this task as Resolved.Sep 3 2020, 8:15 PM
c-po claimed this task.
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.

Tested with:

set service dns dynamic interface eth0.203 service custom host-name 'test.vyos.net'
set service dns dynamic interface eth0.203 service custom login 'vyos'
set service dns dynamic interface eth0.203 service custom password 'vyos'
set service dns dynamic interface eth0.203 service custom protocol 'dyndns2'
set service dns dynamic interface eth0.203 service custom server 'vyos.io'
c-po changed Version from 1.2.6-epa2 to 1.2.5.
c-po moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.6) board.