Commit Graph
1655 Commits
Author SHA1 Message Date
Daniel Clavijo Coca d18cdb107b F OpenNebula/one#6365: Improve oneflow listing commands CLI (#2870)
(cherry picked from commit 9d5322fe1d)
2023-12-12 16:10:08 +01:00
Daniel Clavijo Coca b38f870ba7 B OpenNebula/one#6414: Allow VIRTIO_BLK_QUEUES on one.vm.updateconf (#2852)
(cherry picked from commit fe545803c9)
2023-12-04 12:12:45 +01:00
Tino Vázquez 2fb9b889da L #-: Lint for rubocop 1.58.0
(cherry picked from commit 7516ed7f0a)
2023-12-04 10:41:44 +01:00
Tino Vázquez a6298a5552 Revert "L #-: Linting for rubocop 1.58.0"
This reverts commit 81b8f7c752.
2023-12-04 10:05:27 +01:00
Tino Vázquez 81b8f7c752 L #-: Linting for rubocop 1.58.0
(cherry picked from commit 76f1d1bba4)
2023-12-02 13:22:55 +01:00
Daniel Clavijo Coca 2cc302db4b M #-: Remove offline resize limitation from CLI (#2843)
(cherry picked from commit ec64ac4457)
2023-11-28 16:24:28 +01:00
Daniel Clavijo Coca 611fe5f363 F OpenNebula/one#6059: Added QoL features for backup management (#2837)
using the CLI
2023-11-28 16:19:44 +01:00
Pavel Czerný eac404a950 B #6388: Fix CLI output after deleting all disk snapshots (#2814)
(cherry picked from commit da5e716bba)
2023-11-15 13:42:28 +01:00
Ruben S. Montero 803d39b8e2 F #6333: Snapshots for incremental backup mode
- Defines a new a attribute "INCREMENT_MODE" that can be "SNAPSHOT" or
     "CBT"

- SNAPSHOT mode: takes a disk snapshot (virsh snapshot-create-as or
  qemu-img). The current snapshot is saved in the backup store, and
  committed to the base disk image.

  The backup_qcow2.rb util adapt to different VM folder layout for SSH,
  shared, persistent, non persistent disks.

- Lint vxlan.rb

- Update onevm and XSD schema to reflect the new backup attribute

(cherry picked from commit ea1d5183ea)
2023-11-10 20:24:18 +01:00
mkutouski 28622e08cb M #-: oneflow delete --force analog (#2784)
An information on how to force oneflow service removal added

(cherry picked from commit 403f780497)
2023-10-23 14:39:09 +02:00
Daniel Clavijo Coca 137d0aa5ec F OpenNebula/one#6242: prioritize file read (#2779)
(cherry picked from commit 7c91082e33)
2023-10-23 12:20:08 +02:00
Neal Hansen c1a0e5bfc5 F OpenNebula/one#6286: Add support for VIDEO devices in KVM
- 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.
2023-09-20 20:00:10 +02:00
Pavel Czerný e427a29a14 M #-: Add require 'active_support' (#2738)
Without the require, commands with --json or --yaml flags fails for
ActiveSupport version 7.0+
2023-09-20 13:34:23 +02:00
Pavel Czerný ac49ab6d30 F #6227: New API for VMGroup roles
* New API for VMGroup roles: add, del, update
* Go and Java api for VM Group roles
2023-09-14 15:36:26 +02:00
Daniel Clavijo Coca 6de9e4e8bb F OpenNebula/one#6242: stdin for update methods (#2717) 2023-09-07 19:14:03 +02:00
Pavel Czerný 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
Pavel Czerný 501d855e98 F #6063: Update Backup Job CLI description (#2678) 2023-07-26 16:42:11 +02:00
Daniel Clavijo Coca 7b951d3cc5 F OpenNebula/one#6242: Add bash symbols note to CLI help (#2662) 2023-07-10 13:29:13 +02:00
Daniel Clavijo Coca 1804583ece F OpenNebula/one#6242: Allow templates via STDIN on CLI (#2660) 2023-07-07 10:21:38 +02:00
Ruben S. Montero 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
Pavel Czerný ffc0f8ecb1 F OpenNebula/one#6006: Fix typo in oneprovision (#2653)
(cherry picked from commit 7e69e4e047)
2023-06-28 17:41:46 +02:00
Daniel Clavijo Coca a2db634569 F OpenNebula/one#6006: Add CLI yamls for listing commands (#2643)
(cherry picked from commit 1a98b9b409)
2023-06-28 17:40:35 +02:00
Daniel Clavijo Coca 378ffcd47a B OpenNebula/one#6246: Autocorrect only deprecated methods (#2654) 2023-06-27 18:16:02 +02:00
Pavel Czerný 868828464c M #-: Fix return code if sched-action add fails (#2641) 2023-06-21 09:33:35 +02:00
Victor Palma 15c4626313 F #5591: Add CLI support for custom role attrs (#2579)
(cherry picked from commit 6b11d98f3f)
2023-05-12 13:52:01 +02:00
Ruben S. Montero a9da75db0e F #6030: Cancel backup operation
Author: Pavel Czerny <pczerny@opennebula.systems>
Author: Michal Opala <mopala@opennebula.io>
(cherry picked from commit f12c365d3e)
2023-03-16 13:11:27 +01:00
Daniel Clavijo Coca 820948be4c M #-: Add -R short option for recursive operations (#2555)
(cherry picked from commit 19c6b7c5ef)
2023-03-09 17:48:19 +01:00
Ruben S. Montero 2ec40c2b72 Revert "F #5591: Custom role attributes in oneflow added (#2525)"
This reverts commit d6ec6fad07.

(cherry picked from commit 9bf063b1a2)
2023-02-28 12:28:17 +01:00
Victor Palma f66ab7a8c2 F #5591: Custom role attributes in oneflow added (#2525)
(cherry picked from commit d6ec6fad07)
2023-02-27 10:30:27 +01:00
Ruben S. Montero f0c40913c6 F #6029: Force to re-use current datastore ID
When doing incremental backups it MUST reuse the current datastore ID.
This commits forces this setting ignoring the API parameter in this case.

(cherry picked from commit 01c490a36d)
2023-02-22 11:48:09 +01:00
Jan Orel b82ca031a7 Revert "F #5591: Custom role attributes in oneflow added (#2465)" (#2491)
This reverts commit 8aae36824d.
2023-02-09 10:58:02 +01:00
Tino Vázquez fae34eee26 L #-: Change percentage for brackets
in ruby word array definitions

(cherry picked from commit 27a97b4ea6)
(cherry picked from commit f0d462649d)
2023-02-07 13:28:47 +01:00
Ruben S. MonteroandMichal Opala 8cb3a360b8 F #6029, #6074: Retention and restore opetions for incremental backups
* 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>
2023-02-07 13:19:03 +01:00
Victor Palma 8aae36824d F #5591: Custom role attributes in oneflow added (#2465)
Custom attributes have been added at the role level.
In this way, roles can be individually customized during instantiation.
Added parameters:
- custom_attrs: contains user-defined custom attributes.
- custom_attrs_values: contains the values of the custom_attrs.
  In case of overlapping role and service level attributes, role level attributes will take precedence.

Example:
roles: [
    {
        "name": "role_1",
        ...
        "custom_attrs": {
            "MEMORY": "M|range|memory (mb)|100..500|200",
            "DISK_SIZE": "M|range|disk size (mb)|100..500|250"
        }
    }
]

In order to be used from CLI, the vm_template_contents in the service template must be filled manually.

(cherry picked from commit 90aac4b5f3)
2023-02-07 07:48:31 +01:00
Tino Vázquez da57aa1349 L #-: Deprecate File.exists? 2023-01-31 13:45:40 +01:00
Pavel Czerný 6421160a68 B #5913: Check if CLI *.yaml exists (#2469)
(cherry picked from commit f0c01ca238)
2023-01-31 13:34:45 +01:00
Pavel Czerný 8f99e99236 B #6068: Fix authorization for onevm disk-resize (#2468)
Also fix error code for onevm create-chart

(cherry picked from commit 18a4796ea1)
2023-01-31 12:27:31 +01:00
Pavel CzernýandRuben S. Montero 0696693531 B #6027: Parse host NUMA monitoring (#2440)
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2023-01-09 18:29:09 +01:00
Tino Vázquez 3376afdaf0 M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
Tino Vázquez abeccc507f L #-: YodaStyle new cop compliance 2023-01-05 13:56:38 +01:00
Jan OrelandPavel Czerný a7fd43d9f5 B #5676: Create LDAP user without password (#2399)
* Create LDAP user without password
* Update oneuser CLI tool
* Update opennebula_configuration.xsd

Co-authored-by: Pavel Czerný <pczerny@opennebula.io>
2022-12-07 10:03:15 +01:00
Pavel Czerný fd883f595a F #5925: Improve image delete operation (#2384) 2022-11-28 11:15:43 +01:00
Pavel Czerný f77b9365ee M #-: Network update fix CLI output, ignore alias and pci (#2376)
* Network Update CLI output
* Network update ignores alias and pci NIC
2022-11-24 10:19:39 +01:00
Pavel Czerný 2bda3d2c81 M #-: Fix minor issues in backups (#2366)
* Handle backup append flag for updateconf
* Fix backup attributes for updateconf
2022-11-23 10:00:24 +01:00
865908de1c F #5989: Live update of Virtual Network attributes
co-authored-by: Pavel Czerný <pczerny@opennebula.systems>
co-authored-by: Frederick Borges <fborges@opennebula.io>
co-authored-by: Christian González <cgonzalez@opennebula.io>

* VNET updates trigger a driver action on running VMs with NICs in the
  network.

* VNET includes a sets with VM status: updated, outdated, error and
  updating. With VMs in each state.

* VNET flags error situations with a new state UPDATE_FAILURE.

* The same procedure is applied when an AR is updated (only VMs in that
  AR are updated).

* A new options in the one.vn.recover API call enable to recover or
  retry this VM update operations.

* The following attributes can be live-updated per VNET driver:
    - PHYDEV (novlan, vlan, ovs driver)
    - MTU (vlan, ovs driver)
    - VLAN_ID (vlan, ovs driver)
    - QINQ_TYPE (ovs driver)
    - CVLANS (ovs driver)
    - VLAN_TAGGED_ID (ovs driver)
    - OUTER_VLAN_ID (ovs driver)
    - INBOUND_AVG_BW (SG, ovs driver + KVM)
    - INBOUND_PEAK_BW (SG, ovs driver + KVM)
    - INBOUND_PEAK_KB (SG, ovs driver + KVM)
    - OUTBOUND_AVG_BW (SG, ovs driver + KVM)
    - OUTBOUND_PEAK_BW (SG, ovs driver + KVM)
    - OUTBOUND_PEAK_KB (SG, ovs driver + KVM)

* New API call one.vm.updatenic, allows to update individual NICs
  without the need of detach/attach (only QoS supported).

* Update operations for: 802.1Q, bridge, fw, ovswitch, ovswitch_vxlan
  and vxlan network drivers.

* VNET attributes (old values) stored in VNET_UPDATE to allow
  implementation of update operations. The attribute is removed after a
  successful update.

* Updates to CLI onevnet (--retry option) / onevm (nicupdate command)

* XSD files updated to reflect the new data model

* Ruby and JAVA bindings updated: new VNET state and recover option, new
  VM API call.

* Suntone and Fireedge implementation (lease status, recover option, new
  states)

TODO: Virtual Functions does not support this functionality

iii
2022-11-16 15:06:49 +01:00
Michal Opala 0d5f9280a8 F #5973: Add OneGate proxy service (#2281)
* Update install_gems (async.io, etc, rb-inotify)
    - make install_gems script more verbose
    - slightly refactor/simplify update_locks script
    - add async.io, etc and rb-inotify gems
    - update gem locks for: AlmaLinux8/9, CentOS8
    - update gem locks for: Debian10/11, Ubuntu1804/2004/2204

* onegate-proxy:
    - ruby code and default config (169.254.16.9 to avoid conflicts)
    - install.sh script
    - logrotate and systemd onegate-proxy configs
    - onecfg configs
2022-11-14 20:48:30 +01:00
Tino Vázquez 8ee6e973bb L #-: Linting for backup files 2022-11-07 12:41:06 +01:00
Ruben S. Montero 0a46e21129 F #5516: Incremental backups for qcow2 disk images
- Adds new configuration attribute MODE: FULL or INCREMENTAL for
  BACKUP_CONFIG. FULL backups uses a differen backup image.

- INCREMENTAL backup information is together with the backup image.
  Example:

      <BACKUP_INCREMENTS>
        <INCREMENT>
          <DATE><![CDATA[1667770552]]></DATE>
          <ID><![CDATA[0]]></ID>
          <PARENT_ID><![CDATA[-1]]></PARENT_ID>
          <SIZE><![CDATA[172]]></SIZE>
          <SOURCE><![CDATA[bb828060]]></SOURCE>
          <TYPE><![CDATA[FULL]]></TYPE>
        </INCREMENT>
        <INCREMENT>
          <DATE><![CDATA[1667770604]]></DATE>
          <ID><![CDATA[1]]></ID>
          <PARENT_ID><![CDATA[0]]></PARENT_ID>
          <SIZE><![CDATA[1]]></SIZE>
          <SOURCE><![CDATA[ca0de5f6]]></SOURCE>
          <TYPE><![CDATA[INCREMENT]]></TYPE>
        </INCREMENT>
        <INCREMENT>
          <DATE><![CDATA[1667770700]]></DATE>
          <ID><![CDATA[2]]></ID>
          <PARENT_ID><![CDATA[1]]></PARENT_ID>
          <SIZE><![CDATA[39]]></SIZE>
          <SOURCE><![CDATA[e9897d6a]]></SOURCE>
          <TYPE><![CDATA[INCREMENT]]></TYPE>
        </INCREMENT>
      </BACKUP_INCREMENTS>

    This information only appears on incremental backups

- Internal BACKUP_CONFIG data includes information about the current
  active backup and the last increment id.

- Backup operation includes a new parameter: reset. This "closes" the
  current active incremental chain and creates a new FULL backup.

- Backup drivers store backups with increment index (0 = FULL) e.g.
  disk.0.0.

- Incremental backups are only allowed for VMs using all disks in qcow2
  format.

- Backup configuration cannot be changed while doing a VM backup.

- Downloader strings includes backup chains <inc_id>:<backup_ref>,...

- Restic downloader  has been updated to support backup chains. Disk
  images are rebased across increments.
2022-11-06 22:54:36 +01:00
Pavel Czerný c8da8a2ce5 M #-: Fix parsing of scheduled time (#2332) 2022-11-02 10:26:06 +01:00
Tino Vázquez 2c3f629236 L #-: Adjust to new rubocop version 2022-10-21 12:34:22 +02:00