xuanyuanaosheng opened a new issue, #8124:
URL: https://github.com/apache/cloudstack/issues/8124

   We want using cloudstack to manager the Baremetal Server to achieve to 
deploy the OS on pysical server.
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
    * Baremetal Management
    * Documentation Report
   
   ##### COMPONENT NAME
   - Baremetal Management
   
   
   ##### CLOUDSTACK VERSION
   - CloudStack 4.18.0.0
   
   
   ##### CONFIGURATION
   
   
![image](https://github.com/apache/cloudstack/assets/4197714/61432d2a-cf4f-4ad5-accc-938e92d2b7e5)
   
   The Zone name is `csbm` using `Basic` (Network type). and the cluster 
Hypervisor is `BareMetal`
   
   
   -   Management Network: VLAN2128 : 10.26.128.0/24  (IP range is: 
10.26.128.131 ---> 10.26.128.160)
   -   Guest Network:   10.25.30.X/24 (IP range is: 10.25.30.201  --->  
10.25.30.250).   I think this is also the `IPMI network`.
   
   The config  is as below:
   
   
![image](https://github.com/apache/cloudstack/assets/4197714/16304730-c6eb-4e1e-8cb7-b4ed6583fde9)
   
   
![image](https://github.com/apache/cloudstack/assets/4197714/abfda6a6-63ea-49b4-a597-7e01bc9e4690)
   
   
   
   ##### STEPS TO REPRODUCE
   1.  Create a basic Zone as above
   2.  The Baremetal Server info:
   ```
   ilo:   10.25.30.242
   Ilo Host MAC: f4:02:70:9c:a5:d0
   of CPU cores:  14
   CPU (in MHz): 1000
   Memory (in MB): 515240   (MemTotal:       527606672 kB)
   Host Net MAC: 34:80:0d:43:39:ec
   ```
    3.  Add the above  Baremetal Server to the cluster:
   
   
![image](https://github.com/apache/cloudstack/assets/4197714/8892fa69-99f4-4ce5-8844-e4793985b837)
   
   The error on web UI:
   ```
   Error 530
   Unable to add the host: Cannot find the server resources at 
http://10.25.30.242`
   ```
   
   4. The cloudstack manager error log is:
   
   ```
   2023-10-20 11:41:05,292 INFO  [c.c.r.ResourceManagerImpl] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Trying to add 
a new host at http://10.25.30.242 in data center 16
   2023-10-20 11:41:05,302 DEBUG [c.c.u.s.Script] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Looking for 
scripts/util/ipmi.py in the classpath
   2023-10-20 11:41:05,303 DEBUG [c.c.u.s.Script] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) System 
resource: file:/usr/share/cloudstack-common/scripts/util/ipmi.py
   2023-10-20 11:41:05,303 DEBUG [c.c.u.s.Script] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Absolute path 
=  /usr/share/cloudstack-common/scripts/util/ipmi.py
   2023-10-20 11:41:05,303 DEBUG [c.c.b.m.BareMetalDiscoverer] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Executing: 
/usr/share/cloudstack-common/scripts/util/ipmi.py ping hostname=10.25.30.242 
usrname=ux ****** 
   2023-10-20 11:41:05,304 DEBUG [c.c.b.m.BareMetalDiscoverer] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Executing 
while with timeout : 3600000
   .........................
   2023-10-20 11:41:13,383 WARN  [c.c.b.m.BareMetalDiscoverer] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Can not set up 
ipmi connection(ip=10.25.30.242, username=ux, password=******, args) because 
Get Session Challenge command failedError: Unable to establish LAN 
sessionError: Unable to establish IPMI v1.5 / RMCP session
   2023-10-20 11:41:13,383 WARN  [c.c.r.ResourceManagerImpl] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Cannot find 
the server resources at http://10.25.30.242
   2023-10-20 11:41:13,383 INFO  [c.c.u.e.CSExceptionErrorCode] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Could not find 
exception: com.cloud.exception.DiscoveryException in error code list for 
exceptions
   2023-10-20 11:41:13,383 WARN  [o.a.c.a.c.a.h.AddHostCmd] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Exception: 
   com.cloud.exception.DiscoveryException: Unable to add the host: Cannot find 
the server resources at http://10.25.30.242
           at 
com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:880)
           at 
com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:644)
           at jdk.internal.reflect.GeneratedMethodAccessor5110.invoke(Unknown 
Source)
           at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
           at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
           at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
           at com.sun.proxy.$Proxy199.discoverHosts(Unknown Source)
           at 
org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:136)
           at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:163)
           at com.cloud.api.ApiServer.queueCommand(ApiServer.java:777)
           at com.cloud.api.ApiServer.handleRequest(ApiServer.java:601)
           at 
com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:347)
           at com.cloud.api.ApiServlet$1.run(ApiServlet.java:154)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
           at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:151)
           at com.cloud.api.ApiServlet.doPost(ApiServlet.java:110)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:665)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
           at 
org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1450)
           at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
           at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
           at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
           at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
           at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
           at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
           at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
           at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
           at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
           at 
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772)
           at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
           at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.Server.handle(Server.java:516)
           at 
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
           at 
org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
           at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
           at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
           at 
org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
   2023-10-20 11:41:13,385 INFO  [c.c.a.ApiServer] 
(qtp1955920234-35132:ctx-668d920b ctx-00851472) (logid:eaf1e42a) Unable to add 
the host: Cannot find the server
    resources at http://10.25.30.242
   ```
   
   I have do some test:
   ```
   # /usr/bin/ipmitool -I lanplus  -R 1 -v -H 10.25.30.242 -p 623 -U ux -P 
XXXXXXXX chassis power status
   Chassis Power is on
   
   # /usr/bin/ipmitool   -R 1 -v -H 10.25.30.242 -p 623 -U ux -P XXXXXXXX 
chassis power status
   Authentication type NONE not supported
   Error: Unable to establish LAN session
   Error: Unable to establish IPMI v1.5 / RMCP session
   
   # /usr/share/cloudstack-common/scripts/util/ipmi.py ping 
hostname=10.25.30.242 usrname=ux password=XXXXXXXX
   Get Session Challenge command failed
   Error: Unable to establish LAN session
   Error: Unable to establish IPMI v1.5 / RMCP session
   ```
   
   ##### EXPECTED RESULTS
   Add Baremetal Server
   
   ##### ACTUAL RESULTS
   Can not add Baremetal Server
   
   
   I can not find some useful info on the official doc, I just find the belows:
   ##### Reference:
   1.   
http://events17.linuxfoundation.org/sites/events/files/slides/Baremetal-v4.1a.pdf
   4.   https://github.com/apache/cloudstack/issues/5772
   6.   
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Baremetal+KickStart
   7.   
https://download.cloudstack.org/centos/7/4.18/cloudstack-baremetal-agent-4.18.0.0-1.el7.x86_64.rpm
   
   How to hadle this problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to