Commit Graph
59 Commits
Author SHA1 Message Date
54d9fd6f0c F OpenNebula/one#7638: Add Open vSwitch port mirroring
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>
2026-11-03 14:04:07 +01:00
Pavel Czerný dfa57cab08 B #7938: Fix VLAN authorization for unchanged values (#4457) 2026-08-27 11:10:39 +02:00
Ruben S. Montero 8326215cf3 Revert "F #7971: Configurable algorithm for network leases (#4403)"
This reverts commit 567d5b7a95.
2026-08-25 20:00:03 +02:00
Pavel Czerný 567d5b7a95 F #7971: Configurable algorithm for network leases (#4403) 2026-08-25 19:31:21 +02:00
Ruben S. Montero 41fbb21f61 F #1536, #7253: Minor fixes
* Fix range wrapping in multi-leases ranges (i.e. not use 8,9,0)
* Skip reservations and shared AR's in fsck.
* Do not reserve MAC addresses on VNET reservations
* Release MAC ID's on virtual network drop (with existing AR's)
* NEXT_INDEX is an internal attribute (cannot be set by user)
* Check size on update
2026-05-27 13:36:54 +02:00
8fc632ec4e F #1536, #7253: Implement global MAC adress space and MAC parsing
New configuration attribue MAC_GLOBAL_SPACE in oned.conf to enable the global
MAC address space generation mode.

MAC addresses are generated from a global pool preventing collisions across
VNETs. This does not apply to IP networks and limits the number of VNETs to
2^20, with a max of 2^20 leases per VNET.

This commit also implementes:
  * A round-robin assignment of addresses. (jukka.jokiniva@qt.io)
  * Optimizes the storing of the BitMap - do not store leading zeros

co-authored-by: Pavel Czerny <pczerny@opennebula.io>
co-authored-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
2026-05-26 18:02:39 +02:00
Ruben S. Montero ebbb7be5d4 M #-: Bump version 7.3.80 2026-03-30 09:58:53 +02:00
Tino Vázquez a64f071808 M #-: Bump year 2025 2025-02-28 11:56:18 +01:00
Pavel Czerný a15f729488 M #-: Resolve cppcheck issues version 2.13 (#3334)
* Fixed performance issues
* Suppresed style issues
2025-01-02 07:02:44 +01:00
Tino Vázquez 05d147c524 M #-: Bump version 6.10.0
Also bump copyright year to 2024
2024-07-29 14:27:11 +02:00
Pavel Czerný 2fe396ae15 L #-: Add Astyle linting
* Add AStyle to smoke tests
* Format C++ files using AStyle
2024-06-03 11:40:24 +02:00
Tino Vázquez 3376afdaf0 M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
865908de1c F #5989: Live update of Virtual Network attributes
co-authored-by: Pavel Czerný <pczerny@opennebula.systems>
co-authored-by: Frederick Borges <fborges@opennebula.io>
co-authored-by: Christian González <cgonzalez@opennebula.io>

* VNET updates trigger a driver action on running VMs with NICs in the
  network.

* VNET includes a sets with VM status: updated, outdated, error and
  updating. With VMs in each state.

* VNET flags error situations with a new state UPDATE_FAILURE.

* The same procedure is applied when an AR is updated (only VMs in that
  AR are updated).

* A new options in the one.vn.recover API call enable to recover or
  retry this VM update operations.

* The following attributes can be live-updated per VNET driver:
    - PHYDEV (novlan, vlan, ovs driver)
    - MTU (vlan, ovs driver)
    - VLAN_ID (vlan, ovs driver)
    - QINQ_TYPE (ovs driver)
    - CVLANS (ovs driver)
    - VLAN_TAGGED_ID (ovs driver)
    - OUTER_VLAN_ID (ovs driver)
    - INBOUND_AVG_BW (SG, ovs driver + KVM)
    - INBOUND_PEAK_BW (SG, ovs driver + KVM)
    - INBOUND_PEAK_KB (SG, ovs driver + KVM)
    - OUTBOUND_AVG_BW (SG, ovs driver + KVM)
    - OUTBOUND_PEAK_BW (SG, ovs driver + KVM)
    - OUTBOUND_PEAK_KB (SG, ovs driver + KVM)

* New API call one.vm.updatenic, allows to update individual NICs
  without the need of detach/attach (only QoS supported).

* Update operations for: 802.1Q, bridge, fw, ovswitch, ovswitch_vxlan
  and vxlan network drivers.

* VNET attributes (old values) stored in VNET_UPDATE to allow
  implementation of update operations. The attribute is removed after a
  successful update.

* Updates to CLI onevnet (--retry option) / onevm (nicupdate command)

* XSD files updated to reflect the new data model

* Ruby and JAVA bindings updated: new VNET state and recover option, new
  VM API call.

* Suntone and Fireedge implementation (lease status, recover option, new
  states)

TODO: Virtual Functions does not support this functionality

iii
2022-11-16 15:06:49 +01:00
Tino Vazquez f7d53e75ff M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Vlastimil Holer 096754b63f M #-: Bump year to 2021 (#778) 2021-02-09 16:07:56 +01:00
Ruben S. MonteroandPavel Czerný 565094961a F #4936: oned refactor
* Remove duplicit methods from NebulaUtil

    * Const correctness

    * Fix minor code quality issues

    * Remove ObjectCollection::clone()

    * Minor SSLUtil interface change

co-authored-by: Pavel Czerný <pczerny@opennebula.systems>
2020-07-05 22:01:32 +02:00
Pavel Czerný daaf132a43 F #4936: Remove 'using namespace std' from headers (#60) 2020-07-02 22:42:10 +02:00
Vlastimil Holer f3c50a5d89 M #-: Year bump to 2020 (#4634) 2020-04-30 15:00:02 +02:00
Pavel Czerný 36c79d643b F #2837: Add --force option to 'onevnet rmar' (#4511) 2020-04-14 10:49:06 +02:00
Alejandro Huertas Herrero 2c9bbb9642 B #3070: delete IPAM ars when deleting vnet (#3719) 2019-09-17 15:53:02 +02:00
Alejandro Huertas e997d2b2b3 F #3064: encrypt address range template
The address range template in address range pool is encrypted
2019-09-13 11:35:53 +02:00
Ruben S. MonteroandAlejandro Huertas 3c2df22ad7 F #3064: separate encrypted attrs by objects
* There are encrypted attributes for VMs, Hosts and VNets
    * For VMs the user template is also encrypted
    * For VNets its address ranges attributes are also encrypted

Co-authored-by: Alejandro Huertas <ahuertas@opennebula.systems>
2019-09-12 16:25:23 +02:00
Ruben S. MonteroandPavel Czerny a742b95d83 F #3064: Unified secret handling
Co-authored-by: Pavel Czerny <pczerny@opennebula.systems>
2019-09-03 16:46:36 +02:00
Vlastimil Holer 441cf1f7f9 Bump version to 5.7.85, year to 2019 2019-01-16 11:47:59 +01:00
juanmont 098ce33e79 F #1976: Test access rights to the security groups of a VNet and its ARs 2018-04-27 16:31:12 +02:00
Vlastimil Holer a4c0447ccf Bump year to 2018 (#1623) 2018-01-02 18:27:37 +01:00
Javi Fontan 8de979e42c Bump version 5.3.80 2017-05-25 16:07:35 +02:00
Ruben S. Montero ba40cffd61 F #5027: Operations (hold, release, reserve...) for IP6 no-slaac ARs 2017-02-21 16:50:45 +01:00
Guillaume Oberlé f8615d6e5c Feature #4446: Redesign of AddressRange class to include multiple
implementations. When managing leases 4 abstract methos have been added
to the interface:
  - from_vattr, to notify/request a new network from IPAM
  - allocate_addr, to set an address as used
  - get_addr, to request a free address
  - free_addr, to set an address as unused

This commits also includes an AddressRange implementation based on
OpenNebula's internal IPAM

Signed-off-by: Ruben S. Montero <rsmontero@opennebula.org>
2016-08-17 19:22:53 +02:00
Javi Fontan e1f6dee180 Update copyright notice year 2016-05-04 12:33:23 +02:00
Ruben S. Montero 5761be4d10 feature #4217: Simplify Template, Attribute and PoolObjectSQL class interfaces 2016-02-05 00:33:37 +01:00
Carlos Martín 034943e6b1 Feature #4215: Filter VR leases in onevnet show 2016-01-07 16:58:54 +01:00
Jaime Melis e20fb5c4c4 Fix copyright in banners 2015-09-23 16:51:10 +02:00
Jaime Melis 8d00b74177 Change year to 2015 2015-02-24 12:27:59 +01:00
Ruben S. Montero 18786ec0e6 feature #3175: Cache SECURITY_GROUP parsing 2014-11-11 16:27:46 +01:00
Carlos Martín 76218309bc Feature #3175: Core support for RULE/NETWORK_ID
Each rule is copied once for each vnet's AR
2014-10-10 16:52:51 +02:00
Ruben S. Montero dcd2e80281 feature #3183:Extend VNET to_xml method to list only VM and VNET information granted by the ACL system 2014-09-11 17:01:14 +02:00
Carlos Martín 36f19c0dcf Feature #3167: Allow users to edit their VNet's AR, respecting restricted attributes 2014-09-04 13:38:11 +02:00
Carlos Martín faa407e0ec Feature #2858: Return error for wrong AR update actions. Do not allow to update a reservation SIZE 2014-06-16 17:56:50 +02:00
Ruben S. Montero f57e0b4c1c feature #2858: Adjust quotas on VNET chown 2014-06-03 16:09:26 +02:00
Ruben S. Montero 5599906f02 feature #2858: Fix permission check when adding a reservation to an existing reservation. Quotas always account for the reservation owner 2014-06-03 15:13:26 +02:00
Ruben S. Montero e971911068 feature #2858: Free address ranges on VNET 2014-06-02 19:18:32 +02:00
Ruben S. Montero be238e98ee feature #2858: Add reservations to an exisiting network. VNETs are labeled with the PARENT_NETWORK_ID if any. Just one PARENT VNET is allowed 2014-05-30 19:00:59 +02:00
Ruben S. Montero 41e0412bdc feature #2858: free by owner returns the number of addressses freed 2014-05-30 12:57:09 +02:00
Ruben S. Montero 0fbef4c68c feature #2858: Reserve by IP & MAC 2014-05-30 00:00:32 +02:00
Ruben S. Montero ab6de3ae02 feature #2858: Fix minor memory leaks 2014-05-29 15:36:20 +02:00
Ruben S. Montero 977fc0d9e3 feature #2858: Reserve by AR_ID, fix DB storage of reservations 2014-05-29 12:44:41 +02:00
Ruben S. Montero 28e7faf54e feature #2858: Check quotas for reserve addresses. Update AR on reservation 2014-05-28 10:59:02 +02:00
Ruben S. Montero d5deaaf9e4 feature #2858: First version of VNET reservation. VNET is created, addresses allocated. Needs to set free addr methods upon reservation removal. 2014-05-27 17:19:36 +02:00
Ruben S. Montero 20a3c25843 feature #2858: Update ARs. Core, OCA and CLI. Needs to implement attribute removal 2014-05-23 00:24:14 +02:00