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

Problem while listing DNS entries in rackspace cloud dns #145

Closed
flozano opened this issue May 20, 2013 · 9 comments
Closed

Problem while listing DNS entries in rackspace cloud dns #145

flozano opened this issue May 20, 2013 · 9 comments

Comments

@flozano
Copy link

flozano commented May 20, 2013

Thread [main] (Suspended (breakpoint at line 42 in Absent)) 
    Absent.get() line: 42   
    RecordsToPagedIterable.markerToNextForArg0(Optional<Object>) line: 52   
    RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(IterableWithMarker<T>) line: 73  
    RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(Object) line: 61 
    Functions$FunctionComposition<A,B,C>.apply(A) line: 210 
    InvokeHttpMethod.invoke(Invocation) line: 97    
    InvokeHttpMethod.apply(Invocation) line: 80 
    InvokeHttpMethod.apply(Object) line: 51 
    FunctionalReflection$FunctionalInvocationHandler<T>.handleInvocation(Object, Method, Object[]) line: 119    
    FunctionalReflection$FunctionalInvocationHandler<T>(AbstractInvocationHandler).invoke(Object, Method, Object[]) line: 70    
    $Proxy72.list() line: not available 
    CloudDNSResourceRecordSetApi.list() line: 33    
    ResourceRecordSetCommands$ResourceRecordSetList.doRun(DNSApiManager) line: 58   
    ResourceRecordSetCommands$ResourceRecordSetList(Denominator$DenominatorCommand).run() line: 132 
    Denominator.main(String[]) line: 74 
  @Override public Object get() {
    throw new IllegalStateException("Optional.get() cannot be called on an absent value");
  }

Only happens in a domain with lots of entries. Small domains work well.

@codefromthecrypt
Copy link
Contributor

Can you enable DEBUG to the log categories jclouds.headers and jclouds.wire
and send back the json? Looks like a bug in the pagination code in our
jclouds rax dep

cc @jdaggett

On Monday, May 20, 2013, Francisco A. Lozano wrote:

Thread [main](Suspended %28breakpoint at line 42 in Absent%29)
Absent.get() line: 42
RecordsToPagedIterable.markerToNextForArg0(Optional) line: 52
RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(IterableWithMarker) line: 73
RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(Object) line: 61
Functions$FunctionComposition<A,B,C>.apply(A) line: 210
InvokeHttpMethod.invoke(Invocation) line: 97
InvokeHttpMethod.apply(Invocation) line: 80
InvokeHttpMethod.apply(Object) line: 51
FunctionalReflection$FunctionalInvocationHandler.handleInvocation(Object, Method, Object[]) line: 119
FunctionalReflection$FunctionalInvocationHandler(AbstractInvocationHandler).invoke(Object, Method, Object[]) line: 70
$Proxy72.list() line: not available
CloudDNSResourceRecordSetApi.list() line: 33
ResourceRecordSetCommands$ResourceRecordSetList.doRun(DNSApiManager) line: 58
ResourceRecordSetCommands$ResourceRecordSetList(Denominator$DenominatorCommand).run() line: 132
Denominator.main(String[]) line: 74

@OverRide public Object get() {
throw new IllegalStateException("Optional.get() cannot be called on an absent value");
}

Only happens in a domain with lots of entries. Small domains work well.


Reply to this email directly or view it on GitHubhttps://github.com//issues/145
.

@flozano
Copy link
Author

flozano commented May 21, 2013

2013-05-21 12:20:10,939 DEBUG [jclouds.headers] [main] >> GET https://dns.api.rackspacecloud.com/v1.0/XXXXXX/domains/YYYYYY/records HTTP/1.1
2013-05-21 12:20:10,940 DEBUG [jclouds.headers] [main] >> Accept: application/json
2013-05-21 12:20:10,940 DEBUG [jclouds.headers] [main] >> X-Auth-Token: XXXXXXXXXXXXXXXXXXXXXXXX
2013-05-21 12:20:12,842 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Date: Tue, 21 May 2013 10:20:12 GMT
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << x-api-version: 1.0.24
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Via: 1.1 Repose (Repose/2.6.11)
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Server: Jetty(8.0.y.z-SNAPSHOT)
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Content-Type: application/json
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Content-Length: 17540
2013-05-21 12:20:13,122 DEBUG [jclouds.wire] [main] << "{
   "records":[
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.232.208.999",
         "ttl":300,
         "updated":"2010-10-20T18:03:18.000+0000",
         "created":"2010-10-20T18:03:18.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.143.131.999",
         "ttl":300,
         "updated":"2010-11-12T02:48:38.000+0000",
         "created":"2010-11-12T02:48:38.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.23.243.999",
         "ttl":300,
         "updated":"2010-11-25T13:21:10.000+0000",
         "created":"2010-11-25T13:21:10.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.121.66.999",
         "ttl":300,
         "updated":"2010-12-18T14:09:14.000+0000",
         "created":"2010-12-18T14:09:14.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.23.243.999",
         "ttl":300,
         "updated":"2010-12-18T14:09:44.000+0000",
         "created":"2010-12-18T14:09:44.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.143.151.999",
         "ttl":300,
         "updated":"2011-01-07T13:00:40.000+0000",
         "created":"2011-01-07T13:00:40.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.143.151.999",
         "ttl":300,
         "updated":"2011-01-13T18:18:26.000+0000",
         "created":"2011-01-13T18:18:26.000+0000"
      },
      {
         "name":"ZZZZZ.mydomain.com",
         "id":"A-1234567",
         "type":"A",
         "data":"777.213.78.999",
         "ttl":300,
         "updated":"2013-04-10T02:19:04.000+0000",
         "created":"2013-04-10T02:19:04.000+0000"
      }
   ],
   "totalEntries":271,
   "links":[
      {
         "href":"https://dns.api.rackspacecloud.com/v1.0/XXXXXX/domains/YYYYYY/records?limit=100&offset=100",
         "rel":"next"
      }
   ]
}"
;; error: Optional.get() cannot be called on an absent value

(I've removed tokens, IDs and IP addresses... also there were many more records.

@codefromthecrypt
Copy link
Contributor

logged an upstream issue on this https://issues.apache.org/jira/browse/JCLOUDS-78

@etoews
Copy link
Contributor

etoews commented May 23, 2013

Issue fixed upstream in jclouds. Should be able to close this when Denominator upgrades to jclouds 1.6.1.

@codefromthecrypt
Copy link
Contributor

You mind opening a pr in denominator which uses snapshot and validates this
no longer breaks via a mockwebserver test?

On Thursday, May 23, 2013, Everett Toews wrote:

Issue fixed upstream in jclouds. Should be able to close this when
Denominator upgrades to jclouds 1.6.1.


Reply to this email directly or view it on GitHubhttps://github.com//issues/145#issuecomment-18360866
.

@etoews
Copy link
Contributor

etoews commented May 23, 2013

I've got the test written but am having trouble getting the snapshot using Gradle. From what I can tell in the denominator/build.gradle file the Sonatype snapshot repo is enabled. The 1.6.1 snapshot is there https://oss.sonatype.org/content/repositories/snapshots/org/jclouds/api/rackspace-clouddns/1.6.1-SNAPSHOT/

In denominator-clouddns/build.gradle I've got

dependencies {
  compile      project(':denominator-core')
  testCompile  project(':denominator-core').sourceSets.test.output
  compile     'org.jclouds.provider:rackspace-clouddns-us:1.6.1-SNAPSHOT'
  compile     'org.jclouds.provider:rackspace-clouddns-uk:1.6.1-SNAPSHOT'
  compile     'org.jclouds.driver:jclouds-slf4j:1.6.0'
}

but when I do

./gradlew clean install

I get

Could not resolve all dependencies for configuration ':providers:denominator-clouddns:compile'.
> Could not find org.jclouds.provider:rackspace-clouddns-us:1.6.1-SNAPSHOT.
  Required by:
      com.netflix.denominator:denominator-clouddns:1.2.0-SNAPSHOT
> Could not find org.jclouds.provider:rackspace-clouddns-uk:1.6.1-SNAPSHOT.
  Required by:
      com.netflix.denominator:denominator-clouddns:1.2.0-SNAPSHOT

Do I need anything else in denominator-clouddns/build.gradle?

@codefromthecrypt
Copy link
Contributor

check out #144 for instructions

@etoews
Copy link
Contributor

etoews commented May 26, 2013

Here's the fix #151

@codefromthecrypt
Copy link
Contributor

fixed thanks to @everett-toews! will be in denominator 1.1.4 (shortly)

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

3 participants