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

Can't add CNAME record pointing to other domain using powerdns provider #862

Open
fabiorauber opened this issue Jun 30, 2021 · 0 comments
Open

Comments

@fabiorauber
Copy link

When trying to add a CNAME record to domain foo.com, pointing to server.bar.com using lexicon powerdns provider, the CNAME record gets added with content server.bar.com.foo.com, even when the content variable contains the trailing dot.

I believe the culprit is

content = self._fqdn_name(content)

def _fqdn_name(self, record_name: str) -> str:

    def _fqdn_name(self, record_name: str) -> str:
        # strip trailing period from fqdn if present
        record_name = record_name.rstrip(".")
        # check if the record_name is fully specified
        if not record_name.endswith(self.domain):
            record_name = f"{record_name}.{self.domain}"
        return f"{record_name}."  # return the fqdn name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant