@sallum This is a good and necessary addition to jclouds. I really want to see
this get in. That said I've hit a problem.
I've been live testing this but I can't make it fail, which I think points to a
problem. I'm using the following command to live test this against a temp
instance of DevStack I have running.
cd apis/openstack-nova
mvn clean test -Plive
-Dtest.openstack-nova.endpoint=http://166.78.236.107:5000/v2.0/
-Dtest.openstack-nova.identity=demo:demo
-Dtest.openstack-nova.credential=devstack -Dtest=InternalURLLiveTest
However, I've changed my internalURL for nova to an IP that doesn't exist. So
the test should fail with a host not found exception or timeout. Here's the
nova entry in my service catalog. You can see the internalURL is different from
the publicURL.
{
"name": "nova",
"type": "compute",
"endpoints_links": [],
"endpoints": [
{
"publicURL":
"http://166.78.236.107:8774/v2/134e0fd0c239484dbfe3fdcb5211d4dc",
"id": "39e4d2edc69140ae9aa742d7fd69b16b",
"internalURL":
"http://not.even.an.ip/v2/134e0fd0c239484dbfe3fdcb5211d4dc",
"region": "RegionOne",
"adminURL":
"http://166.78.236.107:8774/v2/134e0fd0c239484dbfe3fdcb5211d4dc"
}
]
},
When I look at the log generated in `target/test-data/jclouds-wire.log` I can
see that the call to
`novaApi.getServerApiForZone(zone).list().concat().toList()` in
`InternalURLLiveTest` goes to the publicURL
`http://166.78.236.107:8774/v2/134e0fd0c239484dbfe3fdcb5211d4dc/servers` and
_not_ the internalURL
`http://not.even.an.ip/v2/134e0fd0c239484dbfe3fdcb5211d4dc/servers`
Also, if I run the test in my IDE and set breakpoints in
https://github.com/sallum/jclouds/blob/555a5377a48204805b6db9d607e899fcde6abbff/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/functions/InternalURL.java#L37
and
https://github.com/sallum/jclouds/blob/555a5377a48204805b6db9d607e899fcde6abbff/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/functions/InternalURLLiveTest.java#L45
the run stops in InternalUrlModule.configure() but not in InternalURL.apply().
Looking at the work done for AdminURL in the
`org.jclouds.openstack.keystone.v2_0.suppliers` I suspect there's more Guice
config to be done before the internalURL can be used.
Can you run your live test against my DevStack instance? Are you seeing similar
behaviour? Am I missing something?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/142#issuecomment-28924788