cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

XCP-ng 7.4 support

Open DagSonsteboSB opened this issue 8 years ago • 6 comments

Support for XCP-ng 7.4 in Apache CloudStack

The new community version of XenServer - XCP-ng 7.4 was released 31/March 2018: https://xcp-ng.github.io/news/2018/03/31/first-xcp-ng-release.html

As this will become an important addition to the CloudStack hypervisor ecosystem support for this will be a great feature. Since this version should be close to feature compatible with XenServer 7.4 the existing XenServer code can hopefully be utilised.

Test results

Test environment:

  • CloudStack 4.11 on CentOS 7.4
  • Hypervisors running first release of XCP-ng version 7.4
  • NFS storage

When tested in CloudStack 4.11 this was as suspected not recognised:

2018-04-03 11:34:29,334 INFO [c.c.r.ResourceManagerImpl] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) Trying to add a new host at http://IPremoved in data center 1 2018-04-03 11:34:29,638 DEBUG [c.c.h.x.d.XcpServerDiscoverer] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) host IPremoved doesn't have 996dd2e7-ad95-49cc-a0be-2c9adc4dfb0b Hotfix 2018-04-03 11:34:29,648 DEBUG [c.c.h.x.d.XcpServerDiscoverer] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) host IPremoved doesn't have 0850b186-4d47-11e3-a720-001b2151a503 Hotfix 2018-04-03 11:34:29,659 WARN [c.c.h.x.d.XcpServerDiscoverer] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) Only support XCP 1.0.0, 1.1.0, 1.4.x, 1.5 beta, 1.6.x; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.1.0, 6.2.0, >6.4.0 but this one is XCP-ng 7.4.0 2018-04-03 11:34:29,660 DEBUG [c.c.h.x.d.XcpServerDiscoverer] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) other exceptions: java.lang.RuntimeException: Only support XCP 1.0.0, 1.1.0, 1.4.x, 1.5 beta, 1.6.x; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.1.0, 6.2.0, >6.4.0 but this one is XCP-ng 7.4.0 java.lang.RuntimeException: Only support XCP 1.0.0, 1.1.0, 1.4.x, 1.5 beta, 1.6.x; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.1.0, 6.2.0, >6.4.0 but this one is XCP-ng 7.4.0 at com.cloud.hypervisor.xenserver.discoverer.XcpServerDiscoverer.createServerResource(XcpServerDiscoverer.java:439) at com.cloud.hypervisor.xenserver.discoverer.XcpServerDiscoverer.createServerResource(XcpServerDiscoverer.java:454) at com.cloud.hypervisor.xenserver.discoverer.XcpServerDiscoverer.find(XcpServerDiscoverer.java:301) at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:756) at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:601) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy178.discoverHosts(Unknown Source) at org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150) at com.cloud.api.ApiServer.queueCommand(ApiServer.java:731) at com.cloud.api.ApiServer.handleRequest(ApiServer.java:555) at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:310) at com.cloud.api.ApiServlet$1.run(ApiServlet.java:130) 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:127) at com.cloud.api.ApiServlet.doGet(ApiServlet.java:89) at javax.servlet.http.HttpServlet.service(HttpServlet.java:686) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:527) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:530) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626) at java.lang.Thread.run(Thread.java:748) 2018-04-03 11:34:29,660 WARN [c.c.r.ResourceManagerImpl] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) Unable to find the server resources at http://IPremoved 2018-04-03 11:34:29,661 INFO [c.c.u.e.CSExceptionErrorCode] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) Could not find exception: com.cloud.exception.DiscoveryException in error code list for exceptions 2018-04-03 11:34:29,661 WARN [o.a.c.a.c.a.h.AddHostCmd] (qtp788117692-16:ctx-040da28f ctx-9347d25e ctx-ab04f31e) (logid:a961de98) Exception: com.cloud.exception.DiscoveryException: Unable to add the host

DagSonsteboSB avatar Apr 03 '18 12:04 DagSonsteboSB

Assuming the CloudStack via the host.get_all_records method retrieves data from the xapi DB, the host list on the xcp host returns as follows:

[root@ref-trl-420-x-cs411-dsonstebo-xs1 ~]# xe host-list params=API-version-major,API-version-minor,API-version-vendor,edition,software-version,capabilities,allowed-operations hostname=ref-trl-420-x-cs411-dsonstebo-xs1 allowed-operations (SRO) : VM.migrate; provision; VM.resume; reboot; evacuate; VM.start; shutdown API-version-major ( RO): 2 API-version-minor ( RO): 9 API-version-vendor ( RO): XenSource software-version (MRO): product_version: 7.4.0; product_version_text: 7.4; product_version_text_short: 7.4; platform_name: XCP; platform_version: 2.5.0; product_brand: XCP-ng; build_number: release/jura/master/100; hostname: localhost; date: 2018-02-19; dbv: 0.0.1; xapi: 1.20; xen: 4.7.4-4.1; linux: 4.4.0+10; xencenter_min: 2.9; xencenter_max: 2.9; network_backend: openvswitch; db_schema: 5.134 capabilities (SRO): xen-3.0-x86_64; xen-3.0-x86_32p; hvm-3.0-x86_32; hvm-3.0-x86_32p; hvm-3.0-x86_64; edition ( RO): xcp-ng

DagSonsteboSB avatar Apr 03 '18 14:04 DagSonsteboSB

+1 :) We'ld also vote for support for XCP-ng

s-seitz avatar Apr 06 '18 11:04 s-seitz

+1 ;)

mdesaive avatar Apr 06 '18 11:04 mdesaive

Thanks for testing and reporting @DagSonsteboSB, I think the fix is to simply add the product string as a support hypervisor version somewhere in CitrixResourceBase or similar class. I can discuss that next week with you/engg.

yadvr avatar Apr 07 '18 14:04 yadvr

I would hope so @rhtyd - happy to discuss and further test, lab is still online for this.

DagSonsteboSB avatar Apr 07 '18 15:04 DagSonsteboSB

PR - https://github.com/apache/cloudstack/issues/2523

yadvr avatar Apr 25 '18 12:04 yadvr