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

   see title. The issue happens when use Solidfire as primary storage on vmware.
   
   steps to reproduce the issue
   1. create a volume and attach to vm
   2. detach volume
   3. attach volume again
   
   Expected result: succeed
   Actual result:
   
   ```
   2023-01-27 14:40:19,380 ERROR [c.c.s.r.VmwareStorageProcessor] 
(DirectAgent-489:ctx-057df38b xxx.yyy.zzz, job-44722/job-44723, cmd: 
AttachCommand) (logid:736275cc) Failed to attach volume!
   com.vmware.vim25.DuplicateNameFaultMsg: The name 
'-iqn.2010-01.com.solidfire:3p53.data-vol-test-01.62-0' already exists.
       at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
       at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
       at 
com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:117)
       at 
com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:223)
       at 
com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:176)
       at 
com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:263)
       at 
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
       at 
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:62)
       at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:131)
       at com.sun.proxy.$Proxy698.createVmfsDatastore(Unknown Source)
       at 
com.cloud.hypervisor.vmware.mo.HostDatastoreSystemMO.createVmfsDatastore(HostDatastoreSystemMO.java:211)
       at 
com.cloud.storage.resource.VmwareStorageProcessor.getVmfsDatastore(VmwareStorageProcessor.java:2825)
       at 
com.cloud.storage.resource.VmwareStorageProcessor.prepareManagedDatastore(VmwareStorageProcessor.java:2666)
       at 
com.cloud.storage.resource.VmwareStorageProcessor.prepareManagedStorage(VmwareStorageProcessor.java:3450)
       at 
com.cloud.storage.resource.VmwareStorageProcessor.attachVolume(VmwareStorageProcessor.java:2034)
       at 
com.cloud.storage.resource.VmwareStorageProcessor.attachVolume(VmwareStorageProcessor.java:1997)
       at 
com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.execute(StorageSubsystemCommandHandlerBase.java:163)
       at 
com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.handleStorageCommands(StorageSubsystemCommandHandlerBase.java:67)
       at 
com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:586)
       at 
com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:315)
       at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
       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 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
       at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
       at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
       at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
       at java.base/java.lang.Thread.run(Thread.java:829)
   
   ```
   
   As the datastore has been already created (before DetachVolume), cloudstack 
just needs to mount the datastore instead of creating a new datastore.
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   vmware, storage
   
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   
   ~~~
   4.17.2.0 (and probably previous versions)
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   
   vmware
   solidfire as primary storage
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   
   ~~~
   


-- 
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