IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* Remove vm_import table from DB
* Remove imported vms actions
* Fix fsck for image and network
* onedb fsck fix running_vms only for non-backup images
* M #-: Replace raw pointers with references/smart pointers.
- Change PoolSQL::allocate method's signature to accept reference instead of pointer and fix all method calls.
- Remove some of the error-handling goto, to be able initialize some variables during declaration.
Signed-off-by: Valentyn Bohdan <vbohdan@opennebula.io>
Implementation overview:
- Incremental points are saved as dedicated rbd snapshots under the
"one_backup_<increment_id>" namespace. This snapshots are used to
generate delta files in rbdiff format.
- The rbdiff formats are stored in the backup server to restore the rbd volumes.
- The restore process is performed directly on the Ceph cluster
importing the base image (first full backup in the chain, rbd import)
and then applying the increments (rbd import-diff) up to the target
increment.
- Two new pseudo-protocols has been implemented to adopt the restore
pattern above (restic+rbd, rsync+rbd). This protocols bundle of the
rbdiff files in a tarball for transfer from the backup server. Note:
reconstruct process uses the Ceph BRIDGE_LIST and not the backup
server (as opposed to qcow2 backups)
Other bug fixes
- This commit also fixes#6741, resetting the backup chain after a
restore
- The original ceph drivers do not receive the full action information,
this now has been fixed by including VM information in the STDIN string sent
to the driver.
Compatibility note.
- backup actions should return now the backup format used raw, rbd, ...
If not provided oned (6.10.x) will use raw as a default to accommodate any
third party driver implementation. It is recommended to include this
third argument.
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
Co-authored-by: Guillermo Ramos <gramos@opennebula.io>
- oned load only last 2 history records (not the full list)
- Dump all history records only if needed in VirtualMachine::to_xml.
- Dump conforms XML schecam and removes VM template from history records.
Speed up of onevm show command:
- for small SQLite DB is for VM with 500 histories: 130 ms down to 5 ms
- for big MySQL DB VM with 687 histories: 1000 ms down to 200 ms
* Cleanup oned in case of initialization error
* Fix monitoring after onemonitord restart. The code includes a "hook" point in case a driver is re-started so custom code can be executed. InformationManager sends the list of hosts and raft status in this case.
* B #5801: Update error msg, in case of duplicated drivers
* Fix body_json for history record
* Update the body_json on every VM update to keep the data synced with the xml body
* Remove few duplicated VM updates
* Refactor release vnc port
* Fix VNC port for recover --recreate in stopped state
* Improve error messages
* Update recover --recreate description
(cherry picked from commit 9ed1fba8b95c1ea5d3984f136e638b973577ad69)
The Template::remove could crash if user assign Single value to attribute, which is expected to be a Vector, e.g. SCHED_ACTION, PCI, ...
Other minor changes:
* refactor the 'set' method - no need to call private _set
* Simplify some callers of the Template::remove method
This commit implements the in-place restore of VM backups. Selected VM disks will
be replaced with the specified backup:
* A new API call has been added to the XML-RPC API (`one.vm.restore`) with
the following arguments:
- VM ID to be restored, needs to be in **poweroff** state
- IMAGE ID of the backup to restore
- INCREMENT ID, only for incremental backups, the increment to use
(defults to -1 to use the last increment available)
- DISK ID of the disk to restore (defaults to -1 to restore all VM
disks)
* Datastore drivers needs to implemente a new operation `ls`. This new
operation takes the VM, image information of the backup and datastore
information and returns the restore URL for the disks in the backup.
* This commit includes the implementation for qcow2 and ssh drivers,
ceph will be implemented in a separated PR. The new driver action is
`restore host:vm_dir vm_id img_id inc_id disk_id`
* The restore operation is performed in a new state `PROLOG_RESTORE`
rendered as `RESTORE` and `rest` in short form. State in in RSuntone.
TODO:
- Remove any existing VM snapshot (system/disk) in the VM. Note that
snapshots are not included in a backup.
- Ceph drivers
- JAVA, GO Lang API bindings
- Sunstone interface, new state and new operation. Review new state in
RSuntone.
co-authored-by: Pavel Czerny <pczerny@opennebula.io>
When a disk with snapshots is resized and a subsequent revert operation
is performed, the following actions are now done:
* DISK/SIZE is updated to reflect the active snapshot size
* Quotas are updated to account the space freed after the resize
operation
(cherry picked from commit 178142105dea30c7deffd1842d0f0ad23d7dc93b)
(cherry picked from commit d2aaf2c8823d4172b1be673f959c4c922266534f)
If q35 machine type is detected the slot of the pci device is set to 0
and the bus to pci_id + 1.
Q35 models uses pcie-root-ports to attach PCI devices. Each PCI port is
selected by the bus parameter of the PCI address and it that does not accept a
slot number greater than 0.
Example:
A VM with 2 X710 VFs is defined OpenNebula as:
PCI=[
ADDRESS="0000:44:0a:0",
BUS="44",
CLASS="0200",
DEVICE="154c",
DOMAIN="0000",
FUNCTION="0",
NUMA_NODE="0",
PCI_ID="0",
SHORT_ADDRESS="44:0a.0",
SLOT="0a",
VENDOR="8086",
VM_ADDRESS="01:00.0",
VM_BUS="0x01",
VM_DOMAIN="0x0000",
VM_FUNCTION="0",
VM_SLOT="0000" ]
PCI=[
ADDRESS="0000:44:0a:1",
BUS="44",
CLASS="0200",
DEVICE="154c",
DOMAIN="0000",
FUNCTION="1",
NUMA_NODE="0",
PCI_ID="1",
SHORT_ADDRESS="44:0a.1",
SLOT="0a",
VENDOR="8086",
VM_ADDRESS="02:00.0",
VM_BUS="0x02",
VM_DOMAIN="0x0000",
VM_FUNCTION="0",
VM_SLOT="0000" ]
Each PCI VFs is attached to different pcie-root-port, selected with the
VM_BUS parameter:
00:02.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:02.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
The PCI topology is:
-[0000:00]-+-00.0 Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
+-01.0 Cirrus Logic GD 5446
+-02.0-[01]----00.0 Intel Corporation Ethernet Virtual Function 700 Series
+-02.1-[02]----00.0 Intel Corporation Ethernet Virtual Function 700 Series
+-02.2-[03-04]----00.0-[04]--
+-02.3-[05]----00.0 Red Hat, Inc. Virtio network device
+-02.4-[06]----00.0 Red Hat, Inc. Virtio SCSI
+-02.5-[07]----00.0 Red Hat, Inc. QEMU XHCI Host Controller
+-02.6-[08]----00.0 Red Hat, Inc. Virtio console
+-02.7-[09]----00.0 Red Hat, Inc. Virtio memory balloon
+-03.0-[0a]--
+-03.1-[0b]--
+-03.2-[0c]--
+-03.3-[0d]--
+-03.4-[0e]--
+-03.5-[0f]--
+-03.6-[10]--
+-03.7-[11]--
+-1f.0 Intel Corporation 82801IB (ICH9) LPC Interface Controller
+-1f.2 Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode]
\-1f.3 Intel Corporation 82801I (ICH9 Family) SMBus Controller
* PCI (de)attach go and java api
* Remove unused VirtualMachinePCI.h
* Use vm_authorization method to check Request authorization
* Fix typos
* L #-: C++ linting + onevm
* Adds 2 new API calls one.vm.attachpci and one.vm.detachpci
* The operation is only for POWEROFF VMs
* Adds 2 new actions to register the event in the VM history pci-detach/pci-attach
* Ruby OCA bindings
* onevm cli commands
TODO:
- JAVA and GO bindings
- Sunstone implementation
(cherry picked from commit 5c4331a4dd2f778556583961a40a4d7c68c97fcd)
- Generic quotas are defined and read from oned.conf (QUOTA_VM_ATTRIBUTE)
- Generic quotas react to the running mode (i.e. account only when the VM is
running). For each quota oned also adds a RUNNIN_* metric
- one.system.config API call has been updated so every user can read
quota configuration:
. Sensitive information is hidden (***)
. Oneadmin group has no longer access to sensitive information
through the API
- CLI has been updated to render generic quotas
- onedb fsck fixes generic quotas reading the configuration from
oned.conf
Other changes in this PR:
- Refactor Quota metrics to use std::vector instead of C array
Squashed commit of the following:
- New methods to Template and Attribute classes to render hidden
attributes as "***"
- Update Quota calls to not include unneeded quotas
co-authored-by:Ruben S. Montero <rsmontero@opennebula.org>
The new attribute does not allocate extra IPs on NICs with FLOATING_IP =
yes and FLOATING_ONLY = yes. The NIC will only containg a random MAC
address and VROUTER_IP/MAC.
This commit also checks that network mode auto is not used for NIC of a
VROUTER
(cherry picked from commit 18c781607428733cce55b3b42813f2fdc7d8004f)
* Remove useless default values from VM quotas, adapt chown and chgrp to it
* Fix VM transition from poweroff, stopped, suspended, undeployed to done when quotas are tmp exceeded
* Fix VM transition from poweroff to undeployed
* Fix VM transition from suspended to stopped
(cherry picked from commit 1e25904148a1900d5355963ee3c10dc2a037c883)
- New attribute VIDEO, that includes
- TYPE: Custom video device (none, vga, cirrus, virtio)
 - IOMMU: Enable IOMMU for the video device
 - ATS: Enable ATS (Address Translation Services) for the video device
 - VRAM: VRAM allocated to the video device (Megabytes)
 - RESOLUTION: Video resolution, in format like: 1280x720 or 1920x1080
- Support for onevm CLI command
- Updated VM xsd file.
* Set priority on Backup Job create
* Fix a bug when running backup jobs in sequential mode
* Change the update semantics to support replace mode
* Update Ruby, Golang and Java API accordingly
* F #6063: Adress PR comments
The connection to an external scheduler module is configured in sched.conf:
EXTERNAL_SCHEDULER = [
SERVER = "http://localhost:4567",
PROXY = "",
TIMEOUT = 10
]
The API post on '/' the list of VMs, their pre-selected list of
candidate hosts based on REQUIREMENTS along with the VM information
(CAPACITY, TEMPLATE and USER_TEMPLATE).
Example:
{
"VMS": [
{
"CAPACITY": {
"CPU": 1.5,
"DISK_SIZE": 1024,
"MEMORY": 131072
},
"HOST_IDS": [
3,
4,
5
],
"ID": 32,
"STATE": "PENDING",
"TEMPLATE": {
"AUTOMATIC_DS_REQUIREMENTS": "(\"CLUSTERS/ID\" @> 0)",
"AUTOMATIC_NIC_REQUIREMENTS": "(\"CLUSTERS/ID\" @> 0)",
"AUTOMATIC_REQUIREMENTS": "(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED)",
"CPU": "1.5",
"MEMORY": "128",
...
},
"USER_TEMPLATE": {}
},
{
"CAPACITY": {
"CPU": 1.5,
"DISK_SIZE": 1024,
"MEMORY": 131072
},
"HOST_IDS": [
3,
4,
5
],
"ID": 33,
"STATE": "PENDING",
"TEMPLATE": {
...
},
"USER_TEMPLATE": {}
}
]
}
The scheduler needs to respond to this post action with a simple list of
the allocation for each VM:
{
"VMS": [
{
"ID": 32,
"HOST_ID": 2
},
{
"ID": 33,
"HOST_ID": 0
}
]
}
This commits vendorize Vendorize nlohmann-json (MIT license)