You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Daan Hoogland <da...@gmail.com> on 2014/05/07 21:32:34 UTC

devcloud script deployDataCentre.py not working

I am setting up a test env on my laptop using devcloud2 v4.3. I am
running the ms v4.4 in eclipse and the db on my laptop. I get the
following error:

daan:~/cloudstack-4.4/cloudstack (4.4)> python
tools/marvin/marvin/deployDataCenter.py -i
tools/devcloud/devcloud-advanced.cfg
Traceback (most recent call last):
  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
    deploy.deploy()
  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
    self.loadCfg()
  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
  File "tools/marvin/marvin/deployDataCenter.py", line 492, in registerApiKey
    listuserRes = self.testClient.getApiClient().listUsers(listuser)
  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 600, in listUsers
    response = self.connection.marvinRequest(command,
response_type=response, method=method)
  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
line 266, in marvinRequest
    method=method)
  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
line 196, in request
    raise c
requests.exceptions.ConnectionError:
HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
exceeded with url:
/client/api?account=admin&command=listUsers&response=json (Caused by
<class 'socket.error'>: [Errno 61] Connection refused)

telnet port 8091 locally on my laptop works and from the devcloud to
my laptop as well but the port is not opened on the dev. So it makes
sense that the connection is refused. Not that it is opened. I set the
'host' config item to the virtualbox gateway address, 192.168.56.1.
That didn't help. I don't see what config I should change.

What should I change? Where didn't I look?

-- 
Daan

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
thanks, it is not me then. ms does not connect to host in 4.4. I'll be
filing a bug in the office, no of for breakfast.

On Tue, May 13, 2014 at 11:46 PM, Ian Duffy <ia...@ianduffy.ie> wrote:
> Failing on 4.4
>
> Marvin output:
>
> Traceback (most recent call last):
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 579, in <module>
>
>     deploy.deploy()
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 563, in deploy
>
>     self.createZones(self.config.zones)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 425, in createZones
>
>     self.createPods(zone.pods, zoneId, networkid)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 142, in createPods
>
>     vmwareDc=pod.vmwaredc)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 87, in createClusters
>
>     cluster.hypervisor)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 53, in addHosts
>
>     self.apiClient.addHost(hostcmd)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1463, in addHost
>
>     response = self.connection.marvinRequest(command,
> response_type=response, method=method)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 272, in marvinRequest
>
>     response = jsonHelper.getResultObj(response.json(), response_type)
>
>   File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/jsonHelper.py", line
> 148, in getResultObj
>
>     raise cloudstackException.cloudstackAPIException(respname, errMsg)
>
> cloudstackException.cloudstackAPIException: Execute cmd: addhost failed,
> due to: errorCode: 530, errorText:Cannot transit agent status with event
> AgentDisconnected for host 1, mangement server id is 4278190080,Unable to
> transition to a new state from Creating via AgentDisconnected
>
>
> Cloudstack output:
>
>
> [INFO] Started Jetty Server
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-1:job-3) Add job-3
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-1:job-3
> ctx-9f333f9b) Received unknown parameters for command
> createPhysicalNetwork. Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-1:job-3) Remove job-3
> from job monitoring
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-2:job-4) Add job-4
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-2:job-4
> ctx-46c8e832) Received unknown parameters for command addTrafficType.
> Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-2:job-4) Remove job-4
> from job monitoring
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-3:job-5) Add job-5
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-3:job-5
> ctx-7a774456) Received unknown parameters for command addTrafficType.
> Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-3:job-5) Remove job-5
> from job monitoring
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-4:job-6) Add job-6
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-4:job-6
> ctx-99d181be) Received unknown parameters for command
> configureVirtualRouterElement. Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-4:job-6) Remove job-6
> from job monitoring
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:job-7) Add job-7
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-5:job-7
> ctx-6f2a6e2d) Received unknown parameters for command
> updateNetworkServiceProvider. Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:job-7) Remove job-7
> from job monitoring
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-6:job-8) Add job-8
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-6:job-8
> ctx-14611436) Received unknown parameters for command
> updateNetworkServiceProvider. Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-6:job-8) Remove job-8
> from job monitoring
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-7:job-9) Add job-9
> into job monitoring
>
> WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-7:job-9
> ctx-01c057e0) Received unknown parameters for command
> updatePhysicalNetwork. Unknown parameters : ctxdetails
>
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-7:job-9) Remove job-9
> from job monitoring
>
> INFO  [c.c.c.ConfigurationManagerImpl] (645061837@qtp-424446918-5:ctx-63b19c14
> ctx-047a852f ctx-1c41be6c) adding a new subnet to the network 204
>
> INFO  [c.c.r.ResourceManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Trying to add a new host at
> http://192.168.56.10/in data center 1
>
> INFO  [c.c.h.x.d.XcpServerDiscoverer] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Found host localhost.localdomain
> ip=192.168.56.10 product version=6.2.0
>
> INFO  [c.c.h.x.r.CitrixResourceBase] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Private Network is Pool-wide network associated
> with eth1 for host 192.168.56.10
>
> INFO  [c.c.h.x.r.CitrixResourceBase] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Guest Network is Pool-wide network associated
> with eth1 for host 192.168.56.10
>
> INFO  [c.c.h.x.r.CitrixResourceBase] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Public Network is Pool-wide network associated
> with eth1 for host 192.168.56.10
>
> INFO  [c.c.h.x.d.XcpServerDiscoverer] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Host: localhost.localdomain connected with
> hypervisor type: XenServer. Checking CIDR...
>
> INFO  [c.c.a.m.DirectAgentAttache] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) StartupAnswer received 1 Interval = 60
>
> INFO  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-1238803d) Host
> 192.168.56.10 OpaqueRef:6e8042ee-893c-1d7a-3e4d-b4dc4bfc066f: Host
> 192.168.56.10 is already setup.
>
> WARN  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-1238803d) Failed to
> configure brige firewall
>
> WARN  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-1238803d) Check
> host 192.168.56.10 for CSP is installed or not and check network mode for
> bridge
>
> WARN  [c.c.h.x.d.XcpServerDiscoverer] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Unable to setup agent 1 due to Failed to
> configure brige firewall
>
> INFO  [c.c.u.e.CSExceptionErrorCode] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Could not find exception:
> com.cloud.exception.ConnectionException in error code list for exceptions
>
> WARN  [c.c.a.m.AgentManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Monitor XcpServerDiscoverer says there is an
> error in the connect process for 1 due to Reinitialize agent after setup.
>
> INFO  [c.c.a.m.AgentManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Host 1 is disconnecting with event
> AgentDisconnected
>
> WARN  [c.c.r.ResourceManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) Unable to connect due to
>
> com.cloud.exception.ConnectionException: Reinitialize agent after setup.
>
> at
> com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.processConnect(XcpServerDiscoverer.java:656)
>
> at
> com.cloud.agent.manager.AgentManagerImpl.notifyMonitorsOfConnection(AgentManagerImpl.java:514)
>
> at
> com.cloud.agent.manager.AgentManagerImpl.handleDirectConnectAgent(AgentManagerImpl.java:1427)
>
> at
> com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1765)
>
> at
> com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)
>
> at
> com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:606)
>
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>
> at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)
>
> at
> org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
>
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:119)
>
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
>
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
>
> at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
>
> at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
>
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
>
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
>
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>
>  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
>
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>
>  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>
>  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>
> at org.mortbay.jetty.Server.handle(Server.java:326)
>
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> ERROR [c.c.a.ApiServer] (645061837@qtp-424446918-5:ctx-c05e4099
> ctx-00af5aca ctx-4ff55ae1) unhandled exception executing api command:
> [Ljava.lang.String;@65704adc
>
> com.cloud.utils.exception.CloudRuntimeException: Cannot transit agent
> status with event AgentDisconnected for host 1, mangement server id is
> 4278190080,Unable to transition to a new state from Creating via
> AgentDisconnected
>
> at
> com.cloud.agent.manager.AgentManagerImpl.agentStatusTransitTo(AgentManagerImpl.java:1359)
>
> at
> com.cloud.resource.ResourceManagerImpl.markHostAsDisconnected(ResourceManagerImpl.java:1720)
>
> at
> com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1781)
>
> at
> com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)
>
> at
> com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:606)
>
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>
> at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)
>
> at
> org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
>
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:119)
>
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
>
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
>
> at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
>
> at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
>
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
>
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
>
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>
>  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
>
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>
>  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>
>  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>
> at org.mortbay.jetty.Server.handle(Server.java:326)
>
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>
>  at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
>
>
>
>
> On 13 May 2014 22:26, Ian Duffy <ia...@ianduffy.ie> wrote:
>
>> > Did you try this with 4.4 yet? Can you please?
>>
>> Will do it now.
>>
>>
>>
>> On 13 May 2014 22:21, Daan Hoogland <da...@gmail.com> wrote:
>>
>>> looks like a totally different  setup then I have. I will give it a
>>> try tomorrow. Did you try this with 4.4 yet? Can you please?
>>>
>>> On Tue, May 13, 2014 at 11:05 PM, Ian Duffy <ia...@ianduffy.ie> wrote:
>>> > Hi Daan,
>>> >
>>> > Took a quick look at this this evening as promised earlier on IRC.
>>> >
>>> > I've stopped using the Ubuntu + XenAPI setup, I never felt it worked
>>> well.
>>> > My alternative solution/setup is below, I can get a full environment up
>>> in
>>> > about 15mins.
>>> >
>>> > I have made a vagrant box of XenServer, the packer files that build this
>>> > box can be found at: https://github.com/imduffy15/packer-xenserver
>>> >
>>> > I have placed the .box file on the github page of the project
>>> > https://github.com/imduffy15/packer-xenserver/releases/tag/0.0.1
>>> >
>>> > In brief it brings up XenServer 6.2 with two interfaces, NAT and
>>> host-only.
>>> > The host only interface has the IP address 192.168.56.10 and I did some
>>> > iptables stuff to enable them to get internet access via the NAT
>>> interface.
>>> > (It takes a bit of time to boot)
>>> >
>>> > I've been looking at using the chef scripts by cloudops to create a
>>> Mysql +
>>> > NFS box. You can see a vagrant file for this over here:
>>> > https://github.com/imduffy15/GSoC-2014/tree/master/MySQL_NFS this
>>> comes up
>>> > on the same host interface as the XenServer box and gets 192.168.56.5,
>>> it
>>> > supplies NFS for /exports on this IP. MySQL is exposed via virtualbox
>>> port
>>> > forwarding due to ease with deploydb. I need to improve this to get the
>>> > systemvms on there for the moment I use the download-templates.sh from
>>> >
>>> https://github.com/djs55/cloudstack-dev-vms/tree/master/cloudstack-infrastructure
>>> >
>>> > I run the Cloudstack 4.3 ( commit
>>> c0cf817f1b2a53a23253679aa785f0db3219619a
>>> > ) manager on my host machine which is joined to the host only network on
>>> > 192.168.56.1. I compile it with: mvn -P impatient,systemvm clean install
>>> > -DskipTests=true -T2C
>>> >
>>> > I use a slightly modified devcloud.cfg
>>> > https://github.com/imduffy15/GSoC-2014/blob/master/devcloud.cfg
>>> >
>>> > General flow is as follows:
>>> >
>>> > 1) Start xenserver vm
>>> > 2) Start nfs/mysql vm
>>> > 3) Compile cloudstack deploy db
>>> > 4) ssh into nfs vm, download systemvm templates
>>> > 5) start up jetty
>>> > 6) marvin to get devcloud going
>>> >
>>> > Planning to clean a lot of these up with CLOUDSTACK-6114.
>>> >
>>> > Hope this is useful.
>>> >
>>> >
>>> >
>>> > On 7 May 2014 20:32, Daan Hoogland <da...@gmail.com> wrote:
>>> >
>>> >> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>>> >> running the ms v4.4 in eclipse and the db on my laptop. I get the
>>> >> following error:
>>> >>
>>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>> >> tools/marvin/marvin/deployDataCenter.py -i
>>> >> tools/devcloud/devcloud-advanced.cfg
>>> >> Traceback (most recent call last):
>>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>> >>     deploy.deploy()
>>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>> >>     self.loadCfg()
>>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>> >>     mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>>> >> registerApiKey
>>> >>     listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>> >>   File
>>> >>
>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
>>> >> line 600, in listUsers
>>> >>     response = self.connection.marvinRequest(command,
>>> >> response_type=response, method=method)
>>> >>   File
>>> >>
>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>>> >> line 266, in marvinRequest
>>> >>     method=method)
>>> >>   File
>>> >>
>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>>> >> line 196, in request
>>> >>     raise c
>>> >> requests.exceptions.ConnectionError:
>>> >> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>>> >> exceeded with url:
>>> >> /client/api?account=admin&command=listUsers&response=json (Caused by
>>> >> <class 'socket.error'>: [Errno 61] Connection refused)
>>> >>
>>> >> telnet port 8091 locally on my laptop works and from the devcloud to
>>> >> my laptop as well but the port is not opened on the dev. So it makes
>>> >> sense that the connection is refused. Not that it is opened. I set the
>>> >> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>>> >> That didn't help. I don't see what config I should change.
>>> >>
>>> >> What should I change? Where didn't I look?
>>> >>
>>> >> --
>>> >> Daan
>>> >>
>>>
>>>
>>>
>>> --
>>> Daan
>>>
>>
>>



-- 
Daan

Re: devcloud script deployDataCentre.py not working

Posted by Ian Duffy <ia...@ianduffy.ie>.
Failing on 4.4

Marvin output:

Traceback (most recent call last):

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 579, in <module>

    deploy.deploy()

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 563, in deploy

    self.createZones(self.config.zones)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 425, in createZones

    self.createPods(zone.pods, zoneId, networkid)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 142, in createPods

    vmwareDc=pod.vmwaredc)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 87, in createClusters

    cluster.hypervisor)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 53, in addHosts

    self.apiClient.addHost(hostcmd)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 1463, in addHost

    response = self.connection.marvinRequest(command,
response_type=response, method=method)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
line 272, in marvinRequest

    response = jsonHelper.getResultObj(response.json(), response_type)

  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/jsonHelper.py", line
148, in getResultObj

    raise cloudstackException.cloudstackAPIException(respname, errMsg)

cloudstackException.cloudstackAPIException: Execute cmd: addhost failed,
due to: errorCode: 530, errorText:Cannot transit agent status with event
AgentDisconnected for host 1, mangement server id is 4278190080,Unable to
transition to a new state from Creating via AgentDisconnected


Cloudstack output:


[INFO] Started Jetty Server

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-1:job-3) Add job-3
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-1:job-3
ctx-9f333f9b) Received unknown parameters for command
createPhysicalNetwork. Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-1:job-3) Remove job-3
from job monitoring

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-2:job-4) Add job-4
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-2:job-4
ctx-46c8e832) Received unknown parameters for command addTrafficType.
Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-2:job-4) Remove job-4
from job monitoring

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-3:job-5) Add job-5
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-3:job-5
ctx-7a774456) Received unknown parameters for command addTrafficType.
Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-3:job-5) Remove job-5
from job monitoring

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-4:job-6) Add job-6
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-4:job-6
ctx-99d181be) Received unknown parameters for command
configureVirtualRouterElement. Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-4:job-6) Remove job-6
from job monitoring

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:job-7) Add job-7
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-5:job-7
ctx-6f2a6e2d) Received unknown parameters for command
updateNetworkServiceProvider. Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:job-7) Remove job-7
from job monitoring

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-6:job-8) Add job-8
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-6:job-8
ctx-14611436) Received unknown parameters for command
updateNetworkServiceProvider. Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-6:job-8) Remove job-8
from job monitoring

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-7:job-9) Add job-9
into job monitoring

WARN  [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-7:job-9
ctx-01c057e0) Received unknown parameters for command
updatePhysicalNetwork. Unknown parameters : ctxdetails

INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-7:job-9) Remove job-9
from job monitoring

INFO  [c.c.c.ConfigurationManagerImpl] (645061837@qtp-424446918-5:ctx-63b19c14
ctx-047a852f ctx-1c41be6c) adding a new subnet to the network 204

INFO  [c.c.r.ResourceManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Trying to add a new host at
http://192.168.56.10/in data center 1

INFO  [c.c.h.x.d.XcpServerDiscoverer] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Found host localhost.localdomain
ip=192.168.56.10 product version=6.2.0

INFO  [c.c.h.x.r.CitrixResourceBase] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Private Network is Pool-wide network associated
with eth1 for host 192.168.56.10

INFO  [c.c.h.x.r.CitrixResourceBase] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Guest Network is Pool-wide network associated
with eth1 for host 192.168.56.10

INFO  [c.c.h.x.r.CitrixResourceBase] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Public Network is Pool-wide network associated
with eth1 for host 192.168.56.10

INFO  [c.c.h.x.d.XcpServerDiscoverer] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Host: localhost.localdomain connected with
hypervisor type: XenServer. Checking CIDR...

INFO  [c.c.a.m.DirectAgentAttache] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) StartupAnswer received 1 Interval = 60

INFO  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-1238803d) Host
192.168.56.10 OpaqueRef:6e8042ee-893c-1d7a-3e4d-b4dc4bfc066f: Host
192.168.56.10 is already setup.

WARN  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-1238803d) Failed to
configure brige firewall

WARN  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-1238803d) Check
host 192.168.56.10 for CSP is installed or not and check network mode for
bridge

WARN  [c.c.h.x.d.XcpServerDiscoverer] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Unable to setup agent 1 due to Failed to
configure brige firewall

INFO  [c.c.u.e.CSExceptionErrorCode] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Could not find exception:
com.cloud.exception.ConnectionException in error code list for exceptions

WARN  [c.c.a.m.AgentManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Monitor XcpServerDiscoverer says there is an
error in the connect process for 1 due to Reinitialize agent after setup.

INFO  [c.c.a.m.AgentManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Host 1 is disconnecting with event
AgentDisconnected

WARN  [c.c.r.ResourceManagerImpl] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) Unable to connect due to

com.cloud.exception.ConnectionException: Reinitialize agent after setup.

at
com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.processConnect(XcpServerDiscoverer.java:656)

at
com.cloud.agent.manager.AgentManagerImpl.notifyMonitorsOfConnection(AgentManagerImpl.java:514)

at
com.cloud.agent.manager.AgentManagerImpl.handleDirectConnectAgent(AgentManagerImpl.java:1427)

at
com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1765)

at
com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)

at
com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)

at
org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)

at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:119)

at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)

at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)

at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)

at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)

at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)

at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)

at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)

at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)

at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)

at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)

at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:326)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

ERROR [c.c.a.ApiServer] (645061837@qtp-424446918-5:ctx-c05e4099
ctx-00af5aca ctx-4ff55ae1) unhandled exception executing api command:
[Ljava.lang.String;@65704adc

com.cloud.utils.exception.CloudRuntimeException: Cannot transit agent
status with event AgentDisconnected for host 1, mangement server id is
4278190080,Unable to transition to a new state from Creating via
AgentDisconnected

at
com.cloud.agent.manager.AgentManagerImpl.agentStatusTransitTo(AgentManagerImpl.java:1359)

at
com.cloud.resource.ResourceManagerImpl.markHostAsDisconnected(ResourceManagerImpl.java:1720)

at
com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1781)

at
com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)

at
com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)

at
org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)

at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:119)

at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)

at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)

at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)

at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)

at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)

at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)

at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)

at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)

at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)

at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)

at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:326)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

 at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)





On 13 May 2014 22:26, Ian Duffy <ia...@ianduffy.ie> wrote:

> > Did you try this with 4.4 yet? Can you please?
>
> Will do it now.
>
>
>
> On 13 May 2014 22:21, Daan Hoogland <da...@gmail.com> wrote:
>
>> looks like a totally different  setup then I have. I will give it a
>> try tomorrow. Did you try this with 4.4 yet? Can you please?
>>
>> On Tue, May 13, 2014 at 11:05 PM, Ian Duffy <ia...@ianduffy.ie> wrote:
>> > Hi Daan,
>> >
>> > Took a quick look at this this evening as promised earlier on IRC.
>> >
>> > I've stopped using the Ubuntu + XenAPI setup, I never felt it worked
>> well.
>> > My alternative solution/setup is below, I can get a full environment up
>> in
>> > about 15mins.
>> >
>> > I have made a vagrant box of XenServer, the packer files that build this
>> > box can be found at: https://github.com/imduffy15/packer-xenserver
>> >
>> > I have placed the .box file on the github page of the project
>> > https://github.com/imduffy15/packer-xenserver/releases/tag/0.0.1
>> >
>> > In brief it brings up XenServer 6.2 with two interfaces, NAT and
>> host-only.
>> > The host only interface has the IP address 192.168.56.10 and I did some
>> > iptables stuff to enable them to get internet access via the NAT
>> interface.
>> > (It takes a bit of time to boot)
>> >
>> > I've been looking at using the chef scripts by cloudops to create a
>> Mysql +
>> > NFS box. You can see a vagrant file for this over here:
>> > https://github.com/imduffy15/GSoC-2014/tree/master/MySQL_NFS this
>> comes up
>> > on the same host interface as the XenServer box and gets 192.168.56.5,
>> it
>> > supplies NFS for /exports on this IP. MySQL is exposed via virtualbox
>> port
>> > forwarding due to ease with deploydb. I need to improve this to get the
>> > systemvms on there for the moment I use the download-templates.sh from
>> >
>> https://github.com/djs55/cloudstack-dev-vms/tree/master/cloudstack-infrastructure
>> >
>> > I run the Cloudstack 4.3 ( commit
>> c0cf817f1b2a53a23253679aa785f0db3219619a
>> > ) manager on my host machine which is joined to the host only network on
>> > 192.168.56.1. I compile it with: mvn -P impatient,systemvm clean install
>> > -DskipTests=true -T2C
>> >
>> > I use a slightly modified devcloud.cfg
>> > https://github.com/imduffy15/GSoC-2014/blob/master/devcloud.cfg
>> >
>> > General flow is as follows:
>> >
>> > 1) Start xenserver vm
>> > 2) Start nfs/mysql vm
>> > 3) Compile cloudstack deploy db
>> > 4) ssh into nfs vm, download systemvm templates
>> > 5) start up jetty
>> > 6) marvin to get devcloud going
>> >
>> > Planning to clean a lot of these up with CLOUDSTACK-6114.
>> >
>> > Hope this is useful.
>> >
>> >
>> >
>> > On 7 May 2014 20:32, Daan Hoogland <da...@gmail.com> wrote:
>> >
>> >> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> >> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> >> following error:
>> >>
>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >> tools/marvin/marvin/deployDataCenter.py -i
>> >> tools/devcloud/devcloud-advanced.cfg
>> >> Traceback (most recent call last):
>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>     deploy.deploy()
>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>> >>     self.loadCfg()
>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>> >>     mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>> >>   File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>> >> registerApiKey
>> >>     listuserRes = self.testClient.getApiClient().listUsers(listuser)
>> >>   File
>> >>
>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
>> >> line 600, in listUsers
>> >>     response = self.connection.marvinRequest(command,
>> >> response_type=response, method=method)
>> >>   File
>> >>
>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> >> line 266, in marvinRequest
>> >>     method=method)
>> >>   File
>> >>
>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> >> line 196, in request
>> >>     raise c
>> >> requests.exceptions.ConnectionError:
>> >> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> >> exceeded with url:
>> >> /client/api?account=admin&command=listUsers&response=json (Caused by
>> >> <class 'socket.error'>: [Errno 61] Connection refused)
>> >>
>> >> telnet port 8091 locally on my laptop works and from the devcloud to
>> >> my laptop as well but the port is not opened on the dev. So it makes
>> >> sense that the connection is refused. Not that it is opened. I set the
>> >> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> >> That didn't help. I don't see what config I should change.
>> >>
>> >> What should I change? Where didn't I look?
>> >>
>> >> --
>> >> Daan
>> >>
>>
>>
>>
>> --
>> Daan
>>
>
>

Re: devcloud script deployDataCentre.py not working

Posted by Ian Duffy <ia...@ianduffy.ie>.
> Did you try this with 4.4 yet? Can you please?

Will do it now.



On 13 May 2014 22:21, Daan Hoogland <da...@gmail.com> wrote:

> looks like a totally different  setup then I have. I will give it a
> try tomorrow. Did you try this with 4.4 yet? Can you please?
>
> On Tue, May 13, 2014 at 11:05 PM, Ian Duffy <ia...@ianduffy.ie> wrote:
> > Hi Daan,
> >
> > Took a quick look at this this evening as promised earlier on IRC.
> >
> > I've stopped using the Ubuntu + XenAPI setup, I never felt it worked
> well.
> > My alternative solution/setup is below, I can get a full environment up
> in
> > about 15mins.
> >
> > I have made a vagrant box of XenServer, the packer files that build this
> > box can be found at: https://github.com/imduffy15/packer-xenserver
> >
> > I have placed the .box file on the github page of the project
> > https://github.com/imduffy15/packer-xenserver/releases/tag/0.0.1
> >
> > In brief it brings up XenServer 6.2 with two interfaces, NAT and
> host-only.
> > The host only interface has the IP address 192.168.56.10 and I did some
> > iptables stuff to enable them to get internet access via the NAT
> interface.
> > (It takes a bit of time to boot)
> >
> > I've been looking at using the chef scripts by cloudops to create a
> Mysql +
> > NFS box. You can see a vagrant file for this over here:
> > https://github.com/imduffy15/GSoC-2014/tree/master/MySQL_NFS this comes
> up
> > on the same host interface as the XenServer box and gets 192.168.56.5, it
> > supplies NFS for /exports on this IP. MySQL is exposed via virtualbox
> port
> > forwarding due to ease with deploydb. I need to improve this to get the
> > systemvms on there for the moment I use the download-templates.sh from
> >
> https://github.com/djs55/cloudstack-dev-vms/tree/master/cloudstack-infrastructure
> >
> > I run the Cloudstack 4.3 ( commit
> c0cf817f1b2a53a23253679aa785f0db3219619a
> > ) manager on my host machine which is joined to the host only network on
> > 192.168.56.1. I compile it with: mvn -P impatient,systemvm clean install
> > -DskipTests=true -T2C
> >
> > I use a slightly modified devcloud.cfg
> > https://github.com/imduffy15/GSoC-2014/blob/master/devcloud.cfg
> >
> > General flow is as follows:
> >
> > 1) Start xenserver vm
> > 2) Start nfs/mysql vm
> > 3) Compile cloudstack deploy db
> > 4) ssh into nfs vm, download systemvm templates
> > 5) start up jetty
> > 6) marvin to get devcloud going
> >
> > Planning to clean a lot of these up with CLOUDSTACK-6114.
> >
> > Hope this is useful.
> >
> >
> >
> > On 7 May 2014 20:32, Daan Hoogland <da...@gmail.com> wrote:
> >
> >> I am setting up a test env on my laptop using devcloud2 v4.3. I am
> >> running the ms v4.4 in eclipse and the db on my laptop. I get the
> >> following error:
> >>
> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >> tools/marvin/marvin/deployDataCenter.py -i
> >> tools/devcloud/devcloud-advanced.cfg
> >> Traceback (most recent call last):
> >>   File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
> >>     deploy.deploy()
> >>   File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
> >>     self.loadCfg()
> >>   File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
> >>     mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
> >>   File "tools/marvin/marvin/deployDataCenter.py", line 492, in
> >> registerApiKey
> >>     listuserRes = self.testClient.getApiClient().listUsers(listuser)
> >>   File
> >>
> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
> >> line 600, in listUsers
> >>     response = self.connection.marvinRequest(command,
> >> response_type=response, method=method)
> >>   File
> >>
> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> >> line 266, in marvinRequest
> >>     method=method)
> >>   File
> >>
> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> >> line 196, in request
> >>     raise c
> >> requests.exceptions.ConnectionError:
> >> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
> >> exceeded with url:
> >> /client/api?account=admin&command=listUsers&response=json (Caused by
> >> <class 'socket.error'>: [Errno 61] Connection refused)
> >>
> >> telnet port 8091 locally on my laptop works and from the devcloud to
> >> my laptop as well but the port is not opened on the dev. So it makes
> >> sense that the connection is refused. Not that it is opened. I set the
> >> 'host' config item to the virtualbox gateway address, 192.168.56.1.
> >> That didn't help. I don't see what config I should change.
> >>
> >> What should I change? Where didn't I look?
> >>
> >> --
> >> Daan
> >>
>
>
>
> --
> Daan
>

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
looks like a totally different  setup then I have. I will give it a
try tomorrow. Did you try this with 4.4 yet? Can you please?

On Tue, May 13, 2014 at 11:05 PM, Ian Duffy <ia...@ianduffy.ie> wrote:
> Hi Daan,
>
> Took a quick look at this this evening as promised earlier on IRC.
>
> I've stopped using the Ubuntu + XenAPI setup, I never felt it worked well.
> My alternative solution/setup is below, I can get a full environment up in
> about 15mins.
>
> I have made a vagrant box of XenServer, the packer files that build this
> box can be found at: https://github.com/imduffy15/packer-xenserver
>
> I have placed the .box file on the github page of the project
> https://github.com/imduffy15/packer-xenserver/releases/tag/0.0.1
>
> In brief it brings up XenServer 6.2 with two interfaces, NAT and host-only.
> The host only interface has the IP address 192.168.56.10 and I did some
> iptables stuff to enable them to get internet access via the NAT interface.
> (It takes a bit of time to boot)
>
> I've been looking at using the chef scripts by cloudops to create a Mysql +
> NFS box. You can see a vagrant file for this over here:
> https://github.com/imduffy15/GSoC-2014/tree/master/MySQL_NFS this comes up
> on the same host interface as the XenServer box and gets 192.168.56.5, it
> supplies NFS for /exports on this IP. MySQL is exposed via virtualbox port
> forwarding due to ease with deploydb. I need to improve this to get the
> systemvms on there for the moment I use the download-templates.sh from
> https://github.com/djs55/cloudstack-dev-vms/tree/master/cloudstack-infrastructure
>
> I run the Cloudstack 4.3 ( commit c0cf817f1b2a53a23253679aa785f0db3219619a
> ) manager on my host machine which is joined to the host only network on
> 192.168.56.1. I compile it with: mvn -P impatient,systemvm clean install
> -DskipTests=true -T2C
>
> I use a slightly modified devcloud.cfg
> https://github.com/imduffy15/GSoC-2014/blob/master/devcloud.cfg
>
> General flow is as follows:
>
> 1) Start xenserver vm
> 2) Start nfs/mysql vm
> 3) Compile cloudstack deploy db
> 4) ssh into nfs vm, download systemvm templates
> 5) start up jetty
> 6) marvin to get devcloud going
>
> Planning to clean a lot of these up with CLOUDSTACK-6114.
>
> Hope this is useful.
>
>
>
> On 7 May 2014 20:32, Daan Hoogland <da...@gmail.com> wrote:
>
>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> following error:
>>
>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> tools/marvin/marvin/deployDataCenter.py -i
>> tools/devcloud/devcloud-advanced.cfg
>> Traceback (most recent call last):
>>   File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>     deploy.deploy()
>>   File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>     self.loadCfg()
>>   File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>     mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>   File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>> registerApiKey
>>     listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>   File
>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
>> line 600, in listUsers
>>     response = self.connection.marvinRequest(command,
>> response_type=response, method=method)
>>   File
>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> line 266, in marvinRequest
>>     method=method)
>>   File
>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> line 196, in request
>>     raise c
>> requests.exceptions.ConnectionError:
>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> exceeded with url:
>> /client/api?account=admin&command=listUsers&response=json (Caused by
>> <class 'socket.error'>: [Errno 61] Connection refused)
>>
>> telnet port 8091 locally on my laptop works and from the devcloud to
>> my laptop as well but the port is not opened on the dev. So it makes
>> sense that the connection is refused. Not that it is opened. I set the
>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> That didn't help. I don't see what config I should change.
>>
>> What should I change? Where didn't I look?
>>
>> --
>> Daan
>>



-- 
Daan

Re: devcloud script deployDataCentre.py not working

Posted by Ian Duffy <ia...@ianduffy.ie>.
Hi Daan,

Took a quick look at this this evening as promised earlier on IRC.

I've stopped using the Ubuntu + XenAPI setup, I never felt it worked well.
My alternative solution/setup is below, I can get a full environment up in
about 15mins.

I have made a vagrant box of XenServer, the packer files that build this
box can be found at: https://github.com/imduffy15/packer-xenserver

I have placed the .box file on the github page of the project
https://github.com/imduffy15/packer-xenserver/releases/tag/0.0.1

In brief it brings up XenServer 6.2 with two interfaces, NAT and host-only.
The host only interface has the IP address 192.168.56.10 and I did some
iptables stuff to enable them to get internet access via the NAT interface.
(It takes a bit of time to boot)

I've been looking at using the chef scripts by cloudops to create a Mysql +
NFS box. You can see a vagrant file for this over here:
https://github.com/imduffy15/GSoC-2014/tree/master/MySQL_NFS this comes up
on the same host interface as the XenServer box and gets 192.168.56.5, it
supplies NFS for /exports on this IP. MySQL is exposed via virtualbox port
forwarding due to ease with deploydb. I need to improve this to get the
systemvms on there for the moment I use the download-templates.sh from
https://github.com/djs55/cloudstack-dev-vms/tree/master/cloudstack-infrastructure

I run the Cloudstack 4.3 ( commit c0cf817f1b2a53a23253679aa785f0db3219619a
) manager on my host machine which is joined to the host only network on
192.168.56.1. I compile it with: mvn -P impatient,systemvm clean install
-DskipTests=true -T2C

I use a slightly modified devcloud.cfg
https://github.com/imduffy15/GSoC-2014/blob/master/devcloud.cfg

General flow is as follows:

1) Start xenserver vm
2) Start nfs/mysql vm
3) Compile cloudstack deploy db
4) ssh into nfs vm, download systemvm templates
5) start up jetty
6) marvin to get devcloud going

Planning to clean a lot of these up with CLOUDSTACK-6114.

Hope this is useful.



On 7 May 2014 20:32, Daan Hoogland <da...@gmail.com> wrote:

> I am setting up a test env on my laptop using devcloud2 v4.3. I am
> running the ms v4.4 in eclipse and the db on my laptop. I get the
> following error:
>
> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> tools/marvin/marvin/deployDataCenter.py -i
> tools/devcloud/devcloud-advanced.cfg
> Traceback (most recent call last):
>   File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>     deploy.deploy()
>   File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>     self.loadCfg()
>   File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>     mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>   File "tools/marvin/marvin/deployDataCenter.py", line 492, in
> registerApiKey
>     listuserRes = self.testClient.getApiClient().listUsers(listuser)
>   File
> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 600, in listUsers
>     response = self.connection.marvinRequest(command,
> response_type=response, method=method)
>   File
> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 266, in marvinRequest
>     method=method)
>   File
> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 196, in request
>     raise c
> requests.exceptions.ConnectionError:
> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
> exceeded with url:
> /client/api?account=admin&command=listUsers&response=json (Caused by
> <class 'socket.error'>: [Errno 61] Connection refused)
>
> telnet port 8091 locally on my laptop works and from the devcloud to
> my laptop as well but the port is not opened on the dev. So it makes
> sense that the connection is refused. Not that it is opened. I set the
> 'host' config item to the virtualbox gateway address, 192.168.56.1.
> That didn't help. I don't see what config I should change.
>
> What should I change? Where didn't I look?
>
> --
> Daan
>

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
Ian, this was not on devcloud, then. Do you happen to know how to
change the backend on a devcloud?

thanks,

On Wed, May 14, 2014 at 8:37 AM, Ian Duffy <ia...@ianduffy.ie> wrote:
> Got a successful deployment on 4.4-forward after changing the network to
> bridge on the hypervisor (xe-switch-network-backend bridge)
>
>
> On 14 May 2014 07:33, Ian Duffy <ia...@ianduffy.ie> wrote:
>
>> Hi Santhosh,
>>
>> Its failing on 4.4-forward for me.
>> As far as I can tell its nothing to do with my setup since it works for
>> 4.3.
>>
>> *$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
>> -i devcloud.cfg
>>
>>
>> ==== Log Folder Path:
>> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
>> will be available here ====
>>
>>
>> ==== Deploy DC Started ====
>>
>> Exception Occurred ['Traceback (most recent call last):\n', '  File
>> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
>> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
>> File
>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
>> line 1506, in addHost\n    response =
>> self.connection.marvinRequest(command, response_type=response,
>> method=method)\n', '  File
>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
>> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
>> transit agent status with event AgentDisconnected for host 1, mangement
>> server id is 4278190080,Unable to transition to a new state from Creating
>> via AgentDisconnected\n']
>>
>>
>> ===deploy dc failed, so cleaning the created entries===
>>
>>
>> ====DeployDC: CleanUp Started====
>>
>>
>> ====Clean Up Entries=== {'Network':
>> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
>> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
>> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
>> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
>> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
>> 'Network', 'PhysicalNetwork', 'Zone']}
>>
>>
>> ===Removing DataCenter Failed===
>>
>> *duffy **at **thunder **in **~/projects/GSoC-2*
>>
>>
>> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>>
>>> I have been seeing this for a while too, and IIRC there was a thread on
>>> dev list regarding this.
>>> In logs, I keep getting an error saying
>>> mgmt server log:
>>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>>> 1-9152158867746979841: Exception Caught while executing command
>>> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
>>> /opt/cloud/bin on XenServer hosts
>>>
>>> Last I had tried was about a month ago though.
>>>
>>>
>>> Thanks,
>>> Amogh
>>>
>>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>>> wrote:
>>>
>>> >If you atleast use 4.4-forward marvin, the first issue mentioned related
>>> >to connection refused, should work fine provided port configuration is
>>> >proper.
>>> >
>>> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>>> >the results.
>>> >
>>> >
>>> >Santhosh
>>> >________________________________________
>>> >From: sebgoa [runseb@gmail.com]
>>> >Sent: Tuesday, May 13, 2014 8:41 AM
>>> >To: dev@cloudstack.apache.org; Santhosh Edukulla
>>> >Subject: Re: devcloud script deployDataCentre.py not working
>>> >
>>> >cc santhosh, maybe he has tried devcloud with 4.4
>>> >
>>> >
>>> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>>> wrote:
>>> >
>>> >> basic networking fails slightly differntly:
>>> >>
>>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
>>> >> Traceback (most recent call last):
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>> >>    deploy.deploy()
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>>> >>    self.createZones(self.config.zones)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>>> >>createZones
>>> >>    self.createPods(zone.pods, zoneId, networkid)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in
>>> createPods
>>> >>    vmwareDc=pod.vmwaredc)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>>> >>createClusters
>>> >>    cluster.hypervisor)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>>> >>    self.apiClient.addHost(hostcmd)
>>> >>  File
>>>
>>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>>> >>cloudstackAPIClient.py",
>>> >> line 1535, in addHost
>>> >>    response = self.connection.marvinRequest(command,
>>> >> response_type=response, method=method)
>>> >>  File
>>>
>>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>>> >>ection.py",
>>> >> line 272, in marvinRequest
>>> >>    response = jsonHelper.getResultObj(response.json(), response_type)
>>> >>  File
>>>
>>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>>> >>,
>>> >> line 148, in getResultObj
>>> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
>>> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>>> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
>>> >> with event AgentDisconnected for host 1, mangement server id is
>>> >> 4278190080,Unable to transition to a new state from Creating via
>>> >> AgentDisconnected
>>> >>
>>> >>
>>> >> seems like I failed to do some config on the devcloud host. Anything?
>>> >> I followed
>>> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>>> >> but in some cases it wasn't clear to me if I should execute something
>>> >> in the devcloud or on my laptop.
>>> >>
>>> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <daan.hoogland@gmail.com
>>> >
>>> >>wrote:
>>> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>>> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>>> >>> following error:
>>> >>>
>>> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>> >>> tools/marvin/marvin/deployDataCenter.py -i
>>> >>> tools/devcloud/devcloud-advanced.cfg
>>> >>> Traceback (most recent call last):
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>> >>>    deploy.deploy()
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>> >>>    self.loadCfg()
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>>> >>>registerApiKey
>>> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>> >>>  File
>>>
>>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>>> >>>/cloudstackAPIClient.py",
>>> >>> line 600, in listUsers
>>> >>>    response = self.connection.marvinRequest(command,
>>> >>> response_type=response, method=method)
>>> >>>  File
>>>
>>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>> >>>nection.py",
>>> >>> line 266, in marvinRequest
>>> >>>    method=method)
>>> >>>  File
>>>
>>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>> >>>nection.py",
>>> >>> line 196, in request
>>> >>>    raise c
>>> >>> requests.exceptions.ConnectionError:
>>> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>>> >>> exceeded with url:
>>> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
>>> >>> <class 'socket.error'>: [Errno 61] Connection refused)
>>> >>>
>>> >>> telnet port 8091 locally on my laptop works and from the devcloud to
>>> >>> my laptop as well but the port is not opened on the dev. So it makes
>>> >>> sense that the connection is refused. Not that it is opened. I set the
>>> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>>> >>> That didn't help. I don't see what config I should change.
>>> >>>
>>> >>> What should I change? Where didn't I look?
>>> >>>
>>> >>> --
>>> >>> Daan
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Daan
>>> >
>>>
>>>
>>



-- 
Daan

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
looks like my issue, I haven't been able to find the cause yet.

On Tue, May 27, 2014 at 9:02 PM, sebgoa <ru...@gmail.com> wrote:
> I tried devcloud2 on a fresh 4.4.
>
> the deploy scripts fails with:
>
> $ python ../marvin/marvin/deployDataCenter.py -i devcloud.cfg
> Traceback (most recent call last):
>   File "../marvin/marvin/deployDataCenter.py", line 579, in <module>
>     deploy.deploy()
>   File "../marvin/marvin/deployDataCenter.py", line 563, in deploy
>     self.createZones(self.config.zones)
>   File "../marvin/marvin/deployDataCenter.py", line 425, in createZones
>     self.createPods(zone.pods, zoneId, networkid)
>   File "../marvin/marvin/deployDataCenter.py", line 142, in createPods
>     vmwareDc=pod.vmwaredc)
>   File "../marvin/marvin/deployDataCenter.py", line 87, in createClusters
>     cluster.hypervisor)
>   File "../marvin/marvin/deployDataCenter.py", line 53, in addHosts
>     self.apiClient.addHost(hostcmd)
>   File "/Users/sebgoa/Documents/gitforks/cloudstack-asf/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py", line 1492, in addHost
>     response = self.connection.marvinRequest(command, response_type=response, method=method)
>   File "/Users/sebgoa/Documents/gitforks/cloudstack-asf/cloudstack/tools/marvin/marvin/cloudstackConnection.py", line 272, in marvinRequest
>     response = jsonHelper.getResultObj(response.json(), response_type)
>   File "/Users/sebgoa/Documents/gitforks/cloudstack-asf/cloudstack/tools/marvin/marvin/jsonHelper.py", line 148, in getResultObj
>     raise cloudstackException.cloudstackAPIException(respname, errMsg)
> cloudstackException.cloudstackAPIException: Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot transit agent status with event AgentDisconnected for host 1, mangement server id is 1,Unable to transition to a new state from Creating via AgentDisconnected
>
>
> and the mgt server logs are:
>
> WARN  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-05a16b6a) Unable to setup
> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory /opt/cloud/bin on XenServer hosts
>         at com.cloud.hypervisor.xen.resource.CitrixResourceBase.setupServer(CitrixResourceBase.java:4850)
>         at com.cloud.hypervisor.xen.resource.CitrixResourceBase.execute(CitrixResourceBase.java:4678)
>         at com.cloud.hypervisor.xen.resource.CitrixResourceBase.executeRequest(CitrixResourceBase.java:494)
>         at com.cloud.hypervisor.xen.resource.XcpOssResource.executeRequest(XcpOssResource.java:182)
>         at com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:216)
>         at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724)
> WARN  [c.c.h.x.d.XcpServerDiscoverer] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Unable to setup agent 1 due to Cannot create directory /opt/cloud/bin on XenServer hosts
> INFO  [c.c.u.e.CSExceptionErrorCode] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Could not find exception: com.cloud.exception.ConnectionException in error code list for exceptions
> WARN  [c.c.a.m.AgentManagerImpl] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Monitor XcpServerDiscoverer says there is an error in the connect process for 1 due to Reinitialize agent after setup.
> INFO  [c.c.a.m.AgentManagerImpl] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Host 1 is disconnecting with event AgentDisconnected
> WARN  [c.c.r.ResourceManagerImpl] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Unable to connect due to
> com.cloud.exception.ConnectionException: Reinitialize agent after setup.
>         at com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.processConnect(XcpServerDiscoverer.java:656)
>         at com.cloud.agent.manager.AgentManagerImpl.notifyMonitorsOfConnection(AgentManagerImpl.java:514)
>         at com.cloud.agent.manager.AgentManagerImpl.handleDirectConnectAgent(AgentManagerImpl.java:1427)
>         at com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1765)
>         at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)
>         at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)
>         at org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
>         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
>         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
>         at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
>         at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
>         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
>         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> ERROR [c.c.a.ApiServer] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) unhandled exception executing api command: [Ljava.lang.String;@443a03ea
> com.cloud.utils.exception.CloudRuntimeException: Cannot transit agent status with event AgentDisconnected for host 1, mangement server id is 1,Unable to transition to a new state from Creating via AgentDisconnected
>         at com.cloud.agent.manager.AgentManagerImpl.agentStatusTransitTo(AgentManagerImpl.java:1359)
>         at com.cloud.resource.ResourceManagerImpl.markHostAsDisconnected(ResourceManagerImpl.java:1720)
>         at com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1781)
>         at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)
>         at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)
>         at org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
>         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
>         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
>         at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
>         at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
>         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
>         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Is it what you guys are facing ?
>
> Any fix ?
>
>
> On May 15, 2014, at 10:16 AM, Ian Duffy <ia...@ianduffy.ie> wrote:
>
>>> wow, should that be so? seems like a regression.
>>
>> Not sure. The install docs mention it for 6.0 and 6.1. Never had an issue
>> before on Cloudstack 4.3 and XenServer 6.2
>>
>> http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/hypervisor/xenserver.html
>>
>>
>>
>> On 14 May 2014 17:26, Daan Hoogland <da...@gmail.com> wrote:
>>
>>> wow, should that be so? seems like a regression.
>>>
>>> On Wed, May 14, 2014 at 8:37 AM, Ian Duffy <ia...@ianduffy.ie> wrote:
>>>> Got a successful deployment on 4.4-forward after changing the network to
>>>> bridge on the hypervisor (xe-switch-network-backend bridge)
>>>>
>>>>
>>>> On 14 May 2014 07:33, Ian Duffy <ia...@ianduffy.ie> wrote:
>>>>
>>>>> Hi Santhosh,
>>>>>
>>>>> Its failing on 4.4-forward for me.
>>>>> As far as I can tell its nothing to do with my setup since it works for
>>>>> 4.3.
>>>>>
>>>>> *$ *python
>>> ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
>>>>> -i devcloud.cfg
>>>>>
>>>>>
>>>>> ==== Log Folder Path:
>>>>> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All
>>> logs
>>>>> will be available here ====
>>>>>
>>>>>
>>>>> ==== Deploy DC Started ====
>>>>>
>>>>> Exception Occurred ['Traceback (most recent call last):\n', '  File
>>>>>
>>> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
>>>>> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
>>>>> File
>>>>>
>>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
>>>>> line 1506, in addHost\n    response =
>>>>> self.connection.marvinRequest(command, response_type=response,
>>>>> method=method)\n', '  File
>>>>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>>>>> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
>>>>> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
>>>>> transit agent status with event AgentDisconnected for host 1, mangement
>>>>> server id is 4278190080,Unable to transition to a new state from
>>> Creating
>>>>> via AgentDisconnected\n']
>>>>>
>>>>>
>>>>> ===deploy dc failed, so cleaning the created entries===
>>>>>
>>>>>
>>>>> ====DeployDC: CleanUp Started====
>>>>>
>>>>>
>>>>> ====Clean Up Entries=== {'Network':
>>>>> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
>>>>> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
>>>>> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
>>>>> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
>>>>> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
>>>>> 'Network', 'PhysicalNetwork', 'Zone']}
>>>>>
>>>>>
>>>>> ===Removing DataCenter Failed===
>>>>>
>>>>> *duffy **at **thunder **in **~/projects/GSoC-2*
>>>>>
>>>>>
>>>>> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>>>>>
>>>>>> I have been seeing this for a while too, and IIRC there was a thread on
>>>>>> dev list regarding this.
>>>>>> In logs, I keep getting an error saying
>>>>>> mgmt server log:
>>>>>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>>>>>> 1-9152158867746979841: Exception Caught while executing command
>>>>>> com.cloud.utils.exception.CloudRuntimeException: Cannot create
>>> directory
>>>>>> /opt/cloud/bin on XenServer hosts
>>>>>>
>>>>>> Last I had tried was about a month ago though.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Amogh
>>>>>>
>>>>>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>>>>>> wrote:
>>>>>>
>>>>>>> If you atleast use 4.4-forward marvin, the first issue mentioned
>>> related
>>>>>>> to connection refused, should work fine provided port configuration is
>>>>>>> proper.
>>>>>>>
>>>>>>> I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>>>>>>> the results.
>>>>>>>
>>>>>>>
>>>>>>> Santhosh
>>>>>>> ________________________________________
>>>>>>> From: sebgoa [runseb@gmail.com]
>>>>>>> Sent: Tuesday, May 13, 2014 8:41 AM
>>>>>>> To: dev@cloudstack.apache.org; Santhosh Edukulla
>>>>>>> Subject: Re: devcloud script deployDataCentre.py not working
>>>>>>>
>>>>>>> cc santhosh, maybe he has tried devcloud with 4.4
>>>>>>>
>>>>>>>
>>>>>>> On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>>> basic networking fails slightly differntly:
>>>>>>>>
>>>>>>>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>>>>>>> tools/marvin/marvin/deployDataCenter.py -i
>>> tools/devcloud/devcloud.cfg
>>>>>>>> Traceback (most recent call last):
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 579, in
>>> <module>
>>>>>>>>   deploy.deploy()
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>>>>>>>>   self.createZones(self.config.zones)
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>>>>>>>> createZones
>>>>>>>>   self.createPods(zone.pods, zoneId, networkid)
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 142, in
>>>>>> createPods
>>>>>>>>   vmwareDc=pod.vmwaredc)
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>>>>>>>> createClusters
>>>>>>>>   cluster.hypervisor)
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 53, in
>>> addHosts
>>>>>>>>   self.apiClient.addHost(hostcmd)
>>>>>>>> File
>>>>>>
>>>>>>
>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>>>>>>>> cloudstackAPIClient.py",
>>>>>>>> line 1535, in addHost
>>>>>>>>   response = self.connection.marvinRequest(command,
>>>>>>>> response_type=response, method=method)
>>>>>>>> File
>>>>>>
>>>>>>
>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>>>>>>>> ection.py",
>>>>>>>> line 272, in marvinRequest
>>>>>>>>   response = jsonHelper.getResultObj(response.json(),
>>> response_type)
>>>>>>>> File
>>>>>>
>>>>>>
>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>>>>>>>> ,
>>>>>>>> line 148, in getResultObj
>>>>>>>>   raise cloudstackException.cloudstackAPIException(respname,
>>> errMsg)
>>>>>>>> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>>>>>>>> failed, due to: errorCode: 530, errorText:Cannot transit agent
>>> status
>>>>>>>> with event AgentDisconnected for host 1, mangement server id is
>>>>>>>> 4278190080,Unable to transition to a new state from Creating via
>>>>>>>> AgentDisconnected
>>>>>>>>
>>>>>>>>
>>>>>>>> seems like I failed to do some config on the devcloud host.
>>> Anything?
>>>>>>>> I followed
>>>>>>>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>>>>>>>> but in some cases it wasn't clear to me if I should execute
>>> something
>>>>>>>> in the devcloud or on my laptop.
>>>>>>>>
>>>>>>>> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <
>>> daan.hoogland@gmail.com
>>>>>>>
>>>>>>>> wrote:
>>>>>>>>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>>>>>>>>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>>>>>>>>> following error:
>>>>>>>>>
>>>>>>>>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>>>>>>>> tools/marvin/marvin/deployDataCenter.py -i
>>>>>>>>> tools/devcloud/devcloud-advanced.cfg
>>>>>>>>> Traceback (most recent call last):
>>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 579, in
>>> <module>
>>>>>>>>>   deploy.deploy()
>>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 561, in
>>> deploy
>>>>>>>>>   self.loadCfg()
>>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 523, in
>>> loadCfg
>>>>>>>>>   mgtDetails.apiKey, mgtDetails.securityKey =
>>> self.registerApiKey()
>>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>>>>>>>>> registerApiKey
>>>>>>>>>   listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>>>>>>>> File
>>>>>>
>>>>>>
>>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>>>>>>>>> /cloudstackAPIClient.py",
>>>>>>>>> line 600, in listUsers
>>>>>>>>>   response = self.connection.marvinRequest(command,
>>>>>>>>> response_type=response, method=method)
>>>>>>>>> File
>>>>>>
>>>>>>
>>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>>>>>>>> nection.py",
>>>>>>>>> line 266, in marvinRequest
>>>>>>>>>   method=method)
>>>>>>>>> File
>>>>>>
>>>>>>
>>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>>>>>>>> nection.py",
>>>>>>>>> line 196, in request
>>>>>>>>>   raise c
>>>>>>>>> requests.exceptions.ConnectionError:
>>>>>>>>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>>>>>>>>> exceeded with url:
>>>>>>>>> /client/api?account=admin&command=listUsers&response=json (Caused
>>> by
>>>>>>>>> <class 'socket.error'>: [Errno 61] Connection refused)
>>>>>>>>>
>>>>>>>>> telnet port 8091 locally on my laptop works and from the devcloud
>>> to
>>>>>>>>> my laptop as well but the port is not opened on the dev. So it
>>> makes
>>>>>>>>> sense that the connection is refused. Not that it is opened. I set
>>> the
>>>>>>>>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>>>>>>>>> That didn't help. I don't see what config I should change.
>>>>>>>>>
>>>>>>>>> What should I change? Where didn't I look?
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Daan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Daan
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>>
>>>
>>> --
>>> Daan
>>>
>



-- 
Daan

Re: devcloud script deployDataCentre.py not working

Posted by sebgoa <ru...@gmail.com>.
I tried devcloud2 on a fresh 4.4.

the deploy scripts fails with:

$ python ../marvin/marvin/deployDataCenter.py -i devcloud.cfg
Traceback (most recent call last):
  File "../marvin/marvin/deployDataCenter.py", line 579, in <module>
    deploy.deploy()
  File "../marvin/marvin/deployDataCenter.py", line 563, in deploy
    self.createZones(self.config.zones)
  File "../marvin/marvin/deployDataCenter.py", line 425, in createZones
    self.createPods(zone.pods, zoneId, networkid)
  File "../marvin/marvin/deployDataCenter.py", line 142, in createPods
    vmwareDc=pod.vmwaredc)
  File "../marvin/marvin/deployDataCenter.py", line 87, in createClusters
    cluster.hypervisor)
  File "../marvin/marvin/deployDataCenter.py", line 53, in addHosts
    self.apiClient.addHost(hostcmd)
  File "/Users/sebgoa/Documents/gitforks/cloudstack-asf/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py", line 1492, in addHost
    response = self.connection.marvinRequest(command, response_type=response, method=method)
  File "/Users/sebgoa/Documents/gitforks/cloudstack-asf/cloudstack/tools/marvin/marvin/cloudstackConnection.py", line 272, in marvinRequest
    response = jsonHelper.getResultObj(response.json(), response_type)
  File "/Users/sebgoa/Documents/gitforks/cloudstack-asf/cloudstack/tools/marvin/marvin/jsonHelper.py", line 148, in getResultObj
    raise cloudstackException.cloudstackAPIException(respname, errMsg)
cloudstackException.cloudstackAPIException: Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot transit agent status with event AgentDisconnected for host 1, mangement server id is 1,Unable to transition to a new state from Creating via AgentDisconnected


and the mgt server logs are:

WARN  [c.c.h.x.r.CitrixResourceBase] (DirectAgent-1:ctx-05a16b6a) Unable to setup
com.cloud.utils.exception.CloudRuntimeException: Cannot create directory /opt/cloud/bin on XenServer hosts
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.setupServer(CitrixResourceBase.java:4850)
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.execute(CitrixResourceBase.java:4678)
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.executeRequest(CitrixResourceBase.java:494)
	at com.cloud.hypervisor.xen.resource.XcpOssResource.executeRequest(XcpOssResource.java:182)
	at com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:216)
	at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
	at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
WARN  [c.c.h.x.d.XcpServerDiscoverer] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Unable to setup agent 1 due to Cannot create directory /opt/cloud/bin on XenServer hosts
INFO  [c.c.u.e.CSExceptionErrorCode] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Could not find exception: com.cloud.exception.ConnectionException in error code list for exceptions
WARN  [c.c.a.m.AgentManagerImpl] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Monitor XcpServerDiscoverer says there is an error in the connect process for 1 due to Reinitialize agent after setup.
INFO  [c.c.a.m.AgentManagerImpl] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Host 1 is disconnecting with event AgentDisconnected
WARN  [c.c.r.ResourceManagerImpl] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) Unable to connect due to 
com.cloud.exception.ConnectionException: Reinitialize agent after setup.
	at com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.processConnect(XcpServerDiscoverer.java:656)
	at com.cloud.agent.manager.AgentManagerImpl.notifyMonitorsOfConnection(AgentManagerImpl.java:514)
	at com.cloud.agent.manager.AgentManagerImpl.handleDirectConnectAgent(AgentManagerImpl.java:1427)
	at com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1765)
	at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)
	at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)
	at org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
	at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
	at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
	at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
	at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
ERROR [c.c.a.ApiServer] (48940041@qtp-1783796402-5:ctx-3d757b56 ctx-9031fd34 ctx-e9224a2c) unhandled exception executing api command: [Ljava.lang.String;@443a03ea
com.cloud.utils.exception.CloudRuntimeException: Cannot transit agent status with event AgentDisconnected for host 1, mangement server id is 1,Unable to transition to a new state from Creating via AgentDisconnected
	at com.cloud.agent.manager.AgentManagerImpl.agentStatusTransitTo(AgentManagerImpl.java:1359)
	at com.cloud.resource.ResourceManagerImpl.markHostAsDisconnected(ResourceManagerImpl.java:1720)
	at com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1781)
	at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:773)
	at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy148.discoverHosts(Unknown Source)
	at org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
	at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
	at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
	at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
	at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Is it what you guys are facing ?

Any fix ?


On May 15, 2014, at 10:16 AM, Ian Duffy <ia...@ianduffy.ie> wrote:

>> wow, should that be so? seems like a regression.
> 
> Not sure. The install docs mention it for 6.0 and 6.1. Never had an issue
> before on Cloudstack 4.3 and XenServer 6.2
> 
> http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/hypervisor/xenserver.html
> 
> 
> 
> On 14 May 2014 17:26, Daan Hoogland <da...@gmail.com> wrote:
> 
>> wow, should that be so? seems like a regression.
>> 
>> On Wed, May 14, 2014 at 8:37 AM, Ian Duffy <ia...@ianduffy.ie> wrote:
>>> Got a successful deployment on 4.4-forward after changing the network to
>>> bridge on the hypervisor (xe-switch-network-backend bridge)
>>> 
>>> 
>>> On 14 May 2014 07:33, Ian Duffy <ia...@ianduffy.ie> wrote:
>>> 
>>>> Hi Santhosh,
>>>> 
>>>> Its failing on 4.4-forward for me.
>>>> As far as I can tell its nothing to do with my setup since it works for
>>>> 4.3.
>>>> 
>>>> *$ *python
>> ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
>>>> -i devcloud.cfg
>>>> 
>>>> 
>>>> ==== Log Folder Path:
>>>> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All
>> logs
>>>> will be available here ====
>>>> 
>>>> 
>>>> ==== Deploy DC Started ====
>>>> 
>>>> Exception Occurred ['Traceback (most recent call last):\n', '  File
>>>> 
>> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
>>>> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
>>>> File
>>>> 
>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
>>>> line 1506, in addHost\n    response =
>>>> self.connection.marvinRequest(command, response_type=response,
>>>> method=method)\n', '  File
>>>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>>>> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
>>>> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
>>>> transit agent status with event AgentDisconnected for host 1, mangement
>>>> server id is 4278190080,Unable to transition to a new state from
>> Creating
>>>> via AgentDisconnected\n']
>>>> 
>>>> 
>>>> ===deploy dc failed, so cleaning the created entries===
>>>> 
>>>> 
>>>> ====DeployDC: CleanUp Started====
>>>> 
>>>> 
>>>> ====Clean Up Entries=== {'Network':
>>>> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
>>>> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
>>>> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
>>>> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
>>>> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
>>>> 'Network', 'PhysicalNetwork', 'Zone']}
>>>> 
>>>> 
>>>> ===Removing DataCenter Failed===
>>>> 
>>>> *duffy **at **thunder **in **~/projects/GSoC-2*
>>>> 
>>>> 
>>>> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>>>> 
>>>>> I have been seeing this for a while too, and IIRC there was a thread on
>>>>> dev list regarding this.
>>>>> In logs, I keep getting an error saying
>>>>> mgmt server log:
>>>>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>>>>> 1-9152158867746979841: Exception Caught while executing command
>>>>> com.cloud.utils.exception.CloudRuntimeException: Cannot create
>> directory
>>>>> /opt/cloud/bin on XenServer hosts
>>>>> 
>>>>> Last I had tried was about a month ago though.
>>>>> 
>>>>> 
>>>>> Thanks,
>>>>> Amogh
>>>>> 
>>>>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>>>>> wrote:
>>>>> 
>>>>>> If you atleast use 4.4-forward marvin, the first issue mentioned
>> related
>>>>>> to connection refused, should work fine provided port configuration is
>>>>>> proper.
>>>>>> 
>>>>>> I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>>>>>> the results.
>>>>>> 
>>>>>> 
>>>>>> Santhosh
>>>>>> ________________________________________
>>>>>> From: sebgoa [runseb@gmail.com]
>>>>>> Sent: Tuesday, May 13, 2014 8:41 AM
>>>>>> To: dev@cloudstack.apache.org; Santhosh Edukulla
>>>>>> Subject: Re: devcloud script deployDataCentre.py not working
>>>>>> 
>>>>>> cc santhosh, maybe he has tried devcloud with 4.4
>>>>>> 
>>>>>> 
>>>>>> On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>>>>> wrote:
>>>>>> 
>>>>>>> basic networking fails slightly differntly:
>>>>>>> 
>>>>>>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>>>>>> tools/marvin/marvin/deployDataCenter.py -i
>> tools/devcloud/devcloud.cfg
>>>>>>> Traceback (most recent call last):
>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 579, in
>> <module>
>>>>>>>   deploy.deploy()
>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>>>>>>>   self.createZones(self.config.zones)
>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>>>>>>> createZones
>>>>>>>   self.createPods(zone.pods, zoneId, networkid)
>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 142, in
>>>>> createPods
>>>>>>>   vmwareDc=pod.vmwaredc)
>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>>>>>>> createClusters
>>>>>>>   cluster.hypervisor)
>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 53, in
>> addHosts
>>>>>>>   self.apiClient.addHost(hostcmd)
>>>>>>> File
>>>>> 
>>>>> 
>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>>>>>>> cloudstackAPIClient.py",
>>>>>>> line 1535, in addHost
>>>>>>>   response = self.connection.marvinRequest(command,
>>>>>>> response_type=response, method=method)
>>>>>>> File
>>>>> 
>>>>> 
>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>>>>>>> ection.py",
>>>>>>> line 272, in marvinRequest
>>>>>>>   response = jsonHelper.getResultObj(response.json(),
>> response_type)
>>>>>>> File
>>>>> 
>>>>> 
>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>>>>>>> ,
>>>>>>> line 148, in getResultObj
>>>>>>>   raise cloudstackException.cloudstackAPIException(respname,
>> errMsg)
>>>>>>> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>>>>>>> failed, due to: errorCode: 530, errorText:Cannot transit agent
>> status
>>>>>>> with event AgentDisconnected for host 1, mangement server id is
>>>>>>> 4278190080,Unable to transition to a new state from Creating via
>>>>>>> AgentDisconnected
>>>>>>> 
>>>>>>> 
>>>>>>> seems like I failed to do some config on the devcloud host.
>> Anything?
>>>>>>> I followed
>>>>>>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>>>>>>> but in some cases it wasn't clear to me if I should execute
>> something
>>>>>>> in the devcloud or on my laptop.
>>>>>>> 
>>>>>>> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <
>> daan.hoogland@gmail.com
>>>>>> 
>>>>>>> wrote:
>>>>>>>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>>>>>>>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>>>>>>>> following error:
>>>>>>>> 
>>>>>>>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>>>>>>> tools/marvin/marvin/deployDataCenter.py -i
>>>>>>>> tools/devcloud/devcloud-advanced.cfg
>>>>>>>> Traceback (most recent call last):
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 579, in
>> <module>
>>>>>>>>   deploy.deploy()
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 561, in
>> deploy
>>>>>>>>   self.loadCfg()
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 523, in
>> loadCfg
>>>>>>>>   mgtDetails.apiKey, mgtDetails.securityKey =
>> self.registerApiKey()
>>>>>>>> File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>>>>>>>> registerApiKey
>>>>>>>>   listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>>>>>>> File
>>>>> 
>>>>> 
>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>>>>>>>> /cloudstackAPIClient.py",
>>>>>>>> line 600, in listUsers
>>>>>>>>   response = self.connection.marvinRequest(command,
>>>>>>>> response_type=response, method=method)
>>>>>>>> File
>>>>> 
>>>>> 
>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>>>>>>> nection.py",
>>>>>>>> line 266, in marvinRequest
>>>>>>>>   method=method)
>>>>>>>> File
>>>>> 
>>>>> 
>>>>> "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>>>>>>> nection.py",
>>>>>>>> line 196, in request
>>>>>>>>   raise c
>>>>>>>> requests.exceptions.ConnectionError:
>>>>>>>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>>>>>>>> exceeded with url:
>>>>>>>> /client/api?account=admin&command=listUsers&response=json (Caused
>> by
>>>>>>>> <class 'socket.error'>: [Errno 61] Connection refused)
>>>>>>>> 
>>>>>>>> telnet port 8091 locally on my laptop works and from the devcloud
>> to
>>>>>>>> my laptop as well but the port is not opened on the dev. So it
>> makes
>>>>>>>> sense that the connection is refused. Not that it is opened. I set
>> the
>>>>>>>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>>>>>>>> That didn't help. I don't see what config I should change.
>>>>>>>> 
>>>>>>>> What should I change? Where didn't I look?
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Daan
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Daan
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 
>> 
>> 
>> --
>> Daan
>> 


Re: devcloud script deployDataCentre.py not working

Posted by Ian Duffy <ia...@ianduffy.ie>.
> wow, should that be so? seems like a regression.

Not sure. The install docs mention it for 6.0 and 6.1. Never had an issue
before on Cloudstack 4.3 and XenServer 6.2

http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/hypervisor/xenserver.html



On 14 May 2014 17:26, Daan Hoogland <da...@gmail.com> wrote:

> wow, should that be so? seems like a regression.
>
> On Wed, May 14, 2014 at 8:37 AM, Ian Duffy <ia...@ianduffy.ie> wrote:
> > Got a successful deployment on 4.4-forward after changing the network to
> > bridge on the hypervisor (xe-switch-network-backend bridge)
> >
> >
> > On 14 May 2014 07:33, Ian Duffy <ia...@ianduffy.ie> wrote:
> >
> >> Hi Santhosh,
> >>
> >> Its failing on 4.4-forward for me.
> >> As far as I can tell its nothing to do with my setup since it works for
> >> 4.3.
> >>
> >> *$ *python
>  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
> >> -i devcloud.cfg
> >>
> >>
> >> ==== Log Folder Path:
> >> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All
> logs
> >> will be available here ====
> >>
> >>
> >> ==== Deploy DC Started ====
> >>
> >> Exception Occurred ['Traceback (most recent call last):\n', '  File
> >>
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> >> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
> >> File
> >>
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
> >> line 1506, in addHost\n    response =
> >> self.connection.marvinRequest(command, response_type=response,
> >> method=method)\n', '  File
> >> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
> >> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
> >> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
> >> transit agent status with event AgentDisconnected for host 1, mangement
> >> server id is 4278190080,Unable to transition to a new state from
> Creating
> >> via AgentDisconnected\n']
> >>
> >>
> >> ===deploy dc failed, so cleaning the created entries===
> >>
> >>
> >> ====DeployDC: CleanUp Started====
> >>
> >>
> >> ====Clean Up Entries=== {'Network':
> >> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
> >> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
> >> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
> >> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
> >> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
> >> 'Network', 'PhysicalNetwork', 'Zone']}
> >>
> >>
> >> ===Removing DataCenter Failed===
> >>
> >> *duffy **at **thunder **in **~/projects/GSoC-2*
> >>
> >>
> >> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
> >>
> >>> I have been seeing this for a while too, and IIRC there was a thread on
> >>> dev list regarding this.
> >>> In logs, I keep getting an error saying
> >>> mgmt server log:
> >>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
> >>> 1-9152158867746979841: Exception Caught while executing command
> >>> com.cloud.utils.exception.CloudRuntimeException: Cannot create
> directory
> >>> /opt/cloud/bin on XenServer hosts
> >>>
> >>> Last I had tried was about a month ago though.
> >>>
> >>>
> >>> Thanks,
> >>> Amogh
> >>>
> >>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
> >>> wrote:
> >>>
> >>> >If you atleast use 4.4-forward marvin, the first issue mentioned
> related
> >>> >to connection refused, should work fine provided port configuration is
> >>> >proper.
> >>> >
> >>> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
> >>> >the results.
> >>> >
> >>> >
> >>> >Santhosh
> >>> >________________________________________
> >>> >From: sebgoa [runseb@gmail.com]
> >>> >Sent: Tuesday, May 13, 2014 8:41 AM
> >>> >To: dev@cloudstack.apache.org; Santhosh Edukulla
> >>> >Subject: Re: devcloud script deployDataCentre.py not working
> >>> >
> >>> >cc santhosh, maybe he has tried devcloud with 4.4
> >>> >
> >>> >
> >>> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
> >>> wrote:
> >>> >
> >>> >> basic networking fails slightly differntly:
> >>> >>
> >>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >>> >> tools/marvin/marvin/deployDataCenter.py -i
> tools/devcloud/devcloud.cfg
> >>> >> Traceback (most recent call last):
> >>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in
> <module>
> >>> >>    deploy.deploy()
> >>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
> >>> >>    self.createZones(self.config.zones)
> >>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
> >>> >>createZones
> >>> >>    self.createPods(zone.pods, zoneId, networkid)
> >>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in
> >>> createPods
> >>> >>    vmwareDc=pod.vmwaredc)
> >>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
> >>> >>createClusters
> >>> >>    cluster.hypervisor)
> >>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in
> addHosts
> >>> >>    self.apiClient.addHost(hostcmd)
> >>> >>  File
> >>>
> >>>
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
> >>> >>cloudstackAPIClient.py",
> >>> >> line 1535, in addHost
> >>> >>    response = self.connection.marvinRequest(command,
> >>> >> response_type=response, method=method)
> >>> >>  File
> >>>
> >>>
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
> >>> >>ection.py",
> >>> >> line 272, in marvinRequest
> >>> >>    response = jsonHelper.getResultObj(response.json(),
> response_type)
> >>> >>  File
> >>>
> >>>
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
> >>> >>,
> >>> >> line 148, in getResultObj
> >>> >>    raise cloudstackException.cloudstackAPIException(respname,
> errMsg)
> >>> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
> >>> >> failed, due to: errorCode: 530, errorText:Cannot transit agent
> status
> >>> >> with event AgentDisconnected for host 1, mangement server id is
> >>> >> 4278190080,Unable to transition to a new state from Creating via
> >>> >> AgentDisconnected
> >>> >>
> >>> >>
> >>> >> seems like I failed to do some config on the devcloud host.
> Anything?
> >>> >> I followed
> >>> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
> >>> >> but in some cases it wasn't clear to me if I should execute
> something
> >>> >> in the devcloud or on my laptop.
> >>> >>
> >>> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <
> daan.hoogland@gmail.com
> >>> >
> >>> >>wrote:
> >>> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
> >>> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
> >>> >>> following error:
> >>> >>>
> >>> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >>> >>> tools/marvin/marvin/deployDataCenter.py -i
> >>> >>> tools/devcloud/devcloud-advanced.cfg
> >>> >>> Traceback (most recent call last):
> >>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in
> <module>
> >>> >>>    deploy.deploy()
> >>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in
> deploy
> >>> >>>    self.loadCfg()
> >>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in
> loadCfg
> >>> >>>    mgtDetails.apiKey, mgtDetails.securityKey =
> self.registerApiKey()
> >>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
> >>> >>>registerApiKey
> >>> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
> >>> >>>  File
> >>>
> >>>
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
> >>> >>>/cloudstackAPIClient.py",
> >>> >>> line 600, in listUsers
> >>> >>>    response = self.connection.marvinRequest(command,
> >>> >>> response_type=response, method=method)
> >>> >>>  File
> >>>
> >>>
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
> >>> >>>nection.py",
> >>> >>> line 266, in marvinRequest
> >>> >>>    method=method)
> >>> >>>  File
> >>>
> >>>
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
> >>> >>>nection.py",
> >>> >>> line 196, in request
> >>> >>>    raise c
> >>> >>> requests.exceptions.ConnectionError:
> >>> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
> >>> >>> exceeded with url:
> >>> >>> /client/api?account=admin&command=listUsers&response=json (Caused
> by
> >>> >>> <class 'socket.error'>: [Errno 61] Connection refused)
> >>> >>>
> >>> >>> telnet port 8091 locally on my laptop works and from the devcloud
> to
> >>> >>> my laptop as well but the port is not opened on the dev. So it
> makes
> >>> >>> sense that the connection is refused. Not that it is opened. I set
> the
> >>> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
> >>> >>> That didn't help. I don't see what config I should change.
> >>> >>>
> >>> >>> What should I change? Where didn't I look?
> >>> >>>
> >>> >>> --
> >>> >>> Daan
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Daan
> >>> >
> >>>
> >>>
> >>
>
>
>
> --
> Daan
>

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
wow, should that be so? seems like a regression.

On Wed, May 14, 2014 at 8:37 AM, Ian Duffy <ia...@ianduffy.ie> wrote:
> Got a successful deployment on 4.4-forward after changing the network to
> bridge on the hypervisor (xe-switch-network-backend bridge)
>
>
> On 14 May 2014 07:33, Ian Duffy <ia...@ianduffy.ie> wrote:
>
>> Hi Santhosh,
>>
>> Its failing on 4.4-forward for me.
>> As far as I can tell its nothing to do with my setup since it works for
>> 4.3.
>>
>> *$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
>> -i devcloud.cfg
>>
>>
>> ==== Log Folder Path:
>> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
>> will be available here ====
>>
>>
>> ==== Deploy DC Started ====
>>
>> Exception Occurred ['Traceback (most recent call last):\n', '  File
>> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
>> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
>> File
>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
>> line 1506, in addHost\n    response =
>> self.connection.marvinRequest(command, response_type=response,
>> method=method)\n', '  File
>> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
>> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
>> transit agent status with event AgentDisconnected for host 1, mangement
>> server id is 4278190080,Unable to transition to a new state from Creating
>> via AgentDisconnected\n']
>>
>>
>> ===deploy dc failed, so cleaning the created entries===
>>
>>
>> ====DeployDC: CleanUp Started====
>>
>>
>> ====Clean Up Entries=== {'Network':
>> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
>> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
>> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
>> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
>> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
>> 'Network', 'PhysicalNetwork', 'Zone']}
>>
>>
>> ===Removing DataCenter Failed===
>>
>> *duffy **at **thunder **in **~/projects/GSoC-2*
>>
>>
>> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>>
>>> I have been seeing this for a while too, and IIRC there was a thread on
>>> dev list regarding this.
>>> In logs, I keep getting an error saying
>>> mgmt server log:
>>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>>> 1-9152158867746979841: Exception Caught while executing command
>>> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
>>> /opt/cloud/bin on XenServer hosts
>>>
>>> Last I had tried was about a month ago though.
>>>
>>>
>>> Thanks,
>>> Amogh
>>>
>>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>>> wrote:
>>>
>>> >If you atleast use 4.4-forward marvin, the first issue mentioned related
>>> >to connection refused, should work fine provided port configuration is
>>> >proper.
>>> >
>>> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>>> >the results.
>>> >
>>> >
>>> >Santhosh
>>> >________________________________________
>>> >From: sebgoa [runseb@gmail.com]
>>> >Sent: Tuesday, May 13, 2014 8:41 AM
>>> >To: dev@cloudstack.apache.org; Santhosh Edukulla
>>> >Subject: Re: devcloud script deployDataCentre.py not working
>>> >
>>> >cc santhosh, maybe he has tried devcloud with 4.4
>>> >
>>> >
>>> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>>> wrote:
>>> >
>>> >> basic networking fails slightly differntly:
>>> >>
>>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
>>> >> Traceback (most recent call last):
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>> >>    deploy.deploy()
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>>> >>    self.createZones(self.config.zones)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>>> >>createZones
>>> >>    self.createPods(zone.pods, zoneId, networkid)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in
>>> createPods
>>> >>    vmwareDc=pod.vmwaredc)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>>> >>createClusters
>>> >>    cluster.hypervisor)
>>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>>> >>    self.apiClient.addHost(hostcmd)
>>> >>  File
>>>
>>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>>> >>cloudstackAPIClient.py",
>>> >> line 1535, in addHost
>>> >>    response = self.connection.marvinRequest(command,
>>> >> response_type=response, method=method)
>>> >>  File
>>>
>>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>>> >>ection.py",
>>> >> line 272, in marvinRequest
>>> >>    response = jsonHelper.getResultObj(response.json(), response_type)
>>> >>  File
>>>
>>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>>> >>,
>>> >> line 148, in getResultObj
>>> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
>>> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>>> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
>>> >> with event AgentDisconnected for host 1, mangement server id is
>>> >> 4278190080,Unable to transition to a new state from Creating via
>>> >> AgentDisconnected
>>> >>
>>> >>
>>> >> seems like I failed to do some config on the devcloud host. Anything?
>>> >> I followed
>>> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>>> >> but in some cases it wasn't clear to me if I should execute something
>>> >> in the devcloud or on my laptop.
>>> >>
>>> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <daan.hoogland@gmail.com
>>> >
>>> >>wrote:
>>> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>>> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>>> >>> following error:
>>> >>>
>>> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>> >>> tools/marvin/marvin/deployDataCenter.py -i
>>> >>> tools/devcloud/devcloud-advanced.cfg
>>> >>> Traceback (most recent call last):
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>> >>>    deploy.deploy()
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>> >>>    self.loadCfg()
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>>> >>>registerApiKey
>>> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>> >>>  File
>>>
>>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>>> >>>/cloudstackAPIClient.py",
>>> >>> line 600, in listUsers
>>> >>>    response = self.connection.marvinRequest(command,
>>> >>> response_type=response, method=method)
>>> >>>  File
>>>
>>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>> >>>nection.py",
>>> >>> line 266, in marvinRequest
>>> >>>    method=method)
>>> >>>  File
>>>
>>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>> >>>nection.py",
>>> >>> line 196, in request
>>> >>>    raise c
>>> >>> requests.exceptions.ConnectionError:
>>> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>>> >>> exceeded with url:
>>> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
>>> >>> <class 'socket.error'>: [Errno 61] Connection refused)
>>> >>>
>>> >>> telnet port 8091 locally on my laptop works and from the devcloud to
>>> >>> my laptop as well but the port is not opened on the dev. So it makes
>>> >>> sense that the connection is refused. Not that it is opened. I set the
>>> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>>> >>> That didn't help. I don't see what config I should change.
>>> >>>
>>> >>> What should I change? Where didn't I look?
>>> >>>
>>> >>> --
>>> >>> Daan
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Daan
>>> >
>>>
>>>
>>



-- 
Daan

Re: devcloud script deployDataCentre.py not working

Posted by Ian Duffy <ia...@ianduffy.ie>.
Got a successful deployment on 4.4-forward after changing the network to
bridge on the hypervisor (xe-switch-network-backend bridge)


On 14 May 2014 07:33, Ian Duffy <ia...@ianduffy.ie> wrote:

> Hi Santhosh,
>
> Its failing on 4.4-forward for me.
> As far as I can tell its nothing to do with my setup since it works for
> 4.3.
>
> *$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
> -i devcloud.cfg
>
>
> ==== Log Folder Path:
> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
> will be available here ====
>
>
> ==== Deploy DC Started ====
>
> Exception Occurred ['Traceback (most recent call last):\n', '  File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
> File
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1506, in addHost\n    response =
> self.connection.marvinRequest(command, response_type=response,
> method=method)\n', '  File
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
> transit agent status with event AgentDisconnected for host 1, mangement
> server id is 4278190080,Unable to transition to a new state from Creating
> via AgentDisconnected\n']
>
>
> ===deploy dc failed, so cleaning the created entries===
>
>
> ====DeployDC: CleanUp Started====
>
>
> ====Clean Up Entries=== {'Network':
> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
> 'Network', 'PhysicalNetwork', 'Zone']}
>
>
> ===Removing DataCenter Failed===
>
> *duffy **at **thunder **in **~/projects/GSoC-2*
>
>
> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>
>> I have been seeing this for a while too, and IIRC there was a thread on
>> dev list regarding this.
>> In logs, I keep getting an error saying
>> mgmt server log:
>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>> 1-9152158867746979841: Exception Caught while executing command
>> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
>> /opt/cloud/bin on XenServer hosts
>>
>> Last I had tried was about a month ago though.
>>
>>
>> Thanks,
>> Amogh
>>
>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>> wrote:
>>
>> >If you atleast use 4.4-forward marvin, the first issue mentioned related
>> >to connection refused, should work fine provided port configuration is
>> >proper.
>> >
>> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>> >the results.
>> >
>> >
>> >Santhosh
>> >________________________________________
>> >From: sebgoa [runseb@gmail.com]
>> >Sent: Tuesday, May 13, 2014 8:41 AM
>> >To: dev@cloudstack.apache.org; Santhosh Edukulla
>> >Subject: Re: devcloud script deployDataCentre.py not working
>> >
>> >cc santhosh, maybe he has tried devcloud with 4.4
>> >
>> >
>> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>> wrote:
>> >
>> >> basic networking fails slightly differntly:
>> >>
>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
>> >> Traceback (most recent call last):
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>    deploy.deploy()
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>> >>    self.createZones(self.config.zones)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>> >>createZones
>> >>    self.createPods(zone.pods, zoneId, networkid)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in
>> createPods
>> >>    vmwareDc=pod.vmwaredc)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>> >>createClusters
>> >>    cluster.hypervisor)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>> >>    self.apiClient.addHost(hostcmd)
>> >>  File
>>
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>> >>cloudstackAPIClient.py",
>> >> line 1535, in addHost
>> >>    response = self.connection.marvinRequest(command,
>> >> response_type=response, method=method)
>> >>  File
>>
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>> >>ection.py",
>> >> line 272, in marvinRequest
>> >>    response = jsonHelper.getResultObj(response.json(), response_type)
>> >>  File
>>
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>> >>,
>> >> line 148, in getResultObj
>> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
>> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
>> >> with event AgentDisconnected for host 1, mangement server id is
>> >> 4278190080,Unable to transition to a new state from Creating via
>> >> AgentDisconnected
>> >>
>> >>
>> >> seems like I failed to do some config on the devcloud host. Anything?
>> >> I followed
>> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>> >> but in some cases it wasn't clear to me if I should execute something
>> >> in the devcloud or on my laptop.
>> >>
>> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <daan.hoogland@gmail.com
>> >
>> >>wrote:
>> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> >>> following error:
>> >>>
>> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >>> tools/marvin/marvin/deployDataCenter.py -i
>> >>> tools/devcloud/devcloud-advanced.cfg
>> >>> Traceback (most recent call last):
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>>    deploy.deploy()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>> >>>    self.loadCfg()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>> >>>registerApiKey
>> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>> >>>  File
>>
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>> >>>/cloudstackAPIClient.py",
>> >>> line 600, in listUsers
>> >>>    response = self.connection.marvinRequest(command,
>> >>> response_type=response, method=method)
>> >>>  File
>>
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>> >>>nection.py",
>> >>> line 266, in marvinRequest
>> >>>    method=method)
>> >>>  File
>>
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>> >>>nection.py",
>> >>> line 196, in request
>> >>>    raise c
>> >>> requests.exceptions.ConnectionError:
>> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> >>> exceeded with url:
>> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
>> >>> <class 'socket.error'>: [Errno 61] Connection refused)
>> >>>
>> >>> telnet port 8091 locally on my laptop works and from the devcloud to
>> >>> my laptop as well but the port is not opened on the dev. So it makes
>> >>> sense that the connection is refused. Not that it is opened. I set the
>> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> >>> That didn't help. I don't see what config I should change.
>> >>>
>> >>> What should I change? Where didn't I look?
>> >>>
>> >>> --
>> >>> Daan
>> >>
>> >>
>> >>
>> >> --
>> >> Daan
>> >
>>
>>
>

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
On Fri, May 16, 2014 at 8:42 AM, Santhosh Edukulla
<sa...@citrix.com> wrote:
> hosts


Santhosh, I will check on monday. two hosts are added. both are 6.0.2
xenservers. I am sure not only the master is added. I think it is the
other machine that is added first. I will check. So there are two bugs
manifesting the same way, you say? One that prevents from adding the
devcloud as an host and another that prevents a xenserver host that is
not master in a cluster from being added?

-- 
Daan

RE: devcloud script deployDataCentre.py not working

Posted by Santhosh Edukulla <sa...@citrix.com>.
Daan,

When i say specific to devcloud, i mean in normal it works to host properly. There is a bug, that when we add xenserver host pool, we just need to add master xenserver host or some thing like that and other hosts need not be added, there was a bug logged for this. But otherwise this was used daily in regression to add hosts. I will find the bug logged for this and see if i can fix it. if its the same.

If we can give specific xenserver information used here, i can check that as well.

Santhosh
________________________________________
From: Daan Hoogland [daan.hoogland@gmail.com]
Sent: Wednesday, May 14, 2014 10:23 AM
To: dev
Subject: Re: devcloud script deployDataCentre.py not working

Santhosh, see inline

On Wed, May 14, 2014 at 9:11 AM, Santhosh Edukulla
<sa...@citrix.com> wrote:
> 1. Its nothing to do with script we are using here. Based upon error text below, addHost API on devcloud is failing. As Daan mentioned, MS is not able to add host and it seems specific to DevCloud.
I have seen this on other XenServer hypervisors as well, it is not
specific to devcloud.

>
> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
> transit agent status with event AgentDisconnected for host 1, mangement
> server id is 4278190080,Unable to transition to a new state from Creating
> via AgentDisconnected\n']
>
> 2. If we see and run the script separately on a normal setup, it works perfectly fine.
No I have seen the addhost command fail without the script around it.

>
> Thanks!
> Santhosh
> ________________________________________
> From: Ian Duffy [ian@ianduffy.ie]
> Sent: Wednesday, May 14, 2014 2:33 AM
> To: CloudStack Dev
> Subject: Re: devcloud script deployDataCentre.py not working
>
> Hi Santhosh,
>
> Its failing on 4.4-forward for me.
> As far as I can tell its nothing to do with my setup since it works for 4.3.
>
> *$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
> -i devcloud.cfg
>
>
> ==== Log Folder Path:
> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
> will be available here ====
>
>
> ==== Deploy DC Started ====
>
> Exception Occurred ['Traceback (most recent call last):\n', '  File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
> File
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1506, in addHost\n    response =
> self.connection.marvinRequest(command, response_type=response,
> method=method)\n', '  File
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
> transit agent status with event AgentDisconnected for host 1, mangement
> server id is 4278190080,Unable to transition to a new state from Creating
> via AgentDisconnected\n']
>
>
> ===deploy dc failed, so cleaning the created entries===
>
>
> ====DeployDC: CleanUp Started====
>
>
> ====Clean Up Entries=== {'Network':
> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
> 'Network', 'PhysicalNetwork', 'Zone']}
>
>
> ===Removing DataCenter Failed===
>
> *duffy **at **thunder **in **~/projects/GSoC-2*
>
>
> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>
>> I have been seeing this for a while too, and IIRC there was a thread on
>> dev list regarding this.
>> In logs, I keep getting an error saying
>> mgmt server log:
>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>> 1-9152158867746979841: Exception Caught while executing command
>> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
>> /opt/cloud/bin on XenServer hosts
>>
>> Last I had tried was about a month ago though.
>>
>>
>> Thanks,
>> Amogh
>>
>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>> wrote:
>>
>> >If you atleast use 4.4-forward marvin, the first issue mentioned related
>> >to connection refused, should work fine provided port configuration is
>> >proper.
>> >
>> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>> >the results.
>> >
>> >
>> >Santhosh
>> >________________________________________
>> >From: sebgoa [runseb@gmail.com]
>> >Sent: Tuesday, May 13, 2014 8:41 AM
>> >To: dev@cloudstack.apache.org; Santhosh Edukulla
>> >Subject: Re: devcloud script deployDataCentre.py not working
>> >
>> >cc santhosh, maybe he has tried devcloud with 4.4
>> >
>> >
>> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>> wrote:
>> >
>> >> basic networking fails slightly differntly:
>> >>
>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
>> >> Traceback (most recent call last):
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>    deploy.deploy()
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>> >>    self.createZones(self.config.zones)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>> >>createZones
>> >>    self.createPods(zone.pods, zoneId, networkid)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
>> >>    vmwareDc=pod.vmwaredc)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>> >>createClusters
>> >>    cluster.hypervisor)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>> >>    self.apiClient.addHost(hostcmd)
>> >>  File
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>> >>cloudstackAPIClient.py",
>> >> line 1535, in addHost
>> >>    response = self.connection.marvinRequest(command,
>> >> response_type=response, method=method)
>> >>  File
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>> >>ection.py",
>> >> line 272, in marvinRequest
>> >>    response = jsonHelper.getResultObj(response.json(), response_type)
>> >>  File
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>> >>,
>> >> line 148, in getResultObj
>> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
>> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
>> >> with event AgentDisconnected for host 1, mangement server id is
>> >> 4278190080,Unable to transition to a new state from Creating via
>> >> AgentDisconnected
>> >>
>> >>
>> >> seems like I failed to do some config on the devcloud host. Anything?
>> >> I followed
>> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>> >> but in some cases it wasn't clear to me if I should execute something
>> >> in the devcloud or on my laptop.
>> >>
>> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com>
>> >>wrote:
>> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> >>> following error:
>> >>>
>> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >>> tools/marvin/marvin/deployDataCenter.py -i
>> >>> tools/devcloud/devcloud-advanced.cfg
>> >>> Traceback (most recent call last):
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>>    deploy.deploy()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>> >>>    self.loadCfg()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>> >>>registerApiKey
>> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>> >>>  File
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>> >>>/cloudstackAPIClient.py",
>> >>> line 600, in listUsers
>> >>>    response = self.connection.marvinRequest(command,
>> >>> response_type=response, method=method)
>> >>>  File
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>> >>>nection.py",
>> >>> line 266, in marvinRequest
>> >>>    method=method)
>> >>>  File
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>> >>>nection.py",
>> >>> line 196, in request
>> >>>    raise c
>> >>> requests.exceptions.ConnectionError:
>> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> >>> exceeded with url:
>> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
>> >>> <class 'socket.error'>: [Errno 61] Connection refused)
>> >>>
>> >>> telnet port 8091 locally on my laptop works and from the devcloud to
>> >>> my laptop as well but the port is not opened on the dev. So it makes
>> >>> sense that the connection is refused. Not that it is opened. I set the
>> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> >>> That didn't help. I don't see what config I should change.
>> >>>
>> >>> What should I change? Where didn't I look?
>> >>>
>> >>> --
>> >>> Daan
>> >>
>> >>
>> >>
>> >> --
>> >> Daan
>> >
>>
>>



--
Daan

Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
Santhosh, see inline

On Wed, May 14, 2014 at 9:11 AM, Santhosh Edukulla
<sa...@citrix.com> wrote:
> 1. Its nothing to do with script we are using here. Based upon error text below, addHost API on devcloud is failing. As Daan mentioned, MS is not able to add host and it seems specific to DevCloud.
I have seen this on other XenServer hypervisors as well, it is not
specific to devcloud.

>
> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
> transit agent status with event AgentDisconnected for host 1, mangement
> server id is 4278190080,Unable to transition to a new state from Creating
> via AgentDisconnected\n']
>
> 2. If we see and run the script separately on a normal setup, it works perfectly fine.
No I have seen the addhost command fail without the script around it.

>
> Thanks!
> Santhosh
> ________________________________________
> From: Ian Duffy [ian@ianduffy.ie]
> Sent: Wednesday, May 14, 2014 2:33 AM
> To: CloudStack Dev
> Subject: Re: devcloud script deployDataCentre.py not working
>
> Hi Santhosh,
>
> Its failing on 4.4-forward for me.
> As far as I can tell its nothing to do with my setup since it works for 4.3.
>
> *$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
> -i devcloud.cfg
>
>
> ==== Log Folder Path:
> /tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
> will be available here ====
>
>
> ==== Deploy DC Started ====
>
> Exception Occurred ['Traceback (most recent call last):\n', '  File
> "/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
> line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
> File
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1506, in addHost\n    response =
> self.connection.marvinRequest(command, response_type=response,
> method=method)\n', '  File
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
> line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
> Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
> transit agent status with event AgentDisconnected for host 1, mangement
> server id is 4278190080,Unable to transition to a new state from Creating
> via AgentDisconnected\n']
>
>
> ===deploy dc failed, so cleaning the created entries===
>
>
> ====DeployDC: CleanUp Started====
>
>
> ====Clean Up Entries=== {'Network':
> [u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
> [u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
> [u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
> [u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
> [u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
> 'Network', 'PhysicalNetwork', 'Zone']}
>
>
> ===Removing DataCenter Failed===
>
> *duffy **at **thunder **in **~/projects/GSoC-2*
>
>
> On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:
>
>> I have been seeing this for a while too, and IIRC there was a thread on
>> dev list regarding this.
>> In logs, I keep getting an error saying
>> mgmt server log:
>> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
>> 1-9152158867746979841: Exception Caught while executing command
>> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
>> /opt/cloud/bin on XenServer hosts
>>
>> Last I had tried was about a month ago though.
>>
>>
>> Thanks,
>> Amogh
>>
>> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
>> wrote:
>>
>> >If you atleast use 4.4-forward marvin, the first issue mentioned related
>> >to connection refused, should work fine provided port configuration is
>> >proper.
>> >
>> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>> >the results.
>> >
>> >
>> >Santhosh
>> >________________________________________
>> >From: sebgoa [runseb@gmail.com]
>> >Sent: Tuesday, May 13, 2014 8:41 AM
>> >To: dev@cloudstack.apache.org; Santhosh Edukulla
>> >Subject: Re: devcloud script deployDataCentre.py not working
>> >
>> >cc santhosh, maybe he has tried devcloud with 4.4
>> >
>> >
>> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
>> wrote:
>> >
>> >> basic networking fails slightly differntly:
>> >>
>> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
>> >> Traceback (most recent call last):
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>    deploy.deploy()
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>> >>    self.createZones(self.config.zones)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>> >>createZones
>> >>    self.createPods(zone.pods, zoneId, networkid)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
>> >>    vmwareDc=pod.vmwaredc)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>> >>createClusters
>> >>    cluster.hypervisor)
>> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>> >>    self.apiClient.addHost(hostcmd)
>> >>  File
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>> >>cloudstackAPIClient.py",
>> >> line 1535, in addHost
>> >>    response = self.connection.marvinRequest(command,
>> >> response_type=response, method=method)
>> >>  File
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>> >>ection.py",
>> >> line 272, in marvinRequest
>> >>    response = jsonHelper.getResultObj(response.json(), response_type)
>> >>  File
>> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>> >>,
>> >> line 148, in getResultObj
>> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
>> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
>> >> with event AgentDisconnected for host 1, mangement server id is
>> >> 4278190080,Unable to transition to a new state from Creating via
>> >> AgentDisconnected
>> >>
>> >>
>> >> seems like I failed to do some config on the devcloud host. Anything?
>> >> I followed
>> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>> >> but in some cases it wasn't clear to me if I should execute something
>> >> in the devcloud or on my laptop.
>> >>
>> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com>
>> >>wrote:
>> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> >>> following error:
>> >>>
>> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> >>> tools/marvin/marvin/deployDataCenter.py -i
>> >>> tools/devcloud/devcloud-advanced.cfg
>> >>> Traceback (most recent call last):
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>> >>>    deploy.deploy()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>> >>>    self.loadCfg()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>> >>>registerApiKey
>> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>> >>>  File
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>> >>>/cloudstackAPIClient.py",
>> >>> line 600, in listUsers
>> >>>    response = self.connection.marvinRequest(command,
>> >>> response_type=response, method=method)
>> >>>  File
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>> >>>nection.py",
>> >>> line 266, in marvinRequest
>> >>>    method=method)
>> >>>  File
>> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>> >>>nection.py",
>> >>> line 196, in request
>> >>>    raise c
>> >>> requests.exceptions.ConnectionError:
>> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> >>> exceeded with url:
>> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
>> >>> <class 'socket.error'>: [Errno 61] Connection refused)
>> >>>
>> >>> telnet port 8091 locally on my laptop works and from the devcloud to
>> >>> my laptop as well but the port is not opened on the dev. So it makes
>> >>> sense that the connection is refused. Not that it is opened. I set the
>> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> >>> That didn't help. I don't see what config I should change.
>> >>>
>> >>> What should I change? Where didn't I look?
>> >>>
>> >>> --
>> >>> Daan
>> >>
>> >>
>> >>
>> >> --
>> >> Daan
>> >
>>
>>



-- 
Daan

RE: devcloud script deployDataCentre.py not working

Posted by Santhosh Edukulla <sa...@citrix.com>.
1. Its nothing to do with script we are using here. Based upon error text below, addHost API on devcloud is failing. As Daan mentioned, MS is not able to add host and it seems specific to DevCloud. 

Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
transit agent status with event AgentDisconnected for host 1, mangement
server id is 4278190080,Unable to transition to a new state from Creating
via AgentDisconnected\n']

2. If we see and run the script separately on a normal setup, it works perfectly fine.

Thanks!
Santhosh
________________________________________
From: Ian Duffy [ian@ianduffy.ie]
Sent: Wednesday, May 14, 2014 2:33 AM
To: CloudStack Dev
Subject: Re: devcloud script deployDataCentre.py not working

Hi Santhosh,

Its failing on 4.4-forward for me.
As far as I can tell its nothing to do with my setup since it works for 4.3.

*$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
-i devcloud.cfg


==== Log Folder Path:
/tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
will be available here ====


==== Deploy DC Started ====

Exception Occurred ['Traceback (most recent call last):\n', '  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
File
"/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 1506, in addHost\n    response =
self.connection.marvinRequest(command, response_type=response,
method=method)\n', '  File
"/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
transit agent status with event AgentDisconnected for host 1, mangement
server id is 4278190080,Unable to transition to a new state from Creating
via AgentDisconnected\n']


===deploy dc failed, so cleaning the created entries===


====DeployDC: CleanUp Started====


====Clean Up Entries=== {'Network':
[u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
[u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
[u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
[u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
[u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
'Network', 'PhysicalNetwork', 'Zone']}


===Removing DataCenter Failed===

*duffy **at **thunder **in **~/projects/GSoC-2*


On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:

> I have been seeing this for a while too, and IIRC there was a thread on
> dev list regarding this.
> In logs, I keep getting an error saying
> mgmt server log:
> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
> 1-9152158867746979841: Exception Caught while executing command
> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
> /opt/cloud/bin on XenServer hosts
>
> Last I had tried was about a month ago though.
>
>
> Thanks,
> Amogh
>
> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
> wrote:
>
> >If you atleast use 4.4-forward marvin, the first issue mentioned related
> >to connection refused, should work fine provided port configuration is
> >proper.
> >
> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
> >the results.
> >
> >
> >Santhosh
> >________________________________________
> >From: sebgoa [runseb@gmail.com]
> >Sent: Tuesday, May 13, 2014 8:41 AM
> >To: dev@cloudstack.apache.org; Santhosh Edukulla
> >Subject: Re: devcloud script deployDataCentre.py not working
> >
> >cc santhosh, maybe he has tried devcloud with 4.4
> >
> >
> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
> wrote:
> >
> >> basic networking fails slightly differntly:
> >>
> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
> >> Traceback (most recent call last):
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
> >>    deploy.deploy()
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
> >>    self.createZones(self.config.zones)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
> >>createZones
> >>    self.createPods(zone.pods, zoneId, networkid)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
> >>    vmwareDc=pod.vmwaredc)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
> >>createClusters
> >>    cluster.hypervisor)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
> >>    self.apiClient.addHost(hostcmd)
> >>  File
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
> >>cloudstackAPIClient.py",
> >> line 1535, in addHost
> >>    response = self.connection.marvinRequest(command,
> >> response_type=response, method=method)
> >>  File
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
> >>ection.py",
> >> line 272, in marvinRequest
> >>    response = jsonHelper.getResultObj(response.json(), response_type)
> >>  File
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
> >>,
> >> line 148, in getResultObj
> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
> >> with event AgentDisconnected for host 1, mangement server id is
> >> 4278190080,Unable to transition to a new state from Creating via
> >> AgentDisconnected
> >>
> >>
> >> seems like I failed to do some config on the devcloud host. Anything?
> >> I followed
> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
> >> but in some cases it wasn't clear to me if I should execute something
> >> in the devcloud or on my laptop.
> >>
> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com>
> >>wrote:
> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
> >>> following error:
> >>>
> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >>> tools/marvin/marvin/deployDataCenter.py -i
> >>> tools/devcloud/devcloud-advanced.cfg
> >>> Traceback (most recent call last):
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
> >>>    deploy.deploy()
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
> >>>    self.loadCfg()
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
> >>>registerApiKey
> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
> >>>  File
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
> >>>/cloudstackAPIClient.py",
> >>> line 600, in listUsers
> >>>    response = self.connection.marvinRequest(command,
> >>> response_type=response, method=method)
> >>>  File
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
> >>>nection.py",
> >>> line 266, in marvinRequest
> >>>    method=method)
> >>>  File
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
> >>>nection.py",
> >>> line 196, in request
> >>>    raise c
> >>> requests.exceptions.ConnectionError:
> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
> >>> exceeded with url:
> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
> >>> <class 'socket.error'>: [Errno 61] Connection refused)
> >>>
> >>> telnet port 8091 locally on my laptop works and from the devcloud to
> >>> my laptop as well but the port is not opened on the dev. So it makes
> >>> sense that the connection is refused. Not that it is opened. I set the
> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
> >>> That didn't help. I don't see what config I should change.
> >>>
> >>> What should I change? Where didn't I look?
> >>>
> >>> --
> >>> Daan
> >>
> >>
> >>
> >> --
> >> Daan
> >
>
>

Re: devcloud script deployDataCentre.py not working

Posted by Ian Duffy <ia...@ianduffy.ie>.
Hi Santhosh,

Its failing on 4.4-forward for me.
As far as I can tell its nothing to do with my setup since it works for 4.3.

*$ *python  ~/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py
-i devcloud.cfg


==== Log Folder Path:
/tmp//MarvinLogs//DeployDataCenter__May_14_2014_07_29_14_N7JNT7. All logs
will be available here ====


==== Deploy DC Started ====

Exception Occurred ['Traceback (most recent call last):\n', '  File
"/Users/duffy/projects/cloudstack/tools/marvin/marvin/deployDataCenter.py",
line 138, in addHosts\n    ret = self.__apiClient.addHost(hostcmd)\n', '
File
"/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 1506, in addHost\n    response =
self.connection.marvinRequest(command, response_type=response,
method=method)\n', '  File
"/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
line 381, in marvinRequest\n    raise e\n', 'CloudstackAPIException:
Execute cmd: addhost failed, due to: errorCode: 530, errorText:Cannot
transit agent status with event AgentDisconnected for host 1, mangement
server id is 4278190080,Unable to transition to a new state from Creating
via AgentDisconnected\n']


===deploy dc failed, so cleaning the created entries===


====DeployDC: CleanUp Started====


====Clean Up Entries=== {'Network':
[u'cd47d129-42fa-4e8a-bc00-f2a4c9ab1f92'], 'Zone':
[u'ad59b26f-e750-45f3-8a73-1885ff1b63b9'], 'PhysicalNetwork':
[u'62af9f63-3fb7-412c-b95f-1b700484a338'], 'Cluster':
[u'b63739f7-df35-4417-ad00-661e8d73b587'], 'Pod':
[u'06d968fa-a342-4d9b-a459-6e45f8d26384'], 'order': ['Cluster', 'Pod',
'Network', 'PhysicalNetwork', 'Zone']}


===Removing DataCenter Failed===

*duffy **at **thunder **in **~/projects/GSoC-2*


On 13 May 2014 18:42, Amogh Vasekar <am...@citrix.com> wrote:

> I have been seeing this for a while too, and IIRC there was a thread on
> dev list regarding this.
> In logs, I keep getting an error saying
> mgmt server log:
> ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
> 1-9152158867746979841: Exception Caught while executing command
> com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
> /opt/cloud/bin on XenServer hosts
>
> Last I had tried was about a month ago though.
>
>
> Thanks,
> Amogh
>
> On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
> wrote:
>
> >If you atleast use 4.4-forward marvin, the first issue mentioned related
> >to connection refused, should work fine provided port configuration is
> >proper.
> >
> >I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
> >the results.
> >
> >
> >Santhosh
> >________________________________________
> >From: sebgoa [runseb@gmail.com]
> >Sent: Tuesday, May 13, 2014 8:41 AM
> >To: dev@cloudstack.apache.org; Santhosh Edukulla
> >Subject: Re: devcloud script deployDataCentre.py not working
> >
> >cc santhosh, maybe he has tried devcloud with 4.4
> >
> >
> >On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com>
> wrote:
> >
> >> basic networking fails slightly differntly:
> >>
> >> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
> >> Traceback (most recent call last):
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
> >>    deploy.deploy()
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
> >>    self.createZones(self.config.zones)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
> >>createZones
> >>    self.createPods(zone.pods, zoneId, networkid)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
> >>    vmwareDc=pod.vmwaredc)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
> >>createClusters
> >>    cluster.hypervisor)
> >>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
> >>    self.apiClient.addHost(hostcmd)
> >>  File
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
> >>cloudstackAPIClient.py",
> >> line 1535, in addHost
> >>    response = self.connection.marvinRequest(command,
> >> response_type=response, method=method)
> >>  File
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
> >>ection.py",
> >> line 272, in marvinRequest
> >>    response = jsonHelper.getResultObj(response.json(), response_type)
> >>  File
> >>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
> >>,
> >> line 148, in getResultObj
> >>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
> >> cloudstackException.cloudstackAPIException: Execute cmd: addhost
> >> failed, due to: errorCode: 530, errorText:Cannot transit agent status
> >> with event AgentDisconnected for host 1, mangement server id is
> >> 4278190080,Unable to transition to a new state from Creating via
> >> AgentDisconnected
> >>
> >>
> >> seems like I failed to do some config on the devcloud host. Anything?
> >> I followed
> >>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
> >> but in some cases it wasn't clear to me if I should execute something
> >> in the devcloud or on my laptop.
> >>
> >> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com>
> >>wrote:
> >>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
> >>> running the ms v4.4 in eclipse and the db on my laptop. I get the
> >>> following error:
> >>>
> >>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> >>> tools/marvin/marvin/deployDataCenter.py -i
> >>> tools/devcloud/devcloud-advanced.cfg
> >>> Traceback (most recent call last):
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
> >>>    deploy.deploy()
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
> >>>    self.loadCfg()
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
> >>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
> >>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
> >>>registerApiKey
> >>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
> >>>  File
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
> >>>/cloudstackAPIClient.py",
> >>> line 600, in listUsers
> >>>    response = self.connection.marvinRequest(command,
> >>> response_type=response, method=method)
> >>>  File
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
> >>>nection.py",
> >>> line 266, in marvinRequest
> >>>    method=method)
> >>>  File
> >>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
> >>>nection.py",
> >>> line 196, in request
> >>>    raise c
> >>> requests.exceptions.ConnectionError:
> >>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
> >>> exceeded with url:
> >>> /client/api?account=admin&command=listUsers&response=json (Caused by
> >>> <class 'socket.error'>: [Errno 61] Connection refused)
> >>>
> >>> telnet port 8091 locally on my laptop works and from the devcloud to
> >>> my laptop as well but the port is not opened on the dev. So it makes
> >>> sense that the connection is refused. Not that it is opened. I set the
> >>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
> >>> That didn't help. I don't see what config I should change.
> >>>
> >>> What should I change? Where didn't I look?
> >>>
> >>> --
> >>> Daan
> >>
> >>
> >>
> >> --
> >> Daan
> >
>
>

Re: devcloud script deployDataCentre.py not working

Posted by Amogh Vasekar <am...@citrix.com>.
I have been seeing this for a while too, and IIRC there was a thread on
dev list regarding this.
In logs, I keep getting an error saying
mgmt server log:
ARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-1:ctx-bef0aa48) Seq
1-9152158867746979841: Exception Caught while executing command
com.cloud.utils.exception.CloudRuntimeException: Cannot create directory
/opt/cloud/bin on XenServer hosts

Last I had tried was about a month ago though.


Thanks,
Amogh

On 5/13/14 9:26 AM, "Santhosh Edukulla" <sa...@citrix.com>
wrote:

>If you atleast use 4.4-forward marvin, the first issue mentioned related
>to connection refused, should work fine provided port configuration is
>proper.
>
>I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know
>the results.
>
>
>Santhosh
>________________________________________
>From: sebgoa [runseb@gmail.com]
>Sent: Tuesday, May 13, 2014 8:41 AM
>To: dev@cloudstack.apache.org; Santhosh Edukulla
>Subject: Re: devcloud script deployDataCentre.py not working
>
>cc santhosh, maybe he has tried devcloud with 4.4
>
>
>On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com> wrote:
>
>> basic networking fails slightly differntly:
>>
>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
>> Traceback (most recent call last):
>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>    deploy.deploy()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>>    self.createZones(self.config.zones)
>>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in
>>createZones
>>    self.createPods(zone.pods, zoneId, networkid)
>>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
>>    vmwareDc=pod.vmwaredc)
>>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in
>>createClusters
>>    cluster.hypervisor)
>>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>>    self.apiClient.addHost(hostcmd)
>>  File 
>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/
>>cloudstackAPIClient.py",
>> line 1535, in addHost
>>    response = self.connection.marvinRequest(command,
>> response_type=response, method=method)
>>  File 
>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConn
>>ection.py",
>> line 272, in marvinRequest
>>    response = jsonHelper.getResultObj(response.json(), response_type)
>>  File 
>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py"
>>,
>> line 148, in getResultObj
>>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
>> cloudstackException.cloudstackAPIException: Execute cmd: addhost
>> failed, due to: errorCode: 530, errorText:Cannot transit agent status
>> with event AgentDisconnected for host 1, mangement server id is
>> 4278190080,Unable to transition to a new state from Creating via
>> AgentDisconnected
>>
>>
>> seems like I failed to do some config on the devcloud host. Anything?
>> I followed 
>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
>> but in some cases it wasn't clear to me if I should execute something
>> in the devcloud or on my laptop.
>>
>> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com>
>>wrote:
>>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>>> following error:
>>>
>>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>>> tools/marvin/marvin/deployDataCenter.py -i
>>> tools/devcloud/devcloud-advanced.cfg
>>> Traceback (most recent call last):
>>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>>    deploy.deploy()
>>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>>    self.loadCfg()
>>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in
>>>registerApiKey
>>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>>  File 
>>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI
>>>/cloudstackAPIClient.py",
>>> line 600, in listUsers
>>>    response = self.connection.marvinRequest(command,
>>> response_type=response, method=method)
>>>  File 
>>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>>nection.py",
>>> line 266, in marvinRequest
>>>    method=method)
>>>  File 
>>>"/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackCon
>>>nection.py",
>>> line 196, in request
>>>    raise c
>>> requests.exceptions.ConnectionError:
>>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>>> exceeded with url:
>>> /client/api?account=admin&command=listUsers&response=json (Caused by
>>> <class 'socket.error'>: [Errno 61] Connection refused)
>>>
>>> telnet port 8091 locally on my laptop works and from the devcloud to
>>> my laptop as well but the port is not opened on the dev. So it makes
>>> sense that the connection is refused. Not that it is opened. I set the
>>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>>> That didn't help. I don't see what config I should change.
>>>
>>> What should I change? Where didn't I look?
>>>
>>> --
>>> Daan
>>
>>
>>
>> --
>> Daan
>


RE: devcloud script deployDataCentre.py not working

Posted by Santhosh Edukulla <sa...@citrix.com>.
If you atleast use 4.4-forward marvin, the first issue mentioned related to connection refused, should work fine provided port configuration is proper.

I havent tried devcloud 4.4 so far, I can try it with 4.4 and let know the results.


Santhosh
________________________________________
From: sebgoa [runseb@gmail.com]
Sent: Tuesday, May 13, 2014 8:41 AM
To: dev@cloudstack.apache.org; Santhosh Edukulla
Subject: Re: devcloud script deployDataCentre.py not working

cc santhosh, maybe he has tried devcloud with 4.4


On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com> wrote:

> basic networking fails slightly differntly:
>
> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
> Traceback (most recent call last):
>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>    deploy.deploy()
>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>    self.createZones(self.config.zones)
>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in createZones
>    self.createPods(zone.pods, zoneId, networkid)
>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
>    vmwareDc=pod.vmwaredc)
>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in createClusters
>    cluster.hypervisor)
>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>    self.apiClient.addHost(hostcmd)
>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1535, in addHost
>    response = self.connection.marvinRequest(command,
> response_type=response, method=method)
>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 272, in marvinRequest
>    response = jsonHelper.getResultObj(response.json(), response_type)
>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py",
> line 148, in getResultObj
>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
> cloudstackException.cloudstackAPIException: Execute cmd: addhost
> failed, due to: errorCode: 530, errorText:Cannot transit agent status
> with event AgentDisconnected for host 1, mangement server id is
> 4278190080,Unable to transition to a new state from Creating via
> AgentDisconnected
>
>
> seems like I failed to do some config on the devcloud host. Anything?
> I followed https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
> but in some cases it wasn't clear to me if I should execute something
> in the devcloud or on my laptop.
>
> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com> wrote:
>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> following error:
>>
>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> tools/marvin/marvin/deployDataCenter.py -i
>> tools/devcloud/devcloud-advanced.cfg
>> Traceback (most recent call last):
>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>    deploy.deploy()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>    self.loadCfg()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in registerApiKey
>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
>> line 600, in listUsers
>>    response = self.connection.marvinRequest(command,
>> response_type=response, method=method)
>>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> line 266, in marvinRequest
>>    method=method)
>>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> line 196, in request
>>    raise c
>> requests.exceptions.ConnectionError:
>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> exceeded with url:
>> /client/api?account=admin&command=listUsers&response=json (Caused by
>> <class 'socket.error'>: [Errno 61] Connection refused)
>>
>> telnet port 8091 locally on my laptop works and from the devcloud to
>> my laptop as well but the port is not opened on the dev. So it makes
>> sense that the connection is refused. Not that it is opened. I set the
>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> That didn't help. I don't see what config I should change.
>>
>> What should I change? Where didn't I look?
>>
>> --
>> Daan
>
>
>
> --
> Daan


Re: devcloud script deployDataCentre.py not working

Posted by sebgoa <ru...@gmail.com>.
cc santhosh, maybe he has tried devcloud with 4.4


On May 7, 2014, at 9:45 PM, Daan Hoogland <da...@gmail.com> wrote:

> basic networking fails slightly differntly:
> 
> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
> Traceback (most recent call last):
>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>    deploy.deploy()
>  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
>    self.createZones(self.config.zones)
>  File "tools/marvin/marvin/deployDataCenter.py", line 425, in createZones
>    self.createPods(zone.pods, zoneId, networkid)
>  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
>    vmwareDc=pod.vmwaredc)
>  File "tools/marvin/marvin/deployDataCenter.py", line 87, in createClusters
>    cluster.hypervisor)
>  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
>    self.apiClient.addHost(hostcmd)
>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1535, in addHost
>    response = self.connection.marvinRequest(command,
> response_type=response, method=method)
>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 272, in marvinRequest
>    response = jsonHelper.getResultObj(response.json(), response_type)
>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py",
> line 148, in getResultObj
>    raise cloudstackException.cloudstackAPIException(respname, errMsg)
> cloudstackException.cloudstackAPIException: Execute cmd: addhost
> failed, due to: errorCode: 530, errorText:Cannot transit agent status
> with event AgentDisconnected for host 1, mangement server id is
> 4278190080,Unable to transition to a new state from Creating via
> AgentDisconnected
> 
> 
> seems like I failed to do some config on the devcloud host. Anything?
> I followed https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
> but in some cases it wasn't clear to me if I should execute something
> in the devcloud or on my laptop.
> 
> On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com> wrote:
>> I am setting up a test env on my laptop using devcloud2 v4.3. I am
>> running the ms v4.4 in eclipse and the db on my laptop. I get the
>> following error:
>> 
>> daan:~/cloudstack-4.4/cloudstack (4.4)> python
>> tools/marvin/marvin/deployDataCenter.py -i
>> tools/devcloud/devcloud-advanced.cfg
>> Traceback (most recent call last):
>>  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>>    deploy.deploy()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>>    self.loadCfg()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>>    mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>>  File "tools/marvin/marvin/deployDataCenter.py", line 492, in registerApiKey
>>    listuserRes = self.testClient.getApiClient().listUsers(listuser)
>>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
>> line 600, in listUsers
>>    response = self.connection.marvinRequest(command,
>> response_type=response, method=method)
>>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> line 266, in marvinRequest
>>    method=method)
>>  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
>> line 196, in request
>>    raise c
>> requests.exceptions.ConnectionError:
>> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
>> exceeded with url:
>> /client/api?account=admin&command=listUsers&response=json (Caused by
>> <class 'socket.error'>: [Errno 61] Connection refused)
>> 
>> telnet port 8091 locally on my laptop works and from the devcloud to
>> my laptop as well but the port is not opened on the dev. So it makes
>> sense that the connection is refused. Not that it is opened. I set the
>> 'host' config item to the virtualbox gateway address, 192.168.56.1.
>> That didn't help. I don't see what config I should change.
>> 
>> What should I change? Where didn't I look?
>> 
>> --
>> Daan
> 
> 
> 
> -- 
> Daan


Re: devcloud script deployDataCentre.py not working

Posted by Daan Hoogland <da...@gmail.com>.
basic networking fails slightly differntly:

daan:~/cloudstack-4.4/cloudstack (4.4)> python
tools/marvin/marvin/deployDataCenter.py -i tools/devcloud/devcloud.cfg
Traceback (most recent call last):
  File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
    deploy.deploy()
  File "tools/marvin/marvin/deployDataCenter.py", line 563, in deploy
    self.createZones(self.config.zones)
  File "tools/marvin/marvin/deployDataCenter.py", line 425, in createZones
    self.createPods(zone.pods, zoneId, networkid)
  File "tools/marvin/marvin/deployDataCenter.py", line 142, in createPods
    vmwareDc=pod.vmwaredc)
  File "tools/marvin/marvin/deployDataCenter.py", line 87, in createClusters
    cluster.hypervisor)
  File "tools/marvin/marvin/deployDataCenter.py", line 53, in addHosts
    self.apiClient.addHost(hostcmd)
  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
line 1535, in addHost
    response = self.connection.marvinRequest(command,
response_type=response, method=method)
  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
line 272, in marvinRequest
    response = jsonHelper.getResultObj(response.json(), response_type)
  File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/jsonHelper.py",
line 148, in getResultObj
    raise cloudstackException.cloudstackAPIException(respname, errMsg)
cloudstackException.cloudstackAPIException: Execute cmd: addhost
failed, due to: errorCode: 530, errorText:Cannot transit agent status
with event AgentDisconnected for host 1, mangement server id is
4278190080,Unable to transition to a new state from Creating via
AgentDisconnected


seems like I failed to do some config on the devcloud host. Anything?
I followed https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud
but in some cases it wasn't clear to me if I should execute something
in the devcloud or on my laptop.

On Wed, May 7, 2014 at 9:32 PM, Daan Hoogland <da...@gmail.com> wrote:
> I am setting up a test env on my laptop using devcloud2 v4.3. I am
> running the ms v4.4 in eclipse and the db on my laptop. I get the
> following error:
>
> daan:~/cloudstack-4.4/cloudstack (4.4)> python
> tools/marvin/marvin/deployDataCenter.py -i
> tools/devcloud/devcloud-advanced.cfg
> Traceback (most recent call last):
>   File "tools/marvin/marvin/deployDataCenter.py", line 579, in <module>
>     deploy.deploy()
>   File "tools/marvin/marvin/deployDataCenter.py", line 561, in deploy
>     self.loadCfg()
>   File "tools/marvin/marvin/deployDataCenter.py", line 523, in loadCfg
>     mgtDetails.apiKey, mgtDetails.securityKey = self.registerApiKey()
>   File "tools/marvin/marvin/deployDataCenter.py", line 492, in registerApiKey
>     listuserRes = self.testClient.getApiClient().listUsers(listuser)
>   File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 600, in listUsers
>     response = self.connection.marvinRequest(command,
> response_type=response, method=method)
>   File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 266, in marvinRequest
>     method=method)
>   File "/Users/daan/cloudstack-4.4/cloudstack/tools/marvin/marvin/cloudstackConnection.py",
> line 196, in request
>     raise c
> requests.exceptions.ConnectionError:
> HTTPConnectionPool(host='192.168.56.10', port=8096): Max retries
> exceeded with url:
> /client/api?account=admin&command=listUsers&response=json (Caused by
> <class 'socket.error'>: [Errno 61] Connection refused)
>
> telnet port 8091 locally on my laptop works and from the devcloud to
> my laptop as well but the port is not opened on the dev. So it makes
> sense that the connection is refused. Not that it is opened. I set the
> 'host' config item to the virtualbox gateway address, 192.168.56.1.
> That didn't help. I don't see what config I should change.
>
> What should I change? Where didn't I look?
>
> --
> Daan



-- 
Daan