Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[os-ddclient] Native backend fails updating ovh dynhost, keeps an invalid cache thereafeter #3679

Closed
3 tasks done
interj opened this issue Nov 20, 2023 · 6 comments
Closed
3 tasks done
Assignees
Labels
cleanup Low impact changes

Comments

@interj
Copy link
Contributor

interj commented Nov 20, 2023

Describe the bug
There are seemingly two problems affecting native backend:

  • ddclient always fails with a badsys status - there's no other information about it in the ddclient log, syslog or anywhere else
  • after a failed attempt local cache gets written (even though the dns record was never updated) and ddclient gives up on updating the ip - it's a very dangerous assumption that local cache is always correct

Expected behavior
Ddclient reliably updates a dynamic domain with ovh as a provider.

Relevant log files

2023-11-20T17:25:34	Notice	ddclient	Account fbc56979-2194-4574-9146-3cd82fbc3ca1 [ovh - test] not modified
2023-11-20T17:25:34	Notice	ddclient	Account fbc56979-2194-4574-9146-3cd82fbc3ca1 [ovh - test] executing	
2023-11-20T17:25:29	Notice	ddclient	Flush dyndns status to disk	
2023-11-20T17:25:29	Notice	ddclient	Account fbc56979-2194-4574-9146-3cd82fbc3ca1 [ovh - test] updated	
2023-11-20T17:25:29	Notice	ddclient	Account fbc56979-2194-4574-9146-3cd82fbc3ca1 [ovh - test] set new ip *.*.*.*[badsys]	
2023-11-20T17:25:28	Notice	ddclient	Account fbc56979-2194-4574-9146-3cd82fbc3ca1 [ovh - test] executing
2023-11-20T17:25:28	Notice	ddclient	Account fbc56979-2194-4574-9146-3cd82fbc3ca1 [ovh - test] uses DynDNS2 for service

Additional context
Legacy ddclient never seemed to work well with the ovh service (usually it updated some ips then crashed), legacy dyndns worked most of the time. Native backend doesn't work at all.

Environment
OPNsense 23.7.8
os-ddclient 1.16_2

@AdSchellevis
Copy link
Member

I'm not sure this is our end to be honest if the endpoint returns a 2XX http_status code (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses):

if 200 <= req.status_code < 300:
if self.is_verbose:
syslog.syslog(
syslog.LOG_NOTICE,
"Account %s set new ip %s [%s]" % (self.description, self.current_address, req.text.strip())
)
self.update_state(address=self.current_address, status=req.text.split()[0] if req.text else '')
return True

@fichtner
Copy link
Member

ovh/docs#3529

@interj
Copy link
Contributor Author

interj commented Nov 20, 2023

I found this https://techforum.ewon.biz/thread-163-post-537.html after learning that badsys is just some substandard status returned by ovh dynhost. Adding 'system': 'dyndns' to params in the dyndns2.py makes it work.

@AdSchellevis
Copy link
Member

the standard is rather old and messy indeed, personally I don't mind adding the result strings documented in https://help.dyn.com/wp-content/uploads/2014/09/flow.pdf , log them separately and skip the action.

@AdSchellevis
Copy link
Member

funny note, the badsys exists in the flow, but not in the return codes document at the same origin https://help.dyn.com/remote-access-api/return-codes/

interj added a commit to interj/opnsense_plugins that referenced this issue Dec 6, 2023
This commit fixes the update process for ovh-dyndns - part of the opnsense#3679
@interj
Copy link
Contributor Author

interj commented Dec 6, 2023

For what it's worth I made a small PR that fixes ddclient updates for ovh dynhost. Doesn't consider a potential badsys response however.

interj added a commit to interj/opnsense_plugins that referenced this issue Dec 6, 2023
interj added a commit to interj/opnsense_plugins that referenced this issue Dec 6, 2023
interj added a commit to interj/opnsense_plugins that referenced this issue Jan 22, 2024
This commit fixes the update process for ovh-dyndns - part of the opnsense#3679
@fichtner fichtner self-assigned this Jan 23, 2024
@fichtner fichtner added the cleanup Low impact changes label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Low impact changes
Development

No branches or pull requests

3 participants