You're in developer mode, please build and run UI using npm. when building CloudStack from source
Hi, I have followed https://docs.cloudstack.apache.org/en/4.18.1.0/developersguide/developer_guide.html to build CloudStack 4.19 from source but when I connect to http://192.168.17.225:8080/client/ I only get "You're in developer mode, please build and run UI using npm." I built the UI using npm, but that did not change anything. What am I doing wrong?
Re: You're in developer mode, please build and run UI using npm. when building CloudStack from source
Hi, I can now open the UI on port 5050, but when I try to log in I get "Login Failed". I had done these steps previously with no error messages: 1. mvn -Pdeveloper,systemvm clean install 2. mvn -P developer -pl developer -Ddeploydb output: > WARNING: Provided file does not exist: /opt/cloudstack/developer/../utils/conf/db.properties.override > WARNING: Provided file does not exist: /opt/cloudstack/developer/developer-prefill.sql.override > Initializing database=cloud with host=localhost port=3306 username=cloud password=cloud > Running query: drop database if exists `cloud` > Running query: create database `cloud` > Running query: CREATE USER IF NOT EXISTS cloud@`localhost` identified by 'cloud' > Running query: CREATE USER IF NOT EXISTS cloud@`%` identified by 'cloud' > Running query: GRANT ALL ON cloud.* to 'cloud'@`localhost` > Running query: GRANT ALL ON cloud.* to 'cloud'@`%` > Initializing database=cloud_usage with host=localhost port=3306 username=cloud password=cloud > Running query: drop database if exists `cloud_usage` > Running query: create database `cloud_usage` > Running query: CREATE USER IF NOT EXISTS cloud@`localhost` identified by 'cloud' > Running query: CREATE USER IF NOT EXISTS cloud@`%` identified by 'cloud' > Running query: GRANT ALL ON cloud_usage.* to 'cloud'@`localhost` > Running query: GRANT ALL ON cloud_usage.* to 'cloud'@`%` > Processing SQL file at /opt/cloudstack/developer/target/db/create-schema.sql > Processing SQL file at /opt/cloudstack/developer/target/db/create-schema-premium.sql > Processing SQL file at /opt/cloudstack/developer/target/db/templates.sql > Processing SQL file at /opt/cloudstack/developer/developer-prefill.sql > Processing upgrade: com.cloud.upgrade.DatabaseUpgradeChecker 3. mvn -pl :cloud-client-ui jetty:run 4. Then I did what is written here https://github.com/apache/cloudstack/tree/main/ui#cloudstack-ui with echo 'CS_URL=http://192.168.17.252:8080' > .env.local 5. opened http://192.168.17.252:5050 in Firefox 6. entered "admin" for Username and "password" for Password, leaving "Domain" empty 7. pressed "Login" and received "Login Failed" (firewalld is disabled) What am I doing wrong? On 12/4/23 15:37, Pearl d'Silva wrote: Hi, Once you've setup CloudStack and built the UI following the steps mentionedhttps://github.com/apache/cloudstack/tree/main/ui#cloudstack-ui , you'd be able to access the UI at port 5050. Regards, Pearl From: Ronald Feicht Sent: December 4, 2023 9:32 AM To:dev@cloudstack.apache.org Subject: You're in developer mode, please build and run UI using npm. when building CloudStack from source Hi, I have followed https://docs.cloudstack.apache.org/en/4.18.1.0/developersguide/developer_guide.html to build CloudStack 4.19 from source but when I connect to http://192.168.17.225:8080/client/ I only get "You're in developer mode, please build and run UI using npm." I built the UI using npm, but that did not change anything. What am I doing wrong? -- *sc synergy GmbH* Hilgestrasse 14 | 55294 Bodenheim | Deutschland Fon: +49 6135 71691 - 000 | Fax: +49 6135 71691 - 299 http://www.scsynergy.com | ronald.fei...@scsynergy.com Sitz der Gesellschaft Bodenheim, HRB 8830, Amtsgericht Mainz, Geschäftsführer: Christian Reichert
Re: You're in developer mode, please build and run UI using npm. when building CloudStack from source
Hi, the error "2023-12-13T13:01:40.388380Z 3 [Note] Aborted connection 3 to db: 'cloud' user: 'cloud' host: 'localhost' (Got an error reading communication packets)" went away after I added the following lines to the file "/etc/my.cnf": max_allowed_packet=256M innodb_log_buffer_size = 32M @All who helped me: Thank you! I can now log in to the UI. On 12/13/23 14:19, Wei ZHOU wrote: Hi, I think you need to at first make sure the management service has been started successfully. You can check it by "curl http://localhost:8080/client/api"; If it does not work, please check vmops.log to see what's wrong. For the error "ENOSPC: System limit for number of file watchers reached", you can search it on google and get some advice. -Wei On Wed, 13 Dec 2023 at 14:05, wrote: I found this in /var/log/mysqld.log "2023-12-13T13:01:40.388380Z 3 [Note] Aborted connection 3 to db: 'cloud' user: 'cloud' host: 'localhost' (Got an error reading communication packets)" Since this error can have a multitude of causes I would be grateful for any hints to point me in the correct direction. On 12/12/23 08:42, Ronald Feicht wrote: Hi, no, I do not see any errors like the one you mentioned, only a lot of errors like this from "npm serve run": Error from chokidar (/opt/cloudstack/ui/src/views/storage): Error: ENOSPC: System limit for number of file watchers reached, watch '/opt/cloudstack/ui/src/views/storage/RecurringSnapshotVolume.vue' The IP has changed due to DHCP and a reboot of the virtual machine - it is nowhttp://192.168.17.252 <http://192.168.17.252>:8080. I do not see any _relevant_ error in vmops.log, but maybe the errors in there are actually crucial and I just fail to recognize this fact? I have attached the file to this email. Mit freundlichen Grüßen R. Feicht *sc synergy GmbH* Hilgestrasse 14 | 55294 Bodenheim | Deutschland Fon: +49 6135 71691 - 000 | Fax: +49 6135 71691 - 299 http://www.scsynergy.com |ronald.fei...@scsynergy.com Sitz der Gesellschaft Bodenheim, HRB 8830, Amtsgericht Mainz, Geschäftsführer: Christian Reichert *From:* Pearl d'Silva *Sent:* Monday, December 11, 2023 16:56 *To:*dev@cloudstack.apache.org *Subject:* Re: You're in developer mode, please build and run UI using npm. when building CloudStack from source Hi, Do you see any error like: Proxy error: Could not proxy request /client/api/?command=listIdps&response=json from 192.168.xx.xx:5050 to http://xx.xx.xx.xx:8080. Seehttps://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED). If so, can you please verify the IP of the Management server, in your initial email you mentioned the address to be: http://192.168.17.225:8080/client/ but the IP placed in .env.local is http://192.168.17.252:8080 (unless the IP was changed) Regards, From: Wei ZHOU Sent: December 11, 2023 9:03 AM To:dev@cloudstack.apache.org Subject: Re: You're in developer mode, please build and run UI using npm. when building CloudStack from source Hi, You can access vmops.log to get some logs. -Wei On Mon, 11 Dec 2023 at 14:49, Ronald Feicht wrote: Hi, I can now open the UI on port 5050, but when I try to log in I get "Login Failed". I had done these steps previously with no error messages: 1. mvn -Pdeveloper,systemvm clean install 2. mvn -P developer -pl developer -Ddeploydb output: > WARNING: Provided file does not exist: /opt/cloudstack/developer/../utils/conf/db.properties.override > WARNING: Provided file does not exist: /opt/cloudstack/developer/developer-prefill.sql.override > Initializing database=cloud with host=localhost port=3306 username=cloud password=cloud > Running query: drop database if exists `cloud` > Running query: create database `cloud` > Running query: CREATE USER IF NOT EXISTS cloud@ `localhost` identified by 'cloud' > Running query: CREATE USER IF NOT EXISTS cloud@`%` identified by 'cloud' > Running query: GRANT ALL ON cloud.* to 'cloud'@ `localhost` > Running query: GRANT ALL ON cloud.* to 'cloud'@`%` > Initializing database=cloud_usage with host=localhost port=3306 username=cloud password=cloud > Running query: drop database if exists `cloud_usage` > Running query: create database `cloud_usage` > Running query: CREATE USER IF NOT EXISTS cloud@ `localhost` identified by 'cloud' > Running query: CREATE USER IF NOT EXISTS cloud@`%` identified by 'cloud' > Running query: GRANT ALL ON cloud_usage.* to 'cloud'@`localhost`
New Object Storage - Huawei OBS
Hi, I am trying to write an Object Storage plugin for Huawei OBS using Minio as example. I added my plugin code to the plugins/storage/object/ directory, added my plugin into plugins/pom.xml and added the string 'Huawei OBS' to AddObjectStorage.vue for the dropdown in the UI. But when I select that dropdown entry and click "Save" in the UI the following exception is thrown: com.cloud.exception.InvalidParameterValueException: can't find object store provider: Huawei OBS at com.cloud.storage.StorageManagerImpl.discoverObjectStore(StorageManagerImpl.java:3743) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 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.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) 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.$Proxy119.discoverObjectStore(Unknown Source) at org.apache.cloudstack.api.command.admin.storage.AddObjectStoragePoolCmd.execute(AddObjectStoragePoolCmd.java:117) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172) at com.cloud.api.ApiServer.queueCommand(ApiServer.java:782) at com.cloud.api.ApiServer.handleRequest(ApiServer.java:603) 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.doGet(ApiServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) 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:1610) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215) at org.ecli
Re: New Object Storage - Huawei OBS
2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-cloudbyte 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-datera 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-default 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-flasharray 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-linstor 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-primera 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-scaleio 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-solidfire 2023-12-14 12:28:21,480 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Module Hierarchy: storage-volume-storpool ``` Like Wei mentioned you need to add the module in the client/pom.xml or you can copy the jar of your plugin (just for the tests) in `/usr/share/cloudstack-management/lib/` and restart the service Best regards, Slavka On Thu, Dec 14, 2023 at 11:57 AM Wei ZHOU wrote: > Is the module added to client/pom.xml ? > > -Wei > > On Thu, 14 Dec 2023 at 10:51, Ronald Feicht > wrote: > > > Hi, > > > > I am trying to write an Object Storage plugin for Huawei OBS using Minio > > as example. I added my plugin code to the plugins/storage/object/ > > directory, added my plugin into plugins/pom.xml and added the string > > 'Huawei OBS' to AddObjectStorage.vue for the dropdown in the UI. But > when I > > select that dropdown entry and click "Save" in the UI the following > > exception is thrown: > > com.cloud.exception.InvalidParameterValueException: can't find object > > store provider: Huawei OBS > > at > > > com.cloud.storage.StorageManagerImpl.discoverObjectStore(StorageManagerImpl.java:3743) > > at > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > > Method) > > at > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > > 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.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107) > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) > > at > > > com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52) > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) > > 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.$Proxy119.discoverObjectStore(Unknown Source) > > at > > > org.apache.cloudstack.api.command.admin.storage.AddObjectStoragePoolCmd.execute(AddObjectStoragePoolCmd.java:117) > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172) > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:782) > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:603) > > at > > com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:347) > > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:154) > > at > > > org.apache.cloudstack.managed
Re: New Object Storage - Huawei OBS
Hi Wido, changing the method parameters from String to BucketTO is no problem for me - I will simply adapt my code accordingly and contribute my code upstream as soon as I get it to work. Mit freundlichen Grüßen R. Feicht sc synergy GmbH Hilgestrasse 14 | 55294 Bodenheim | Deutschland Fon: +49 6135 71691 - 000 | Fax: +49 6135 71691 - 299 http://www.scsynergy.com | ronald.fei...@scsynergy.com Sitz der Gesellschaft Bodenheim, HRB 8830, Amtsgericht Mainz, Geschäftsführer: Christian Reichert From: Wido den Hollander Sent: Thursday, December 14, 2023 16:26 To: dev@cloudstack.apache.org; Ronald Feicht Subject: Re: New Object Storage - Huawei OBS Op 14/12/2023 om 10:51 schreef Ronald Feicht: > Hi, > > I am trying to write an Object Storage plugin for Huawei OBS using Minio as > example. I added my plugin code to the plugins/storage/object/ directory, > added my plugin into plugins/pom.xml and added the string 'Huawei OBS' to > AddObjectStorage.vue for the dropdown in the UI. But when I select that > dropdown entry and click "Save" in the UI the following exception is thrown: Great to see! I'm working on the Ceph plugin: https://github.com/wido/cloudstack/commits/ceph-object-store I will be changing something to the framework where a BucketTO is added and passed, not just a String containing the bucket's name. My PR will go out next week or after Christmas I think. Wido > com.cloud.exception.InvalidParameterValueException: can't find object store > provider: Huawei OBS > at > com.cloud.storage.StorageManagerImpl.discoverObjectStore(StorageManagerImpl.java:3743) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > 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.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) > at > com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) > 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.$Proxy119.discoverObjectStore(Unknown Source) > at > org.apache.cloudstack.api.command.admin.storage.AddObjectStoragePoolCmd.execute(AddObjectStoragePoolCmd.java:117) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172) > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:782) > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:603) > 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.doGet(ApiServlet.java:105) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:16
Re: New Object Storage - Huawei OBS
11) at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:152) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) But the directory exists and is not empty: [root@cloudstack-centos cloudstack-huawei-obs]# ll /opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/ total 4 drwxr-xr-x. 2 root root 21 Dec 15 08:59 WEB-INF -rw-r--r--. 1 root root 1135 Dec 15 08:59 index.html drwxr-xr-x. 3 root root 39 Dec 15 08:59 . drwxr-xr-x. 4 root root 87 Dec 15 08:59 .. [root@cloudstack-centos cloudstack-huawei-obs]# ll /opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/WEB-INF/ total 4 -rw-r--r--. 1 root root 2694 Dec 15 08:59 web.xml drwxr-xr-x. 2 root root 21 Dec 15 08:59 . drwxr-xr-x. 3 root root 39 Dec 15 08:59 .. I have compared my plugin code to that of Minio and https://github.com/wido/cloudstack/commits/ceph-object-store but fail to see what I have done wrong. The only significant thing I can make out is my choice for the directory name "/opt/cloudstack-huawei-obs/plugins/storage/object/huawei-obs". In plugins/pom.xml all object storage plugins have only a simple name without the character "-" in it. storage/object/minio storage/object/simulator storage/object/huawei-obs But surely that cannot be the source of the error? My fork is located here https://github.com/scsynergy/cloudstack-huawei-obs and I created a Pull Request for you. Mit freundlichen Grüßen R. Feicht sc synergy GmbH Hilgestrasse 14 | 55294 Bodenheim | Deutschland Fon: +49 6135 71691 - 000 | Fax: +49 6135 71691 - 299 http://www.scsynergy.com | ronald.fei...@scsynergy.com Sitz der Gesellschaft Bodenheim, HRB 8830, Amtsgericht Mainz, Geschäftsführer: Christian Reichert From: Kishan Kavala Sent: Friday, December 15, 2023 06:35 To: dev@cloudstack.apache.org Subject: RE: New Object Storage - Huawei OBS Hi Ronald, You need to add module to client/pom.xml and add the plugin folder to plugins/pom.xml. Looks like your implementation of ObjectStoreProvider is not getting registered as a ObjectStoreProvider. If you can share a draft PR, I can review and suggest what is missing. Regards, Kishan -----Original Message- From: Ronald Feicht Sent: Thursday, December 14, 2023 5:01 PM To: dev@cloudstack.apache.org Subject: Re: New Object Storage - Huawei OBS Hi, I had added the module to client/pom.xml, but then http://192.168.17.252:8080/client/ retuns "HTTP ERROR 503 Service Unavailable" because of the following exception: [WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@1df8ea34{/client,file:///opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/,UNAVAILABLE}{file:///opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/} java.lang.NullPointerException at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$1.with (DefaultModuleDefinitionSet.java:104) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (Def
Re: New Object Storage - Huawei OBS
Hello Kishan, sorry for taking so long to answer - I was on holiday. Your solution works and I can now continue with implementing the Huawei object store. BIG THANKS to ALL for your help! Regards, Ronald On 12/15/23 19:29, Kishan Kavala wrote: Hi Ronald, Here is what I found from the logs: Error: WARN [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Failed to start module [root-ca] due to: [Failed to start bean 'cloudStackLifeCycle'; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method 'org.bouncycastle.cert.X509v3CertificateBuilder org.bouncycastle.cert.X509v3CertificateBuilder.addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier, boolean, org.bouncycastle.asn1.ASN1Encodable)' the class loader org.eclipse.jetty.webapp.WebAppClassLoader @1d9295e2 of the current class, org/apache/cloudstack/utils/security/CertUtils, and the class loader org.codehaus.plexus.classworlds.realm.ClassRealm @7fecc26f for the method's defining class, org/bouncycastle/cert/X509v3CertificateBuilder, have different Class objects for the type org/bouncycastle/asn1/ASN1ObjectIdentifier used in the signature (org.apache.cloudstack.utils.security.CertUtils is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @1d9295e2, parent loader org.codehaus.plexus.classworlds.realm.ClassRealm @7fecc26f; org.bouncycastle.cert.X509v3CertificateBuilder is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @7fecc26f, parent loader 'bootstrap')]. Reason: ASN1ObjectIdentifier has different versions in the dependencies of root-ca and Huawei OBS(huaweicloud-sdk-iam) packages. java.lang.LinkageError happens when code is compiled with dependency version say v1 and then is running with dependency version say v2. Solution: Add provided scope to huaweicloud-sdk-iam dependency in Huawei OBS project. This will mark dependencies that should be provided at runtime. com.huaweicloud.sdk huaweicloud-sdk-iam 3.1.69 provided Regards, Kishan -Original Message- From: Kishan Kavala Sent: Friday, December 15, 2023 6:42 PM To:dev@cloudstack.apache.org Subject: RE: New Object Storage - Huawei OBS Ronald, The error is coming from rootca project after adding Huawei OBS plugin. org.apache.cloudstack cloud-plugin-ca-rootca ${project.version} After removing the above from client/pom.xml, Huawei OBS plugin was loaded. On the other hand, if I remove Huawei OBS plugin and keep rootca project, I see no issues. I'm investigating further, in the meantime removing rootca project can unblock your development. Regards, Kishan -Original Message- From: Ronald Feicht Sent: Friday, December 15, 2023 2:12 PM To:dev@cloudstack.apache.org Subject: Re: New Object Storage - Huawei OBS Hi Kishan, when I add my module to client/pom.xml I get the following error andhttp://192.168.17.252:8080/client/ returns "HTTP ERROR 503 Service Unavailable" because of the following exception: [WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@1df8ea34{/client,file:///opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/,UNAVAILABLE}{file:///opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/} java.lang.NullPointerException at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$1.with (DefaultModuleDefinitionSet.java:104) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:263) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:268) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:268) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:268) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:268) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:268) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule (DefaultModuleDefinitionSet.java:251) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.startContexts (DefaultModuleDefinitionSet.java:96) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load (DefaultModuleDefinitionSet.java:79) at org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules (ModuleBasedContextFactory.java:37) at org.apache.cloudstack.spring.module.factory.CloudStackSp
Adding Huawei Object Storage: 3 questions
Hi, I have only lately found out, that I cannot use the publicly available Java SDK for Huawei Object Storage (which has Maven coordinates) as this SDK only works for the public Huawei Cloud, not for local non-cloud devices. Instead, all I have is a JAR file under the Apache License 2.0 sent to me via email. I integrated that JAR file as a local repository inside plugins/storage/object/huawei-obs/local-huawei-sdk/. This is a quite ugly and frustrating "solution" as I have no influence on getting the right Java SDK published to maven central. I have opened a support ticket with Huawei asking whether I may include the JAR into the Cloudstack source code or better yet if they would be so kind as to publish it via maven central - but have not received an answer, yet. What is the official way for integrating local-only JAR files under the Apache License 2.0 into Cloudstack? The Huawei Object Storage Java SDK does not yet support bucket encryption. What should I return in the corresponding methods "setBucketEncryption" and "deleteBucketEncryption" - true, false or throw an exception? My assumption: The "createUser" method gets called via the UI by an account wishing to create a simple non-privileged user which may then use the created buckets of that account, but not create, modify or delete buckets themselves? Is this assumption correct? Best regards, Ronald -- *sc synergy GmbH* Hilgestrasse 14 | 55294 Bodenheim | Deutschland Fon: +49 6135 71691 - 000 | Fax: +49 6135 71691 - 299 http://www.scsynergy.com | ronald.fei...@scsynergy.com Sitz der Gesellschaft Bodenheim, HRB 8830, Amtsgericht Mainz, Geschäftsführer: Christian Reichert
Re: Adding Huawei Object Storage: 3 questions
Hi, >> The Huawei Object Storage Java SDK does not yet support bucket >> encryption. What should I return in the corresponding methods >> "setBucketEncryption" and "deleteBucketEncryption" - true, false or >> throw an exception? > This is a design decision that the code should already be clear on (in > for instance the minio plugin) . Strangely, the DeleteBucketCmd always > creates a success response, while the CreateBucketCmd handles > exceptions as expected. I think there is a bug in DeleteBucketCmd in > that respect. Actually, looking at the MinIO or simulator plugin, the design decision is not clear at all: "setBucketEncryption" and "deleteBucketEncryption" both have a boolean as return value, but only ever return true or throw an exception, yet, never return false. So, it boils down to "Everything went well unless an exception is thrown." Normally in Java this kind of behavior is achieved by a "void" return value. Therefore I naturally wondered when my methods should return false. The intention behind the boolean might have been: true -- the method set / deleted the bucket encryption, respectively exception -- the method should have completed but some unforeseen out-of-the-ordinary error occurred, e. g. network connection error false -- the device was purchased without a license for bucket-level encryption; unless a valid encryption license is installed into the device, this method will always continue to return false > I gues your PR is https://github.com/apache/cloudstack/pull/8359. You > can look at the ./deps/install-non-oss.sh or at > https://github.com/shapeblue/cloudstack-nonoss/blob/main/install-non-oss.sh > to see how these situations are handled. This method would require you > to hide your sub-project behind the -Dnoredist flag. which is an > inconvenience but is the only way to deal with those > non-redistributables. If Huawei allows, we can add the jar in that > repo. It seems to me like this will not work, because an Object Storage Plugin has to be added to client/pom.xml and the provider's name into ui/src/views/infra/AddObjectStorage.vue? Hardcoding my plugin into those places would result in the client/pom.xml not building and my provider to be available in the UI's dropdown selection even though the corresponding plugin is not present on the classpath? Or is there some dynamic dependency injection class scanning going on at runtime which detects all plugin provider beans at runtime and sends their ObjectStoreProvider instance variable "providerName" property to the UI to populate the dropdown selection? When a plugin is selected in the UI this would then trigger the client/pom.xml project to do a dynamic bean lookup to find the correct ObjectStoreProvider class by "providerName"? If this dynamic bean discovery is actually being done I would not have to add my project to client/pom.xml or into the "AddObjectStorage.vue" file? So, I guess dynamic bean discovery is NOT done? I have next to no experience with the Spring (Boot) framework, only with Java SE / Jakarta EE and CDI / Weld, so maybe I just overlooked something very important in the code base, but from what information I was able to gather it seems like I should not be contributing my plugin upstream unless I can add the JAR library in question via Maven coordinates. And judging from the fact that Huawei has still not answered my request to publish the OBS SDK with Maven coordinates, I assume that this is the "chinese way" of saying "Nope, not going to happen!". Mit freundlichen Grüßen R. Feicht sc synergy GmbH Hilgestrasse 14 | 55294 Bodenheim | Deutschland Fon: +49 6135 71691 - 000 | Fax: +49 6135 71691 - 299 http://www.scsynergy.com | ronald.fei...@scsynergy.com Sitz der Gesellschaft Bodenheim, HRB 8830, Amtsgericht Mainz, Geschäftsführer: Christian Reichert From: Daan Hoogland Sent: Wednesday, January 31, 2024 10:49 To: dev@cloudstack.apache.org Subject: Re: Adding Huawei Object Storage: 3 questions Ronald, On Wed, Jan 31, 2024 at 10:02 AM Ronald Feicht wrote: > > Hi, > > I have only lately found out, that I cannot use the publicly available > Java SDK for Huawei Object Storage (which has Maven coordinates) as this > SDK only works for the public Huawei Cloud, not for local non-cloud > devices. Instead, all I have is a JAR file under the Apache License 2.0 > sent to me via email. I integrated that JAR file as a local repository > inside plugins/storage/object/huawei-obs/local-huawei-sdk/. This is a > quite ugly and frustrating "solution" as I have no influence on getting > the right Java SDK published to maven central. I have opened a support > ticket with Huawei asking whether I may include the JAR int