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
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.
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)
- 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>
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>
- 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
* 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>
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.
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>
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>
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)
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.
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
- 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)
* 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
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