10930 Commits

Author SHA1 Message Date
Rohit Yadav
c8f7c0d823 Merge remote-tracking branch 'origin/4.15'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-03-11 13:33:44 +05:30
Rohit Yadav
3f84b9ab42 Merge remote-tracking branch 'origin/4.14' into 4.15 2021-03-11 13:31:46 +05:30
Abhishek Kumar
8aa765ac39
server: delete template on storage over capacity threshold (#4691)
* server: delete template on storage over capacity threshold

While deleting template for a specific zone, check should be done only for writable secondary storages and not for storages with available capacity threshold.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix for ISOs and refactor

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove writable store check

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix exception message

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-03-11 13:15:40 +05:30
Rohit Yadav
057ad2b7d9
usage: return guest OS uuid, guest OS name, category ID and name (#4755)
This fixes the ostype ID returned in listUsageRecords API response to
be uuid instead of internal DB ID and also returns the os category ID
(uuid) and name.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-03-11 13:08:55 +05:30
Abhishek Kumar
025b654b5d
server: use network details from nic network (#4772)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-03-11 13:06:44 +05:30
Rohit Yadav
a1be9b02a6 Merge remote-tracking branch 'origin/4.15' 2021-03-06 16:02:09 +05:30
Rohit Yadav
3a82392941 Merge remote-tracking branch 'origin/4.14' into 4.15 2021-03-06 15:59:50 +05:30
Wei Zhou
df4103f0d1
novnc: Add source IP check (#4736)
* novnc: Add client IP check for novnc console in cloudstack 4.16

* novnc ip check : Fix restart CPVM or mgt server does not update novnc param

* novnc ip check: move to method
2021-03-06 15:08:34 +05:30
sureshanaparti
81dfcbb5f5
server: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s) (#4681)
* Updated libvirt's native reboot operation for VM on KVM using ACPI event, and Added 'forced' reboot option to stop and start the VM (using rebootVirtualMachine API)

* Added 'forced' reboot option for System VM and Router

- New parameter 'forced' in rebootSystemVm API, to stop and then start System VM
- New parameter 'forced' in rebootRouter API, to force stop and then start Router

* Added force reboot tests for User VM, System VM and Router
2021-03-06 14:58:56 +05:30
Wei Zhou
58a3f90a51
server: fix failed to remove template/iso if upload from local fails (#4626)
* server: fix failed to remove template/iso if upload from local fails

When upload template/iso/volume from local fails, the install_path will not be a full path of file so removing it will fail.

```
mysql> select install_path from template_store_ref;
+--------------------------------------------------------------------+
| install_path                                                       |
+--------------------------------------------------------------------+
| template/tmpl/1/3/805f4763-248e-40ec-b79a-b868cc480d0a.qcow2       |
| template/tmpl/1/4/c7e32c9e-5e72-3726-85cf-aa5ccd84118d.qcow2       |
| template/tmpl/2/201/bc4f4f08-138a-31b8-af1a-d4450eff7982.qcow2     |
| template/tmpl/2/202                                                |
| template/tmpl/2/203/203-2-d47f8cde-a2a8-31e7-a826-2628ad98a6c8.iso |
| template/tmpl/2/204                                                |
| template/tmpl/5/205                                                |
| template/tmpl/2/206                                                |
| template/tmpl/2/207                                                |
| template/tmpl/2/208                                                |
| template/tmpl/2/209                                                |
| template/tmpl/2/210                                                |
+--------------------------------------------------------------------+
12 rows in set (0.00 sec)

mysql> select install_path from volume_store_ref;
+---------------------------------------------------------+
| install_path                                            |
+---------------------------------------------------------+
| volumes/2/22                                            |
| volumes/2/19/f93face9-6521-4184-b89a-cb07f86bbae8.qcow2 |
| volumes/2/23                                            |
| volumes/2/24                                            |
+---------------------------------------------------------+
4 rows in set (0.00 sec)
```

* server: disallow removing template/iso in NotUpload and UploadInProgress state
2021-03-06 14:53:40 +05:30
Rohit Yadav
fa067e02a7 Updating pom.xml version numbers for release 4.14.2.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-03-02 12:32:27 +05:30
Rohit Yadav
2e36e905d9 Tagging release 4.14.1.0 on branch 4.14.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEXtHhEi3F6KSkURLCSEJIIQ7j2IQFAmAhGGIACgkQSEJIIQ7j
 2IQN7RAAtyIlEUYp0X0KABNJKaAFOCy/GkBxETTmkjYgMNMX1GOj16F8X3ZXAJ/D
 q0ZBBsvLu62WmTzG6hWTMllFz0w5HRl4X4lObDnBci1u35oa+f6KUh0tyWsAYgWM
 qsIAtePcudJA60MOPwffTZjkxwTUNl2fjwCOxCBOLLTiIa6F0DA4zjNQ4L1/frSS
 KefQt9UDM5GsGrZIGlZIwFD7aqL6PIilxh++3PfCseAUPY6FZiHDYNwN1gPWkziM
 vjQbJyT5cmZdcCs7vlm3fcKYIvXL5S3p64C80L5U/NMdcYQ1mHabwZGQTsTkhDt3
 a7aeXBKIm/V8Aeq3jIRCtNb2m0qiIjmxlLrYRQaUfyIhCU9jRO4gWMzneLVoeUtY
 UACzTpFJvAgSR8viYwtlKgBCbiRVvcJgaPR58pIroiUvc2TIaERw121u4wxDVT5Z
 JqX4zpJjuhXcClHPis6AV8AISjftAbSl24D+IoL0rUn2w3/oH1dMrfkIPPF0wbDw
 /0pwvGHCwXZ5sBqos+OSy1ChPt8KiKHfWDRrHQm5TLDk738uuUV4hf6v4OMKa3Hy
 Tyu/9ZDZbLGBdYit6R7DHWPJ0/y5J+zC7Opt9ufqP3dH6ZIV+j0yvqs9HQJMvZ7F
 LuPcjjWVq2tXnSeLBzjkBTvCrpejb6MJyPO8mcLKw1+BRM93XZY=
 =jGff
 -----END PGP SIGNATURE-----

Merge tag '4.14.1.0' into 4.14

Tagging release 4.14.1.0 on branch 4.14.
2021-03-02 12:30:08 +05:30
Rohit Yadav
77290df0d5 Merge remote-tracking branch 'origin/4.15'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-26 12:09:11 +05:30
Abhishek Kumar
88337bdea4
server: fix finding pools for volume migration (#4693)
While finding pools for volume migration list following compatible storages:
- all zone-wide storages of the same hypervisor.
- when the volume is attached to a VM, then all storages from the same cluster as that of VM.
- for detached volume, all storages that belong to clusters of the same hypervisor. 

Fixes #4692 
Fixes #4400
2021-02-25 22:13:50 +05:30
Rohit Yadav
1d8a4978e9 Merge remote-tracking branch 'origin/4.15'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-24 17:39:12 +05:30
Pearl Dsilva
ccbcb08fbf
server: Increase leniency to list templates on secondary stores that have been marked deleted by updating the db (#4713)
This PR aims at restoring the previous level of leniency in listing templates on stores that have been marked as deleted / removed by updating the DB.
While Cloudstack doesn't allow deleting stores that have resources on them, it may so happen that users may mimic a deletion of a store by merely updating the DB. Under such a case, listing of templates is hampered due to an NPE that is caused. (as seen in #4606)

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2021-02-24 16:30:32 +05:30
Pearl Dsilva
a896760a40
storage: Secondary storage allow store deletion after successful data migration (#4615)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2021-02-24 16:27:39 +05:30
sureshanaparti
eba186aa40
storage: New Dell EMC PowerFlex Plugin (formerly ScaleIO, VxFlexOS) (#4304)
Added support for PowerFlex/ScaleIO (v3.5 onwards) storage pool as a primary storage in CloudStack (for KVM hypervisor) and enabled VM/Volume operations on that pool (using pool tag).
Please find more details in the FS here:
https://cwiki.apache.org/confluence/x/cDl4CQ

Documentation PR: apache/cloudstack-documentation#169

This enables support for PowerFlex/ScaleIO (v3.5 onwards) storage pool as a primary storage in CloudStack

Other improvements addressed in addition to PowerFlex/ScaleIO support:

- Added support for config drives in host cache for KVM
	=> Changed configuration "vm.configdrive.primarypool.enabled" scope from Global to Zone level
	=> Introduced new zone level configuration "vm.configdrive.force.host.cache.use" (default: false) to force host cache for config drives
	=> Introduced new zone level configuration "vm.configdrive.use.host.cache.on.unsupported.pool" (default: true) to use host cache for config drives when storage pool doesn't support config drive
	=> Added new parameter "host.cache.location" (default: /var/cache/cloud) in KVM agent.properties for specifying the host cache path and create config drives on the "/config" directory on the host cache path
	=> Maintain the config drive location and use it when required on any config drive operation (migrate, delete)

- Detect virtual size from the template URL while registering direct download qcow2 (of KVM hypervisor) templates

- Updated full deployment destination for preparing the network(s) on VM start

- Propagate the direct download certificates uploaded to the newly added KVM hosts

- Discover the template size for direct download templates using any available host from the zones specified on template registration
	=> When zones are not specified while registering template, template size discovery is performed using any available host, which is picked up randomly from one of the available zones

- Release the VM resources when VM is sync-ed to Stopped state on PowerReportMissing (after graceful period)

- Retry VM deployment/start when the host cannot grant access to volume/template

- Mark never-used or downloaded templates as Destroyed on deletion, without sending any DeleteCommand
	=> Do not trigger any DeleteCommand for never-used or downloaded templates as these doesn't exist and cannot be deleted from the datastore

- Check the router filesystem is writable or not, before performing health checks
	=> Introduce a new test "filesystem.writable.test" to check the filesystem is writable or not
	=> The router health checks keeps the config info at "/var/cache/cloud" and updates the monitor results at "/root" for health checks, both are different partitions. So, test at both the locations.
	=> Added new script: "filesystem_writable_check.py" at /opt/cloud/bin/ to check the filesystem is writable or not

- Fixed NPE issue, template is null for DATA disks. Copy template to target storage for ROOT disk (with template id), skip DATA disk(s)

* Addressed some issues for few operations on PowerFlex storage pool.

- Updated migration volume operation to sync the status and wait for migration to complete.

- Updated VM Snapshot naming, for uniqueness in ScaleIO volume name when more than one volume exists in the VM.

- Added sync lock while spooling managed storage template before volume creation from the template (non-direct download).

- Updated resize volume error message string.

- Blocked the below operations on PowerFlex storage pool:
  -> Extract Volume
  -> Create Snapshot for VMSnapshot

* Added the PowerFlex/ScaleIO client connection pool to manage the ScaleIO gateway clients, which uses a single gateway client per Powerflex/ScaleIO storage pool and renews it when the session token expires.

- The token is valid for 8 hours from the time it was created, unless there has been no activity for 10 minutes.
  Reference: https://cpsdocs.dellemc.com/bundle/PF_REST_API_RG/page/GUID-92430F19-9F44-42B6-B898-87D5307AE59B.html

Other fixes included:

- Fail the VM deployment when the host specified in the deployVirtualMachine cmd is not in the right state (i.e. either Resource State is not Enabled or Status is not Up)

- Use the physical file size of the template to check the free space availability on the host, while downloading the direct download templates.

- Perform basic tests (for connectivity and file system) on router before updating the health check config data
	=> Validate the basic tests (connectivity and file system check) on router
	=> Cleanup the health check results when router is destroyed

* Updated PowerFlex/ScaleIO storage plugin version to 4.16.0.0

* UI Changes to support storage plugin for PowerFlex/ScaleIO storage pool.
- PowerFlex pool URL generated from the UI inputs(Gateway, Username, Password, Storage Pool) when adding "PowerFlex" Primary Storage
- Updated protocol to "custom" for PowerFlex provider
- Allow VM Snapshot for stopped VM on KVM hypervisor and PowerFlex/ScaleIO storage pool

and Minor improvements in PowerFlex/ScaleIO storage plugin code

* Added support for PowerFlex/ScaleIO volume migration across different PowerFlex storage instances.

- findStoragePoolsForMigration API returns PowerFlex pool(s) of different instance as suitable pool(s), for volume(s) on PowerFlex storage pool.
- Volume(s) with snapshots are not allowed to migrate to different PowerFlex instance.
- Volume(s) of running VM are not allowed to migrate to other PowerFlex storage pools.
- Volume migration from PowerFlex pool to Non-PowerFlex pool, and vice versa are not supported.

* Fixed change service offering smoke tests in test_service_offerings.py, test_vm_snapshots.py

* Added the PowerFlex/ScaleIO volume/snapshot name to the paths of respective CloudStack resources (Templates, Volumes, Snapshots and VM Snapshots)

* Added new response parameter “supportsStorageSnapshot” (true/false) to volume response, and Updated UI to hide the async backup option while taking snapshot for volume(s) with storage snapshot support.

* Fix to remove the duplicate zone wide pools listed while finding storage pools for migration

* Updated PowerFlex/ScaleIO volume migration checks and rollback migration on failure

* Fixed the PowerFlex/ScaleIO volume name inconsistency issue in the volume path after migration, due to rename failure
2021-02-24 14:58:33 +05:30
Rohit Yadav
6634382f69 Merge remote-tracking branch 'origin/4.15'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-19 15:30:21 +05:30
Rohit Yadav
186ac69c49 Merge remote-tracking branch 'origin/4.14' into 4.15
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-19 15:24:48 +05:30
Rohit Yadav
7a712e2c4c server: fix build failure
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-19 15:08:03 +05:30
Abhishek Kumar
f489439a3a
api: add zone, vm name params in listVmSnapshot response (#4604)
* api: add zone, vm name params in listVmSnaphots response

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-02-19 14:52:48 +05:30
Daniel Augusto Veronezi Salvador
3b5f99a7ca
kvm: Prevent KVM from performing volume migrations of running instances (#4562)
* Prevent KVM from performing volume migrations of running instances

KVM has a limitation to modify instances definitions while they are on running state. Therefore, it is not possible to change volumes backend location easily.

There is a problem in the `migrateVolume` API. This API command ignores that limitation and causes an inconsistence on the database. ACS processes the migrate command, copies the volume to the destination storage, modifies the database and finishes the process with success. However, the running backend is still using the "old volume file".

This PR intends to prevent KVM to perform volumes migrations while KVM instances are in the running state and inform the user of an alternative API command that enables such operation on running instances.

* Update VolumeApiServiceImpl.java

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
Co-authored-by: Rohit Yadav <rohit@apache.org>
2021-02-19 14:34:28 +05:30
Rakesh
fd49efa9c1
server: Show network name in exception message (#4396)
* Show network name in exception message

* Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
2021-02-19 14:04:39 +05:30
Pearl Dsilva
aa01580381
network: Specify IP for VR in shared networks (#4503)
This PR enables admins to specify IP for a VR in a shared network.
2021-02-18 13:54:09 +05:30
Pearl Dsilva
b6fe9f99eb
Network Offering: Allow enabling network and vpc offering during creation (#4564)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2021-02-13 10:19:06 +00:00
Sina Kashipazha
543f9827ff
add creation date as a value for domains and accounts. (#4649) 2021-02-13 10:07:53 +00:00
Rohit Yadav
40c14b4552 Merge remote-tracking branch 'origin/4.15' 2021-02-12 13:06:33 +05:30
Gabriel Beims Bräscher
35055896a0
server: FIx typo on FirstFitAllocator (#4648)
From "Cusotm[UEFI]" to "Custom[UEFI]"
2021-02-12 12:53:40 +05:30
Rakesh
de7b131724
server: Cleanup domain details when domain is deleted (#4445)
When domain is deleted, all the settings configured under
the domain scope still exists in domain_details table.
All the entries for the domain should be deleted as well
2021-02-12 12:52:22 +05:30
Rakesh
b8ec2b22d3
server: Display lb rule name instead of uuid (#4524)
Display proper error message while deleting ssl cert which is
associated with a load balancer rule
2021-02-12 12:47:01 +05:30
Abhishek Kumar
d6e8b53736
vmware: vm migration improvements (#4385)
- Fixes inter-cluster migration of VMs
- Allows migration of stopped VM with disks attached to different and suitable pools
- Improves inter-cluster detached volume migration
- Allows inter-cluster migration (clusters of same Pod) for system VMs, VRs on VMware
- Allows storage migration for stopped system VMs, VRs on VMware within same Pod if StoragePool cluster scopetype

Linked Primate PR: https://github.com/apache/cloudstack-primate/pull/789 [Changes merged in this PR after new UI merge]
Documentation PR: https://github.com/apache/cloudstack-documentation/pull/170

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-02-12 12:41:41 +05:30
Rohit Yadav
66f0beda5f Updating pom.xml version numbers for release 4.14.1.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-08 16:24:09 +05:30
Rohit Yadav
ba127dab3e Merge remote-tracking branch 'origin/4.15'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-05 16:02:26 +05:30
Rohit Yadav
6bde1384ff Merge remote-tracking branch 'origin/4.14' into 4.15
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-05 16:01:01 +05:30
Wei Zhou
4de6ac3c05
server: Get vm network/disk statistics and update database per host (#4601)
* server: Get vm network/disk statistics and update database per host

* #4601 : modify debug message
2021-02-04 14:44:47 +05:30
Wei Zhou
78f73c1bc6
server: Fix update capacity for hosts take long time if there are many service offerings (#4623)
Steps to reproduce the issue:

(1)Create 10000 service offerings (by db changes below or cloudmonkey).

```
DROP PROCEDURE IF EXISTS cloud.insert_service_offering;

DELIMITER $$
CREATE PROCEDURE cloud.insert_service_offering()
BEGIN
  DECLARE count INT DEFAULT 10000;
  SET @offeringid = (select max(id)+1 from disk_offering);

  WHILE count > 0 DO
    INSERT INTO disk_offering (id,name,uuid,display_text,disk_size,type,created) values (@offeringid,'test-offering-wei',uuid(), 'test-offering-wei',0,'Service',now());
    INSERT INTO service_offering (id,cpu,speed,ram_size) values (@offeringid, 1, 500,256);
    SET @offeringid = @offeringid + 1;
    SET count = count - 1;
  END WHILE;
END $$
DELIMITER ;

CALL cloud.insert_service_offering();

mysql> CALL cloud.insert_service_offering();
Query OK, 0 rows affected (2 min 30.85 sec)
```

(2) Check the total time of periodical capacity check in cloudstack.

Without this patch, it spend 2.5 seconds (2 hosts)
```
2021-01-15 16:10:12,793 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-5d5f3b3b) (logid:f5eb68ba) Running Capacity Checker ...
2021-01-15 16:10:15,287 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-5d5f3b3b) (logid:f5eb68ba) Done running Capacity Checker ...
```

With this patch ,it spend 1.3 seconds (2 hosts)
```
2021-01-15 16:12:43,604 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-a2a7f3f1) (logid:f7e0a4c5) Running Capacity Checker ...
2021-01-15 16:12:44,927 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-a2a7f3f1) (logid:f7e0a4c5) Done running Capacity Checker ...
```

If there are 100 hosts, the total time will be reduced from 100+ seconds to around 10 seconds.
2021-02-04 14:43:57 +05:30
Daan Hoogland
66d49c5c0d Merge release branch 4.14 to 4.15
* 4.14:
  server: prevent update vm read-only details (#4629)
2021-02-02 09:16:34 +00:00
Abhishek Kumar
05301b1e6a
server: prevent update vm read-only details (#4629) 2021-02-02 08:49:25 +00:00
Daan Hoogland
ff376d8187 Merge release branch 4.15 to master
* 4.15:
  server: select root disk based on user input during vm import (#4591)
  kvm: Use Q35 chipset for UEFI x86_64 (#4576)
  server: fix wrong error message when create isolated network without SourceNat (#4624)
  server: add possibility to scale vm to current customer offerings (#4622)
  server: keep networks order and ips while move a vm with multiple networks (#4602)
  server: throw exception when update vm nic on L2 network (#4625)
  doc: fix typo in install notes (#4633)
2021-02-01 09:58:52 +00:00
Daan Hoogland
b6b778f003 Merge release branch 4.14 to 4.15
* 4.14:
  server: select root disk based on user input during vm import (#4591)
  kvm: Use Q35 chipset for UEFI x86_64 (#4576)
  server: fix wrong error message when create isolated network without SourceNat (#4624)
  server: add possibility to scale vm to current customer offerings (#4622)
  server: keep networks order and ips while move a vm with multiple networks (#4602)
  server: throw exception when update vm nic on L2 network (#4625)
  doc: fix typo in install notes (#4633)
2021-02-01 09:57:35 +00:00
Abhishek Kumar
9b45ec275a
server: select root disk based on user input during vm import (#4591)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-02-01 09:55:09 +00:00
Wei Zhou
a44fb11a02
server: add possibility to scale vm to current customer offerings (#4622)
We can use cloudmonkey to scale a vm with dynamic offering, to same offering but with different cpunumber or memory.
Enable it on UI to improve user experience.
2021-02-01 14:14:48 +05:30
Wei Zhou
1913c6854e
server: keep networks order and ips while move a vm with multiple networks (#4602)
This PR fixes an issue when move a vm from an account to another account.

Steps to reproduce the issue
(1) create a vm with multiple shared networks (in advanced zone, or advanced zone with security groups)
(2) create another account (in same domain who can also access the shared networks)
(3) move vm to new account, with a list of networkid

expected result: the vm has nics on the networks in same order as specified in API request, and nics have the same ips as before actual result: network order is not same as specified, ips are changed.
2021-02-01 14:14:20 +05:30
Wei Zhou
890e84777c
server: throw exception when update vm nic on L2 network (#4625)
without this change
```
root@mgt01:~# cmk update vmnicip nicid=afab73cb-f4f4-490f-a524-365edef432b7

{
  "accountid": "a27bffc1-48ee-11eb-8680-069fc4003392",
  "cmd": "org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd",
  "completed": "2020-12-28T12:55:27+0000",
  "created": "2020-12-28T12:55:27+0000",
  "jobid": "88af30e0-214b-4379-9c39-49648f998ff6",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 530,
    "errortext": "Failed to update ip address on vm NIC. Refer to server logs for details."
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "a27f45f5-48ee-11eb-8680-069fc4003392"
}
🙈 Error: async API failed for job 88af30e0-214b-4379-9c39-49648f998ff6
```

with this change
```
root@mgt01:~# cmk update vmnicip nicid=22d79189-6754-4dfe-a8c4-0ba21be2ada5

{
  "accountid": "044bb5a9-32fd-11eb-b251-06b6e80033a6",
  "cmd": "org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd",
  "completed": "2020-12-28T12:55:15+0000",
  "created": "2020-12-28T12:55:15+0000",
  "jobid": "f4ccb545-0e47-4e9c-b562-b0e6cf52ddd7",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 431,
    "errortext": "UpdateVmNicIpCmd is not supported in L2 network"
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "044cc6e3-32fd-11eb-b251-06b6e80033a6"
}
🙈 Error: async API failed for job f4ccb545-0e47-4e9c-b562-b0e6cf52ddd7
```
2021-02-01 14:13:50 +05:30
Rohit Yadav
be5e61a2f3 Merge remote-tracking branch 'origin/4.15' 2021-01-28 16:45:49 +05:30
Rohit Yadav
1bccb954c4 Fix merge issue from 74bae56642b224e9ccf54bf6ad3dd73b4cf13f41
Fixes fwd merge issue from origin/4.14

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-28 16:43:59 +05:30
Rohit Yadav
e6fef05f30 Merge remote-tracking branch 'origin/4.15' 2021-01-28 14:25:40 +05:30
Rohit Yadav
74bae56642 Merge remote-tracking branch 'origin/4.14' into 4.15
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-28 14:24:25 +05:30
Wei Zhou
182cea79b5
server: fix cannot create vm if another vm with same name has been added and removed on the network (#4600)
* server: fix cannot create vm if another vm with same name has been added and removed on the network

steps to reproduce the issue
(1) create vm-1 on network-1
(2) add vm-1 to network-2
(3) remove vm-1 from network-2
(4) create another vm with same name vm-1 on network-2

expected result: operation succeed
actual result: operation failed.

* #4600: add back a removed line
2021-01-27 19:28:52 +05:30