Adds two new operator-level configuration keys to control the number of secondary storage copies made for public and private templates, decoupling replica count from template visibility.
- secstorage.public.template.copy.max (default: 0 = all stores, preserving existing behavior)
- secstorage.private.template.copy.max (default: 1, preserving existing behavior)
* refactor vmschedule to make it more generic and add new commands for it
* fixup
* update marvin tests to use the new APIs
* Update UI to use new APIs
* minor fixups
* Add support scheduling min & max for autoscaling groups
* Add marvin test for ASG
* fixup
* fixup
* fixup
* Fixup
* pre-allocate a second empty cdrom slot at boot (hardcoded)
* drive cdrom slot count via vm.cdrom.max.count ConfigKey
* add vm_iso_map table + VO/DAO
* persist multi-ISO state via vm_iso_map
* carry target cdrom slot through AttachCommand to KVM agent
* enforce per-VM cdrom cap, clamp to hypervisor max
* make detachIso accepts an ISO id
* expose attached ISOs as isos[] in listVirtualMachines response
* extract CDROM_PRIMARY_DEVICE_SEQ constant
* unit tests for cdrom slot allocation logic
* implement multi-ISO attachment and detachment for VMs with enhanced validation
* implement multi-ISO display in InstanceTab with computed property for attached ISOs
* add warning alert for max CDROM selections and enhance global capacity fetching
* enhance ISO attachment validation to handle multiple ISOs and prevent duplicates
* refactor ISO attachment logic for detachment and validation
* add unit tests for ISO detachment resolution and validation logic
* add mock for VmIsoMapDao in UserVmJoinDaoImplTest and set lenient behavior for listByVmId
* refactor ISO attachment logic and enhance UI for multi-CDROM management
* refactor ISO attachment methods to use VM ID and improve parameter handling
* remove unnecessary mock for VM ISO mapping in TemplateManagerImplTest
* add 'since' attribute to ISO detach command parameter description
* scope vm.cdrom.max.count to cluster
* add support for configurable CD-ROM count per VM and improve handling in TemplateManager
* add HostDetailsDao mock to UserVmJoinDaoImplTest
* fix: handle null poolId when loading attached ISO slots in prepareIsoForVmProfile
* implement listByIsoId method in VmIsoMapDao and update TemplateManagerImpl for ISO deletion checks
* improve logging messages for ISO deletion checks
* add unit tests for CD-ROM handling and enforce limits in TemplateManager
* refactor: update configuration value handling and improve notification logic
* refactor: rename CD-ROM references to ISO and update related logic
* refactor: enhance effective CD-ROM max count logic to handle missing host IDs and improve cluster ID retrieval
* refactor: enhance effective CD-ROM max count logic to handle misconfigurations during VM boot
* refactor: enhance effective CD-ROM max count logic to retrieve host ID from candidates based on hypervisor type
* refactor: enhance host ID retrieval logic for VMs based on hypervisor type
* feat: add bootable ISO flag to AttachedIsoResponse and update UI to display it
* refactor: simplify effectiveMaxCdroms method and improve logging for CD-ROM capacity
* test: update AttachedIsoResponseTest to include bootable flag in constructor tests
* feat: include bootable flag in AttachedIsoResponse for user VMs
* feat: enhance CD-ROM management by defining empty slots for user VMs
* Allow selecting network for VNF nics if template nics > 0 and is a non-deploy as is template
* delpoy as is param not required
---------
Co-authored-by: Pearl Dsilva <pearl1954@gmail.com>
* Addition of description field for NIC's secondary IP addresses
* Address copilot's review
* Add newline at the end of file
Co-authored-by: dahn <daan.hoogland@gmail.com>
* Address Wei's label changes
* Remove colon from label
* Apply suggestions from code review
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
* Fix missing newline at end of SQL file
---------
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
This PR enhances the existing CLVM implementation which was based on the deprecated CLVM technology which was based on corosync/pacemaker. With RHEL 7 having reached EOL, CLVM seems to be broken. CLVM supports RAW volumes on LVM , where as CLVM_NG support QCOW2 on LVM.
Further details: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Modernized+CLVM%3A+Enhancements+and+CLVM_NG+support
NOTE: On testing - it was identified that incremental snapshots for clvm-ng do not work as expected. As of now it's been removed from scope. So, CLVM and CLVM_NG would only support full snapshots.
* add support for proper cleanup of snapshots and prevent vol snapshot of running vm
* remove snap vol restriction for sunning vms
* refactor clvm code
* add support for live migration
* add support for migrating lvm lock
* clvm deletion called explicitly
* made necessary changes to allow migration of lock and deletion of detached volumes
* fix create vol from snap and attach
* add support to revert snapshot for clvm
* add support to revert snapshot for clvm
* make zero fill configurable
* make setting non-dynamic & fix test
* fix locking at vol/vm creation
* fix revert snapshot format type and handle revert snapshot functionality for clvm
* 1. Create clvmlockmanager and move common code \n
2. handle attaching volumes to stopped VMs \n
3. Handle lock transfer when VM is started on another host
* add license
* remove command/answer classes from sonar coverage check
* add support for new gen clvm with template (qcow2) backing
* Add support for clvm_ng - which allows qcow2 on block storage , linked clones, etc
* fix test and use physical size + 50% of virtual size for backing file, while virtual size + pe for disk
* migrate clvm volumes as full clone and allow migration from clvm to nfs
* fix clvm_ng to nfs migration, and handle overhead calc
* support live migration from clvm_ng to nfs and vice-versa
* add support to migrate to and from clvm to nfs
* fix creation of volume on destination host during migration to clvm/clvm-ng
* support live vm migration between clvm -> clvm-ng (vice-versa), nfs -> clvm (vice-versa) and nfs->clvm-ng (vice-versa)
* add unit tests for clvm/clvm_ng operations
* Add support for incremental volume snapshots for clvm_ng
* prevent snapshot backup for incremental clvm_ng snaps, fix build failure, add unit tests
* fix lockhost on creation of volumes from snap and fix bitmap issue when migrating a vol with incremental snap
* restrict pre and post migration commands to only kvm hosts where vm has CLVM/CLVM-NG volumes
* evist lock tracking - use lvs command to get lock host than DB
* add test for pre/post migration
* Create a CLVM storage adaptor
* update existing clvm get stats method
* fix precommit check failure
* Apply suggestions from code review
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
* Apply suggestions from code review
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
* improve lock host retrieval logic and quicker retrival using db host as first check point and then fanning out
* add proper support for resizing of clvm_ng which calculated PE correctly for qcow2 metadata
* fallback to full snapshots for clvm-ng - incremental not supported in 4.23
* expunge volume detail of lock host on vm expunge
* if vmmigration with volume is done to the same clvm volume group, then dont do data transfer, just lock transfer and vm
* add clvm pools with deterministic uuid , so as to prevent adding the same pool twic
* added a small improvement to factor in a senario when lv is inactive on all hosts, could happen in storage outage issue
* address comment - extract common code for endpoint identification if clvm pool type
* Address comments - add early return guard to reduce indentation
* minor improvement - when migrating vm with volumes, if there's a failures, change the clvm vols to exclusive on source from shared, and on success, change dest vol to exclusive only for cross-pool migration
* cleanup unused code and tests for incremental snaps for clvmng and other cleanups
* allow storage browser to list lv in clvm, fix clvm shrink, overprovisioning factor isnt used for clvm pools - so set it to 1 and prevented display of provisioning type for clvm
* no need to have locktransfercommand to execute in sequence
* increase lv cmd timeouts to consider cluster load
---------
Co-authored-by: Pearl Dsilva <pearl1954@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>