* Fixes image uploads by setting the correct content type
* Removes unused encrypt/decrypt functions
* Updates URL parse API
Signed-off-by: Victor Hansson <vhansson@opennebula.io>
Suppress knownConditionTrueFalse false positive in RaftManager::get_leader_endpoint,
cppcheck does not see that members may change while raft_mutex is released.
Remove duplicate entries from cppcheck-suppressions.xml, newer cppcheck (2.22)
aborts with 'suppression already exists'.
Add port mirroring for Virtual Networks using the ovswitch and ovswitch_vxlan drivers, allowing selected VM interfaces to send copies of their traffic to external monitoring tools. Support RSPAN output through a VLAN and GRE or ERSPAN tunnels, including ERSPAN types II and III.
Introduce Virtual Network MIRROR definitions with an automatically assigned MIRROR_ID, NAME, optional DESCRIPTION, and TYPE. Select source interfaces through PORTS, expressed as comma-separated VM_ID:NIC_ID pairs, control traffic direction with DIRECTION (IN, OUT, or BOTH, the default), and optionally filter traffic with VLANS.
Configure RSPAN destinations with OUTPUT_VLAN, and GRE or ERSPAN destinations with REMOTE_IP and optional LOCAL_IP. The local address accepts either an IPv4 address or an interface:<name> reference resolved on each host. ERSPAN adds ERSPAN_TYPE and ERSPAN_KEY, with ERSPAN_INDEX for type II and ERSPAN_HWID for type III. Validate required fields, numeric ranges, and incompatible attribute combinations.
Expose mirror creation, configuration updates, source-port membership changes, and deletion through XML-RPC and gRPC, with Ruby, Java, and Go client support and corresponding onevnet mirror-* commands. Add a Sunstone Port Mirroring tab with creation and editing forms, source-interface selection, configuration review, and mirror details. Require administrative permissions on the Virtual Network and selected source VMs; manage definitions through the dedicated mirror APIs.
Integrate mirror configuration with VM networking operations so host OVS state follows NIC activation, updates, and deactivation, and released NICs are removed from mirror membership. Serialize shared mirror changes under a host lock, apply OVS updates in a single transaction, and clean up unused managed tunnel outputs. Configuration updates preserve source membership, membership changes target affected VMs, and mirrors must have all source ports removed before deletion.
co-authored-by: Alejandro Aizel <aaizel@opennebula.io>
co-authored-by: Daniel Clavijo Coca <dclavijo@opennebula.io>
co-authored-by: Pavel Czerny <pczerny@opennebula.io>
co-authored-by: David Carracedo <dcarracedo@opennebula.io>
- Updates the Lodash dependency from `4.17.21` to `4.18.1`.
- Synchronizes the lockfile with the new package version and integrity metadata.
(cherry picked from commit fe61503ca378ba22fa0f95a260afb7e8656b4406)
Interactive backups were limited to a fixed list of TM drivers in
VirtualMachineDisk::support_interactive(), so third party storage
drivers could not use them, even with a OneBEX exporter of their own.
The TM_MAD_CONF of a driver can now enable them:
INTERACTIVE_BACKUP = "YES" | "NO"
INTERACTIVE_BACKUP_FORMATS = comma separated list of image formats,
empty for all formats
The default oned.conf sets them for the drivers that supported
interactive backups so far. If INTERACTIVE_BACKUP is not set, e.g. with
the oned.conf of a previous release, the former built-in list is used.
Adding an exporter required editing config/environment.rb and
app/helpers.rb, which are overwritten on every upgrade.
OneBEX now loads every file in the exporters directory and each
exporter registers itself with OneBEX::Exporters.register, so a third
party exporter only needs to be installed in remotes/onebex/exporters
(and synced to the hosts). An exporter that fails to load is skipped
instead of breaking the others, and the error is logged when the server
starts.
Signed-off-by: Rene Peinthor <rene.peinthor@linbit.com>
Co-authored-by: Rene Peinthor <rene.peinthor@linbit.com>
When a NIC is detached, its ETHx_* variables are removed from the VM CONTEXT
whatever the value of NETWORK is. With NETWORK=NO, OpenNebula does not generate
those variables: they are defined by the user, and nothing generates them back
when the NIC is attached again. Guests that read their network configuration
from the CONTEXT at every boot lose their network.
Only clear them when NETWORK=YES, the same condition generate_network_context()
uses to decide whether OpenNebula manages them.
Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
(cherry picked from commit 6e4694de9365e8275301249c20acdeef0e8d34fe)
Check cpu_j > 0 and j_end >= cpu_ini[pid] in ProcessList.cpu_info before
computing per-process CPU percentage to avoid FloatDomainError (NaN) and
negative CPU usage when a process terminates during the sampling window.
Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
(cherry picked from commit c46d2253e4)
Read MARKETPLACE/TEMPLATE/READ_LENGTH (with fallback to READx_LENGTH) in
src/market_mad/remotes/s3/import so the configured S3 chunk size is applied
during marketplace imports.
Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
(cherry picked from commit 86e35f0e64)
Restore target cluster_id in quota_tmpl before calling Quotas::vm_del in
VirtualMachineAPI::migrate error paths so failed cross-cluster migrations
release the target cluster quota instead of decrementing the source cluster
quota again.
Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
(cherry picked from commit 95d8756749)
VectorAttribute::vector_value(name, value) returns -1 without modifying value when the requested metric attribute is absent from an existing quota vector (for example RUNNING_VMS or PCI_* metrics on user/group/default quota entries created before those metrics were introduced, or when resuming a VM from POWEROFF where only RUNNING_* metrics are checked).
Pass explicit default values (DEFAULT / UNLIMITED for limits and 0.0f for usage) via the 3-argument VectorAttribute::vector_value overload in Quota::check_quota and Quota::cleanup_quota, and initialize total to 0 in Quota::add_to_quota.
Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
(cherry picked from commit 1add0f30f3)
A follower only loaded the server list at start-up and refreshed it as a
candidate, so a server added later could become the leader while this
follower could not resolve its endpoint ("no leader found").
Co-authored-by: Pavel Czerny <pczerny@opennebula.io>
* Cluster creation dialog's EVC selector now only shows the intersecting
CPU models from the selected hosts table.
Signed-off-by: Victor Hansson <vhansson@opennebula.io>