30280 Commits

Author SHA1 Message Date
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
Nick Livens
094c4cf02b 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 2016-11-25 11:49:47 +01:00
Rohit Yadav
185be24ed8
Merge pull request #1577 from nlivens/CLOUDSTACK-9321
CLOUDSTACK-9321 : Multiple Internal LB rules (more than one Internal LB rule with same source IP address) are not getting resolved in the corresponding InternalLbVm instance's haproxy.cfg fileMultiple Internal LB rules (more than one Internal LB rule with same source IP address) are not getting resolved in the corresponding InternalLbVm instance's haproxy.cfg file. Moreover, each time a new Internal LB rule is added to the corresponding InternalLbVm instance, it replaces the existing one. Thus, traffic corresponding to these un-resolved (old) Internal LB rules are getting dropped by the InternalLbVm instance.

PR contents:
1) Fix for this bug.
2) Marvin test coverage for Internal LB feature on master with native ACS setup (component directory) including validations for this bug fix.
3) Enhancements on our exiting Internal LB Marvin test code (nuagevsp plugins directory) to validate this bug fix.
4) PEP8 & PyFlakes compliance with the added Marvin test code.

* pr/1577:
  CLOUDSTACK-9321 : Multiple Internal LB rules (more than one Internal LB rule with same source IP address) are not getting resolved in the corresponding InternalLbVm instance's haproxy.cfg file

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-25 13:31:45 +05:30
Rohit Yadav
62c8496d7e
Merge pull request #1580 from nlivens/nuage_vsp_pat_fip2ul
CLOUDSTACK-9402 : Support for underlay features (Source & Static NAT to underlay) in Nuage VSP pluginSupport for underlay features (Source & Static NAT to underlay) with Nuage VSP SDN Plugin including Marvin test coverage for corresponding Source & Static NAT features on master. Moreover, our Marvin tests are written in such a way that they can validate our supported feature set with both Nuage VSP SDN platform's overlay and underlay infra.

PR contents:
1) Support for Source NAT to underlay feature on master with Nuage VSP SDN Plugin.
2) Support for Static NAT to underlay feature on master with Nuage VSP SDN Plugin.
3) Marvin test coverage for Source & Static NAT to underlay on master with Nuage VSP SDN Plugin.
4) Enhancements on our exiting Marvin test code (nuagevsp plugins directory).
5) PEP8 & PyFlakes compliance with our Marvin test code.

* pr/1580:
  CLOUDSTACK-9402 : Support for underlay features (Source & Static NAT to underlay) in Nuage VSP plugin

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-25 13:29:15 +05:30
Rohit Yadav
d8c038e5b2
Merge branch '4.9' 2016-11-25 13:10:56 +05:30
Rohit Yadav
50f80cc2a0
Merge branch '4.8' into 4.9 2016-11-25 13:03:04 +05:30
Rohit Yadav
5811d33658 Merge pull request #1635 from myENA/feature/honor_force_stop_vm
CLOUDSTACK-9451https://issues.apache.org/jira/browse/CLOUDSTACK-9451

Re-doing against 4.8 since this is a bug, not a feature.

* pr/1635:
  CLOUDSTACK-9451

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-25 12:56:23 +05:30
Rohit Yadav
020606ec31 Merge pull request #1738 from SudharmaJain/cs-9566
CLOUDSTACK-9566 instance-id metadata for baremetal VM returns IDThere is difference in instance-id metadata across baremetal and other hypervisors.

On Baremetal
[root@ip-172-17-0-144 ~]# curl http://8.37.203.221/latest/meta-data/instance-id
6021

on Xen
[root@ip-172-17-2-103 ~]# curl http://172.17.0.252/latest/meta-data/instance-id
cbeb517a-e833-4a0c-b1e8-9ed70200fbbf

In both cases it should be vm's uuid.

* pr/1738:
  CLOUDSTACK-9566 instance-id metadata for baremetal VM returns ID

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-25 12:52:10 +05:30
Nick Livens
8d4dc81223 CLOUDSTACK-9402 : Support for underlay features (Source & Static NAT to underlay) in Nuage VSP plugin
CLOUDSTACK-9402 : Marvin tests for Source NAT and Static NAT features verification with NuageVsp (both overlay and underlay infra).

Co-Authored-By: Prashanth Manthena <prashanth.manthena@nuagenetworks.net>, Frank Maximus <frank.maximus@nuagenetworks.net>
2016-11-24 21:33:02 +01:00
Rohit Yadav
16c2761cea Merge PR #1545
CLOUDSTACK-8715: Add channel to Instances for Qemu Guest Agent

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-24 23:12:07 +05:30
Rohit Yadav
f07081dfc7
Merge branch '4.9'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-24 22:59:09 +05:30
Rohit Yadav
e59897bad8
Merge branch '4.8' into 4.9 2016-11-24 22:58:08 +05:30
Rohit Yadav
445d36c122
Merge PR #1737
CLOUDSTACK-9561 After domain/account deletion, snapshot taken by the
domain/account remains undeleted

While deleting the UserAccount Cleanup for the removed VMs/volumes are not
happening. For the removed VMs, snapshots doesn't get cleaned. Only for running
VMs(volumes in ready state) the cleanup happens.

When the VM is desroyed, the volume is marked as destroyed and later storage
garbage collector perform the cleanup. But if we try delete domain/account
before storage garbage collector runs, then it fails.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-24 22:56:22 +05:30
Rohit Yadav
c6bb8c6f41
Merge branch '4.9' 2016-11-24 12:45:01 +05:30
Rohit Yadav
825935da69
Merge branch '4.8' into 4.9 2016-11-24 12:44:19 +05:30
Rohit Yadav
90ae04b791
Merge pull request #1766 from murali-reddy/vr-default-network-gateway
CLOUDSTACK-9598: wrong defaut gateway for the nic in non-default network when guest VM has nic's in more than one guest network set the tag for each host in /etc/dhcphosts.txt, and use the tag to add exception in /etc/dhcpopts.txt to prevent sending default route, dns server in case if the nic is in non-default network

this was the behaviour with edithosts.sh prior to 4.6

* pr/1766:
  CLOUDSTACK-9598: wrong defaut gateway for the nic in non-default network

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-24 12:39:36 +05:30
Wido den Hollander
2a5f37c1b1
CLOUDSTACK-8715: Add channel to Instances for Qemu Guest Agent
This commit adds a additional VirtIO channel with the name
'org.qemu.guest_agent.0' to all Instances.

With the Qemu Guest Agent the Hypervisor gains more control over the Instance if
these tools are present inside the Instance, for example:

* Power control
* Flushing filesystems
* Fetching Network information

In the future this should allow safer snapshots on KVM since we can instruct the
Instance to flush the filesystems prior to snapshotting the disk.

More information: http://wiki.qemu.org/Features/QAPI/GuestAgent

Keep in mind that on Ubuntu AppArmor still needs to be disabled since the default
AppArmor profile doesn't allow libvirt to write into /var/lib/libvirt/qemu

This commit does not add any communication methods through API-calls, it merely
adds the channel to the Instances and installs the Guest Agent in the SSVMs.

With the addition of the Qemu Guest Agent channel a second channel appears in /dev
on a SSVM as a VirtIO port.

The order in which the ports are defined in the XML matters for the naming inside
the SSVM VM and by not relying on /dev/vportXX but looking for a static name the
SSVM still boots properly if the order in the XML definition is changed.

A SSVM with both ports attached will have something like this:

  root@v-215-VM:~# ls -l /dev/virtio-ports
  total 0
  lrwxrwxrwx 1 root root 11 May 13 21:41 org.qemu.guest_agent.0 -> ../vport0p2
  lrwxrwxrwx 1 root root 11 May 13 21:41 v-215-VM.vport -> ../vport0p1
  root@v-215-VM:~# ls -l /dev/vport*
  crw------- 1 root root 251, 1 May 13 21:41 /dev/vport0p1
  crw------- 1 root root 251, 2 May 13 21:41 /dev/vport0p2
  root@v-215-VM:~#

In this case the SSVM port points to /dev/vport0p1, but if the order in the XML
is different it might point to /dev/vport0p2

By looking for a portname with a pre-defined pattern in /dev/virtio-ports we
do not rely on the order in the XML definition.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2016-11-23 16:01:08 +01:00
Rohit Yadav
9bec7032be
Merge pull request #756 from nlivens/CLOUDSTACK-8781
CLOUDSTACK-8781 : Superfluous field during VPC creation

* pr/756:
  CLOUDSTACK-8781 : Superfluous field during VPC creation

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 15:01:58 +05:30
Rohit Yadav
feaeed7b16
Merge pull request #1542 from nvazquez/nestedv
CLOUDSTACK-9379: Support nested virtualization at VM level on VMware Hypervisor## Introduction

[JIRA TICKET](https://issues.apache.org/jira/browse/CLOUDSTACK-9379)

It is desired to support nested virtualization at VM level for VMware hypervisor. Current behaviour supports enabling/desabling global nested virtualization by modifying global config `'vmware.nested.virtualization'`. It is wished to improve this feature, having control at VM level instead of a global control only.

A new global configuration is added, to enable/disable VM nested virtualization control: `'vmware.nested.virtualization.perVM'`. Default value=false

After a vm deployment or start command, vm params include `'nestedVirtualizationFlag'` key and its value is:
- true -> nested virtualization enabled
- false -> nested virtualization disabled

**We will determinate nested virtualization enabled/disabled by examining this 3 values:**
- **(1)** global configuration `'vmware.nested.virtualization'` value
- **(2)** global configuration `'vmware.nested.virtualization.perVM'` value
- **(3)** `'nestedVirtualizationFlag'` value in `user_vm_details` if present, `null` if not.

Using this 3 values, there are different use cases:
- **(1)** = TRUE, **(2)** = TRUE, **(3)** is null -> _ENABLED_
- **(1)** = TRUE, **(2)** = TRUE, **(3)** = TRUE -> _ENABLED_
- **(1)** = TRUE, **(2)** = TRUE, **(3)** = FALSE -> _DISABLED_
- **(1)** = TRUE, **(2)** = FALSE, **(3)** indifferent  -> _ENABLED_
- **(1)** = FALSE, **(2)** = TRUE, **(3)** is null -> _DISABLED_
- **(1)** = FALSE, **(2)** = TRUE, **(3)** = TRUE -> _ENABLED_
- **(1)** = FALSE, **(2)** = TRUE, **(3)** = FALSE -> _DISABLED_
- **(1)** = FALSE, **(2)** = FALSE, **(3)** indifferent -> _DISABLED_

* pr/1542:
  CLOUDSTACK-9379: Support nested virtualization at VM level on VMware Hypervisor

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 15:00:36 +05:30
Rohit Yadav
97f9ef52a4
Merge branch '4.9' 2016-11-23 14:31:09 +05:30
Rohit Yadav
1e88ad45a7
Merge pull request #1680 from murali-reddy/vr_csfile_search
CLOUDSTACK-9498: VR CsFile search utility methods fail when search stThere is no real use of python 're' module  in CsFile.py utility methods searchString, deleteLine. Regular string search is sufficient. These methods are used only for VPN user add/delete. Since VPN user password can have python 're' module meta characters, it interfere with search functionality.

Replacing re.search() with regular string search instead.

Change is confined to VPN add/delete users. Have run the test/integration/component/test_vpn_users.py

VPN remote access user limit tests ... === TestName: test_01_VPN_user_limit | Status : SUCCESS ===
ok
Test create VPN when L2TP port in use ... === TestName: test_02_use_vpn_port | Status : SUCCESS ===
ok
Test create NAT rule when VPN when L2TP enabled ... === TestName: test_03_enable_vpn_use_port | Status : SUCCESS ===
ok
Test add new users to existing VPN ... === TestName: test_04_add_new_users | Status : SUCCESS ===
ok
Test add duplicate user to existing VPN ... === TestName: test_05_add_duplicate_user | Status : SUCCESS ===
ok
Test as global admin, add a new VPN user to an existing VPN entry ... === TestName: test_06_add_VPN_user_global_admin | Status : SUCCESS ===
ok
Test as domain admin, add a new VPN user to an existing VPN entry ... === TestName: test_07_add_VPN_user_domain_admin | Status : SUCCESS ===
ok

* pr/1680:
  CLOUDSTACK-9498: VR CsFile search utility methods fail when search string has 're' meta chars, and causing VPN user add/deelte to fail

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 14:31:00 +05:30
Rohit Yadav
35803805c7
Merge branch '4.9' 2016-11-23 14:28:31 +05:30
Rohit Yadav
1f2184800b Merge pull request #1681 from murali-reddy/router_eth_device_index
CLOUDSTACK-9491: incorrect parsing of device list to find ethernet index of plugged NICIn VmwareResource, findRouterEthDeviceIndex() method find ethernet interface index given
the mac address. This method is used, once a nic is plugged to determine ethernet interface.
"/proc/sys/net/ipv4/conf" from the VR and looped through the devices to find the right
ethernet interface. Howver current logic read it once, and loops through the device list.
Its observerd device may not show up '/proc/sys/net/ipv4/conf' immediatly once NIC is plugged
in the VM from vCenter.

Fix ensured, while waiting for 15 sec in the loop, read the latest content from /proc/sys/net/ipv4/conf
, so that right device list is processed.

Manual tested VPC scenarios of adding new tiers which uses findRouterEthDeviceIndex, to find the guest/public network ethernet index.

* pr/1681:
  CLOUDSTACK-9491: incorrect parsing of device list to find ethernet index of plugged NIC

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 14:28:12 +05:30
Rohit Yadav
0642a6982f
Merge branch '4.9' 2016-11-23 14:22:15 +05:30
Rohit Yadav
55b918076f
Merge branch '4.8' into 4.9 2016-11-23 13:50:15 +05:30
Rohit Yadav
ff616e700b Merge pull request #1745 from shapeblue/CLOUDSTACK-9503
CLOUDSTACK-9503: Increased the VR script timeout. Most of the changes are about converting int/long time values to joda Duration.

* pr/1745:
  CLOUDSTACK-9503: Increased the VR script timeout. Most of the changes are about converting int/long time values to joda Duration.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 13:41:52 +05:30
Rohit Yadav
15fd571f2b
Merge branch '4.9' 2016-11-23 13:39:02 +05:30
Rohit Yadav
1137a79ccc
Merge branch '4.8' into 4.9 2016-11-23 13:38:11 +05:30
Rohit Yadav
3b59a9b2e4 Merge pull request #1757 from murali-reddy/vr_dhcp_entries
CLOUDSTACK-9583: VR: In CsDhcp.py preseed both hostaname and localhost to resolve to 127.0.0.1

The VR executes a ip route flush command as part of configurations. This command performs a
DNS lookup on the VR hostname. Since the VR does not have a DNS entry, the ip command would
wait 5 seconds before timing out and executing the flush operation. This fix adds the VR
hostname to /etc/hosts mapped to 127.0.0.1 to answer the DNS lookup  reducing the
execution time.

* pr/1757:
  CLOUDSTACK-9583: VR: In CsDhcp.py preseed both hostaname and localhost to resolve to 127.0.0.1

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 13:33:56 +05:30
Rohit Yadav
7a5e88ccb4
Merge branch '4.9' 2016-11-23 13:29:39 +05:30
Rohit Yadav
072af7a677 Merge pull request #1684 from shapeblue/cloudstack-9489
CLOUDSTACK-9489: the new config vars that are added do not goto DB if values are set to NULL, removing this check so the entries in DB are made with NULL values

* pr/1684:
  CLOUDSTACK-9489: the new config vars that are added do not goto DB if values are set to NULL, removing this check so the entries in DB are made with NULL values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-23 13:18:55 +05:30
Nick Livens
62e858131f CLOUDSTACK-9321 : Multiple Internal LB rules (more than one Internal LB rule with same source IP address) are not getting resolved in the corresponding InternalLbVm instance's haproxy.cfg file
CLOUDSTACK-9321 : Adding component tests for VPC Network functionality - Internal LB rules

CLOUDSTACK-9321 : Extending Nuage VSP Internal LB Marvin tests

Co-Authored-By: Prashanth Manthena <prashanth.manthena@nuagenetworks.net>, Frank Maximus <frank.maximus@nuagenetworks.net>
2016-11-22 15:51:22 +01:00
Murali Reddy
7ab35e6616 CLOUDSTACK-9598: wrong defaut gateway for the nic in non-default network
when guest VM has nic's in more than one guest network set the tag for
each host in /etc/dhcphosts.txt, and use the tag to add exception in
/etc/dhcpopts.txt to prevent sending default route, dns server in case if the nic is in non-default network
this was the behaviour with edithosts.sh prior to 4.6

added new test case test_router_dhcp_opts to test DHCP option file use of cloudstack
2016-11-22 16:30:42 +05:30
Koushik Das
027409d9bc Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9410: Data Disk shown as detached in XS
2016-11-21 11:25:38 +05:30
Koushik Das
bdc806e315 Merge release branch 4.8 to 4.9
* 4.8:
  CLOUDSTACK-9410: Data Disk shown as detached in XS
2016-11-21 11:12:09 +05:30
Koushik Das
7f051bd790 Signed-off-by: Koushik Das <koushik@apache.org> 2016-11-21 10:45:04 +05:30
Nick Livens
e91b734638 CLOUDSTACK-8781 : Superfluous field during VPC creation 2016-11-20 14:24:16 +01:00
Rohit Yadav
88e059d6f0
Merge branch '4.9' 2016-11-20 13:43:24 +05:30
Rohit Yadav
8c62464a31
Merge pull request #1591 from myENA/alert-response-doc-update
Updating Alert codesUpdating codes per values present here: https://github.com/apache/cloudstack/blob/4.8/api/src/org/apache/cloudstack/alert/AlertService.java#L39

* pr/1591:
  Updating Alert codes (CLOUDSTACK-9468)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-20 13:42:49 +05:30
nvazquez
cebee7cbda CLOUDSTACK-9379: Support nested virtualization at VM level on VMware Hypervisor 2016-11-17 17:51:50 -03:00