rp- opened a new issue, #8899:
URL: https://github.com/apache/cloudstack/issues/8899
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete
the comments.
-->
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
Storage
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.19.0
~~~
But I assume also 4.18 is affected
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
I could recreate this with Linstor primary storage and the config option:
`lin.backup.snapshots` disabled
I'm not sure yet which other storage combination could be used to trigger
this.
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Ubuntu 22.04 non hyperconverged (2 storage nodes, 3 compute nodes (with
agents)) setup.
##### SUMMARY
<!-- Explain the problem/feature briefly -->
If I create 2 templates from snapshot (from different snapshots) at nearly
the same time and the copy command is sent to the same agent,
both copy commands use the same storage pool object and the 1. finished will
try to unmount
the still used storage pool (from the second copy command).
In the worst case the first copy command is finished while the second didn't
even start yet to copy, resulting in the second copy command to write into the
local mount directory.
##### 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 -->
~~~
* Create 2 snapshots from the same volume.
* Create a template from the first snapshot
* Create a template from the second snapshot (nearly after the first)
If the copy commands run on the same agent you would see the secondary
storage created twice. e.g.:
2024-04-10 12:03:13,081 INFO [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-1:null) (logid:1ec7c8ad) Attempting to create storage
pool e9e15545-fceb-3d76-be34-37dfaf5af384 (NetworkFilesystem) in libvirt
2024-04-10 12:03:13,089 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-1:null) (logid:1ec7c8ad) Attempting to create storage
pool e9e15545-fceb-3d76-be34-37dfaf5af384
2024-04-10 12:03:23,319 INFO [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-4:null) (logid:1fab4dd4) Attempting to create storage
pool e9e15545-fceb-3d76-be34-37dfaf5af384 (NetworkFilesystem) in libvirt
2024-04-10 12:03:43,257 INFO [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-1:null) (logid:1ec7c8ad) Attempting to remove storage
pool e9e15545-fceb-3d76-be34-37dfaf5af384 from libvirt
2024-04-10 12:03:48,862 INFO [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-4:null) (logid:1fab4dd4) Attempting to remove storage
pool e9e15545-fceb-3d76-be34-37dfaf5af384 from libvirt
~~~
<!-- You can also paste gist.github.com links for larger files -->
Attached are management and agent logs.
[management.log](https://github.com/apache/cloudstack/files/14932372/management.log)
[agent.log](https://github.com/apache/cloudstack/files/14932373/agent.log)
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
Either running the copy commands in sequence or having a ref counted storage
pool, that doesn't remove itself
while still used.
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
2 storage pool objects created, pointing to the same mount point.
The first finished would unmount the mount point for the other.
~~~
--
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]