30167 Commits

Author SHA1 Message Date
Mike Tutkowski
06806a6523 CLOUDSTACK-9619: Updates for SAN-assisted snapshots 2016-12-06 17:32:56 -07:00
Rohit Yadav
f82873ebf8
Merge branch '4.9' 2016-12-05 15:32:11 +05:30
Rohit Yadav
48b28f7d6e
Merge branch '4.8' into 4.9 2016-12-05 15:32:03 +05:30
Rohit Yadav
20aea27dc0
Merge pull request #1765 from shapeblue/CLOUDSTACK-9586
Cloudstack 9586: When using local storage with Xenserver prepareTemplate does not work with multiple primary storeThe race condition will happen whenever there are multiple primary storages and the CS tries to mount the secondary store to xenserver host simultaneously.

Due to synchronised block one mount will be successful and other thread will get the already mounted SR. Without the fix the two thread will try to mount it parallely and one will fail on Xenserver.

* pr/1765:
  Cloudstack 9586: When using local storage with Xenserver prepareTemplate does not work with multiple primary store The race condition will happen whenever there are multiple primary storages and the CS tries to mount the secondary store to xenserver host simultaneously. Due to synchronised block one mount will be successful and other thread will get the already mounted SR. Without the fix the two thread will try to mount it parallely and one will fail on Xenserver.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-05 15:31:25 +05:30
Rohit Yadav
45a746ad2e
Merge branch '4.9' 2016-12-05 15:16:22 +05:30
Rohit Yadav
8d14e8e8b5 Merge pull request #1729 from shapeblue/vmware-memleak-fix
CLOUDSTACK-9564: Fix memory leaks in VmwareContextPoolIn a recent management server crash, it was found that the largest contributor
to memory leak was in VmwareContextPool where a registry is held (arraylist)
that grows indefinitely. The list itself is not used anywhere or consumed. There
exists a hashmap (pool) that returns a list of contexts for existing poolkey
(address/username) that is used instead.

This fixes the issue by removing the arraylist registry, and limiting the
length of the context list for a given poolkey.

@blueorangutan package

* pr/1729:
  CLOUDSTACK-9564: Fix memory leaks in VmwareContextPool

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-05 15:15:58 +05:30
Rohit Yadav
3a03a01093
Merge branch '4.8' into 4.9
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-05 15:15:00 +05:30
Rohit Yadav
9e4246a26d Merge pull request #1808 from shapeblue/fix-release-script-checkstyle
CLOUDSTACK-9648: Fix release script to update checkstyle pomThis fixes build_asf.sh release script to update checkstyle pom.xml with the
provided new version.

* pr/1808:
  CLOUDSTACK-9648: Fix release script to update checkstyle pom

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-05 15:08:04 +05:30
Rohit Yadav
46d11b3711
Merge branch '4.9' 2016-12-05 13:52:22 +05:30
Rohit Yadav
61644f9ea9
Merge branch '4.8' into 4.9 2016-12-05 13:51:43 +05:30
Rohit Yadav
d540015bc8 Merge pull request #1802 from murali-reddy/test_privategw_acl
CLOUDSTACK-9635: fix test_privategw_acl.pyensure VLAN used for createPrivateGateway is determined after the guest
networks in the VPC is created, so that we skip VLAN allocated for guest
network for the private network of vpc gateway

* pr/1802:
  CLOUDSTACK-9635: fix test_privategw_acl.py

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-05 13:51:09 +05:30
Murali Reddy
db39a06085 CLOUDSTACK-9635: fix test_privategw_acl.py
ensure VLAN used for createPrivateGateway is determined after the guest
networks in the VPC is created, so that we skip VLAN allocated for guest
network for the private network of vpc gateway
2016-12-05 09:54:45 +05:30
Rohit Yadav
a2e65ac28c
Merge branch '4.9' 2016-12-02 22:29:32 +05:30
Rohit Yadav
b81683b742
Merge branch '4.8' into 4.9 2016-12-02 22:29:16 +05:30
Rohit Yadav
14b4642ac8 Merge pull request #1806 from shapeblue/4.8-travis-apt-clean
travis: cleanup apt before installing packagesThis aims at fixing recent Travis failures.

* pr/1806:
  CLOUDSTACK-9584: Fix Travis to cleanup apt repo before pkg installation

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 22:28:51 +05:30
Rohit Yadav
7da423157b CLOUDSTACK-9584: Fix Travis to cleanup apt repo before pkg installation
This fixes an env issue that cleans apt repo pkg/cache, before installing new
packages.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 22:21:06 +05:30
Abhinandan Prateek
ba32ac1a7c Cloudstack 9586: When using local storage with Xenserver prepareTemplate does not work with multiple primary store
The race condition will happen whenever there are multiple primary storages and the CS tries to mount the secondary store to xenserver host simultaneously.
Due to synchronised block one mount will be successful and other thread will get the already mounted SR. Without the fix the two thread will try to mount it parallely and one will fail on Xenserver.
2016-12-02 13:37:47 +05:30
Rohit Yadav
77d2984494 CLOUDSTACK-9648: Fix release script to update checkstyle pom
This fixes build_asf.sh release script to update checkstyle pom.xml with the
provided new version.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 13:23:41 +05:30
Rohit Yadav
7670ce0e65
Merge branch '4.9'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 12:00:44 +05:30
Rohit Yadav
f231c8cd98 Merge pull request #1803 from nitin-maharana/nitin6
CLOUDSTACK-9636: The host alerts box should be named as hosts in Alerts.The host Alerts box shows hosts in Alerts. The name host Alerts is misleading,
it should be changed to hosts in alerts.

For rest of the languages, it should be modified accordingly.
As I am not familiar with other languages, contributors familiar with other languages can suggest the change. or Open a new PR.

* pr/1803:
  CLOUDSTACK-9636: The host alerts box should be named as hosts in Alerts.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 11:56:49 +05:30
Rohit Yadav
cc73f17a75
Merge pull request #1800 from shapeblue/4.8-marvin-fix-for-snapshots-xenserver
CLOUDSTACK-9633:test_snapshot is failing due to incorrect string construction in utils.py

* pr/1800:
  CLOUDSTACK-9633:test_snapshot is failing due to incorrect string construction in utils.py

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 11:31:02 +05:30
Rohit Yadav
e091e82a7f
Merge branch '4.9' 2016-12-02 10:42:31 +05:30
Rohit Yadav
3ef775dc4d Merge pull request #828 from sureshanaparti/CLOUDSTACK-8854
CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisorsCLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors

Problem Description: CloudStack doesnt add a USB controller to the Apple Mac OS X VMs created in ESXi hypervisors. But, vSphere Client, by default, adds a USB Controller to the Mac OS VMs. Mac OS X machines require USB Controller for USB mouse and keyboard access.

Root Cause: The Guest OS details are specified in the Virtual Machine Configuration Spec for creating the VM (using the SDK API) in the EXSi hypervisor. No USB Controller is added to the Virtual Machine Configuration Spec. As the guest OS Identification details are specified in the VM Configuration Spec, It is assumed that the Create VM SDK API would create the defaults in the VM same as vSphere Client. But, as per the observation, USB Controller is not added to the Guest OS - Mac OS VM created through the SDK API.

Resolution: When the Guest OS is Apple Mac OS, Add the USB Controller (EHCI+UHCI - Mac supported) to the Virtual Machine Configuration Spec before Creating or Starting the VM. For any existing Mac OS VMs, Stop and Start to add the USB Controller. For new VMs with Mac OS, USB Controller is added automatically.

* pr/828:
  CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 10:41:27 +05:30
Boris
f1fd325c08 CLOUDSTACK-9633:test_snapshot is failing due to incorrect string construction in utils.py
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-01 17:10:20 +05:30
Rohit Yadav
90a3d97c5e CLOUDSTACK-9564: Fix memory leaks in VmwareContextPool
In a recent management server crash, it was found that the largest contributor
to memory leak was in VmwareContextPool where a registry is held (arraylist)
that grows indefinitely. The list itself is not used anywhere or consumed. There
exists a hashmap (pool) that returns a list of contexts for existing poolkey
(address/username) that is used instead.

This fixes the issue by removing the arraylist registry, and limiting the
length of the context list for a given poolkey.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-01 15:27:29 +05:30
Suresh Kumar Anaparti
309da6a57f CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors 2016-12-01 14:32:18 +05:30
Nitin Kumar Maharana
0198abbc40 CLOUDSTACK-9636: The host alerts box should be named as hosts in Alerts. 2016-12-01 13:56:29 +05:30
Rohit Yadav
e8de07a1ae
Merge branch '4.9' 2016-12-01 10:38:51 +05:30
Rohit Yadav
5d7288b858
Merge branch '4.8' into 4.9 2016-12-01 10:38:43 +05:30
Rohit Yadav
b57d0ae7c3 Merge pull request #1801 from murali-reddy/test_router_dhcp_opts
fix marvin test failure test_router_dhcp_optsmarvin, VirtualMachine object's, nic attribute does not have nic's in any
particualr order in the array. so check isdefault attribute to the get non-default nic

earlier test made assumption that nic[0] is default nic, which is not true always

* pr/1801:
  CLOUDSTACK-9634: fix marvin test failure test_router_dhcp_opts

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-01 10:37:32 +05:30
Murali Reddy
a07e7ac099 CLOUDSTACK-9634: fix marvin test failure test_router_dhcp_opts
marvin, VirtualMachine object, nic attribute does not have nic's in any
particualr order in the array. soi check isdefault attribute to the get non-default nic

earlier test made assumption that nic[0] is default nic, which is not true always
2016-11-30 17:32:03 +05:30
Rohit Yadav
1de336b975
Merge branch '4.9' 2016-11-29 17:19:47 +05:30
Rohit Yadav
bef2236d33
Merge pull request #1793 from sateesh-chodapuneedi/pr-cs-9624
CLOUDSTACK-9624 Incorrect hypervisor mapping of guest os Windows 2008 Server R2 (64-bit) for VMware**JIRA ticket**
CLOUDSTACK-9624 Incorrect hypervisor mapping of guest os Windows 2008 Server R2 (64-bit) for VMware

**Issue**
Guest OS Windows Server 2008 R2 (64-bit) is being mapped to incorrect guest os at hypervisor, which is winLonghorn64Guest, same as that of Windows Server 2008 (64-bit).
Due to this the VM's guest os type was set to "Other (64-bit)", which would not represent the guest OS accurately on hypervisor.

**Solution**
Fix is to update incorrect guest_os_name field value in DB table cloud.guest_os_hypervisor.
Th query is,
UPDATE IGNORE `cloud`.`guest_os_hypervisor` SET guest_os_name = 'windows7Server64Guest' WHERE guest_os_id IN (SELECT id FROM guest_os WHERE display_name LIKE 'windows%2008%r2%64%') AND hypervisor_type = 'VMware' AND hypervisor_version != 'default';

After running above query, the 6 updated rows looks like

UPDATE IGNORE `cloud`.`guest_os_hypervisor` SET guest_os_name = 'windows7Server64Guest' WHERE guest_os_id IN (SELECT id FROM guest_os WHERE display_name LIKE 'windows%2008%r2%64%') AND hypervisor_type = 'VMware' AND hypervisor_version != 'default';
Query OK, 6 rows affected (0.01 sec)
Rows matched: 6  Changed: 6  Warnings: 0

mysql> select * from guest_os_hypervisor where guest_os_id in (select id from guest_os where display_name like 'windows%2008%r2%64%') and hypervisor_type = 'VMware' and hypervisor_version != 'default';
+------+-----------------+-----------------------+-------------+--------------------+--------------------------------------+---------------------+---------+-----------------+
| id   | hypervisor_type | guest_os_name         | guest_os_id | hypervisor_version | uuid                                 | created             | removed | is_user_defined |
+------+-----------------+-----------------------+-------------+--------------------+--------------------------------------+---------------------+---------+-----------------+
| 1307 | VMware          | windows7Server64Guest |          54 | 4.0                | 98fce372-b271-11e6-b56b-4e61adb7c6b1 | 2016-11-24 23:42:44 | NULL    |               0 |
| 1448 | VMware          | windows7Server64Guest |          54 | 4.1                | 990abdcc-b271-11e6-b56b-4e61adb7c6b1 | 2016-11-24 23:42:45 | NULL    |               0 |
| 1589 | VMware          | windows7Server64Guest |          54 | 5.0                | 99166f75-b271-11e6-b56b-4e61adb7c6b1 | 2016-11-24 23:42:45 | NULL    |               0 |
| 1730 | VMware          | windows7Server64Guest |          54 | 5.1                | 9930ff30-b271-11e6-b56b-4e61adb7c6b1 | 2016-11-24 23:42:45 | NULL    |               0 |
| 1871 | VMware          | windows7Server64Guest |          54 | 5.5                | 993acb18-b271-11e6-b56b-4e61adb7c6b1 | 2016-11-24 23:42:45 | NULL    |               0 |
| 2381 | VMware          | windows7Server64Guest |          54 | 6.0                | 9cb53675-b271-11e6-b56b-4e61adb7c6b1 | 2016-11-24 18:12:51 | NULL    |               0 |
+------+-----------------+-----------------------+-------------+--------------------+--------------------------------------+---------------------+---------+-----------------+
6 rows in set (0.01 sec)

**Tests**
Registered a template with Windows 2008 R2 (64-bit) guest OS and deployed an instance from the template. Found that the VM appeared in vCenter with valid guest OS type instead of "Other (64-bit)" shown up before the fix.

* pr/1793:
  CLOUDSTACK-9624 Incorrect hypervisor mapping of guest os Windows 2008 Server R2 (64-bit) for VMware

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-29 17:19:06 +05:30
Rohit Yadav
dbe57c3e50
Merge branch '4.9' 2016-11-28 16:47:44 +05:30
Rohit Yadav
a5d5784859
Merge pull request #1710 from ustcweizhou/CLOUDSTACK-9538-deletesnapshot
CLOUDSTACK-9538: FIX failure in Deleting Snapshot From Primary Storage RBD Storage if vm has been removed

* pr/1710:
  CLOUDSTACK-9538: FIX failure in Deleting Snapshot From Primary Storage RBD Storage if vm has been removed

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-28 16:47:19 +05:30
Rohit Yadav
edf4fe951d
Merge branch '4.9' 2016-11-28 16:01:54 +05:30
Rohit Yadav
fd6833b9cb
Merge pull request #1755 from shapeblue/4.9-component-tests
CLOUDSTACK-9584: run component tests in Travis runThis would run additional component tests in Travis run.

* pr/1755:
  CLOUDSTACK-9584: run component tests in Travis run

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-28 16:01:04 +05:30
Rohit Yadav
7a96d32c7e
CLOUDSTACK-9584: run component tests in Travis run
This would run additional component tests in Travis run

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-28 13:47:50 +05:30
Sateesh Chodapuneedi
d7ff6b75f0 CLOUDSTACK-9624 Incorrect hypervisor mapping of guest os Windows 2008 Server R2 (64-bit) for VMware
Issue
Guest OS Windows Server 2008 R2 (64-bit) is being mapped to incorrect guest os at hypervisor, which is winLonghorn64Guest, same as that of Windows Server 2008 (64-bit).
Due to this the VM's guest os type was set to "Other (64-bit)", which would not represent the guest OS accurately on hypervisor.

Solution
Fix is to update incorrect guest_os_name field value in DB table cloud.guest_os_hypervisor.
Th query is,
UPDATE IGNORE cloud.guest_os_hypervisor SET guest_os_name = 'windows7Server64Guest' WHERE guest_os_id IN (SELECT id FROM guest_os WHERE display_name LIKE 'windows%2008%r2%64%') AND hypervisor_type = 'VMware' AND hypervisor_version != 'default';
2016-11-28 03:50:53 +05:30
Rohit Yadav
bc02858a49
Merge branch '4.9' 2016-11-27 21:49:58 +05:30
Rohit Yadav
bc846b1373
Merge pull request #1791 from milamberspace/CLOUDSTACK-9622_Fix_Project_Not_L10N
CLOUDSTACK-9622 Localisation for 'Project' label on the top of Web UI[Base 4.9, forward to 4.10 too]

The label Project isn't localized.

Sample with chinese UI:
Current:
![selection_457](https://cloud.githubusercontent.com/assets/3995882/20648086/56e54cfe-b495-11e6-9e78-3590a24302d1.png)

With this PR:
![selection_456](https://cloud.githubusercontent.com/assets/3995882/20648088/6090960a-b495-11e6-9dc0-eb24e16dcdc6.png)

cc @rhtyd

* pr/1791:
  CLOUDSTACK-9622 Localisation for 'Project' label on the top of Web UI

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-27 21:49:35 +05:30
Rohit Yadav
21209a06ad
Merge pull request #1789 from milamberspace/L10N-update-Master-20161124
Update L10N files from Transifex (2016-11-27) for the new release 4.10.0.0I've check manually the correct display of the UI foreach language.

Don't forget to merge this before 4.10 release.

cc @jburwell @rhtyd

* pr/1789:
  CLOUDSTACK-9621: Update L10N resource files with 4.10 strings from Transifex (20161127)
  CLOUDSTACK-9621: Improve conversion Transifex's JSON format to CloudStack JS

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-27 21:47:21 +05:30
Milamber
0522d0df93 CLOUDSTACK-9622 Localisation for 'Project' label on the top of Web UI 2016-11-27 11:18:49 +00:00
Milamber
32a70cb83a CLOUDSTACK-9621: Update L10N resource files with 4.10 strings from Transifex (20161127) 2016-11-27 11:02:37 +00:00
Milamber
c238b12cd8 CLOUDSTACK-9621: Improve conversion Transifex's JSON format to CloudStack JS 2016-11-27 11:02:26 +00:00
Rohit Yadav
e5efae6c13
Merge branch '4.9' 2016-11-27 16:01:31 +05:30
Rohit Yadav
f78e946349
Merge pull request #1785 from prashanthvarma/4.9
CLOUDSTACK-9416 : Enabling Static NAT on an associated Public IP to one of the NICs (networks) of a multi-NIC VM fails due to a wrong (default) Guest VM IP being selected in the GUIBug in ACS master GUI: Enabling Static NAT on an associated Public IP to one of the NICs (networks) of a multi-NIC VM fails due to a wrong (default) Guest VM IP being selected in the GUI.

ERROR:
INFO  [c.c.a.ApiServer](catalina-exec-7:ctx-83926837 ctx-fc7aa5ed) VM ip 10.10.2.163 address not belongs to the vm

ACS GUI before the bug fix:

![network1](https://cloud.githubusercontent.com/assets/3722369/16091177/cff63836-3332-11e6-8854-c7e8222a7c67.png)
![network2](https://cloud.githubusercontent.com/assets/3722369/16091186/d7118ba2-3332-11e6-9143-ae0a5cd96235.png)

As you can see in the above attached ACS GUI screen shots, same (default) guest VM IP is being selected in the ACS GUI for both the NICs (networks) of the multi-NIC VM while enabling Static NAT on the corresponding associated Public IPs. Thus, we hit this issue.

ACS GUI after this bug fix:

![fixed_network1](https://cloud.githubusercontent.com/assets/3722369/16091242/1c1b3252-3333-11e6-82e5-071bd05a7edb.png)
![fixed_network2](https://cloud.githubusercontent.com/assets/3722369/16091245/1fd52696-3333-11e6-8f96-3f9ca0019af6.png)

As you can see in the above attached ACS GUI screen shots, this bug fix resolves the above mentioned issue.

* pr/1785:
  CLOUDSTACK-9416 : Enabling Static NAT on an associated Public IP to one of the NICs (networks) of a multi-NIC VM fails due to a wrong (default) Guest VM IP being selected in the GUI

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-27 16:00:58 +05:30
Rohit Yadav
d0481723e3
Merge branch '4.9' 2016-11-27 15:50:18 +05:30
Rohit Yadav
6a449e4b3b
Merge pull request #1788 from shapeblue/4.9-fix-merge-pr1766
systemvm: Fix regression from fwd-merging PR #1766Fixes merge conflict issue incorrectly fixed during a fwd-merge in 825935
from PR #1766.

* pr/1788:
  systemvm: Fix regression from 825935

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-27 15:49:55 +05:30
Rohit Yadav
cc72e4da64 systemvm: Fix regression from 825935
Fixes merge conflict issue incorrectly fixed during a fwd-merge in 825935
from PR #1766

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-27 15:43:10 +05:30