Skip to content

Desec stop retrying rejected updates - #9098

Open
szaimen wants to merge 2 commits into
mainfrom
desec-stop-retrying-rejected-updates
Open

szaimen wants to merge 2 commits into
mainfrom
desec-stop-retrying-rejected-updates

Conversation

@szaimen

@szaimen szaimen commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The PR was tested and verified that it works locally
  • Or will be tested after merge on a dedicated test instance (available for maintainers)
  • Sign-off message is added to all commits
  • Tests (playwright if possible) are included
  • Screenshots before/after for front-end changes
  • Documentation has been updated or is not required
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone next added

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@szaimen

szaimen commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

@peterthomassen WDYT?

@szaimen szaimen added this to the next milestone Nov 23, 2026
@peterthomassen

Copy link
Copy Markdown
Contributor

looks good!

@szaimen
szaimen force-pushed the desec-avoid-noop-updates branch 2 times, most recently from 80c8218 to 5985801 Compare November 25, 2026 09:09
Base automatically changed from desec-avoid-noop-updates to main November 25, 2026 14:53
szaimen and others added 2 commits November 25, 2026 15:57
…token or domain

When the deSEC token was revoked or the domain deleted, the updater kept
sending the same rejected update every 10 minutes indefinitely. Retrying
cannot succeed until the account is fixed, so after a 401/403/404 the next
attempt is delayed exponentially (20 minutes, doubling, at most one day).
A successful update or a new registration ends the backoff.

Fixes #9097

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
The deSEC mock's dyndns endpoint always answered "good", so rejected
updates could not be tested. It now rejects unknown tokens and foreign
domains like deSEC does, and a new spec checks that rejected updates are
backed off and that a successful update ends the backoff.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
@szaimen
szaimen force-pushed the desec-stop-retrying-rejected-updates branch from 08bd4d5 to a8a13c7 Compare November 25, 2026 14:59
@szaimen
szaimen marked this pull request as ready for review November 25, 2026 15:00
@szaimen szaimen modified the milestones: v15.2.0, next Nov 25, 2026

@pabzm pabzm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at my comments.

I'd also appreciate if you could test your changes locally. Thanks!


$backoff = $this->configurationManager->desecIpUpdateBackoff;
$failedAttempts = $backoff['failed_attempts'] ?? 0;
if ($failedAttempts > 0 && time() < ($backoff['last_failed_at'] ?? 0) + self::getUpdateRetryDelay($failedAttempts)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you split up this line so it gets easier to understand, please?

Comment on lines +629 to +630
if ($failedAttempts > 0) {
$this->configurationManager->desecIpUpdateBackoff = [];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way I find the code unnecessarily indirect and thus harder to understand. I would suggest to change the if-clause and at least to compare against the variable with a related name – instead of a helper variable, of which I have to remember that its value was pulled out of the data stored in the config 35 lines earlier:

Suggested change
if ($failedAttempts > 0) {
$this->configurationManager->desecIpUpdateBackoff = [];
if ($backoff === []) {
$this->configurationManager->desecIpUpdateBackoff = [];

@szaimen szaimen added 2. developing Work in progress desec.io and removed 3. to review Waiting for reviews labels Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress bug Something isn't working desec.io

Projects

None yet

Development

Successfully merging this pull request may close these issues.

desec: invalid token or deleted domain is retried every 10 minutes indefinitely.

3 participants