1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-08-21 05:49:26 +03:00
Commit Graph

20535 Commits

Author SHA1 Message Date
4673721a21 F #6311: GOCA - marketplace state
- Add state to Markeplace
- Add state Markeplace Appliance
- Add enable method for Marketplace
- Add tests and use gocheck

co-authored-by: Pavel Czerny <pczerny@opennebula.io>

Signed-off-by: Pierre Lafievre <pierre.lafievre@iguanesolutions.com>
2023-09-12 18:02:53 +02:00
4c1ab6efee F #6211: fix Datastore creation ignores cluster selection (#2721) 2023-09-11 18:33:32 +02:00
9b9f9195a0 M #-: Corrected action constants (#2720) 2023-09-11 17:25:23 +02:00
c5dcadfbc1 M #-: Terminate_hard action corrected (#2719) 2023-09-11 15:34:49 +02:00
a9275666ba B #6310: Don't deactivate NICs on NIC_ALIAS detach
When a NIC_ALIAS is detached the deactivate block is executed
incorrectly for some drivers. This can render in an unusable network for
the VM.

This commits includes also some linting
2023-09-08 13:04:43 +02:00
6de9e4e8bb F OpenNebula/one#6242: stdin for update methods (#2717) 2023-09-07 19:14:03 +02:00
d57ff44ff5 M #-: dummy driver enabled (#2677) (#2716) 2023-09-07 16:43:56 +02:00
c5392d08b8 F #6063: Update Backup Job fix (#2715)
* 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
2023-09-07 11:11:02 +02:00
44204ebf05 F OpenNebula/one#6121: Add users tab (#2707) 2023-09-06 19:30:01 +02:00
cbaab1e047 L #-: Exclude new JSON rb file from lintin 2023-09-06 19:06:13 +02:00
618062f0ea F #6063: BackupJobs tab for RSunstone (#2714)
Co-authored-by: Pavel Czerny <pczerny@opennebula.io>
2023-09-06 19:02:27 +02:00
c7f550fd2d M #-: Change the default emulator path
Now it points to the qemu-kvm-one script that adjust to each distro. The
qemu-kvm-one link is generated by the node-kvm packages.
2023-09-05 10:49:15 +02:00
2075b02cf4 F OpenNebula/one#6167: Add io_uring to IO Sunstone drop-down
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
2023-09-04 16:33:01 +02:00
2eb07ee1c1 F #6303: Support for VIRTIO_BLK_QUEUES in disk attach
Add support for VIRTIO_BLK_QUEUES when attaching a disk. "auto" keyword
can be used and set as default.
2023-09-04 13:09:34 +02:00
f5de29658f F #6303: Add SCSI controller and update names
- Always add a virtio-scsi controller to allow hotplug of scsi disks
- Change DISK/QUEUES to DISK/VIRTIO_BLK_QUEUES
- Default for all disk in the VM can be set in FEATURES/VIRTIO_BLK_QUEUES
- Defaults for all domains can be set in vmm_exec.conf
2023-09-04 11:52:57 +02:00
159275c833 F #6303: Fix addition of SCSI controller
Adds a SCSI controller to the VM (KVM) when a SCSI disk (target sd) is
present.

Note: < 6.6.x works becasue defaults to 1 SCSI virtio queue that adds
the controller
2023-09-03 14:50:49 +02:00
da3ce70341 F #6303: Automatic setting of IO queues
This commit adds support for the "auto" keywork for the
VIRTIO_SCSI_QUEUES attribute. The number of queues is set to the number
of virtual CPUs in this case.

Also a new DISK attribute, QUEUES has been added to the VM DISK
definition to set the numner of virt queues for virt-blk. This parameter
also supports the auto keyword to set it to the number of VCPUs.

These parameters can be set by default in vmm_exec_kvm.conf.
2023-09-02 01:53:20 +02:00
7a77dff659 F #1636: Add KVM_CPU_FEATURES to Virtual Machines
Add support to <feature> element for the virtual cpu (see [1]). It
includes:

* A new probe that gets the supported features of the hypervisor CPU
  using virsh capabilities.
* Generate AUTOMATIC_REQUIREMENTS if the CPU_MODEL/FEATURES is present.
  Note that a MODEL needs to be set for this to work (libvirt error otherwise is:
  "XML error: Non-empty feature list specified without CPU model...")

[1] https://libvirt.org/formatdomain.html#cpu-model-and-topology

Example
--------------------------------------------------------------------------------

* Template configuration:

CPU_MODEL = [
    MODEL    = "host-passthrough",
    FEATURES = "ss,vmx,tsc_adjust"
]

* Generated AUTOMATIC_REQUIREMENTS in the VM:

AUTOMATIC_REQUIREMENTS="(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED) & (KVM_CPU_FEATURES = \"*ss*\") & (KVM_CPU_FEATURES = \"*vmx*\") & (KVM_CPU_FEATURES = \"*tsc_adjust*\")"

* Generated deployment file:

<cpu mode='host-passthrough'>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='tsc_adjust'/>
</cpu>

* Information gathered by the probe:
...
MONITORING INFORMATION
ARCH="x86_64"
CGROUPS_VERSION="2"
...
KVM_CPU_FEATURES="ss,vmx,pdcm,osxsave,hypervisor,tsc_adjust,clflushopt,umip,md-clear,stibp,arch-capabilities,ssbd,xsaves,pdpe1gb,ibpb,ibrs,amd-stibp,amd-ssbd,rdctl-no,ibrs-all,skip-l1dfl-vmentry,mds-no,pschange-mc-no"
KVM_CPU_MODEL="Skylake-Client-noTSX-IBRS"
...

co-authored-by: Neal Hansen <nhansen@opennebula.io>
2023-09-01 14:10:30 +02:00
0f776c9b40 M #-; Adjust package-lock.json 2023-09-01 11:48:19 +02:00
366449a0c5 M #-: Dependencies checked & fixed
Signed-off-by: Victor Hansson <vhansson@opennebula.io>
(cherry picked from commit 0adbb9c49274dc965daf1b55a56854cf0189bd05)
2023-09-01 11:05:36 +02:00
23b0f3b165 F OpenNebula/one#6121: Added new multichart (#2703)
(cherry picked from commit 45b1bd00f5)
(cherry picked from commit 87a009f165)
2023-09-01 11:05:11 +02:00
89c6c4a01c F #6275: Test received host ID, log warning (#2709) 2023-08-31 16:04:50 +02:00
820e559042 F OpenNebula/one#5793: add check to wake up vm in pmsuspended state (#2696)
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
2023-08-31 15:49:19 +02:00
c14869eb84 F #6063: Include backup job id in Image URL
The new URL format is:

- restic://<datastore_id>/<bj_id>/<id>:<snapshot_id>,.../<file_name>
- rsync://<datastore_id>/<bj_id>/<id>:<snapshot_id>,.../<file_name>

bj_id can be empty

This commits also adapts some drivers to the new BACKUP format.
2023-08-31 13:04:02 +02:00
8ae7512350 B OpenNebula/one#6306: change SED variable initialization (#2711) 2023-08-31 11:32:23 +02:00
5e37e52e39 F #6063: Pass backup_job_id to drivers
This enables to use the same repo for all VMs in the same backup job,
for example to deduplicate all VMs in the backup job.

This commit changes the driver interface for the backup operation as now
the backup job id is passed:

BACKUP host:remote_dir DISK_ID:..:DISK_ID vm_uuid bj_id vm_id ds_id

When the backup job is not defined it will be '-'
2023-08-30 19:29:22 +02:00
addb5edc33 Revert "F OpenNebula/one#6121: Added new multichart (#2703)"
This reverts commit 87a009f165.
2023-08-30 14:30:02 +02:00
cde8501eab Revert "M #-: Update package-lock.json"
This reverts commit c5f426147e.
2023-08-30 14:29:54 +02:00
f5d83053e3 F #6275: Update sched.conf comments 2023-08-29 19:09:25 +02:00
c5f426147e M #-: Update package-lock.json 2023-08-29 18:47:35 +02:00
87a009f165 F OpenNebula/one#6121: Added new multichart (#2703)
(cherry picked from commit 45b1bd00f5)
2023-08-29 18:02:15 +02:00
dd7de98f0e M #-: Regen lockfile + move deps (#2708) 2023-08-29 17:58:19 +02:00
7927059d48 M #-: Fix VectorAttribute::to_json (#2367)
Co-authored-by: Pavel Czerny <pczerny@opennebula.systems>
2023-08-29 17:49:33 +02:00
40d62686ee F #6275: Remove TEMPLATE from VM information
{
  "CAPACITY": {
    "CPU": 1.5,
    "DISK_SIZE": 1024,
    "MEMORY": 131072
  },
  "HOST_IDS": [
    3,
    4,
    5
  ],
  "ID": 33,
  "STATE": "PENDING",
  "USER_TEMPLATE": {}
}

co-authored-by: Pavel Czerny <pczerny@opennebula.io>
2023-08-29 17:43:27 +02:00
dca50b2bb9 F #6275: External scheduler API
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)
2023-08-29 17:11:01 +02:00
ee8c6bd8be B #6297: Fix local characters for onedb (#2699)
* Fix local characters for onedb fsck
* Fix charset for onedb sqlite2mysql

(cherry picked from commit 0fc9f457f2)
2023-08-29 11:41:05 +02:00
8db501097a Revert "F OpenNebula/one#6121: Added new multichart (#2703)"
This reverts commit 45b1bd00f5.
2023-08-29 10:55:33 +02:00
776e9f3d9b M #-: Vendorize bower spice-html5 (#2706) 2023-08-28 11:23:53 +02:00
45b1bd00f5 F OpenNebula/one#6121: Added new multichart (#2703) 2023-08-25 12:10:40 +02:00
522b1327a0 F #6028: onevm nic-update supports PCI 2023-08-24 10:54:26 +02:00
d74ace5244 FIx segmentation fault in oned service when configured to cache mode.
Before :
```
        if (!event.empty())
        {
            hm->trigger_send_event(event);
        }
```

After:
```
     if (!nd.is_cache())
    {
        if (!event.empty())
        {
            hm->trigger_send_event(event);
        }
    }
```

When nebula is cache HookManager isn't initialize, therfore ```hm``` equals to null.

(cherry picked from commit 9e6d755d73)
2023-08-21 12:07:19 +02:00
53fd81bfa3 M #~: humanize data in datastores cloudview (#2700)
(cherry picked from commit 3e99e579e2f8b8198960933b1893df92c403bf36)
2023-08-21 10:40:01 +02:00
70f960d9fa F #6292: Remove check for disk snapshots in resize 2023-08-17 13:34:54 +02:00
1f4512433d L #-: Disabling cop for rubocop 1.56.0 2023-08-17 13:00:35 +02:00
80def3466d M #~: Fix ds quotas dashboard RSunstone(#2698)
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
2023-08-17 12:41:34 +02:00
bf5f139a37 M #~: add cache and discard in disk when instantiate a VM (#2693)
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
2023-08-09 21:16:12 +02:00
3893aa39d1 M #-: Update Backup Job xml schema 2023-08-08 09:42:05 +02:00
9d463a72f1 M #-: Add DISK_TYPE to xml-schema 2023-08-08 09:42:05 +02:00
1e42b638a9 F #6063: Improve Backup Job Operations
* 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>
2023-08-07 11:49:18 +02:00
373f32e54a L #-: bridge/update_nic 2023-08-07 10:37:40 +02:00