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

cloudify-openstack-driver #1

Open
ylcao2012 opened this issue Nov 30, 2012 · 10 comments
Open

cloudify-openstack-driver #1

ylcao2012 opened this issue Nov 30, 2012 · 10 comments
Milestone

Comments

@ylcao2012
Copy link

Could you update the tenantName to tenantId ? Looks my openStack only accept tenantId for the http POST ? Looks like:

curl -k -X 'POST' -v http://hostIP:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "admin", "password":"PASSWD"}, "tenantId":"118036cd9b124d"}}' -H 'Content-type: application/json' -H 'Accept: application/xml'

@grozeille
Copy link
Contributor

What about the other REST calls?
For now, the driver is sending some headers:
X-Auth-Token=
x-auth-project-id=

Could the "x-auth-project-id" be the tenantid also? or should I guess the tenantname from the tenantid?

@ylcao2012
Copy link
Author

I got error in Cloudify bootstrap-cloud openstack as following:

cloudify@default> bootstrap-cloud openstack
Bootstrapping cloud openstack. This may take a few minutes.
1 * Client out-bound request
1 > POST http://myOpenStackServerIP:5000/v2.0/tokens
1 > Content-Type: application/json
1 > Accept: application/xml
{"auth":{"passwordCredentials":{"username":"admin","password":"mypasswd"},"tenantName":"admin"}}

java.net.NoRouteToHostException: No route to host
Operation failed.

I manually tried to post above message and failed. If I use tenantId, it works. So, could you upadte tenanatName to tenantId in this driver ?

Other REST call works fine if I put X-Auth-Token=xxxxx in the message.

Thanks,

@grozeille
Copy link
Contributor

For the other REST calls, what are the headers you put?
X-Auth-Token=xxxxx is one of them. Did you put x-auth-project-id too? with tenantname or tenantid?

I just want to know if I have to replace "tenantname" to "tenantid" everywhere or just for the authentication part

@grozeille
Copy link
Contributor

Also, can you try "bootstrap-cloud --verbose openstack" and give me the stacktrace? just in case...

@ylcao2012
Copy link
Author

I will check w/ --verbose next Monday.

In openstack api doc, it uses tenantId for authentication,
http://docs.openstack.org/api/quick-start/content/index.html#Getting-Credentials-a00665

@ylcao2012
Copy link
Author

Here is the stacktrace:
cloudify@default> bootstrap-cloud --verbose openstack
Bootstrapping cloud openstack. This may take a few minutes.
1 * Client out-bound request
1 > POST http://myOpenStackServerIP:5000/v2.0/tokens
1 > Content-Type: application/json
1 > Accept: application/xml
{"auth":{"passwordCredentials":{"username":"admin","password":"verybadpass"},"tenantName":"admin"}}

Operation failed. com.sun.jersey.api.client.ClientHandlerException: java.net.NoRouteToHostException: No route to host
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
at com.sun.jersey.api.client.filter.LoggingFilter.handle(LoggingFilter.java:183)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:670)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:563)
at org.cloudifysource.esc.driver.provisioning.openstack2.OpenstackCloudDriver.createAuthenticationToken(OpenstackCloudDriver.java:877)
at org.cloudifysource.esc.driver.provisioning.openstack2.OpenstackCloudDriver.startManagementMachines(OpenstackCloudDriver.java:212)
at org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper.boostrapCloudAndWait(CloudGridAgentBootstrapper.java:174)
at org.cloudifysource.esc.shell.commands.BootstrapCloud.doExecute(BootstrapCloud.java:98)
at org.cloudifysource.shell.commands.AbstractGSCommand.execute(AbstractGSCommand.java:79)
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:221)
at org.apache.karaf.shell.console.Main.run(Main.java:191)
at org.apache.karaf.shell.console.Main.run(Main.java:89)
at org.cloudifysource.shell.GigaShellMain.main(GigaShellMain.java:122)
Caused by: java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.(HttpClient.java:227)
at sun.net.www.http.HttpClient.New(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler$1$1.getOutputStream(URLConnectionClientHandler.java:225)
at com.sun.jersey.api.client.CommittingOutputStream.commitWrite(CommittingOutputStream.java:117)
at com.sun.jersey.api.client.CommittingOutputStream.write(CommittingOutputStream.java:89)
at com.sun.jersey.api.client.filter.LoggingFilter$LoggingOutputStream.write(LoggingFilter.java:110)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
at com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java:191)
at com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:128)
at com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:88)
at com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:58)
at com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:300)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:204)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:147)
... 21 more

Operation failed.
cloudify@default>

@ylcao2012
Copy link
Author

I tried in Cloudify 2.2.0 ga

cloudify@default> version
GigaSpaces Cloudify 2.2.0 GA (build 2500)

@ylcao2012
Copy link
Author

Replace port 5000 to 35357 and IP to DNS name, it moves forward. But, it still failed later.

12 * Client out-bound request
12 > GET http://localhost:8774/v1.1/118036cd9b124d52a8455e66d90aeb50/servers/5c4ac595-95e7-4f52-b92a-c99f46774f83
12 > X-Auth-Token: 97033d80f24e4e11b070aa8846bcf7f9
12 > x-auth-project-id: admin
12 > Accept: application/xml

12 * Client in-bound response
12 < 404
12 < Date: Mon, 03 Dec 2012 06:56:00 GMT
12 < Content-Length: 142
12 < Connection: keep-alive
12 < Content-Type: application/xml; charset=UTF-8
12 < X-Compute-Request-Id: req-5719a5b7-ce0c-4ea6-b91e-d1d4735b9016
12 <
The resource could not be found.

Provisioning of management machines failed, the following node will be shut down: []
Failed to start managememnt servers. Reason: Failed to launch management machines: java.lang.IllegalStateException: Failed to allocate floating IP
Operation failed.
cloudify@default>

Seems it failed to get the server. Any idea?

@ylcao2012
Copy link
Author

Hi,

Attached please find the Cloudify log, and my driver config file. I replace port 5000 to 35357 and installed Cloudify in my openStack server.

Please help to take a look to see what's wrong with me.

Thanks,
Moore

@ylcao2012 ylcao2012 reopened this Dec 3, 2012
@chape
Copy link

chape commented Mar 28, 2013

Hi,

I download your cloudify-openstack-driver.jar,but where is it place?
when i type "bootstarp-cloud --verbose openstack",I got an exception.It shows that,

Setting security profile to "nonsecure".
Operation failed. java.lang.IllegalArgumentException: Could not find property: localDirectory on Object: CloudProvider [provider=openstack, cloudifyUrl=http://repository.cloudifysource.org/org/cloudifysource/2.3.1-RELEASE/gigaspaces-cloudify-2.3.1-ga-b3720, machineNamePrefix=null, dedicatedManagementMachines=true, managementOnlyFiles=null, sshLoggingLevel=INFO, zones=[agent], managementGroup=null, numberOfManagementMachines=0, reservedMemoryCapacityPerMachineInMB=0]
at org.cloudifysource.dsl.internal.BaseDslScript.applyPropertyToObject(BaseDslScript.java:157)
at org.cloudifysource.dsl.internal.BaseDslScript.setProperty(BaseDslScript.java:123)
at org.cloudifysource.dsl.internal.BaseDslScript.invokeMethod(BaseDslScript.java:288)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:407)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:346)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:697)
at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:407)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:346)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at dslEntity$_run_closure1_closure3.doCall(dslEntity:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at dslEntity$_run_closure1_closure3.doCall(dslEntity)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at groovy.lang.Closure.call(Closure.java:412)
at groovy.lang.Closure.call(Closure.java:406)
at org.cloudifysource.dsl.internal.BaseDslScript.swapActiveObject(BaseDslScript.java:703)
at org.cloudifysource.dsl.internal.BaseDslScript.invokeMethod(BaseDslScript.java:257)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:407)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:346)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at dslEntity$_run_closure1.doCall(dslEntity:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at dslEntity$_run_closure1.doCall(dslEntity)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at groovy.lang.Closure.call(Closure.java:412)
at groovy.lang.Closure.call(Closure.java:406)
at org.cloudifysource.dsl.internal.BaseDslScript.swapActiveObject(BaseDslScript.java:703)
at org.cloudifysource.dsl.internal.BaseDslScript.invokeMethod(BaseDslScript.java:257)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:72)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at dslEntity.run(dslEntity:8)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:599)
at org.cloudifysource.dsl.internal.DSLReader.evaluateGroovyScript(DSLReader.java:435)
at org.cloudifysource.dsl.internal.DSLReader.readDslObject(DSLReader.java:344)
at org.cloudifysource.dsl.internal.DSLReader.readDslEntity(DSLReader.java:283)
at org.cloudifysource.dsl.internal.ServiceReader.readCloud(ServiceReader.java:363)
at org.cloudifysource.dsl.internal.ServiceReader.readCloud(ServiceReader.java:383)
at org.cloudifysource.esc.shell.commands.BootstrapCloud.doExecute(BootstrapCloud.java:153)
at org.cloudifysource.shell.commands.AbstractGSCommand.execute(AbstractGSCommand.java:81)
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:172)
at org.apache.karaf.shell.console.Main.run(Main.java:191)
at org.apache.karaf.shell.console.Main.run(Main.java:89)
at org.cloudifysource.shell.GigaShellMain.main(GigaShellMain.java:123)

Please help me how to bootstrap my openstack-cloudify.

Thanks,
Pc

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