7011 Commits

Author SHA1 Message Date
Mike Tutkowski
46c56eaaf9 Merge release branch 4.11 to master
* 4.11:
  Changed the implementation of isVolumeOnManagedStorage(VolumeInfo) to check if the data store in question is for primary storage (and added a unit test from Daan Hoogland)
  vmware: reboot VR after mac updates (#2794)
2018-08-12 00:03:37 -06:00
Rafael Weingärtner
96d80b154b
Fix alert message in VM creation wizard (#2786)
* Fix alert message in VM creation wizard

* Remove "var" keyword for customZindex variable

* Fix "cloudStack.applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton"
2018-08-10 10:20:59 -03:00
Rohit Yadav
461c4ad027
vmware: reboot VR after mac updates (#2794)
This re-introduces the rebooting of VR after setup of nics/macs in
case of VMware. It also adds a minor enhancement to show the console
esp. for root admins when VRs and systemvms are in starting state.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-08-10 13:07:11 +05:30
Rohit Yadav
5e48c0b4c9 Merge remote-tracking branch 'origin/4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-08-08 12:20:56 +05:30
ernjvr
ecb44a5e72 ui: add height sizing to detail view so that it renders all detail items in the list (#2790)
In the UI, when a VM instance has more than one NIC, the NICs screen does not display all the details of the first NIC. The last few rows of text overlap with the second NIC's text. This is due to the incorrect placement of the second NIC's bar. The default height sizing does not allow enough head space to display all the details of the first NIC before displaying the second NIC's details.

Expected Behaviour:
When a VM instance has more than one NIC, the NICs screen must allow enough height size to display all the details of the first NIC before displaying the second NIC's details. The last few rows of text must not overlap with the second NIC's text.

Current Behaviour:
When a VM instance has more than one NIC, the NICs screen does not allow enough height size to display all the details of the first NIC before displaying the second NIC's details. The last few rows of text overlap with the second NIC's text.

To Reproduce:
In the UI, on the lefthand side, select the Instances link. On the Instances screen, select a VM instance that has more than one NIC and then select the NICs screen. Scroll down to where the second NIC bar is displayed. Notice that it does not display all the details of the first NIC correctly. The last few rows of text overlap with the second NIC's text.
2018-08-08 12:10:23 +05:30
ernjvr
a3d999c203 ui: change table header cursor for sortable columns to pointer (#2788)
In the UI, when a user navigates to a screen that displays a table of data and hovers the mouse over a sortable column header, the cursor does not change to a hand pointer, indicating to the user that it can be clicked on, in order to sort the table's data rows according to that column.
When the mouse hovers over the non-sortable 'Quickview' column header, it incorrectly displays a hand pointer cursor instead of a default cursor.
When the mouse hovers over a column header, it also does not display the column header's value as a tooltip.

Expected Behaviour:
The cursor type for a sortable column header must display a hand pointer.
The cursor type for the non-sortable 'Quickview' column header must display a default pointer.
When the mouse hovers over a column header it must display the column header's value as a tooltip.

Actual Behaviour:
The cursor type for a sortable column header incorrectly displays a default pointer.
The cursor type for the non-sortable 'Quickview' column header incorrectly displays a hand pointer.
When the mouse hovers over a column header it does not display the column header's value as a tooltip.

To Reproduce:
In the UI, navigate to a screen that displays a table of data and hover the mouse over a sortable column header, the cursor does not change to a hand pointer.
Hover the mouse over the non-sortable 'Quickview' column header and notice that it incorrectly displays a hand pointer cursor instead of a default cursor.
Hover the mouse over a column header and notice that it does not display the column header's value as a tooltip.
2018-08-08 12:09:38 +05:30
ernjvr
f20d3a4183 ui: change cursor to default to prevent user confusion (#2785)
When a regular user navigates to the Dashboard screen and hovers over the 'Latest events' entries, the mouse cursor changes to a hand pointer, but it cannot select any of these entries.

Expected Behaviour:
When a user navigates to the Dashboard screen and hovers over the 'Latest events' entries, the mouse cursor must not change to a hand pointer. This will allow the user to make the correct interpretation that the 'Latest events' entries are not selectable.

Actual Behaviour:
When a user navigates to the Dashboard screen and hovers over the 'Latest events' entries, the mouse cursor changes to a hand pointer. This causes a user to incorrectly interpret that the entries are selectable.

To Reproduce:
Log in to the Cloudstack UI as a regular User.
On the Dashboard screen, hover the mouse over the 'Latest events' entries, the cursor changes to a hand pointer. Confirm that the entries cannot be selected.
2018-08-08 12:08:43 +05:30
ernjvr
d8b3a90962 ui: insert plugin css files before custom.css file (#2784)
In the index.html file, the reference to the custom.css file is made on the last line of the <head> tag.
The plugins.js file appends a list of CSS files to the <head> tag dynamically, consequently placing them after the custom.css file and overriding it.

Expected Behaviour:
The plugins.js file must insert the list of CSS files before the custom.css file so that it does not get overridden.

Actual Behaviour:
The plugins.js file appends a list of CSS files to the <head> tag dynamically, consequently placing them after the custom.css file and overriding it.

To Reproduce:
Log in to the Cloudstack UI using your favourite browser.
Use your browser's development tool to view the HTML elements of the index.html loaded in memory.
Expand the <head> element and review the list of CSS <link> elements.
Notice that the list of module and plugins CSS files is appended after the custom.css file.
2018-08-08 12:07:56 +05:30
ernjvr
5043768406 ui: add ipaddress input field to 'Add network to VM' form (#2782)
On the 'NICs' tab, when a user clicks the 'Add network to VM' button to add a network to a VM, the 'Add network to VM' popup screen does not have an IP Address input field to allow a user to define a specific IP Address for a NIC. A user can specify the IP address for the first NIC when creating a VM instance, but cannot do that for subsequent NICs when adding a network to a VM.

To Reproduce:
Go to the 'Instances' screen by clicking the 'Instances' tab on the lefthand side.
On the 'Instances' screen click on a specific VM instance name.
This will open the 'Details' tab for the specific VM instance.
Click on the 'NICs' tab and then click on the 'Add network to VM' button to add a network to a VM.
The 'Add network to VM' popup screen will display.

Actual Behaviour:
The 'Add network to VM' popup screen does not have an IP Address input field to allow a user to define a specific IP Address for a NIC.

Expected behaviour:
The 'Add network to VM' popup screen must have an IP Address input field to allow a user to define a specific IP Address for a NIC.
Since the addNicToVirtualMachine API's ipaddress field is not required, the IP Address input field is also not a required field.
The IP Address input field must be validated for a valid IPv4 formatted value if the user enters anything into the field.
The valid user-specified IPv4 IP Address value must be allocated to the NIC if it is within the acceptable IP range for the chosen Network.
2018-08-08 12:07:04 +05:30
Rohit Yadav
75030e5522 Merge branch '4.11' 2018-08-01 16:37:21 +05:30
ernjvr
4f49bf6770 ui: hide hvm tickbox for vmware, otherwise display (#2781)
On the 'Register Template From URL' screen, when a user selects the VMware option from the Hypervisor dropdown:

It incorrectly displays the 'HVM' checkbox.
This checkbox must be hidden in the VMware context.
This checkbox must still be visible in any other hypervisor context.

To Reproduce:
Go to the 'Register Template From URL' screen by clicking the 'Templates' tab on the lefthand side.
On the 'Templates' screen click the 'Add' button to display the 'Register Template From URL' screen.
On the 'Register Template From URL' screen, select the VMware option from the Hypervisor dropdown:

Actual Behaviour:
It incorrectly displays the 'HVM' checkbox.

Expected behaviour:
This checkbox must be hidden in the VMware context.
This checkbox must still be visible in any other hypervisor context.
2018-08-01 16:36:11 +05:30
ernjvr
a32bd464b6 ui: show reset SSH key for VM in running state (#2778)
In the UI, on the Instances screen, the Quickview popup window and the Details window do not display the 'Reset SSH Key Pair' button for VMs in a running state. They only display when the VM is in a stopped state. This is inconsistent with the 'Reset Password' button behaviour, where it displays in both VM states: running and stopped. This fixes the issue so that the 'Reset SSH Key Pair' button also displays in both VM states.

Expected Behaviour:
In the UI, on the Instances screen, the Quickview popup window and the Details window must display the 'Reset SSH Key Pair' button in both VM states: running and stopped. When a user clicks on the 'Reset SSH Key Pair' button and a VM is in a running state, it will display a message "Vm xxx should be stopped to do SSH Key reset".
Actual Behaviour:
In the UI, on the Instances screen, the Quickview popup window and the Details window do not display the 'Reset SSH Key Pair' button for VMs in a running state. It only displays when the VM is in a stopped state.
2018-07-31 13:03:50 +05:30
Rohit Yadav
d64f787b66 Merge branch '4.11' 2018-07-26 13:03:46 +05:30
ernjvr
4c66908b1f ui: Fix clicking the previous button to go back to the Physical Network screen in the Add Zone Wizard (#2767)
In the Add Zone Wizard, when a user lands on the Physical Network page, by default the first Physical Network gets initialized with the 3 Traffic Types: Guest, Management and Public. When a user drags the Management or Public Traffic Types from the first Physical Network to a second or nth Physical Network and then clicks the next button to go to the next screen, and then decides to click the previous button to go back to the Physical Network screen, the UI initializes the physicalNetwork again and thus moves these Traffic Types back to their original position in the first Physical Network as if it is the first time the user navigated to this page.
A fix was made so that when a user clicks the previous button to go back to the Physical Network screen, it does not initialize the physicalNetwork again, therefore leaving the user-defined Traffic Type configuration as it was before the next button was clicked.
2018-07-25 22:14:34 +05:30
Daan Hoogland
c3ff356c15 Merge release branch 4.11 to master
* 4.11:
  register template kvm context ui fix (#2757)
  check volumes for state when retrieving pool for configDrive creation (#2709)
2018-07-20 11:31:53 +00:00
ernjvr
781d6bc051 register template kvm context ui fix (#2757)
On the 'Register Template From URL' screen, when a user selects the KVM option from the Hypervisor dropdown:
1) It incorrectly displays the 'Original XS Version is 6.1' checkbox. This checkbox should be hidden in the KVM context.
2) The 'Root Disk Controller' dropdown should display the default option of 'osdefault' instead of a blank default option.
2018-07-20 09:16:23 +02:00
Rafael Weingärtner
70bd177064
Fix concurrency problem when moving ACL rules with drag&drop (#2703)
There was a concurrency problem with the “moveNetworkAclItem” API method. If two users were changing the ACL rules order at the same time, this could lead to inconsistent actions.
To solve the problem we added a “consistency check ” parameter, which is used to hold the consistency hash. This hash is created using an MD5 hash function on a String that is created with all ACL rules UUIDs concatenated in their order, which is defined via the ‘number’ field.
We also lock the editing of the ACL while executing the upgrade. This allows us to handle race conditions nicely, and present a good feedback for the user.
2018-07-19 12:47:54 -03:00
Rafael Weingärtner
d0c6cacd06
[CLOUDSTACK-9261] Upgrate jQuery-UI to 1.11 (JQuery UI 1.8.4 prone to XSS) (#2524)
* [CLOUDSTACK-9261] Upgrate jQuery-UI to 1.11 (JQuery UI 1.8.4 prone to XSS)

* fix problems in the UI for lbCertificatePolicy and StaticNAT

* force jenkins build

* Fix about dialog

* Fix position of network service offering
2018-07-16 13:18:55 -03:00
Mike Tutkowski
9776157ea1
Merge pull request #2670 from mike-tutkowski/remove-old-netapp-plug-in
Removing an old, unused NetApp plug-in
2018-06-19 11:09:22 -06:00
Daan Hoogland
3ff122d824 Merge release branch 4.11 to master
* 4.11:
  comment on unencryption
  ui: fix create VPC dialog box failure when zone is SG enabled (#2704)
  CLOUDSTACK-10381: Fix password reset / reset ssh key with ConfigDrive
  isisnot=
  extra message
  debug message
  imports
  update without decrypt doesn't work
  set unsensitive attributes as not 'Secure'
  remove old config artifacts from update path
2018-06-12 07:41:09 +00:00
Mike Tutkowski
c7d6376964 Removing an old, unused NetApp plug-in 2018-06-08 12:55:39 -06:00
Rohit Yadav
e41b4ed786 ui: fix create VPC dialog box failure when zone is SG enabled (#2704) 2018-06-08 20:05:16 +02:00
Rohit Yadav
72e61bfa1d Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-07 11:26:34 +05:30
Nicolas Vazquez
99ca81a676 ui: do not send conserve mode on L2 network offering creation from the UI (#2694)
Do not send conserve mode param on L2 network offering creation from the UI. Fix config drive NPE issue on L2 network.
2018-06-07 11:20:37 +05:30
Rohit Yadav
ca17b6a126 Merge branch '4.11': Fixes #2666 conditional template filter (#2669)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-24 13:01:23 +05:30
dahn
2fad5bea31 ui: Fixes #2666 conditional template filter (#2669)
This fixes issue of warning when deploying vm as non-root admin user account.
2018-05-24 12:59:57 +05:30
Rohit Yadav
ea373eb1e5
Merge apache/4.11
ui: Fixes #2558 use POST for uploadSslCert API request (#2661)
2018-05-23 09:36:03 +05:30
Gabriel Beims Bräscher
eb23d91cf4 ui: Fixes #2558 use POST for uploadSslCert API request (#2661) 2018-05-23 09:34:30 +05:30
Rohit Yadav
65511c4335 Merge branch '4.11': Reduce VR downtime during network restart (#2508)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-11 13:09:03 +05:30
Rohit Yadav
a77ed56b86
CLOUDSTACK-9114: Reduce VR downtime during network restart (#2508)
This introduces a rolling restart of VRs when networks are restarted
with cleanup option for isolated and VPC networks. A make redundant option is
shown for isolated networks now in UI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-11 12:48:07 +05:30
Rohit Yadav
1b10c188f2 Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-09 23:01:55 +05:30
Nicolas Vazquez
bd89760108 config-drive: support user data on L2 networks (#2615)
Supporting ConfigDrive user data on L2 networks.
Add UI checkbox to create L2 network offering with config drive.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-09 21:33:11 +05:30
Rohit Yadav
4534cefa40
backports for 4.11.1 from master (#2621)
* CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's. Added code to skip disabled clusters when selecting a host (#2442)

(cherry picked from commit c3488a51db4bce4ec32c09e6fef78193d360cf3f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10318: Bug on sorting ACL rules list in chrome (#2478)

(cherry picked from commit 4412563f19ec8b808fe4c79e2baf658507a84873)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10284:Creating a snapshot from VM Snapshot generates error if hypervisor is not KVM.

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

* CLOUDSTACK-10221: Allow IPv6 when creating a Basic Network (#2397)

Since CloudStack 4.10 Basic Networking supports IPv6 and thus
should be allowed to be specified when creating a network.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
(cherry picked from commit 9733a10ecda5f1af0f2c0fa863fc976a3e710946)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10214: Unable to remove local primary storage (#2390)

Allow admins to remove primary storage pool.
Cherry-picked from eba2e1d8a1ce4e86b4df144db03e96739da455e5

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

* dateutil: constistency of tzdate input and output (#2392)

Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
Signed-off-by: Daan Hoogland <daan.hoogland@shapeblue.com>
(cherry picked from commit 2ad520282319da9a03061b8c744e51a4ffdf94a2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10054:Volume download times out in 3600 seconds (#2244)

(cherry picked from commit bb607d07a97476dc4fb934b3d75df6affba47086)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* When creating a new account (via domain admin) it is possible to select “root admin” as the role for the new user (#2606)

* create account with domain admin showing 'root admin' role

Domain admins should not be able to assign the role of root admin to new users. Therefore, the role ‘root admin’ (or any other of the same type) should not be visible to domain admins.

* License and formatting

* Break long sentence into multiple lines

* Fix wording of method 'getCurrentAccount'

* fix typo in variable name

* [CLOUDSTACK-10259] Missing float part of secondary storage data in listAccounts

* [CLOUDSTACK-9338] ACS not accounting resources of VMs with custom service offering

ACS is accounting the resources properly when deploying VMs with custom service offerings. However, there are other methods (such as updateResourceCount) that do not execute the resource accounting properly, and these methods update the resource count for an account in the database. Therefore, if a user deploys VMs with custom service offerings, and later this user calls the “updateResourceCount” method, it (the method) will only account for VMs with normal service offerings, and update this as the number of resources used by the account. This will result in a smaller number of resources to be accounted for the given account than the real used value. The problem becomes worse because if the user starts to delete these VMs, it is possible to reach negative values of resources allocated (breaking all of the resource limiting for accounts). This is a very serious attack vector for public cloud providers!

* [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type” (#2404)

* [CLOUDSTACK-10230] User is able to change to “Guest OS type” that has been removed

Users are able to change the OS type of VMs to “Guest OS type” that has been removed. This becomes a security issue when we try to force users to use HVM VMs (Meltdown/Spectre thing). A removed “guest os type” should not be usable by any users in the cloud.

* Remove trailing lines that are breaking build due to checkstyle compliance

* Remove unused imports

* fix classes that were in the wrong folder structure

* Updates to capacity management
2018-05-09 15:20:19 +05:30
Rohit Yadav
ffe86e1c17 Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-08 16:02:17 +05:30
Rohit Yadav
bd0959517b
hypervisor: allow Ubuntu 18.04 to be added as KVM host (#2626)
This adds and allows Ubuntu 18.04 to be used as KVM host. In addition,
on the UI when hypervisor version key is missing, this adds and display
the host os and version detail which is useful to show the KVM host
os and version.

When cache mode 'none' is used for empty cdrom drives, systemvms
and guest VMs fail to start on newer libvirtd such as Ubuntu bionic.
The fix is ensure that cachemode is not declared when drives are empty
upon starting of the VM. Similar issue logged at redhat here:
https://bugzilla.redhat.com/show_bug.cgi?id=1342999

The workaround is to ensure that we don't configure cachemode for
cdrom devices at all. This also fixes live VM migration issue.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-08 15:56:49 +05:30
Rafael Weingärtner
883b313b9d
[migrateVolume API method] Filter disk offerings based on storage pool selected (#2612)
After using the feature introduced by #2486 in production, we felt the need for an improvement in the UI.  It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.
2018-05-04 08:04:10 -03:00
Rohit Yadav
67c67f516a Merge branch '4.11' 2018-05-04 12:43:48 +05:30
Frank Maximus
10a10f625b CLOUDSTACK-10376: UI: Create VPC Offering does not show ConfigDrive as UserData provider 2018-05-04 12:43:05 +05:30
Rohit Yadav
6412e50471 saml2: Fixes #2548 SAML2 cert encoding and decoding
This fixes SAML2 certificate encoding/decoding issue due to refactoring
regression introduced in 7ce54bf7a85d6df72f84c00fadf9b0fd42ab0d99 that
did not account for base64 based encoding/decoding. The changes
effectively restore the same logic as used in previous versions.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-04 12:37:23 +05:30
Rafael Weingärtner
3adc2b8485
[CLOUDSTACK-5235] ask users current password when they are executing a password update (#2574)
* [CLOUDSTACK-5235] Force users to enter old password when updating password

* Formatting for checkstyle

* Remove an unused import in AccountManagerImpl

* Apply Nitin's suggestions

* Change 'oldPassword' to 'currentPassword'

* Second review of Resmo

* Fix typos found by Nitin
2018-05-02 09:19:06 -03:00
Rohit Yadav
e4537e9d39 Merge branch '4.11' 2018-04-27 12:57:51 +02:00
dahn
296a3804b9 ui: fix project network listing failure in UI (#2536)
Fixes #2533
2018-04-27 12:54:37 +02:00
Rafael Weingärtner
d6cbd774b7
[CLOUDSTACK-10323] Allow changing disk offering during volume migration (#2486)
* [CLOUDSTACK-10323] Allow changing disk offering during volume migration

This is a continuation of work developed on PR #2425 (CLOUDSTACK-10240), which provided root admins an override mechanism to move volumes between storage systems types (local/shared) even when the disk offering would not allow such operation. To complete the work, we will now provide a way for administrators to enter a new disk offering that can reflect the new placement of the volume. We will add an extra parameter to allow the root admin inform a new disk offering for the volume. Therefore, when the volume is being migrated, it will be possible to replace the disk offering to reflect the new placement of the volume.

The API method will have the following parameters:

* storageid (required)
* volumeid (required)
* livemigrate(optional)
* newdiskofferingid (optional) – this is the new parameter

The expected behavior is the following:

* If “newdiskofferingid” is not provided the current behavior is maintained. Override mechanism will also keep working as we have seen so far.
* If the “newdiskofferingid” is provided by the admin, we will execute the following checks
** new disk offering mode (local/shared) must match the target storage mode. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** we will check if the new disk offering tags match the target storage tags. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** check if the target storage has the capacity for the new volume. If it does not have enough space, then an exception is thrown and the operator will receive a message indicating the problem.
** check if the size of the volume is the same as the size of the new disk offering. If it is not the same, we will ALLOW the change of the service offering, and a warning message will be logged.

We execute the change of the Disk offering as soon as the migration of the volume finishes. Therefore, if an error happens during the migration and the volume remains in the original storage system, the disk offering will keep reflecting this situation.

* Code formatting

* Adding a test to cover migration with new disk offering (#4)

* Adding a test to cover migration with new disk offering

* Update test_volumes.py

* Update test_volumes.py

* fix test_11_migrate_volume_and_change_offering

* Fix typo in Java doc
2018-04-26 20:05:55 -03:00
Rafael Weingärtner
b3c22df71d Forward merge branch '4.11' to master
ConfigDrive fixes: CLOUDSTACK-10288, CLOUDSTACK-10289 (#2566)
CLOUDSTACK-9677: Adding storage policy support for swift as secondary
storage (#2412)
2018-04-26 10:14:49 -03:00
Khosrow Moossavi
b6d420bec3 CLOUDSTACK-9677: Adding storage policy support for swift as secondary storage (#2412)
Original-Author: @pdube on PR Fixes #1830.
2018-04-26 00:42:15 +02:00
Rohit Yadav
644b0910cd Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-04-20 00:46:43 +05:30
Rohit Yadav
8da2462469
CLOUDSTACK-10333: Secure Live VM Migration for KVM (#2505)
This extends securing of KVM hosts to securing of libvirt on KVM
host as well for TLS enabled live VM migration. To simplify implementation
securing of host implies that both host and libvirtd processes are
secured with management server's CA plugin issued certificates.

Based on whether keystore and certificates files are available at
/etc/cloudstack/agent, the KVM agent determines whether to use TLS or
TCP based uris for live VM migration. It is also enforced that a secured
host will allow live VM migration to/from other secured host, and an
unsecured hosts will allow live VM migration to/from other unsecured
host only.

Post upgrade the KVM agent on startup will expose its security state
(secured detail is sent as true or false) to the managements server that
gets saved in host_details for the host. This host detail can be accesed
via the listHosts response, and in the UI unsecured KVM hosts will show
up with the host state of ‘unsecured’. Further, a button has been added
that allows admins to provision/renew certificates to KVM hosts and can
be used to secure any unsecured KVM host.

The `cloudstack-setup-agent` was modified to accept a new flag `-s`
which will reconfigure libvirtd with following settings:

    listen_tcp=0
    listen_tls=1
    tcp_port="16509"
    tls_port="16514"
    auth_tcp="none"
    auth_tls="none"
    key_file = "/etc/pki/libvirt/private/serverkey.pem"
    cert_file = "/etc/pki/libvirt/servercert.pem"
    ca_file = "/etc/pki/CA/cacert.pem"

For a connected KVM host agent, when the certificate are
renewed/provisioned a background task is scheduled that waits until all
of the agent tasks finish after which libvirt process is restarted and
finally the agent is restarted via AgentShell.

There are no API or DB changes.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-04-20 00:36:18 +05:30
Rafael Weingärtner
685cc7210c [CLOUDSTACK-10344] bug when moving ACL rules (change order with drag and drop) (#2511)
* Add permission to 'moveNetworkAclItem' API method in default roles
2018-04-16 13:45:29 +02:00
Rafael Weingärtner
5d9ae35506 Remove 'todb' in favor of 'encodeURIComponent'. (#2572)
While executing the find/replace, I found some blocks of duplicated code. Therefore, I extracted the duplicated part to an utils file, and then removed the duplicated blocks.
2018-04-16 13:44:27 +02:00
Daan Hoogland
cf3c2d1aab Merge branch '4.11' 2018-04-13 11:44:30 +02:00