Netflix / denominator

Portably control DNS clouds using java or bash
Apache License 2.0
580 stars 110 forks source link

denominator giving error when advanced directional dns is not enabled #259

Closed AEgitadmin closed 9 years ago

AEgitadmin commented 10 years ago

I am getting below error from denominator because we don't have advanced directional dns enabled. Is it still possible to use denominator for our account?

[UltraDNS#getDirectionalPoolsOfZone] <--- HTTP/1.1 500 Server Error (1492ms) ;; error: UltraDNS#getDirectionalPoolsOfZone(String) failed with error 4006: Directional feature not Enabled or Directional migration is not done.

codefromthecrypt commented 10 years ago

what syntax are you using?

AEgitadmin commented 10 years ago

./denominator -p ultradns -c username -c password record --zone zonename list

AEgitadmin commented 10 years ago

any update?

codefromthecrypt commented 10 years ago

Looks like list and get are inconsistent, as they should use basic* which shouldn't ask for geo stuff.

https://github.com/Netflix/denominator/blob/master/cli/src/main/java/denominator/cli/ResourceRecordSetCommands.java#L55

Can you try the following, giving a well-known DNS record name, to see if my hypothesis is correct?

./denominator -p ultradns -c username -c password record --zone zonename list -n domainname.com.

AEgitadmin commented 10 years ago

You are right, with -n domainname.com is working fine for a single domain entry

but I need to get an option to retrieve all records.

codefromthecrypt commented 10 years ago

Here's how to fix this.

clone denominator and make a branch

edit this file https://github.com/Netflix/denominator/blob/master/cli/src/main/java/denominator/cli/ResourceRecordSetCommands.java

replace all case-insensitive occurrences of recordSetsInZone with basicRecordSetsInZone

make sure tests still pass

make a pull request from your branch.

Are you able to do ^^?

dunka commented 10 years ago

Running into the same issue, I did the above minus the pull request. It looks like the basicRecordSetsInZone does not have the iterateByNameAndType or the getByNameTypeAndQualifier methods.

I went ahead and removed them from the if statements and built the project. It seems to list fine now!

I worry though that I may have introduced bad behavior by leaving out the qualifier != null and if (name != null && type != null) checks in the iterator.

codefromthecrypt commented 9 years ago

crazy latency, but I plan to spend a bit of time in denominator. ping back if you'd still like this addressed!