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

LMDB: pdnsutil edit-zone fails #8134

Open
zeha opened this issue Jul 28, 2019 · 6 comments

Comments

@zeha
Copy link
Collaborator

commented Jul 28, 2019

  • Program: Authoritative
  • Issue type: Bug report

Short description

edit-zone appears to fail with lmdbbackend.

Environment

  • Operating system: Debian sid
  • Software version: 4.2.0-rc2
  • Software source: "compiled yourself"

Steps to reproduce

% sudo pdnsutil create-zone exa.org
Creating empty zone 'exa.org'
% sudo pdnsutil create-zone exa.org
% sudo pdnsutil list-all-zones            
exa.org
% sudo pdnsutil edit-zone exa.org
Checked 3 records of 'exa.org', 0 errors, 0 warnings.
Detected the following changes:
+exa.org 300 IN NS ns1.exa.org
+ns1.exa.org 300 IN A 127.0.0.1

(a)pply these changes, (e)dit again, (r)etry with original zone, (q)uit: y

(a)pply these changes, (e)dit again, (r)etry with original zone, (q)uit: a
Error: Duplicate RO transaction

NB: pdns-server was stopped when this was attempted.

@zeha zeha added auth defect labels Jul 28, 2019

@zeha zeha added this to the auth-4.2.0 milestone Jul 28, 2019

@zeha

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 28, 2019

The same can be observed in add-record:

% sudo pdnsutil add-record exa.org exa.org NS 100 ns1.exa.org
Error: Duplicate RO transaction
@Habbie

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

I've bisected the add-record failure to:

commit f43646f5156f93f710671fbaeadaee4102dfb02d
Author: Peter van Dijk <peter.van.dijk@powerdns.com>
Date:   Fri Jun 7 16:29:37 2019 +0200

    auth API, pdnsutil: improve backend transaction correctness

😢

This was #7891. Verschlimmbesserung!

@zeha

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 29, 2019

Looks like the passing -1 to startTransaction is not a good idea with lmdbbackend...

LMDBBackend::replaceRRSet checks the domain_id against the d_transactiondomainid, but I think it shouldn't do that. If I'm not mistaken the API might also submit changes to multiple domains in a single TX.

@Habbie

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

Unsurprisingly, it's also broken on rel/auth-4.2.x.

@Habbie

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Looks like the passing -1 to startTransaction is not a good idea with lmdbbackend...

For add-record, that is not the problem. The 'problem' is that pdnsutil wants to both read and write in the same transaction, and the lmdbbackend does not support that (this is not by any means an LMDB limitation).

@Habbie

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

This appears to be the main thing holding up 4.2.0(-rc3) now, so I'm postponing this issue, as sad as that makes me, so that the rest of 4.2.0 can go out the door.

@Habbie Habbie modified the milestones: auth-4.2.0, auth-4.2.x Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.