-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
ISSUE TYPE
Bug
COMPONENT NAME
Component: Bug
CLOUDSTACK VERSION
Cloudstack version 4.19.1.1, 4.19.1.2
Ubuntu 22.04, and other Os
SUMMARY
Default local storage /var/lib/libvirt/images is getting added everytime the agent is restarted
Steps to reproduce the behaviour
- Enable the 'Enable local storage for User Instances' on the zone
- Make sure the agent.properties doesn't contain any value of
local.storage.uuid=
local.storage.path=
Example
root@kvm2:/home/kiran# cat /etc/cloudstack/agent/agent.properties
#Storage
#Thu Oct 17 08:53:20 UTC 2024
cluster=1
pod=1
resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
private.network.device=cloudbr0
domr.scripts.dir=scripts/network/domr/kvm
guest.network.device=cloudbr0
keystore.passphrase=v5DA5u6vazg2NpZP
hypervisor.type=kvm
port=8250
zone=1
public.network.device=cloudbr0
host=192.168.55.216@static
guid=05b58647-269d-386b-a3e9-334037c001e7
LibvirtComputingResource.id=5
workers=5
iscsi.session.cleanup.enabled=false
vm.migrate.wait=3600
-
Restart the cloud stack agent
-
The local storage of /var/lib/libvirt/images is added
-
Restart the cloud stack agent again
Logs
2024-10-17 08:43:10,714 INFO [kvm.storage.LibvirtStorageAdaptor] (Agent-Handler-1:null) (logid:) Attempting to create storage pool 1fd120df-566c-4480-a31d-cdfa3aad7344 (Filesystem) in libvirt
2024-10-17 08:43:10,714 DEBUG [kvm.resource.LibvirtConnection] (Agent-Handler-1:null) (logid:) Looking for libvirtd connection at: qemu:///system
2024-10-17 08:43:10,716 WARN [kvm.storage.LibvirtStorageAdaptor] (Agent-Handler-1:null) (logid:) Storage pool 1fd120df-566c-4480-a31d-cdfa3aad7344 was not found running in libvirt. Need to create it.
2024-10-17 08:43:10,716 INFO [kvm.storage.LibvirtStorageAdaptor] (Agent-Handler-1:null) (logid:) Didn't find an existing storage pool 1fd120df-566c-4480-a31d-cdfa3aad7344 by UUID, checking for pools with duplicate paths
2024-10-17 08:43:10,717 DEBUG [kvm.storage.LibvirtStorageAdaptor] (Agent-Handler-1:null) (logid:) Checking path of existing pool 9f638db4-0845-3250-bfc7-f6f8be657c7f against pool we want to create
2024-10-17 08:43:10,721 DEBUG [kvm.storage.LibvirtStorageAdaptor] (Agent-Handler-1:null) (logid:) Attempting to create storage pool 1fd120df-566c-4480-a31d-cdfa3aad7344
2024-10-17 08:43:10,721 DEBUG [kvm.storage.LibvirtStorageAdaptor] (Agent-Handler-1:null) (logid:) <pool type='dir'>
<name>1fd120df-566c-4480-a31d-cdfa3aad7344</name>
<uuid>1fd120df-566c-4480-a31d-cdfa3aad7344</uuid>
<target>
<path>/var/lib/libvirt/images</path>
</target>
</pool>
Actual Behaviour
Cloudstack is adding the default local storage if there is no entry in the /etc/cloudstack/agent/agent.properties
Expected Behaviour
Cloudstack should not add the default local storage if there is no entry in the /etc/cloudstack/agent/agent.properties
