Hi Wido,

It looks you need a file like
https://github.com/apache/cloudstack/blob/main/plugins/storage/object/simulator/src/main/resources/META-INF/cloudstack/storage-object-simulator/spring-storage-object-simulator-context.xml

-Wei

On Fri, 15 Dec 2023 at 13:40, Wido den Hollander <w...@widodh.nl.invalid>
wrote:

>
>
> On 12/15/23 09:41, Ronald Feicht wrote:
> > Hi Kishan,
> >
> >
> > when I add my module to client/pom.xml I get the following error and
> http://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.CloudStackSpringContext.init
> (CloudStackSpringContext.java:70)
> >      at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>
> (CloudStackSpringContext.java:57)
> >      at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>
> (CloudStackSpringContext.java:61)
> >      at
> org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized
> (CloudStackContextLoaderListener.java:52)
> >      at
> org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized
> (ContextHandler.java:933)
> >      at
> org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized
> (ServletContextHandler.java:553)
> >      at org.eclipse.jetty.server.handler.ContextHandler.startContext
> (ContextHandler.java:892)
> >      at org.eclipse.jetty.servlet.ServletContextHandler.startContext
> (ServletContextHandler.java:356)
> >      at org.eclipse.jetty.webapp.WebAppContext.startWebapp
> (WebAppContext.java:1445)
> >      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp
> (JettyWebAppContext.java:328)
> >      at org.eclipse.jetty.webapp.WebAppContext.startContext
> (WebAppContext.java:1409)
> >      at org.eclipse.jetty.server.handler.ContextHandler.doStart
> (ContextHandler.java:825)
> >      at org.eclipse.jetty.servlet.ServletContextHandler.doStart
> (ServletContextHandler.java:275)
> >      at org.eclipse.jetty.webapp.WebAppContext.doStart
> (WebAppContext.java:524)
> >      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart
> (JettyWebAppContext.java:397)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.start
> (ContainerLifeCycle.java:169)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart
> (ContainerLifeCycle.java:117)
> >      at org.eclipse.jetty.server.handler.AbstractHandler.doStart
> (AbstractHandler.java:97)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.start
> (ContainerLifeCycle.java:169)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart
> (ContainerLifeCycle.java:117)
> >      at org.eclipse.jetty.server.handler.AbstractHandler.doStart
> (AbstractHandler.java:97)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.start
> (ContainerLifeCycle.java:169)
> >      at org.eclipse.jetty.server.Server.start (Server.java:407)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart
> (ContainerLifeCycle.java:110)
> >      at org.eclipse.jetty.server.handler.AbstractHandler.doStart
> (AbstractHandler.java:97)
> >      at org.eclipse.jetty.server.Server.doStart (Server.java:371)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty
> (AbstractJettyMojo.java:450)
> >      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute
> (AbstractJettyMojo.java:311)
> >      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.
> > <module>storage/object/minio</module>
> > <module>storage/object/simulator</module>
> > <module>storage/object/huawei-obs</module>
> > But surely that cannot be the source of the error?
> >
>
> My code doesn't work either, just running it now:
>
> "com.cloud.exception.InvalidParameterValueException: can't find object
> store provider: Ceph RGW"
>
> But the module was loaded:
>
> 2023-12-15 12:24:39,440 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> (main:null) (logid:) Loading module context [storage-object-ceph] from
> URL
>
> [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.19.0.0-SNAPSHOT.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]
> 2023-12-15 12:24:39,496 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> (main:null) (logid:) Loaded module context [storage-object-ceph] in 56 ms
>
> Trying to figure out what is happening.
>
> Wido
>
> > 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 <kishan.kav...@shapeblue.com>
> > 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 <ronald.fei...@scsynergy.com>
> > 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
> (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.CloudStackSpringContext.init
> (CloudStackSpringContext.java:70)
> >      at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>
> (CloudStackSpringContext.java:57)
> >      at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>
> (CloudStackSpringContext.java:61)
> >      at
> org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized
> (CloudStackContextLoaderListener.java:52)
> >      at
> org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized
> (ContextHandler.java:933)
> >      at
> org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized
> (ServletContextHandler.java:553)
> >      at org.eclipse.jetty.server.handler.ContextHandler.startContext
> (ContextHandler.java:892)
> >      at org.eclipse.jetty.servlet.ServletContextHandler.startContext
> (ServletContextHandler.java:356)
> >      at org.eclipse.jetty.webapp.WebAppContext.startWebapp
> (WebAppContext.java:1445)
> >      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp
> (JettyWebAppContext.java:328)
> >      at org.eclipse.jetty.webapp.WebAppContext.startContext
> (WebAppContext.java:1409)
> >      at org.eclipse.jetty.server.handler.ContextHandler.doStart
> (ContextHandler.java:825)
> >      at org.eclipse.jetty.servlet.ServletContextHandler.doStart
> (ServletContextHandler.java:275)
> >      at org.eclipse.jetty.webapp.WebAppContext.doStart
> (WebAppContext.java:524)
> >      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart
> (JettyWebAppContext.java:397)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.start
> (ContainerLifeCycle.java:169)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart
> (ContainerLifeCycle.java:117)
> >      at org.eclipse.jetty.server.handler.AbstractHandler.doStart
> (AbstractHandler.java:97)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.start
> (ContainerLifeCycle.java:169)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart
> (ContainerLifeCycle.java:117)
> >      at org.eclipse.jetty.server.handler.AbstractHandler.doStart
> (AbstractHandler.java:97)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.start
> (ContainerLifeCycle.java:169)
> >      at org.eclipse.jetty.server.Server.start (Server.java:407)
> >      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart
> (ContainerLifeCycle.java:110)
> >      at org.eclipse.jetty.server.handler.AbstractHandler.doStart
> (AbstractHandler.java:97)
> >      at org.eclipse.jetty.server.Server.doStart (Server.java:371)
> >      at org.eclipse.jetty.util.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:72)
> >      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty
> (AbstractJettyMojo.java:450)
> >      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute
> (AbstractJettyMojo.java:311)
> >      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 14 12:17 WEB-INF
> > -rw-r--r--. 1 root root 1135 Dec 14 12:17 index.html
> > drwxr-xr-x. 3 root root   39 Dec 14 12:17 .
> > drwxr-xr-x. 4 root root   87 Dec 14 12:17 ..
> > [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 14 12:17 web.xml
> > drwxr-xr-x. 2 root root   21 Dec 14 12:17 .
> > drwxr-xr-x. 3 root root   39 Dec 14 12:17 ..
> >
> > Because of that error I had removed my plugin from client/pom.xml again
> and then afterwards http://192.168.17.252:8080/client/ worked.
> > So, I now understand that my plugin must by part of client/pom.xml but
> then I receive the same exception mentioned above - how do I fix that?
> >
> >
> > 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: Slavka Peleva <slav...@storpool.com.INVALID>
> > Sent: Thursday, December 14, 2023 11:37
> > To: dev@cloudstack.apache.org
> > Subject: Re: New Object Storage - Huawei OBS
> >
> > Hi Ronald,
> >
> > In the logs, you can find all the modules that are loaded like:
> >
> > ```
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:         storage
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           baremetal-storage
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:
> > server-alert-adapter-storage
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           server-storage
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           server-template-adapter
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           storage-allocator
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           storage-image-default
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           storage-image-s3
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           storage-image-swift
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           storage-object-minio
> > 2023-12-14 12:28:21,480 INFO  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet]
> > (main:null) (logid:) Module Hierarchy:           storage-object-simulator
> > 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 <ustcweiz...@gmail.com> wrote:
> >
> >> Is the module added to client/pom.xml ?
> >>
> >> -Wei
> >>
> >> On Thu, 14 Dec 2023 at 10:51, Ronald Feicht
> >> <ronald.fei...@scsynergy.com>
> >> 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(StorageManage
> >> rImpl.java:3743)
> >>>          at
> >>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nati
> >>> ve
> >>> Method)
> >>>          at
> >>>
> >> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeM
> >> ethodAccessorImpl.java:62)
> >>>          at
> >>>
> >> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
> >> egatingMethodAccessorImpl.java:43)
> >>>          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> >>>          at
> >>>
> >> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio
> >> n(AopUtils.java:344)
> >>>          at
> >>>
> >> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi
> >> npoint(ReflectiveMethodInvocation.java:198)
> >>>          at
> >>>
> >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R
> >> eflectiveMethodInvocation.java:163)
> >>>          at
> >>>
> >> org.apache.cloudstack.network.contrail.management.EventUtils$EventInte
> >> rceptor.invoke(EventUtils.java:107)
> >>>          at
> >>>
> >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R
> >> eflectiveMethodInvocation.java:175)
> >>>          at
> >>>
> >> com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.j
> >> ava:52)
> >>>          at
> >>>
> >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R
> >> eflectiveMethodInvocation.java:175)
> >>>          at
> >>>
> >> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke
> >> (ExposeInvocationInterceptor.java:97)
> >>>          at
> >>>
> >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R
> >> eflectiveMethodInvocation.java:186)
> >>>          at
> >>>
> >> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamic
> >> AopProxy.java:215)
> >>>          at com.sun.proxy.$Proxy119.discoverObjectStore(Unknown Source)
> >>>          at
> >>>
> >> org.apache.cloudstack.api.command.admin.storage.AddObjectStoragePoolCm
> >> d.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.cal
> >> l(DefaultManagedContext.java:55)
> >>>          at
> >>>
> >> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callW
> >> ithContext(DefaultManagedContext.java:102)
> >>>          at
> >>>
> >> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWi
> >> thContext(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(Servle
> >> tHolder.java:1386)
> >>>          at
> >>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
> >>>          at
> >>>
> >> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletH
> >> andler.java:1617)
> >>>          at
> >>>
> >> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(Web
> >> SocketUpgradeFilter.java:226)
> >>>          at
> >>>
> >> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletH
> >> andler.java:1604)
> >>>          at
> >>>
> >> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:
> >> 545)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.ja
> >> va: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(ScopedHandle
> >> r.java:235)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandle
> >> r.java:1610)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandle
> >> r.java:233)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandle
> >> r.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.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.ja
> >> va:141)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Conte
> >> xtHandlerCollection.java:221)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerColle
> >> ction.java:146)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.
> >> java:127)
> >>>          at org.eclipse.jetty.server.Server.handle(Server.java:500)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:
> >> 383)
> >>>          at
> >>> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
> >>>          at
> >>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
> >>>          at
> >>>
> >> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java
> >> :273)
> >>>          at org.eclipse.jetty.io
> >>> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> >>>          at org.eclipse.jetty.io
> >>> .FillInterest.fillable(FillInterest.java:103)
> >>>          at org.eclipse.jetty.io
> >>> .ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatY
> >> ouKill.java:336)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWha
> >> tYouKill.java:313)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWh
> >> atYouKill.java:171)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKi
> >> ll.java:129)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.ru
> >> n(ReservedThreadExecutor.java:375)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool
> >> .java:806)
> >>>          at
> >>>
> >> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThread
> >> Pool.java:938)
> >>>          at java.base/java.lang.Thread.run(Thread.java:829)
> >>>
> >>>
> >>> What do I need to do to register my plugin with
> StorageManagerImpl.java?
> >>>
> >>> The fork I made with my code can be seen here
> >>> https://github.com/scsynergy/cloudstack-huawei-obs .
> >>>
> >>>
> >>> 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
> >>>
> >>
> >
>

Reply via email to