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

make ndcli modify pool <p> set layer3domain <l3d> possible for pools with subnets smaller /24 #233

Closed
miesi opened this issue Apr 7, 2022 · 1 comment · Fixed by #241
Labels
bug Something isn't working
Milestone

Comments

@miesi
Copy link
Contributor

miesi commented Apr 7, 2022

$ ndcli modify pool ic-documentation-only-5 set layer3domain 6724-global 
ERROR - The view default of the zone 13.214.85.in-addr.arpa is not empty.

$ ndcli list pool ic-documentation-only-5
prio subnet         gateway free total
   1 85.214.13.0/26           58    64
INFO - Total free IPs: 58

  85.214.13.0/26 (Subnet) pool:ic-documentation-only-5
  85.214.13.64/28 (Subnet) pool:de-ber-rs1-gsp-public-2052
  85.214.13.80/28 (Subnet) pool:de-ber-rs2-gsp-public-2052
  85.214.13.96/29 (Subnet) pool:de-ber-rs-dns-public-304-live

This happens because the code tries to delete the reverse zone although the zone is not yet empty.

I suggest to ignore errors returned by

1331             self._delete_reverse_zones(subnet, force=False)

when admin is moving subsequent pools (e.g. de-ber-rs1-gsp-public-2052 ...) the reverse zone will get emptied. Last pool will then be able to delete reverse zone.

@miesi miesi added the bug Something isn't working label Apr 7, 2022
@miesi miesi added this to the next milestone Apr 7, 2022
miesi pushed a commit that referenced this issue Apr 7, 2022
@Srudush
Copy link
Contributor

Srudush commented May 3, 2022

It is weird that the error returns, that the zone is not empty.
In https://github.com/1and1/dim/blob/master/dim/dim/rpc.py#L3096-L3105 there is special handling in place for ipv4 networks to check that the view is completely empty.

Srudush added a commit to Srudush/dim that referenced this issue May 6, 2022
The function _delete_reverse_zones expected the subnet to be deleted
already. This lead to many reverse zones not being deleted or the
transaction being blocked altogether.

By forcing the deletion and working with a copy of the actual Subnet
object the deletion now goes through without problems.

Fixes ionos-cloud#233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants