37578 Commits

Author SHA1 Message Date
Harikrishna
60af31c9c0
Decrypt zone, cluster, storage details for configuration values (#10237)
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Bryan Lima <42067040+BryanMLima@users.noreply.github.com>
2025-02-03 13:30:57 +01:00
Daan Hoogland
085bd3bda5 Merge branch '4.19' into 4.20 2025-02-01 17:51:50 +01:00
Abhishek Kumar
0b5a5e8043
api,agent,server,engine-schema: scalability improvements (#9840)
* api,agent,server,engine-schema: scalability improvements

Following changes and improvements have been added:

- Improvements in handling of PingRoutingCommand

    1. Added global config - `vm.sync.power.state.transitioning`, default value: true, to control syncing of power states for transitioning VMs. This can be set to false to prevent computation of transitioning state VMs.
    2. Improved VirtualMachinePowerStateSync to allow power state sync for host VMs in a batch
    3. Optimized scanning stalled VMs

- Added option to set worker threads for capacity calculation using config - `capacity.calculate.workers`

- Added caching framework based on Caffeine in-memory caching library, https://github.com/ben-manes/caffeine

- Added caching for account/use role API access with expiration after write can be configured using config - `dynamic.apichecker.cache.period`. If set to zero then there will be no caching. Default is 0.

- Added caching for account/use role API access with expiration after write set to 60 seconds.

- Added caching for some recurring DB retrievals

    1. CapacityManager - listing service offerings - beneficial in host capacity calculation
    2. LibvirtServerDiscoverer existing host for the cluster - beneficial for host joins
    3. DownloadListener - hypervisors for zone - beneficial for host joins
    5. VirtualMachineManagerImpl - VMs in progress- beneficial for processing stalled VMs during PingRoutingCommands

- Optimized MS list retrieval for agent connect

- Optimize finding ready systemvm template for zone

- Database retrieval optimisations - fix and refactor for cases where only IDs or counts are used mainly for hosts and other infra entities. Also similar cases for VMs and other entities related to host concerning background tasks

- Changes in agent-agentmanager connection with NIO client-server classes

    1. Optimized the use of the executor service
    2. Refactore Agent class to better handle connections.
    3. Do SSL handshakes within worker threads
    5. Added global configs to control the behaviour depending on the infra. SSL handshake could be a bottleneck during agent connections. Configs - `agent.ssl.handshake.min.workers` and `agent.ssl.handshake.max.workers` can be used to control number of new connections management server handles at a time. `agent.ssl.handshake.timeout` can be used to set number of seconds after which SSL handshake times out at MS end.
    6. On agent side backoff and sslhandshake timeout can be controlled by agent properties. `backoff.seconds` and `ssl.handshake.timeout` properties can be used.

- Improvements in StatsCollection - minimize DB retrievals.

- Improvements in DeploymentPlanner allow for the retrieval of only desired host fields and fewer retrievals.

- Improvements in hosts connection for a storage pool. Added config - `storage.pool.host.connect.workers` to control the number of worker threads that can be used to connect hosts to a storage pool. Worker thread approach is followed currently only for NFS and ScaleIO pools.

- Minor improvements in resource limit calculations wrt DB retrievals

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* test1, domaindetails, capacitymanager fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* test2 - agent tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* capacitymanagertest fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* change

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix missing changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address comments

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* revert marvin/setup.py

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix indent

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* use space in sql

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address duplicate

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* update host logs

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* revert e36c6a5d07

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix npe in capacity calculation

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* move schema changes to 4.20.1 upgrade

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* build fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address comments

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix build

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add some more tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* checkstyle fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove unnecessary mocks

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* build fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* replace statics

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* engine/orchestration,utils: limit number of concurrent new agent
connections

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* refactor - remove unused

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* unregister closed connections, monitor & cleanup

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add check for outdated vm filter in power sync

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* agent: synchronize sendRequest wait

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-02-01 12:28:41 +05:30
Suresh Kumar Anaparti
0d5047b8b7
Improve listing of HA and non-HA hosts when ha.tag setting is defined and hosts have multiple tags along with ha tag (#10240) 2025-01-31 14:07:00 +01:00
Abhishek Kumar
27efc779ea
api,ui: fix empty source cidr value for firewall rule (#10208)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-31 13:30:16 +01:00
Abhishek Kumar
ae2ffbe40b Merge remote-tracking branch 'apache/4.19' into 4.20 2025-01-31 16:54:22 +05:30
Pearl Dsilva
5447950f09
Allow creation of Shared Networks without IP range if network offering has no services - specifyvlan = true (#10168) 2025-01-31 11:38:34 +01:00
Wei Zhou
fbb1ff78d6
Static Routes: fix check on wrong global configuration (#10066) 2025-01-31 11:04:13 +01:00
Abhishek Kumar
97be6f2e5d
ui: fix column filter for templates, isos (#10288)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-31 10:23:26 +01:00
Fabricio Duarte
4201a2dc11
Fix Usage job not executing successfully (#10244)
* Add `api_key_access` to Usage account table

* use the procedure in cloud_usage instead
2025-01-30 22:07:50 +01:00
Bernardo De Marco Gonçalves
a335feab6a
fix allocation of vmfs storage pools (#10201) 2025-01-30 18:44:48 +01:00
kiranchavala
641a60670e
changed the kubernetestool url (#10295) 2025-01-30 17:31:52 +01:00
Wei Zhou
bbe9c90592
packaging: support both mysql and mariadb on EL8/EL9 (#9941) 2025-01-30 16:08:39 +01:00
Vishesh
0fbf6379f9
UI: Fix domain view when opening details for a specific domainid (#10245) 2025-01-30 15:55:17 +01:00
Bernardo De Marco Gonçalves
c70e4e29be
fix npe on account creation (#10274) 2025-01-30 15:52:36 +01:00
Bernardo De Marco Gonçalves
d9af9bdb36
fix SQL syntax erros and target 419 (#10273) 2025-01-30 15:51:55 +01:00
Abhishek Kumar
b93589b5bd
server: reset 2fa user configuration on incomplete setup (#10247)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-30 15:51:04 +01:00
Wei Zhou
b9890875cc
CKS: use --delete-emptydir-data instead of deprecated --delete-local-data (#10234) 2025-01-30 15:49:26 +01:00
Wei Zhou
0f544c9a3b
api/ui: add specifyvlan to network response (#10236) 2025-01-30 15:35:33 +01:00
Suresh Kumar Anaparti
ee0dc5b2d6
list hosts API fix, when any stale entries exists on storage_pool_host_ref for the removed pools (#9852) 2025-01-30 15:33:25 +01:00
Abhishek Kumar
3313cc5829
ui: fix loading for hypervisor filter in serachview (#10292)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-30 15:30:49 +01:00
Bernardo De Marco Gonçalves
6f03f9e726
validate inserted values in numeric global settings (#10279) 2025-01-30 16:30:32 +05:30
Abhishek Kumar
1c84ce4e23
server: fix attach uploaded volume (#10267)
* server: fix attach uploaded volume

Fixes #10120

When an uploaded volume is attached to a VM for which no existing volume
can be found it was resulting in error. For such volumes, server needs
to find a suitable pool first and copy them to the pool from secondary
store.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add unit tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Boris Stoyanov - a.k.a Bobby <bss.stoyanov@gmail.com>
2025-01-29 13:14:16 +02:00
Daan Hoogland
717ce981d4 Merge release branch 4.19 to 4.20
* 4.19:
  extra null guard (#10264)
2025-01-28 14:33:49 +01:00
Abhishek Kumar
33a37da9ec
server: investigate pending HA work when executing in new MS session (#10167)
For HA work items that are created for host state change, checks must be
done when execution is called in a new management server session.

A new column, reason, has been added in cloud.op_ha_work table to track
the reason for HA work.

When HighAvailabilityManager starts it finds and puts all pending HA
work items in Investigating state. During execution of the HA work if it
is found in investigating state, checks are done to verify if the work
is still valid. If the jobs is found to be invalid it is cancelled.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-28 14:39:31 +05:30
dahn
f652ad0d98
extra null guard (#10264) 2025-01-27 14:14:31 +01:00
Daan Hoogland
34d2a3bc86 Merge branch '4.19' into 4.20 2025-01-24 17:01:42 +01:00
dahn
0a77eb7f85
deal with NPE during host reconnect (#10158)
* log to see what command is being processed

* exception names
2025-01-24 15:39:56 +05:30
Abhishek Kumar
4787885fc0
cks: prevent npe on cluster listing with removed offering (#10075)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-24 09:47:52 +01:00
Pearl Dsilva
2aa2e92dff
Handle special characters when exporting ACLs (#10259) 2025-01-23 20:10:09 +01:00
Nicolas Vazquez
c9fea62276
[UI] Switch between allocated and used capacity on dashboard (#10215)
* [UI] Switch between allocated and used capacity on dashboard

* Fix text

* Refactor

* Internationalize capacity text
2025-01-23 11:06:38 -03:00
Nicolas Vazquez
7e295ec4e1
[KVM] Add watchdog model none to disable use of watchdogs on KVM agent (#10203) 2025-01-23 13:15:02 +01:00
Harikrishna
4d9fd1b73f
Added displaynetwork option in filters for listnetwork only for admin (#10209) 2025-01-23 09:36:30 +01:00
Harikrishna
20759187b3
Fix local storage deletion cases (#10231)
* Delete local storage properties in agent.properties during delete pool

* Fix stale entry when add local storage failed

* Smaller methods

* Comment added
2025-01-23 12:46:33 +05:30
Abhishek Kumar
1e59f5cd0c
ui: fix passing vlan while creating vpc tier (#10239)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-22 16:14:04 +01:00
Wei Zhou
09f154796a
server: Fix host CPU number (#10218) 2025-01-22 15:44:54 +01:00
Wei Zhou
b186272f68
kvm: add SCSI controllers based on the number of virtio-SCSI disks (#9823)
According to libvirt code, the units per scsi controller is set to 7
therefore, we need to create scsi controller every 7 disks (including CDROM).

50cc7a0d9d/src/conf/domain_conf.h (L3007-L3008)

50cc7a0d9d/src/conf/domain_conf.c (L6701-L6704)
2025-01-22 14:00:02 +01:00
Harikrishna
d053bb97ec
Fix to allow actions on the network if it belongs to a project (#9550) 2025-01-22 10:01:23 +01:00
Rohit Yadav
96b757c35b
packaging: have noarch defined for rpms (#10057)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-01-21 16:48:53 +01:00
Wei Zhou
91f1adab86
UI: set redundant state as N/A for non-redundant routers (#10227) 2025-01-21 14:29:37 +01:00
Daan Hoogland
5167c3b613 Merge branch '4.19' into 4.20 2025-01-21 11:59:43 +01:00
Rene Peinthor
1ff68cf9b1
linstor: Fix ZFS snapshot backup (#10219)
Linstor plugin used the wrong zfs dataset path to hide/unhide
the snapshot device.
Also don't use the full path to the zfs binary.
2025-01-21 15:40:17 +05:30
Bernardo De Marco Gonçalves
70776b067a
fix listing of VMs by network (#10204) 2025-01-21 10:33:55 +01:00
Abhisar Sinha
0b8076c38c
Configure org.eclipse.jetty.server.Request.maxFormKeys from server.properties and increase the default value (#10214) 2025-01-21 09:28:51 +01:00
Abhishek Kumar
00c659b7a7
api: fix access for listSystemVmUsageHistory (#10032)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-01-20 14:29:27 +01:00
Suresh Kumar Anaparti
c5e8f63452
Fix NPE issues during host rolling maintenance, due to host tags and custom constrained/unconstrained service offering (#9844) 2025-01-20 13:20:17 +01:00
BartJM
a163831b7e
Maintenance mode: Add host to deployment planner avoid list to fix local storage vm migration (#9892) 2025-01-20 11:54:30 +01:00
Daan Hoogland
9f594c9699 Merge branch '4.19' into 4.20 2025-01-20 11:53:32 +01:00
Fabricio Duarte
2300c1caa3
Add project-user association normalization script to 4.20.1 upgrade (#10116) 2025-01-16 16:18:30 +01:00
Bernardo De Marco Gonçalves
9967bb3fe8
fix slider component for global settings of the range type (#10187) 2025-01-16 15:48:21 +01:00