Removable storage导致不能Add host
一台XenServer,曾用作为过cluster的Master,从CloudStack删除后,再次加入其他已有Master的Cluster,UI上报Unable to add the host错误,日志报“com.xensource.xenapi.Types$JoiningHostCannotContainSharedSrs Unable to allow host 20.1.101.19 to join pool 20.1.101.20 due to The host joining the pool cannot contain any shared storage.The host joining the pool cannot contain any shared storage.”异常。通过google,baidu均未发现解决方案,后来通过使用xe sr-list命令,发现有Removable storage的SR,host为not in database,分析属于异常情况,改SR如下:
uuid ( RO) : 5d938231-ee85-b668-5074-ffbbfd3c5c39
name-label ( RW): Removable storage
name-description ( RW):
host ( RO): <not in database>
type ( RO): udev
content-type ( RO): disk
uuid ( RO) : 5d938231-ee85-b668-5074-ffbbfd3c5c39
name-label ( RW) : Removable storage
name-description ( RW) :
host ( RO) : <not in database>
type ( RO) : udev
content-type ( RO) : disk
解决方法:forget这个SR(命令:xe sr-forget uuid=5d938231-ee85-b668-5074-ffbbfd3c5c39)后,再次add host就成功了。
注:实际中,我还forget了如下的SR。
uuid ( RO) : cc8aa0f5-eac3-3571-20e8-2eb500edbdd7
name-label ( RW) : DVD drives
name-description ( RW): Physical DVD drives
host ( RO) : <not in database>
type ( RO) : udev
content-type ( RO) : iso
日志内容:
2012-12-06 13:18:31,693 INFO [cloud.resource.ResourceManagerImpl] (catalina-exec-4:null) Trying to add a new host at www.zzzyk.com in data center 1
2012-12-06 13:18:31,762 DEBUG [xen.resource.XenServerConnectionPool] (catalina-exec-4:null) Slave logon to 20.1.101.19
2012-12-06 13:18:31,789 DEBUG [xen.resource.XenServerConnectionPool] (catalina-exec-4:null) Logging on as the master to 20.1.101.19
2012-12-06 13:18:32,562 WARN [xen.resource.XenServerConnectionPool] (catalina-exec-4:null) Catch com.xensource.xenapi.Types$JoiningHostCannotContainSharedSrs Unable to allow host 20.1.101.19 to join pool 20.1.101.20 due to The host joining the pool cannot contain any shared storage.
The host joining the pool cannot contain any shared storage.
at com.xensource.xenapi.Types.checkResponse(Types.java:1000)
at com.xensource.xenapi.Connection.dispatch(Connection.java:372)
at com.xensource.xenapi.Pool.join(Pool.java:1058)
at com.cloud.hypervisor.xen.resource.XenServerConnectionPool.join(XenServerConnectionPool.java:781)
at com.cloud.hypervisor.xen.resource.XenServerConnectionPool.joinPool(XenServerConnectionPool.java:155)
at com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.addHostsToPool(XcpServerDiscoverer.java:395)
at com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.find(XcpServerDiscoverer.java:202)
at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:644)
at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:514)
at com.cloud.api.commands.AddHostCmd.execute(AddHostCmd.java:136)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:132)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:509)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:416)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:300)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2260)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
2012-12-06 13:18:32,565 DEBUG [xen.resource.XenServerConnectionPool] (catalina-exec-4:null) Host(20.1.101.19) unable to Join the pool at 20.1.101.20
2012-12-06 13:18:32,565 WARN [xen.discoverer.XcpServerDiscoverer] (catalina-exec-4:null) Unable to join the pool
2012-12-06 13:18:32,567 DEBUG [xen.discoverer.XcpServerDiscoverer] (catalina-exec-4:null) other exceptions: com.cloud.exception.DiscoveryException: Unable to join the pool
com.cloud.exception.DiscoveryException: Unable to join the pool
at com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer.addHostsToPo
补充:综合编程 , 其他综合 ,