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

20501 Commits

Author SHA1 Message Date
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
c5d6ff1555 L #-: vf.rb
(cherry picked from commit 5cf34d426e2f037e811c178fa65a65c185de702b)
2023-08-07 10:36:21 +02:00
a24f3f8e6c M #-: Attach SR-IOV devices to the right PCI port (#2695)
SR-IOV devices were being attached to the first PCI port available and opennebula was rendering the port number incorrectly
2023-08-07 10:19:42 +02:00
d6895c4716 F #6028: Update operation for VF.
Attributes that can be updated through the network:
- VLAN_ID
- SPOOFCHK
- TRUST

* OpenNebula core changes add the previous attributes to VNET_UPDATE.
  And removes constraint on updating non-pci NICs

* VF class includes an update method equivalent to activate_vf. Common
  code has been moved to a separate function

* Drivers: 802.1Q, bridge, fw, and ovswitch calls update_vf function
2023-08-01 00:10:16 +02:00
00549961bc M #-: Enable backup tab for users (#2692) 2023-07-27 13:51:53 +02:00
d5909d5995 B OpenNebula/one#6288: Fix volatile BLOCK attach for lvm_fs_ssh
DISK_TYPE is added for volatile disks. This patch checks DISK_TYPE in
all cases. It removes TM name checks.

(cherry picked from commit 1e5a9ebba068fd6fb5925630d019cb879cdf6789)
2023-07-26 21:47:15 +02:00
07cb0f9b53 M #~: add DEV_PREFIX when instantiate a VM Template (#2690) 2023-07-26 18:10:12 +02:00
73a9b7931a M #-: Filter out duplicate PCI devices (#2688)
(cherry picked from commit b32418df0ae7b551193e9d32974af19bc3081946)
2023-07-26 17:30:27 +02:00
be38316f03 F OpenNebula/one#6212: include DISK_TYPE from TM_MAD_CONF definitions (#2683)
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
2023-07-26 17:15:59 +02:00
ae2a6b8cb8 F OpenNebula/one#6212: add DISK_TYPE to TM_MAD_CONF for lvm tms (#2684)
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
2023-07-26 16:43:59 +02:00
501d855e98 F #6063: Update Backup Job CLI description (#2678) 2023-07-26 16:42:11 +02:00
71bb9e3263 F #6063: Remove args from BJ Scheduled Action (#2681)
* Make VM scheduled backup backward compatible

Signed-off-by: Pavel Czerny <pczerny@opennebula.io>
2023-07-26 16:41:17 +02:00
e18d1b6d4f fixup! F OpenNebula/one#6265: Fix recovery_snap_create_live (#2659) (#2687) 2023-07-25 13:35:08 +02:00
1fa2c5c8fe M #-: clone.replia: fix when dir does not exists (#2686) 2023-07-24 17:53:15 +02:00
53c575029c F OpenNebula/one#6265: Fix recovery_snap_create_live (#2659)
Disk is not a symlik any more

+ don't delete rs_tmp if used
+ run blockcommit in trap
2023-07-24 09:49:22 +02:00
c3c29471ed M #: Enable backup nonadminusers and disable deploy (#2682) 2023-07-21 17:53:08 +02:00
08bb8f7684 L #-: Add quotes (#2680)
(cherry picked from commit e8167ea549)
2023-07-20 19:47:06 +02:00
5af31298e5 F OpenNebula/one#6265: Fix migrate for qcow2 (#2679)
mkdir disk.X.snap directories when creating
target qcow2 disks

(cherry picked from commit a7dd64eed1)
2023-07-20 19:41:38 +02:00
156cd04ba5 F OpenNebula/one#6265: Delete of snapshots in the middle of the chain
- 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.
2023-07-20 19:04:28 +02:00
1606a1c53e M #-: Corrected object path (#2675) 2023-07-18 14:28:49 +02:00
9732628b01 B OpenNebula/one#6129: Add disk on template (#2673)
with basic image attributes
2023-07-18 11:28:16 +02:00
1c356eef52 L #-: Fix for rubocop 1.54.2 2023-07-17 17:41:55 +02:00
2a49542539 M #-: Document OCA Service client (#2669) 2023-07-12 19:42:03 +02:00
f4cb72f24b F OpenNebula/one#6146: Conditionally render backup (#2668) 2023-07-12 18:53:16 +02:00
057cfd07a5 L #~: lint-fix missing proptypes (#2667) 2023-07-12 18:15:28 +02:00
a131bbfa93 F OpenNebula/one#6136: Unit size on images and templates (#2666) 2023-07-12 18:01:19 +02:00
f0756c0b4d L #-: Adjust linting for rubocop 1.54.1
(cherry picked from commit 93af7585376b10c7951cbb96d05de0c903a5ee41)
2023-07-12 11:57:20 +02:00
b06bd9a5ff F #6123: Add VDC tab to FireEdge Sunstone (#2661)
Co-authored-by: Frederick Borges <fborges@opennebula.io>
2023-07-12 11:22:28 +02:00
201d388601 F OpenNebula/one#6367: Add FORMAT to the ALLOW_ORPHANS values (#2664)
in oned.conf comments
2023-07-10 19:37:31 +02:00
7b951d3cc5 F OpenNebula/one#6242: Add bash symbols note to CLI help (#2662) 2023-07-10 13:29:13 +02:00
76653e2142 F OpenNebula/one#5637: Stepper configurable by prev. choices (#2663) 2023-07-10 10:36:49 +02:00
00e5419209 M #-: Enable live snapshots for qemu 2023-07-07 13:18:47 +02:00
1804583ece F OpenNebula/one#6242: Allow templates via STDIN on CLI (#2660) 2023-07-07 10:21:38 +02:00
6bbfbb03e4 F #6063: Backup Jobs for OpenNebula
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
2023-07-03 18:15:52 +02:00
90585e42cf F OpenNebula/one#6258: Fix Turnkey defaults (#2658) 2023-07-03 16:40:36 +02:00