Commit Graph
185 Commits
Author SHA1 Message Date
Jan Orel 82196ef2be B #7899: Fix the remote scripts directory handling (#4379)
The remote scripts directory (former SCRIPTS_REMOTE_DIR) is now fixed
to /var/lib/one-remotes and the configuration attribute is gone. The
old default /var/tmp/one was broken in several ways: /var/tmp content
is aged away by systemd-tmpfiles, the world-writable parent allows
squatting on the directory, and the configurable location was silently
not honored by many drivers, probes and static files (sudoers,
AppArmor, tmpfiles, cron).

  - The remotes are synced to /var/lib/one-remotes on the hosts; the
    directory is created by the node packages, as it cannot be created
    by the unprivileged oneadmin
  - The node monitoring DB moves along to /var/lib/one-remotes-db;
    it cannot live inside the remotes directory as the sync
    (rsync --delete) would remove it. The monitord client migrates
    the DB from the legacy location on its first start
  - Helpers executed through sudo are installed at a fixed path
    (/usr/lib/one/sbin) by the node packages, so they are no longer
    executed from an oneadmin-writable location
  - Remote hooks (REMOTE = yes) run from /var/lib/one-remotes/hooks.
    Hook commands given as an absolute path are executed as-is and
    must be updated manually
  - Fix remotes sync to run the mkdir on the host: the local shell
    interpreted the unquoted ';' and ran it on the frontend instead
  - onecfg migrator drops SCRIPTS_REMOTE_DIR from oned.conf and the
    stock :remote_hook_base_path from onehem-server.conf
2026-10-01 15:23:47 +02:00
Guillermo Ramos c1cafb73e4 B OpenNebula/one#7746: Run lvm and fs_lvm mkfs with privileges (#4409)
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
2026-08-26 18:08:17 +02:00
Daniel Clavijo Coca 25e308555e B #7935: Fix arping on rhel9 (#4362) 2026-07-28 15:30:46 +02:00
Jan Orel e213d706a3 B OpenNebula/one#7691: Avoid sudoers argument wildcard in netns arp_ignore sysctl (#4354)
sudo-rs (default sudo on Ubuntu 26.04+) rejects wildcards inside command
arguments, so the ONE_NETNS entry 'sysctl -w net.ipv4.conf.*.arp_ignore=0'
made the whole alias unparseable and broke all netns sudo commands on the
node (tproxy/OneGate setup failed).

Set net.ipv4.conf.{all,default}.arp_ignore=0 in the namespace before the
veth device is moved in; the device then re-inherits arp_ignore=0 from
conf.default, so the per-device (wildcarded) sysctl is not needed and the
sudoers entry becomes a fixed string accepted by both sudo flavors.
2026-07-24 10:35:54 +02:00
Jan Orel bf4da7f671 F #-: Import OneKS from one-ee-tools 2026-07-22 15:49:53 +02:00
Anton Todorov 0cebd42c8f B #7691: loosen inherited ARP strictness in netns
to allow cross-subnet ARP replies.

Network namespaces can inherit strict ARP policies (where arp_ignore is greater than 0) from the host's default configurations. When this strictness is inherited, it breaks cross-subnet ARP resolution. Specifically, the namespace silently drops and fails to reply to the VM's cross-subnet ARP requests for local endpoints, such as the 169.254.16.9.

This PR explicitly loosens the inherited ARP strictness by forcing arp_ignore=0 inside the namespace. By applying this to both all and the specific interface, it guarantees the namespace will successfully reply to the VM's ARP requests for local IPs.

(cherry picked from commit ba242ba963)
2026-07-22 14:50:41 +02:00
Jan Orel cf0b0bc2fa B OpenNebula/one#7562: Manage OneForm service in HA raft hook (#4328) 2026-07-21 13:06:49 +02:00
Jan Orel cef1db4ff2 M #-: Drop forced logrotate on service start from systemd units (#4262)
* Fixup path when removing other arch cbc solver
* Drop forced logrotate on service start from systemd units
2026-06-12 11:36:10 +02:00
Jan Orel cfa8e3e82c F OpenNebula/one#7653: Drop !requiretty from Debian sudoers for sudo-rs (#4247)
- Ubuntu 26.04 ships sudo-rs, it does not implement the 'requiretty'
- setting is a no-op on Debian/Ubuntu sudo anyway
2026-06-02 11:00:39 +02:00
Daniel Clavijo CocaandRuben S. Montero fe1023926d F #7679, #7707: Add OVS representor support and monitoring updates
- Configure Open vSwitch VF representor ports
- Apply VLAN, QinQ, and trunk tagging to representors
- Clear OVS port tags when VLAN_ID is empty on update
- Update monitoring components for the new network support
- Fix non string message driver logging
- #7707, fix update VLAN IDs

co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2026-06-01 09:34:17 +02:00
mkutouskiandJan Orel 4188fe50ad B #7646: Apply log rotation fix to remaining services
Extend the FireEdge log fix to oned, oneflow, oneform, onegate and
onehem so they share the same rotation behavior:

- Add compress / compressoptions -9 / delaycompress to the logrotate
  configs. With copytruncate, delaycompress avoids gzipping the
  freshly-rotated file in the same pass and keeps service restarts
  fast even when ExecStartPre runs logrotate -f.

- Drop the synchronous gzip ExecStartPre loops from each unit. The
  glob (e.g. oneflow*.log) does not match files rotated with
  dateformat -%Y%m%d-%s, so the loop was ineffective, and running
  gzip without backgrounding blocked startup.

- Ship a logrotate config for oneform; the unit was pointing at
  /etc/logrotate.d/opennebula-form but no such file existed, so
  oneform.log was never rotated.

- src/hem/bin/onehem-server: use >> instead of > so restarts via the
  shell wrapper do not truncate the log, matching oneflow / onegate /
  oneform / fireedge wrappers (originally fixed in #6034).

Signed-off-by: Mikalai Kutouski <mkutouski@opennebula.io>
Co-authored-by: Jan Orel <jorel@opennebula.io>
2026-05-11 10:26:58 +02:00
Jan Orel b777defb67 M #-: Add own suse sudoers, due to iscsiadm in /sbin (#4121) 2026-03-23 17:06:15 +01:00
Ruben S. Montero 72a773dcd4 F #7311: LXC Disk Snapshot support
It supports live snapshot operations for LXC and the following storage
drivers:

- fs_lvm
- ceph
- shared (only raw disks)
- local (only raw disks)
2026-03-11 17:16:28 +01:00
Jan Orel f42bd9cd0a F #7450: support SUSE build (#4057)
- support for SUSE in install_gems, update locks
- don't install prometheus systemd services in install.sh
  we handle that in packages
- various minor issues: bashisms, sudoers paths
2026-02-12 09:24:59 +01:00
Neal 61905fc3d6 M #-: purefa and scsi changes (#3995) 2026-01-08 18:10:09 +01:00
Ruben S. Montero 6893ef40c8 F OpenNebula/one#7052: Add support for hotplug NIC devices
* Supports for regular (veth) and PCI NIC devices
* Live context updates (for configuring the NIC devices)
* Supports Linux bridges, OVS and OVS DPDK
* Initial support for disk hotplugging (disabled)

Author: Daniel Clavijo Coca <dclavijo@opennebula.io>
2025-12-02 16:38:13 +01:00
Ruben S. Montero 27554da00c M #-: Add missing arguments to sudoers 2025-11-15 09:42:55 +01:00
Ruben S. Montero ea69b4070d F #7282: Add dmidecode to sudoers
This is used by the onefabric script to map GPU PCI addresses to
NVSwitch partitions
2025-11-14 18:13:37 +01:00
bfccb59244 F OpenNebula/one#7361: Introduce OneForm (#3930)
Co-authored-by: Victor Palma <vpalma@opennebula.io>
Co-authored-by: Miguel E. Ruiz <mruiz@opennebula.io>
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2025-11-13 17:06:42 +01:00
Guillemo Ramos 685a21ef9d F # 5892: vTPM support (#3668)
This commit add support for vTPM devices:

* TPM devices can be enabled by adding TPM = [ MODEL = "..." attribute to the VM. Only model is supported

* vTPM data is saved (and restored) as part of the backup information for the VM.  The TPM data is saved as a tarball with the special name disk.tpm.0. This way backup drivers manage this as another disk. When restoring from a backup, the saved TPM state is stored into the new VM template using the attribute "TPM_STATE" (base64 encoded).

* A new sudo action has been added to the kvm driver to prepare the tpm folder

Note: Packages setup TPM permissions to oneadmin in libvirtd configuration files.
2025-09-16 14:00:43 +02:00
Josep SelgaandRuben S. Montero 78638dab05 F OpenNebula/one#6912: Thin LVM - incremental backups (#3734)
Signed-off-by: josepselga <jselga@opennebula.io>
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2025-07-24 13:55:13 +02:00
Neal ed3d6a3a91 F OpenNebula/one#6753: remove dd from sudoers (#3621)
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
2025-05-07 09:49:38 +02:00
NealandTino Vázquez 1811ae58df F OpenNebula/one#6753: update sudoers (#3611)
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
2025-04-30 17:50:01 +02:00
Jan OrelandTino Vázquez 1bdc73740c M #-: Add qemu-nbd for ovirtapi (#3604)
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
2025-04-29 16:29:23 +02:00
Ruben S. Montero cc79391fa6 M #-: Remove additional references to ebtables command 2025-03-26 10:55:30 +01:00
Jan Orel b8d453fa51 M #-: Remove ebtables virtual network driver
Also remove VCENTER enum in VirtualNetwork
2025-03-26 10:11:27 +01:00
Jan Orel c1bbbdab28 OpenNebula/one#6720: Remove vcenter, ruby Sunstone
This commits removes two components:

- vcenter driver and associated dependencies
- Ruby Sunstone
2025-03-25 13:13:27 +01:00
eda55567b1 F #1550: New Scheduler Framework for OpenNebula & DRS scheduler
This commits introduces a new framework for OpenNebula, it is based on
standard the OpenNebula middleware access driver (mad) model. Benefits
compared to the current implementation:

* Less overhead on API server and streamlined communications
* Ease integration with third party schedulers
* New "optimize" action to balance the workload of a cluster
* Embedded Plan Manager to apply optimization and deployment plans with
  custom parameters for the scheduling window
* Custom optimization policies per cluster

This commits introduces 2 schedulers:

* Rank scheduler based on the match-making algorithm present in 6.x
  series
* OpenNebula DRS an optimization algorithm based on an ILP solver for
  placement and cluster optimization

Also new API calls has been added for onecluster as well as the CLI
updates to expose them.

co-authored-by: MarioRobres <mrobres@opennebula.io>
co-authored-by: Pavel Czerny <pczerny@opennebula.io>
co-authored-by: Mirko Stojiljkovic <mstojiljkovic@opennebula.io>
co-authored-by: Valentyn Bohdan <vbohdan@opennebula.io>
2025-02-27 16:33:05 +01:00
Guillemo RamosandRuben S. Montero 696e69a957 F #6752: AutoNFS (#3331)
This feature auto mounts NFS volumes for datastores. The behavior can be controlled with the following template attributes:

- ANFS_ENABLE: YES/NO to enable the automatic NFS management
- ANFS_HOST: hostname/IP of the NFS server
- ANFS_PATH: of the NFS share for this datastore
- ANFS_OPTS: Comma separated options (fstab-like) used for mounting the NFS shares

The shared drivers also performs a "garbage-collector" like to unmount NFS volumes on the hypervisors when the datastores are deleted. This operation is performed in a "lazy" way, when VMs are deployed on the hypervisor.

* oneimage create: mount/umount DS on demand

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Move sh mount/umount logic to libfs.sh

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* oneimage delete: mount/umount DS on demand

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Limit NFS mount/umount from SH code to 30s

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* oneimage clone: mount/umount DS on demand

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* onevm deploy: mount DS on demand

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Temporal mount only when needed

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* onevm deploy: mount DS on demand (persisten)

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Linter

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* onevm deploy: umount unneeded DS

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Allow mount/umount/sed from sudoers

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Temporal mount: use NFS_AUTO_OPTS

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Do AutoNFS cleanup even during non-related ops

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Final refactor and improvements

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* ro values for Datastore object

* Wording for AutoNFS RO attributes

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* NFS_AUTO_ENABLE: change 'true' to 'yes'

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* sudoers: merge everythng into ONE_NFS

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Quote NFS_AUTO_OPTS

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Fix difference between sudoers specs

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Touch .automounted in AutoNFS mounts

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

* Update sudoers.rb

* Update rm

* Quote bash variable expansion

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>

---------

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2025-01-20 16:55:22 +01:00
Ruben S. Montero 146dfe6a09 F #6669: Support for VLAN filtering and QinQ
This commit adds the following features using the vlan_filter
capabilities of the Linux Bridge:

* 802.1Q driver, support for QinQ. This is not a full implementation
  compared to the vSwitch as there is no native support in the linux
  bridge:
    - VLAN_ID is the (outer/C-VLAN) tag implemented by tagging the
      PHY_DEV interface
    - CVLANS are the customer tags, any other VLAN is filtered out in
      the bridge

* bridge driver, support for vlan filtering (VLAN_TAGGED_ID) only the
  specified tags are allowed in the trunk.

Additionally this commits includes linting of some files.

(cherry picked from commit e379bd6684)
2024-12-11 11:38:22 +01:00
Michal Opala b1ef4332e5 F OpenNebula/one#6641: Add the "string-phone" transparent proxy (#3221)
This feature let's cloud admin to proxy VM connections to any service through the hypervisor. VMs uses a link local IP that is forwarded to a local proxy. This simplifies VM network requirements, e.g. to access gateway, vaults, configuration services etc...

Implementation:
- Use network namespaces to isolate VNET networking. ip netns command is executed through a wrapper to limit sudo access to commands.
- Add tproxy.rb app to manage a group of daemons on HV nodes.
- Use unix sockets for communication between proxy peers. "Inner" proxy runs in the netns without any network access. "Outer" proxy handles HV connections to services.
- Use OpenNebulaNetwork.conf + 'onehost sync -f' for configuration. Proxy can be defined per network.
2024-09-26 18:19:48 +02:00
Ruben S. Montero f194c1241f M #-: Remove tproxy logic 2024-07-23 13:29:48 +02:00
Michal Opala 360605628c F #6641: Implement OneGateProxy in VN drivers (#3142)
This commit implements a transparent proxy for OneGate service (as well as any other  TCP service)
* #6281: Disable legacy OneGateProxy
* Implement OneGateProxy in VN drivers
2024-07-19 11:55:49 +02:00
Ruben S. Montero 888cc87c68 F #6397: Minor adjustments to LXC marketplace
- Fix LXC linuxcontainers monitor action (error setting header)
- Update context packages URL reference to point to the new location
- Add lxc marketplace utility to sudoers file (removed in a previous
  commit)
- Remove CentOS from supported OS list in LXC marketplace
  (CentOS9_Stream includes some failures that need further debugging)
2024-07-09 13:43:35 +02:00
Ruben S. Montero 41f25a2518 F OpenNebula/one#6397: Removes Marketplaces, Hypervisor drivers and others
- Remove Firecracker driver
- Remove LXD driver
- Remove dockerhub, docker registry marketplaces
- Remove turnkey linux marketplace
- Remove docker machine
- Remove references to above components in Sunstone
- Change suffix to LXC to avoid confussion, remove turnkeylinux driver
2024-07-08 09:49:11 +02:00
Daniel Clavijo Coca e1b5bc6b44 M #-: Allow fireedge to bind to <1024 ports (#3045) 2024-05-06 16:34:24 +02:00
Jan Orel a32719139d M #-: Use /usr/bin/arping from iputils-arping (#2938)
There is also arping, providing /usr/sbin/arping but we don't use that one.
2024-02-12 12:16:33 +01:00
Jan Orel ca1ac6f8f0 B OpenNebula/one##5909: Switch to /usr/(s)bin deb (#2907) 2024-02-06 11:38:47 +01:00
mkutouski af6591e814 B #6282: Fix Incorrect configuration of systemd services (#2831) 2023-11-22 12:45:36 +01:00
vichansson d1c32620ab B #6241: Modified fireedge service file (#2651) 2023-06-26 18:05:48 +02:00
Ruben S. Montero 3c9bfecbd1 Revert "B #5909: Add /usr/sbin/ipset to sudoers (#2466)"
This reverts commit 8a0d892f39.
2023-01-30 13:49:59 +01:00
Jan Orel 8a0d892f39 B #5909: Add /usr/sbin/ipset to sudoers (#2466)
(cherry picked from commit f96338c0c8)
(cherry picked from commit 1cc6332536)
2023-01-30 11:43:28 +01:00
Jan Orel 8689d5d49b B #6034 Fix log rotation (#2415)
* Revert "F #5328: Update logrotate behavior to avoid long restarts (#2275)". This reverts commit 6b1127f180.

* B #5328: Don't wait for log compressing
* B #6034: Don't overwrite logs

While having already `copytruncate` in logroate we don't need to implement signaling and re-openning files.

* L #-: Linting
2022-12-12 11:50:54 +01:00
Jan Orel f002812c9f B #-: Cleanup ssh-agent socket before starting (#2413)
When (for whatever reason) opennebula-ssh-agent gets killed
it leaves existing socket and following start fails with

opennebula-ssh-agent[2333]: unix_listener: cannot bind to path /var/run/one/ssh-agent.sock: Address already in use
2022-12-09 16:22:11 +01:00
Michal Opala 0d5f9280a8 F #5973: Add OneGate proxy service (#2281)
* Update install_gems (async.io, etc, rb-inotify)
    - make install_gems script more verbose
    - slightly refactor/simplify update_locks script
    - add async.io, etc and rb-inotify gems
    - update gem locks for: AlmaLinux8/9, CentOS8
    - update gem locks for: Debian10/11, Ubuntu1804/2004/2204

* onegate-proxy:
    - ruby code and default config (169.254.16.9 to avoid conflicts)
    - install.sh script
    - logrotate and systemd onegate-proxy configs
    - onecfg configs
2022-11-14 20:48:30 +01:00
onenhansen 6b1127f180 F #5328: Update logrotate behavior to avoid long restarts (#2275) 2022-09-12 18:57:07 +02:00
Alejandro Huertas Herrero 307a6bb153 B #5189: fix typo (#2160) 2022-06-17 11:48:25 +02:00
Alejandro Huertas Herrero c37f2105bd B #5189: remove left lock file (#2159) 2022-06-16 18:57:07 +02:00
Alejandro Huertas 654990e0ea F #1149: add systemd units SyslogIdentifier 2022-05-09 13:42:50 +02:00
Alejandro Huertas Herrero df31718a5c F #5351: fix minor bug with vgpu path (#1906) 2022-04-05 15:15:45 +02:00