8658 Commits

Author SHA1 Message Date
Bryan Lima
0535d9b5e1
ui: Add message upon network offering creation to warn user of VR creation (#6684)
This PR aims to improve the user experience upon creation of Network Offerings warning the user of the scenarios in which a VR is created. For this, the service offering field is always shown in the form and a warning message is displayed if the user's configuration does not require the creation of a VR. These scenarios include a network offering with guest type L2, and a with a guest type Shared or Isolated when none of the following services are enabled: (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat and/or PortForwarding). Finally, the message for the Isolated and Shared networks disappear when one of the aforementioned services are selected.
2022-10-09 15:21:41 +05:30
Rohit Yadav
9a381db956 Merge remote-tracking branch 'origin/4.17' 2022-10-08 12:21:04 +05:30
Peinthor Rene
ff961c9594
linstor: support QoS(IOPs) and small improvements (#6682)
This PR has 3 improvements for the Linstor primary storage driver:

- Create a separate jar of it and move all Linstor related classes into the correct project (similar to the storpool plugin)
- Add aux properties for Cloudstack volumes in Linstor to make it easier to identify them in Linstor
- Add support for IOPs settings with the Linstor storage plugin
2022-10-08 12:06:49 +05:30
Harikrishna
713a236843
UserData as first class resource (#6202)
This PR introduces a new feature to make userdata as a first class resource much like existing SSH keys.

Detailed feature specification document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Userdata+as+a+first+class+resource
2022-10-05 17:34:59 +05:30
Hoang Nguyen
6a0c9079ed
ui: fixes ui style on Edge (#6791)
Fixes #6787
2022-10-04 10:55:03 +05:30
Hoang Nguyen
b69292c376
ui: disable getResource in login page (#6788)
Fixes #6731
2022-10-04 10:53:39 +05:30
João Jandre
33bd08369b
Show name instead of description in the infocards and breadcrumbs (#6769)
Co-authored-by: João Paraquetti <joao@scclouds.com.br>
2022-09-29 15:22:02 +02:00
Rohit Yadav
7fa41ddfcc
README: update and refactor project README page (#6782)
- Refactor links, use https://
- Add link to UI/QA website for new users try out CloudStack via simulator
- Update screenshot photo

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-09-29 11:15:25 +02:00
João Jandre
8ab8fdc1db
Fix migrate volume permissions (#6224)
* changed when to show migrate volume button on the UI.

Co-authored-by: Joao <JoaoJandre@gitlab.com>
2022-09-27 10:26:07 +02:00
Marcus Sorensen
697e12f8f7
kvm: volume encryption feature (#6522)
This PR introduces a feature designed to allow CloudStack to manage a generic volume encryption setting. The encryption is handled transparently to the guest OS, and is intended to handle VM guest data encryption at rest and possibly over the wire, though the actual encryption implementation is up to the primary storage driver.

In some cases cloud customers may still prefer to maintain their own guest-level volume encryption, if they don't trust the cloud provider. However, for private cloud cases this greatly simplifies the guest OS experience in terms of running volume encryption for guests without the user having to manage keys, deal with key servers and guest booting being dependent on network connectivity to them (i.e. Tang), etc, especially in cases where users are attaching/detaching data disks and moving them between VMs occasionally.

The feature can be thought of as having two parts - the API/control plane (which includes scheduling aspects), and the storage driver implementation.

This initial PR adds the encryption setting to disk offerings and service offerings (for root volume), and implements encryption support for KVM SharedMountPoint, NFS, Local, and ScaleIO storage pools.

NOTE: While not required, operations can be significantly sped up by ensuring that hosts have the `rng-tools` package and service installed and running on the management server and hypervisors. For EL hosts the service is `rngd` and for Debian it is `rng-tools`. In particular, the use of SecureRandom for generating volume passphrases can be slow if there isn't a good source of entropy. This could affect testing and build environments, and otherwise would only affect users who actually use the encryption feature. If you find tests or volume creates blocking on encryption, check this first.

### Management Server

##### API

* createDiskOffering now has an 'encrypt' Boolean
* createServiceOffering now has an 'encryptroot' Boolean. The 'root' suffix is added here in case there is ever any other need to encrypt something related to the guest configuration, like the RAM of a VM.  This has been refactored to deal with the new separation of service offering from disk offering internally.
* listDiskOfferings shows encryption support on each offering, and has an encrypt boolean to choose to list only offerings that do or do not support encryption
* listServiceOfferings shows encryption support on each offering, and has an encrypt boolean to choose to list only offerings that do or do not support encryption
* listHosts now shows encryption support of each hypervisor host via `encryptionsupported`
* Volumes themselves don't show encryption on/off, rather the offering should be referenced. This follows the same pattern as other disk offering based settings such as the IOPS of the volume.

##### Volume functions

A decent effort has been made to ensure that the most common volume functions have either been cleanly supported or blocked. However, for the first release it is advised to mark this feature as *experimental*, as the code base is complex and there are certainly edge cases to be found.

Many of these features could eventually be supported over time, such as creating templates from encrypted volumes, but the effort and size of the change is already overwhelming.

Supported functions:
* Data Volume create
* VM root volume create
* VM root volume reinstall
* Offline volume snapshot/restore
* Migration of VM with storage (e.g. local storage VM migration)
* Resize volume
* Detach/attach volume

Blocked functions:
* Online volume snapshot
* VM snapshot w/memory
* Scheduled snapshots (would fail when VM is running)
* Disk offering migration to offerings that don't have matching encryption
* Creating template from encrypted volume
* Creating volume from encrypted volume
* Volume extraction (would we decrypt it first, or expose the key? Probably the former).

##### Primary Storage Support

For storage developers, adding encryption support involves:

1. Updating the `StoragePoolType` for your primary storage to advertise encryption support. This is used during allocation of storage to match storage types that support encryption to storage that supports it.

2. Implementing encryption feature when your `PrimaryDataStoreDriver` is called to perform volume lifecycle functions on volumes that are requesting encryption. You are free to do what your storage supports - this could be as simple as calling a storage API with the right flag when creating a volume. Or (as is the case with the KVM storage types), as complex as managing volume details directly at the hypervisor host. The data objects passed to the storage driver will contain volume passphrases, if encryption is requested.

##### Scheduling

For the KVM implementations specified above, we are dependent on the KVM hosts having support for volume encryption tools. As such, the hosts `StartupRoutingCommand` has been modified to advertise whether the host supports encryption. This is done via a probe during agent startup to look for functioning `cryptsetup` and support in `qemu-img`. This is also visible via the listHosts API and the host details in the UI.  This was patterned after other features that require hypervisor support such as UEFI.

The `EndPointSelector` interface and `DefaultEndpointSelector` have had new methods added, which allow the caller to ask for endpoints that support encryption.  This can be used by storage drivers to find the proper hosts to send storage commands that involve encryption. Not all volume activities will require a host to support encryption (for example a snapshot backup is a simple file copy), and this is the reason why the interface has been modified to allow for the storage driver to decide, rather than just passing the data objects to the EndpointSelector and letting the implementation decide.

VM scheduling has also been modified. When a VM start is requested, if any volume that requires encryption is attached, it will filter out hosts that don't support encryption.

##### DB Changes

A volume whose disk offering enables encryption will get a passphrase generated for it before its first use. This is stored in the new 'passphrase' table, and is encrypted using the CloudStack installation's standard configured DB encryption. A field has been added to the volumes table, referencing this passphrase, and a foreign key added to ensure passphrases that are referenced can't be removed from the database.  The volumes table now also contains an encryption format field, which is set by the implementer of the encryption and used as it sees fit.

#### KVM Agent

For the KVM storage pool types supported, the encryption has been implemented at Qemu itself, using the built-in LUKS storage support. This means that the storage remains encrypted all the way to the VM process, and decrypted before the block device is visible to the guest.  This may not be necessary in order to implement encryption for /your/ storage pool type, maybe you have a kernel driver that decrypts before the block device on the system, or something like that. However, it seemed like the simplest, common place to terminate the encryption, and provides the lowest surface area for decrypted guest data.

For qcow2 based storage, `qemu-img` is used to set up a qcow2 file with LUKS encryption. For block based (currently just ScaleIO storage), the `cryptsetup` utility is used to format the block device as LUKS for data disks, but `qemu-img` and its LUKS support is used for template copy.

Any volume that requires encryption will contain a passphrase ID as a byte array when handed down to the KVM agent. Care has been taken to ensure this doesn't get logged, and it is cleared after use in attempt to avoid exposing it before garbage collection occurs.  On the agent side, this passphrase is used in two ways:

1. In cases where the volume experiences some libvirt interaction it is loaded into libvirt as an ephemeral, private secret and then referenced by secret UUID in any libvirt XML. This applies to things like VM startup, migration preparation, etc.

2. In cases where `qemu-img` needs to use this passphrase for volume operations, it is written to a `KeyFile` on the cloudstack agent's configured tmpfs and passed along. The `KeyFile` is a `Closeable` and when it is closed, it is deleted. This allows us to try-with-resources any volume operations and get the KeyFile removed regardless.

In order to support the advanced syntax required to handle encryption and passphrases with `qemu-img`, the `QemuImg` utility has been modified to support the new `--object` and `--image-opts` flags. These are modeled as `QemuObject` and `QemuImageOptions`.  These `qemu-img` flags have been designed to supersede some of the existing, older flags being used today (such as choosing file formats and paths), and an effort could be made to switch over to these wholesale. However, for now we have instead opted to keep existing functions and do some wrapping to ensure backward compatibility, so callers of `QemuImg` can choose to use either way.

It should be noted that there are also a few different Enums that represent the encryption format for various purposes. While these are analogous in principle, they represent different things and should not be confused. For example, the supported encryption format strings for the `cryptsetup` utility has `LuksType.LUKS` while `QemuImg` has a `QemuImg.PhysicalDiskFormat.LUKS`.

Some additional effort could potentially be made to support advanced encryption configurations, such as choosing between LUKS1 and LUKS2 or changing cipher details. These may require changes all the way up through the control plane. However, in practice Libvirt and Qemu currently only support LUKS1 today. Additionally, the cipher details aren't required in order to use an encrypted volume, as they're stored in the LUKS header on the volume there is no need to store these elsewhere.  As such, we need only set the one encryption format upon volume creation, which is persisted in the volumes table and then available later as needed.  In the future when LUKS2 is standard and fully supported, we could move to it as the default and old volumes will still reference LUKS1 and have the headers on-disk to ensure they remain usable. We could also possibly support an automatic upgrade of the headers down the road, or a volume migration mechanism.

Every version of cryptsetup and qemu-img tested on variants of EL7 and Ubuntu that support encryption use the XTS-AES 256 cipher, which is the leading industry standard and widely used cipher today (e.g. BitLocker and FileVault).

Signed-off-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Marcus Sorensen <mls@apple.com>
2022-09-27 10:20:59 +05:30
João Jandre
d4c6586546
Return vm userdata (#6683)
* [UI] Update vm userdata

* fix vm id

* Address review

* Address review

Co-authored-by: João Paraquetti <joao@scclouds.com.br>
2022-09-26 19:12:28 -03:00
Hoang Nguyen
e39b7ac0d9
ui: fixes errors in the Console.vue (#6741)
This PR for fixes errors in the Console.vue
2022-09-15 16:44:31 +05:30
Abhishek Kumar
bf4e9059dd Merge remote-tracking branch 'apache/4.17' into main 2022-09-14 13:17:57 +05:30
hooklee2000
c3d6f42dd9
UI fix Theme text color not bind navTextColorPick and reset button (#6721)
UI fix Theme text color not bind navTextColorPick fix #6720
2022-09-14 12:56:58 +05:30
Wido den Hollander
ba35437da7
UI: Build Dockerfile with Node v14 (#6712)
Node versions >14 throw errors when building and thus do not allow to
build the UI.

Pinning to v14 allows us to build and run the UI Docker container.
2022-09-14 12:48:14 +05:30
Nicolas Vazquez
b2fbe7bb12
console: Console access enhancements (#6577)
This PR creates a new API createConsoleAccess to create VM console URL allowing it to connect using other UI implementations. To avoid reply attacks, the console access is enhanced to use a one time token per session

New configuration added:
consoleproxy.extra.security.validation.enabled: Enable/disable extra security validation for console proxy using a token

Documentation PR: apache/cloudstack-documentation#284
2022-09-14 12:39:59 +05:30
Abhishek Kumar
78b68fd7e6
api,server: custom dns for guest network (#6425)
Adds option to provide custom DNS servers for isolated network, shared network and VPC tier.
New API parameters added in createNetwork API along with the corresponding response parameters.

Doc PR: apache/cloudstack-documentation#276
2022-09-10 13:05:40 +05:30
Abhishek Kumar
cf18549dbb Merge remote-tracking branch 'apache/4.17' into main 2022-09-07 14:11:09 +05:30
David Jumani
f342cf300e
ui: Fix netowrkid not passed in deployvm (#6711)
Fixes the issue of the networkid not being passed when deploying a VM
This is caused when the first template selected is a deploy-as-is one and the nicToNetworkSelection not being reset when selecting a new template
2022-09-07 12:25:23 +05:30
Wei Zhou
fe16be0408
UI: fix bulk delete project with cleanup (#6708) 2022-09-07 11:13:45 +05:30
Abhishek Kumar
687a21c116 Merge remote-tracking branch 'apache/4.17' into main 2022-09-06 18:47:47 +05:30
Abhishek Kumar
1d20fcfc6e
ui: fix set reservation toggle in add public ip range (#6707)
Fixes 'Set reservation' toggle not getting updated on value change.
2022-09-06 14:05:01 +05:30
Bryan Lima
c58118148e
Remove unsupported params from API calls on the UI (#6686) 2022-08-31 15:34:25 +02:00
Rohit Yadav
201f06697d Merge remote-tracking branch 'origin/4.17' 2022-08-30 12:52:59 +02:00
Hoang Nguyen
3170338d14
ui: remove incorrect API calls when initializing the deploy VM page (#6687) 2022-08-30 16:06:34 +05:30
José Flauzino
9f7e0cc2d5
VM stats history visualization (#6401)
* Add VM stats view feature

* Add dynamic label to the submit button of the VM stats filtering modal

* Improve CPU info message

* Reduce identation

* Remove missed line

* Fix timestamp when 'Use local timezone' is selected

* Fix bug when filtering for all data

* Support for toggle 'Use local timezone' button

Co-authored-by: joseflauzino <jose@scclouds.com.br>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2022-08-29 13:42:03 +02:00
Abhishek Kumar
c526244359 Merge remote-tracking branch 'apache/4.17' into main 2022-08-26 14:22:14 +05:30
Abhishek Kumar
7115e35965
ui: fix update network update in sequence param (#6675)
Fixes wrong param used in the update network form
2022-08-26 14:21:13 +05:30
Hoang Nguyen
c8494354ca
UI: Fixes suffix icon on project selector not work (#6671)
* fix the animation suffix icon of select

* move style code
2022-08-25 22:14:31 +05:30
Rohit Yadav
ad0ae83974
ui: Revise Chinese language pack (#6653)
Co-authored-by: 卢苇 <lw_bk@163.com>
2022-08-22 17:08:34 +05:30
Rohit Yadav
83008e55cf Merge remote-tracking branch 'origin/4.17' 2022-08-17 16:25:25 +02:00
Abhishek Kumar
052a34c1fb
ui: fix resource tags visibility in infocard (#6650)
Fixes #6649

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-17 15:47:31 +05:30
Rohit Yadav
8e428c7b0c Merge remote-tracking branch 'origin/4.17' 2022-08-17 10:29:40 +02:00
Abhishek Kumar
780bb2474c
ui: fix gputype in add compute offering (#6646)
Fixes gpuType value in the add compute offering form during submit
2022-08-17 11:53:22 +05:30
Abhishek Kumar
7ae6fdf053 Merge remote-tracking branch 'apache/4.17' into main 2022-08-16 17:51:09 +05:30
Hoang Nguyen
ef2997c4a8
ui: fix the warning in detail tab (#6645)
This PR for fixes the warning in detail tab
2022-08-16 16:41:19 +05:30
Abhishek Kumar
a5716d964a
ui: reset disksize param on offering change in scale vm (#6636)
Fixes #6627

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-16 11:44:32 +05:30
Rohit Yadav
4d41b6bc44 Merge remote-tracking branch 'origin/4.17' 2022-08-09 12:33:39 +02:00
Abhishek Kumar
bca60761c5
ui: use ssh keypair uuid for listing (#6616)
Addresses #6569

Use uuid to list SSH keypair wherever uuid is available.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-09 13:29:49 +05:30
Daniel Augusto Veronezi Salvador
b0e780a35e
Enable system VM volume migration for KVM (#6341)
Release 4.16.0.0 introduced a feature for migrating system VM volumes (#4385). However, it was enabled only for VMWare.

This PR intends to enable the feature for KVM too.

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-08-09 10:03:03 +05:30
Rohit Yadav
c4ab8fffab Merge remote-tracking branch 'origin/4.17' 2022-08-08 11:57:37 +02:00
Abhishek Kumar
167cd17d7c
ui: fix hypervisortrafficlabel for phy nw traffic (#6612)
Fixes: #6593

Before fix UI was setting vlan to 'null' when no value was passed. Now it just leaves the vlan value empty in the trafficlabel.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-05 10:42:13 +05:30
Abhishek Kumar
ddb11b1b96 Merge remote-tracking branch 'apache/4.17' into main 2022-08-03 16:45:36 +05:30
Nicolas Vazquez
7d50b65674
UI: Fix delete ISO navigation after job is finished (#6598)
* UI: Fix delete ISO navigation after job is finished

* Apply suggestion

* Fix redirection
2022-08-03 16:44:31 +05:30
Daniel Augusto Veronezi Salvador
d4d310c790
ui: Close form right after receiving the job id (#6603)
When restoring and attaching a backup volume, the UI waits for the successfful response of the API to close the formulary. However, letting the form open after sending the command can confuse users, that might try to send the command again.

Note: other formularies (like volume or snapshot creation) always are closed after sending the command to the backend.

With this PR, we intend to close the formulary right after sending the command, as done with others.

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-08-03 16:20:23 +05:30
Hoang Nguyen
06ff472906
UI: Fixes notification error can't close when exit config limit tab (#6607)
* fixed an error that generated incorrect messages when accessing the config limit tab

* removed deep:true
2022-08-03 15:31:16 +05:30
Abhishek Kumar
db2bda313f
ui: fix icon for vr migrate storage (#6600)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-02 16:16:57 +05:30
Abhishek Kumar
3cba4266c8 Merge remote-tracking branch 'apache/4.17' into main 2022-08-01 08:13:43 +05:30
Abhishek Kumar
b0f90fc6fb
ui: fix vpc loadbalancer listing for admins (#6592)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-01 04:24:09 +02:00
Rohit Yadav
c938bae8c6 Merge remote-tracking branch 'origin/4.17' 2022-07-29 14:15:47 +02:00