This commits adds 2 monitor parameters to PCI devices:
* IFNAME. Obtained from predefined mapping as comments (with format # <PCI_ADDRESS> <- IFNAME, eg #0000:65:00.0 <- eth0) in udev file '/etc/udev/rules.d/99-rename.rules'. If not defined the net folder of the pci device is used (e.g. ls /sys/bus/pci/devices/0000:00:14.3/net).
* PCI_ROLE. To set the type of pci device, 'vf' = virtual function, 'pf' = physical function and '-' = not a network device.
Add PCI_ROLE={pf,vf,-} to PCI attributes
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
* Refactor extract_pci_interfaces method for clarity
* Update NET_NAMES_CACHE_DIR path to /var/tmp
Change NET_NAMES_CACHE_DIR to a persistent location.
---------
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
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>
Handle missing or empty PROBES_PERIOD entries in monitord-client by falling
back to the expected defaults. Also default empty SYNC_STATE_VM values in KVM
and LXC status probes to avoid 0 sync interval.
Follow-up to https://github.com/OpenNebula/one-ee/pull/4176. After that PR, other failures started
appearing with (full) live backups, because temporal snapshots were not being cleaned up.
The reason is not fully clear to me but looks like the second command returned by `backup_disks_sh`
(Save TPM state, via ssh), although running correctly, was returning a non-zero code and thus the
third command (Cleanup snapshots) was not being executed. This commit fixes that by executing the whole
script in the bridge and removing the self-SSH in the second command.
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
Supersedes #4158 (this one includes a fix for multidisk VMs).
Code is heavily inspired by the example provided by the OP (cited as Co-authored-by, not sure if this is the best way to provide attribution), but with some changes:
* MONITOR_VM_DISKS is taken into account. In my testing it works just fine (for SYSTEM ds; it's undefined for IMAGE ds).
* BRIDGE_LIST branches are not needed. It is a mandatory attribute in Ceph datastores.
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
Add load_opennebula_paths stub to the CLI gem and include the missing
opennebula/lib/ files in the OCA gem so both gems work when installed
standalone via RubyGems.
Code is heavily inspired by the example provided by the OP (cited as Co-authored-by, not sure if this is the best way to provide attribution), but with some changes:
- MONITOR_VM_DISKS is taken into account. In my testing it works just fine (for SYSTEM ds; it's undefined for IMAGE ds).
- BRIDGE_LIST branches are not needed. It is a mandatory attribute in Ceph datastores.
Co-authored-by: nachowork90
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
OpenNebula Document Server (ODS) is a lightweight Sinatra-based server that
provides a foundation for building API servers within the OpenNebula ecosystem
which work with Documents. It can be used as a base class for custom services,
making it easier to maintain consistency across different OpenNebula
servers.
Features
========
- Provides a configurable base server class that can be inherited.
- Centralized logging setup with `LogConfig`.
- Supports modular route registration via `AppRoutes`.
- Easy configuration through `ConfigLoader`.
- Preconfigured error handling and exception management.
Add support for per-VM migration flags (--auto-converge and --compressed)
controlled by VM template attributes:
- MIGRATE_AUTO_CONVERGE: Initial CPU throttling rate/increment (ranges: 0-100).
Format: <initial>[,<increment>]
- MIGRATE_COMPRESSED: Enable migration compression (YES/NO). Default: NO
This commit also adds a FEATURES parser and use it during VM creation and updateconf.
The parser normalizes boolean FEATURES values, validates GIC and MIGRATE_AUTO_CONVERG.
Since FEATURES are normalized in oned, the commit removes some redundant checks.
updateconf allow updates GIC, RAS, MIGRATE_* options
See also https://libvirt.org/manpages/virsh.html#migrate
Author: Guillermo Ramos <gramos@opennebula.io>
co-authored-by: Guillermo Ramos <gramos@opennebula.io>
co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>