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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
- 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 18c7816074)
* 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 1e25904148)
- 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)
* Schedule Action Manager executes only on RAFT leader in HA configurations.
* Relative time for Scheduled Action Backup Jobs returns error.
* Store Backup Job ID to VM and associated backup Image.
* VM can be only in one Backup Job at a time.
* Deny single Backup if the VM is already part of BackupJob to prevent
inconsistent backup states.
Other fixes:
- Fix crash on scheduled backup for VM in pending state
- Fix error messages for Scheduled Actions
- Remove SCHED_ACTION from Backup Job template on update
co-authored-by: Pavel Czerný <pczerny@opennebula.io>
- Add suport for delete snapshots in the middle of the chain in qcow2
(ALLOW_ORPHANS=NO). Example, snapshot 2 below:
0 <- 1 <- 2 <- 3
- It supports removing the last snapshot and active (blockpull) and
first one (snapshot 0). The first snapshot cannot be deleted in
persistent images because of the underlying link setting.
- Snapshots are deleted by blockcommit. For example to delete 2, 3 is
committed into 2:
0 <- 1 <- 2: (2+3)
A new file 3.current is created in the filesystem to look for the
actual file name supporting snapshot 3.
- qcow2/shared operations snap_delete, snap_revert and cpds
(disk-saveas) has been updated to react to the .current files
- The kvm/deploy action has been updated to resolve links in source file
attributes. This is needed so the <backingStore> of the libvirt domain
does not contain the sysmlinks that changes on the revert/create
operations.
- The kvm/migrate action also includes a minor modification to resolv
the VM disk
- Snapshots with more than 1 child (or their relatives) cannot be deleted to not
break backing chains.
- It has been found that the snap-delete operation in suspend state is
insecure as the guest caches may not be updated accordingly. The
operation is now not allowed in this state.
- The associated state has been removed from oned. It needs to be
removed in CLI/Sunstone and APIs
- The changes are for VM disk-snapshots. A similar update can be made
for images in the datastore/fs snap_delete action. This operation is
not implemented in this commit.
Note: Output of xmllint may or may not include new lines when multiple matches
of an xpath expression occurs. Parsing of xmllint output adds additional new lines
to deal with different versions.
Includes the following changes:
- xml-schema for Backup Job and Scheduled Actions
- GO, Java api
- Deprecate onevm update-chart, delete-chart
* The commands are replaced by sched-update and sched-delete
* Refactor method deprecate_command, it's still possible to run the
command
* Delete 'shutdown' and 'delete' commands deprecated years ago
* Fix --verbose option for sched-update and sched-delete
- Re-implementation of scheduled actions, now are managed and executed
by oned
- Backup Job objects, API, and CLI commands
* Add Sched actions and sg (de)attach to VM_*_OPERATION
* Add Backup cancel action
* For consistency add poweroff migrate, alias (de)attach and nic update to set_auth_ops
VM topology can be defined:
- To use a NUMA node and huge pages. Example:
TOPOLOGY = [ NODE_AFFINITY = 0, HUGEPAGE_SIZE = 2 ]
- To use huge pages without specifying the NUMA node. Example:
TOPOLOGY = [ HUGEPAGE_SIZE = 2 ]
In any case OpenNebula will:
- look (or check) for a NUMA node with enough free huge pages
- will pick the NUMA node with more free pages (if no NUMA node is specified)
- configure the VM with CPU affinity to the selected NUMA node
(cherry picked from commit 1b3b88ed4e)
* NODE_AFFINITY can be used to pin a VM to all the CPUs of a NUMA node.
The attribute is part of the TOPOLOGY definition.
* A default virtual topology is defined when no other is set. This
allows to set only the affinity:
TOPOLOGY = [ NODE_AFFINITY = 1 ]
* NODE_AFFINITY can only be set for not-pinned VMs to not conflict with
core allocations for pin VMs. VMs with NODE_AFFINITY set will be
allocated to regular hosts (i.e. PIN_POLICY = NONE)
(cherry picked from commit fc15d6ebc9)
Extending the BACKUP state may lead to unneed wait times to perform VM
management operations
Fixes reset of backup chains for poweroff state
(cherry picked from commit 377db9653e)
Some backup drivers may not allow delete (forget) operations while an
active backup is being performed. This commits fails the
one.image.delete API call in that case.
A new configuration attribute to describe the related driver behavior has been
added CONCURRENT_FORGET for DS_MAD_CONF.
(cherry picked from commit 940c1d7d63)
* Introduce support to follow KEEP_LAST for incremental backups.
- New increment_flatten action added for backup datastores.
- increment_flatten will consolidate KEEP_LAST increments into the
current first increment in the chain.
- increment_flatten MUST return the new chain (inc1:source1,...) and size
of the new first increment (FULL) in the chain.
* Downloader logic for restore has been extracted from downloader.sh to
reuse the increment flatten logic. A new command restic_downloader.rb
process restic:// pseudo-urls.
* Restore process uses two new attributes to customize the restore
process:
- NAME to be used as base name for images and VM Template
- INCREMENT_ID to restore disks from a given increment (not always the
last one)
* Common logic has been added to BackupImage class (backup.rb)
* Includes the following fixes:
- Fix when increment includes blocks larger than max qemu-io request size
- Fix IMAGE counter for quotas on backup images
- Fix rsync restore NO_IP / NO_NIC attributes
TODO:
* Mimic increment_flatten logic and restore images on the backup server
* Suntone restore options
co-authored-by:Michal Opala <mopala@opennebula.io>
Add support for block context CD's. System Datastore can include
CONTEXT_DISK_TYPE to specify the type (FILER or BLOCK) of the context
CD's
co-authored-by: Victor Palma
- Qemu will terminate VMs with system snapshots and checkpoints, example:
libvirtd[7446]: internal error: qemu unexpectedly closed the monitor: 2022-12-07T16:06:59.603678Z qemu-kvm-one: Device has active dirty bitmaps.
- Also disk snapshots may render inconsistent bitmaps, example:
'virsh --connect qemu:///system checkpoint-delete 45d76e5f-25fa-416a-97fd-1624380d5e02 one-191-0': error: Failed to delete checkpoint one-191-0 error: internal error: unable to execute QEMU command 'query-named-block-nodes': Bitmap '' doesn't satisfy the constraints Error preparing disk files
This commits prevents snapshot operations when increment backups are configured, and vice versa.