10792 Commits

Author SHA1 Message Date
Rohit Yadav
86fcb14238 Merge remote-tracking branch 'origin/4.14'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-09-24 12:20:29 +05:30
Wei Zhou
534dd475d8
agent: Compare indirect agent lb algorithm when cloudstack agent connects (#4335)
Compare not only the list of management servers but also the lb algorithm when agent connects.

Fixes: #3895
2020-09-23 12:48:16 +05:30
davidjumani
c06e7ded3c
systemvm: update novnc v1.2.0 (#4323)
Update noVNC v1.2.0, add support for clipboard, explicit button toolbar and resize screensize
2020-09-22 17:42:30 +05:30
Pearl Dsilva
82b6971258
server: Handle listProjects API to list projects with user as members when listAll=true (#4316)
* added defensive checks for avoiding NPE and list projects API fix

* list projects with account name provided to not include users in the account in response

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2020-09-17 10:20:34 +05:30
davidjumani
44bc134162
Adding acl name to several responses (#4315) 2020-09-17 10:13:14 +05:30
Pearl Dsilva
b464fe41c6
server: Secondary Storage Usage Improvements (#4053)
This feature enables the following:
Balanced migration of data objects from source Image store to destination Image store(s)
Complete migration of data
setting an image store to read-only
viewing download progress of templates across all data stores
Related Primate PR: apache/cloudstack-primate#326
2020-09-17 10:12:10 +05:30
Pearl Dsilva
f06daa5f8a
Change Global setting type for allow.user.create.projects (#4320)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2020-09-15 13:23:54 +05:30
Rakesh
43a25c78f6
Display acl name in listNetworks response (#4317)
* Display acl name in listNetworks response

Display acl name along with its id so that we
dont need to make extra api call to get acl name

* Add since tag
2020-09-11 14:36:20 +02:00
Rohit Yadav
c7328652fd Merge remote-tracking branch 'origin/4.14' 2020-09-01 16:02:33 +05:30
Rohit Yadav
578d29e166 Merge remote-tracking branch 'origin/4.13' into 4.14
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-09-01 16:01:52 +05:30
Gabriel Beims Bräscher
5c29d5ba45
influxdb: Avoid out of memory by influxDB (#4291)
After a few hours running with InfluxDB configured, CloudStack hangs due to OutOfMemoryException raised. The exception happens at com.cloud.server.StatsCollector.writeBatches(StatsCollector.java:1510):

2020-08-12 21:19:00,972 ERROR [c.c.s.StatsCollector] (StatsCollector-6:ctx-0a4cfe6a) (logid:03a7ba48) Error trying to retrieve host stats
java.lang.OutOfMemoryError: unable to create new native thread
        ...
        at org.influxdb.impl.BatchProcessor.<init>(BatchProcessor.java:294)
        at org.influxdb.impl.BatchProcessor$Builder.build(BatchProcessor.java:201)
        at org.influxdb.impl.InfluxDBImpl.enableBatch(InfluxDBImpl.java:311)
        at com.cloud.server.StatsCollector.writeBatches(StatsCollector.java:1510)
        at com.cloud.server.StatsCollector$AbstractStatsCollector.sendMetricsToInfluxdb(StatsCollector.java:1351)
        at com.cloud.server.StatsCollector$HostCollector.runInContext(StatsCollector.java:522)
Context on InfluxDB Batch: Enabling batch on InfluxDB is great and speeds writing but it requires caution to avoid Zombie threads.

Solution: This happens because the batching feature creates an internal thread pool that needs to be shut down explicitly; therefore, it is important to add: influxDB.close().
2020-09-01 15:59:43 +05:30
Gabriel Beims Bräscher
d5acabdbf7
server: Avoid Null pointer at DomainChecker and enhance AssignVMCmd (#4279)
When executing request assignVirtualMachine with null domainID and a valid projectID then a NullPointerException happens at DomainChecker.java.

Command example:

assign virtualmachine virtualmachineid=vmID projectid=projectID account=admin
The NullPointerException that is thrown at DomainChecker is handled at AssignVMCmd.java#L142, resulting in the following log message: Failed to move vm null.
2020-09-01 13:58:42 +05:30
Wei Zhou
4746c8c726
server: move UpdateDefaultNic to vm work job queue (#4020)
While remove secondary nic from a Running vm, if update the default nic to the secondary nic before the nic is removed, the vm will not have default nic (and cannot be started) when both operations are completed.

It is because UpdateDefaultNic api is not handled as a vm work job (AddNicToVMCmd and RemoveNicFromVMCmd are), it is processed before nic is removed. The result is that secondary nic becomes default nic and got removed.
2020-09-01 13:54:48 +05:30
Rohit Yadav
749e302e0e Merge remote-tracking branch 'origin/4.14' 2020-08-28 15:00:18 +05:30
Rakesh
3b4a8fcbfd
api: List networks using networkofferingid (#4258)
Add extra parameter for listNetworks command to list
all networks using networkofferingid
2020-08-28 14:55:54 +05:30
Wei Zhou
8dfc11a57c
router: Save PlaceHolder nic for VR if network does not have source nat (#3902)
This PR aims to fix the issue below

Create a network offering for isolated network, services: Dns/Dhcp/Userdata, and enable it
create a isolated network with the new offering
create a vm
check the guest IP of virtual router,
restart network with cleanup
check the guest IP of new virtual router
The IP in step4 and step6 should be the same, but they are different actually.
2020-08-28 14:44:00 +05:30
Greg Goodrich
9b72e5dfb8
Adding os type id to the usage record response for virtual machines (#4266) 2020-08-25 16:54:08 +05:30
Spaceman1984
c4922c4289
Fixed rolling restart on VPC network (#4272)
This PR fixes the problem where restarting a network with cleanup within a VPC destroys the VR first before creating a new one.

Fixes: #3815
2020-08-25 15:19:51 +05:30
Rohit Yadav
961f3ece41 Merge remote-tracking branch 'origin/4.14' 2020-08-21 14:31:52 +05:30
davidjumani
3872bf1ff9
kvm: Enable PVLAN support on L2 networks (#4040)
This is an extention of #3732 for kvm.
This is restricted to ovs > 2.9.2
Since Xen uses ovs 2.6, pvlan is unsupported.
This also fixes issues of vms on the same pvlan unable to communicate if they're on the same host
2020-08-20 15:46:34 +05:30
Paul Angus
9ae4362908 add info only log file. 2020-08-20 10:45:11 +01:00
Rakesh
9681a28c7f
api: Display hypervisor type for VM snapshot (#4275)
The "hypervisor" field in listvmsnapshot response will
be used in primate to enable/disable creating snapshot
from vm snapshot functionality.

Creating snpashot from vm snapshot will be enabled only if
hypervisor is KVM
2020-08-20 14:13:49 +05:30
Spaceman1984
d57aa83517
server: Added nfs minor version support (#4180)
This PR adds minor version support when mounting nfs on the SSVM as requested in #2861

The global setting "secstorage.nfs.version" has been changed to use the String data type which allows any minor version to be specified.
2020-08-19 14:53:38 +05:30
Spaceman1984
b586eb22f1
Human readable sizes in logs (#4207)
This PR adds outputting human readable byte sizes in the management server logs, agent logs, and usage records. A non-dynamic global variable is added (display.human.readable.sizes) to control switching this feature on and off. This setting is sent to the agent on connection and is only read from the database when the management server is started up. The setting is kept in memory by the use of a static field on the NumbersUtil class and is available throughout the codebase.

Instead of seeing things like:
2020-07-23 15:31:58,593 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) (logid:) Seq 8-1863645820801253428: Processing: { Ans: , MgmtId: 52238089807, via: 8, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-224-VM","bytesSent":"106496","bytesReceived":"0","result":"true","details":"","wait":"0",}}] }

The KB MB and GB values will be printed out:

2020-07-23 15:31:58,593 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) (logid:) Seq 8-1863645820801253428: Processing: { Ans: , MgmtId: 52238089807, via: 8, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-224-VM","bytesSent":"(104.00 KB) 106496","bytesReceived":"(0 bytes) 0","result":"true","details":"","wait":"0",}}] }

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Human+Readable+Byte+sizes
2020-08-13 15:55:16 +05:30
Rohit Yadav
55a5470da6 Merge remote-tracking branch 'origin/4.14' 2020-08-13 15:52:47 +05:30
Pearl Dsilva
c578004fe5
projects: Role based users in Projects (#4128)
Enabling Role Based users in projects
Primate PR related to the FR: apache/cloudstack-primate#382
Doc PR: https://github.com/apache/cloudstack-documentation/pull/145

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2020-08-13 15:45:39 +05:30
Pearl Dsilva
b68be664b7
server: Search vm snapshots using tags (#4213)
Search VM snapshots using tags
Currently, search of VM snapshots doesn't comply with tags passed as input
2020-08-13 15:39:08 +05:30
Rodrigo D. Lopez
3adee270c7
api: Prevent null pointer on listPublicIpAddress cmd (#4255)
* Prevent null pointer on listPublicIpAddress cmd

Insert an inner join between data_center table and user_ip_address where data_center.removed field is null

* Remove extra join and add a filter for VLAN removed
2020-08-13 15:36:19 +05:30
Rodrigo D. Lopez
6704ef2794
server: fix comparison using nullable objects (#4256)
This PR fix some wrongs comparison using nullable objects. Preventing null pointer exception
2020-08-13 15:35:23 +05:30
Abhishek Kumar
95c4ef167d
cks: fix for null hypervisor type (#4260)
Fixes #4241 

Failure to deploy VM when vm.instancename.flag is set to true

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2020-08-13 15:33:58 +05:30
Rohit Yadav
7bbb4d4bef Merge remote-tracking branch 'origin/4.14' 2020-08-12 13:46:13 +05:30
Rohit Yadav
6b6cc71be9 Merge remote-tracking branch 'origin/4.13' into 4.14 2020-08-12 13:44:41 +05:30
Spaceman1984
86939e7f9d
server: Fixed private gateway can't be deleted (#4016)
When the static route service is not available on the VPC and a static route is created, the static route is created in a revoked state.

Currently, the UI doesn't distinguish between active or revoked static routes.

This PR adds the missing state filter to the list routes command and only lists active routes in the UI.
It also ignores revoked routes when the private gateway is being removed but clears out the inactive routes before the gateway is removed.

Fixes #2908
2020-08-12 13:29:12 +05:30
Rohit Yadav
562a7db8df Merge remote-tracking branch 'origin/4.14'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-08-05 23:59:16 +05:30
Wei Zhou
cd8e28b279
server: Move restoreVM to vm work job queue (#4019) 2020-08-05 09:46:55 +00:00
Rohit Yadav
db665fa8df Merge remote-tracking branch 'origin/4.14'
Conflicts:
	engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-08-05 14:46:13 +05:30
Gabriel Beims Bräscher
2237486079
server: Allow renaming cluster, host, and storage (#4165)
This PR adds implementation for changing host and storage name, additionally, it fixes a Bug on cluster updateCluster API command. This PRs also enhances the UI by allowing editing field name on Host and Storage pool. Due to the fact that there is no support to editing cluster via UI, it was not edited.

TODO: I will address Host, Cluster, and Storage Pool name edition on CloudStack Primate once the API implementation gets merged.

Details:
Prior to this PR the following API commands did not offer support for updating name:

updateHost (enhancement)
updateStoragePool (enhancement)
Additionally, updateCluster claims to support changing a cluster name (via clustername parameter); however, such operation did not work. (bug)
2020-08-05 14:08:29 +05:30
Rakesh
a529470b16
server: Fix cpuallocated value in findHostsForMIgration api (#4220)
The findHostsForMigration api displays 0% always for
cpuallocated field which is wrong.

Fixes #4221
2020-08-05 14:02:09 +05:30
Rohit Yadav
2fce8b733e
vmware: volume utilisation is always zero (#4225)
This fixes issues of virtual size to be twice in case the disk is a
linked-clone root disk. The virtual size of root disk (first in chain)
must be used.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-08-05 14:01:16 +05:30
Rohit Yadav
36ef85012f Merge remote-tracking branch 'origin/4.14'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-07-29 14:08:02 +05:30
davidjumani
eec56025c8
api: Bug fixes for primate (#4214)
Adding the following fixes so primate can work without issues :
- Adding pagination for listNetworkAclLists
- Adding pagination for listRoles
- Returning mshost uuid rather than msid in list hosts response
- Allowing listVirtualMachinesMetrics to respect hostid
- Fixing return all details in template response
2020-07-29 12:26:39 +05:30
nvazquez
7e3b61b723 Merge branch '4.14' 2020-07-18 14:17:43 -03:00
nvazquez
5c6e79b1eb Merge branch '4.13' into 4.14 2020-07-18 14:15:46 -03:00
Nicolas Vazquez
f843c537f0
Fix snapshots garbage collection (#4188)
* Cleanup orphan entries from snapshot store ref for primary storage

* Add debug message
2020-07-18 14:12:53 -03:00
Rohit Yadav
dfc76e0278 Merge remote-tracking branch 'origin/4.14' 2020-07-08 11:37:14 +05:30
Rohit Yadav
ba767783bd Merge remote-tracking branch 'origin/4.13' into 4.14 2020-07-08 11:36:30 +05:30
Rohit Yadav
139aa13e6a
server: Purge all cookies on logout, set /client path on login (#4176)
This will purge all the cookies on logout including multiple sessionkey
cookies if passed. On login, this will restrict sessionkey cookie
(httponly) to the / path.

Fixes #4136

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2020-07-08 08:03:51 +05:30
Rohit Yadav
cb6b89c03b Merge remote-tracking branch 'origin/4.14' 2020-07-07 18:30:38 +05:30
Rohit Yadav
db9f8258d7
server: don't export B&R APIs if feature is not enabled globally (#4202)
This change will ensure that B&R APIs are not exported if the feature
is not enabled in any of the zones.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-07-07 18:29:44 +05:30
Rohit Yadav
2c82aac5aa Merge remote-tracking branch 'origin/4.14' 2020-07-07 12:53:05 +05:30