Commit Graph

28493 Commits

Author SHA1 Message Date
Remi Bergsma a5a5f612ea Merge pull request #867 from jayapalu/CLOUDSTACK-8891
CLOUDSTACK-8891: Fixed default iptables rules on VR  for guest trafficVR default iptables rules in INPUT chain are configured partially.
In CsAddress.py rules are configured while configuring public interface, guest interface post configuration is missed. Fixed to configure guest post configuration so that iptables rules are configured.

Testing:
1. Deployed vm in the network.
2.iptables rules on the VR configured correctly.
3.VM got the dhcp ip address from the VR.

* pr/867:
  CLOUDSTACK-8891: Fixed default iptables rules on VR  for guest traffic

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-09-24 15:35:33 +02:00
Remi Bergsma 7d5555429b Merge pull request #851 from SudharmaJain/cs-8864
CLOUDSTACK-8864: Not able to add TCP port forwarding rule in VPN for specific ports

Setting port forwarding rules for port 500,1701 and 4500 after enabling VPN, gives the error message "The range specified, xxxx, conflicts with rule xxxx which has xxxx." This happens because the rules added for vpn doesn't have a matching condition to allow port forwarding rules.

Added a unit test to verify the detectRulesConflict function of FirewallManagerImpl.

* pr/851:
  CLOUDSTACK-8864: Not able to add TCP port forwarding rule in VPN for specific ports

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-09-24 15:35:16 +02:00
Remi Bergsma 8367911ef7 Merge pull request #836 from SudharmaJain/cs-8863
CLOUDSTACK-8863: VM doesn't reconnect to internet post VR RESTART/STOP-START/RECREATE

The ongoing ICMP request reply session is broken when the VR is down, the expectation is that it would resume once the VR is up. Investigations revealed that the ongoing ICMP packets are sent out of eth2 without being NATed post VR stop/start or restart or recreate.

TCPDUMP output from VR post restart/stop-start/recreate on eth2:

root@r-4-VM:~# tcpdump -i eth2 icmp -n -vvv
tcpdump: listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes
06:22:52.749770 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.200.67 > 173.194.33.163: ICMP echo request, id 30996, seq 81, length 64
06:22:53.749782 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.200.67 > 173.194.33.163: ICMP echo request, id 30996, seq 82, length 64
06:22:54.749771 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.200.67 > 173.194.33.163: ICMP echo request, id 30996, seq 83, length 64
06:22:55.749775 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.200.67 > 173.194.33.163: ICMP echo request, id 30996, seq 84, length 64
06:22:56.749765 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.200.67 > 173.194.33.163: ICMP echo request, id 30996, seq 85, length 64
06:22:57.749776 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.200.67 > 173.194.33.163: ICMP echo request, id 30996, seq 86, length 64
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel
root@r-4-VM:~#
root@r-4-VM:~# grep icmp /proc/net/ip_conntrack
icmp     1 29 src=192.168.200.67 dst=173.194.33.163 type=8 code=0 id=30996 [UNREPLIED] src=173.194.33.163 dst=192.168.200.67 type=0 code=0 id=30996 mark=0 use=2

This get fixed after flushing the conntrack table.

Screenshots:

Before fix (ping session doesn't resume, stop and starting the ping works, 120 packets lost):
![image](https://cloud.githubusercontent.com/assets/12229259/9897800/4de7488e-5c6a-11e5-98eb-3bd79cc3a8b1.png)

After fix(ping session resumes, 27 packets lost):
![image](https://cloud.githubusercontent.com/assets/12229259/9897822/9112e866-5c6a-11e5-95b3-1b20600d2e44.png)

* pr/836:
  CLOUDSTACK-8863: VM doesn't reconnect to internet post VR RESTART/STOP-START/RECREATE

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-09-24 15:35:00 +02:00
Jayapal 746a5dc48e CLOUDSTACK-8891: Fixed default iptables rules on VR for guest traffic 2015-09-24 12:49:43 +05:30
Rajani Karuturi 13b29bac5a Merge pull request #875 from pdube/CLOUDSTACK-8898
Fixed box location on vagrant files for devcloud4 (CLOUDSTACK-8898)The centos-6.5 is no longer available

* pr/875:
  Added fix to binary installation vagrant files (CLOUDSTACK-8898)
  Fixed box location on vagrant files

Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
2015-09-24 10:01:07 +05:30
Wido den Hollander 73c7ad9a4a Merge pull request #878 from borisroman/CLOUDSTACK-8890
[4.6][BLOCKER]CLOUDSTACK-8890: Added isEmpty() check to prevent nullPointerException.Check if the list is empty before trying to get the first entry. If the list is empty, in example when dealing with projects, it will user the caller user id.

Tests to verify working order:
1. Deploy ACS
2. Create project
3. Create resource in project -> Should succeed!

* pr/878:
  Added isEmpty() check to prevent nullPointerException.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-23 16:04:35 +02:00
Patrick Dube 4b37df242e Added fix to binary installation vagrant files (CLOUDSTACK-8898) 2015-09-23 09:15:40 -04:00
Boris Schrijver 80cb3adad0 Added isEmpty() check to prevent nullPointerException. 2015-09-23 15:07:16 +02:00
Wido den Hollander a0f8f56a5d Merge pull request #845 from borisroman/CLOUDSTACK-8763
[4.6][BLOCKER]CLOUDSTACK-8763: Resolved POD/ZONE deletion failure.Instead of having both checkIfPodIsDeletable() and checkIfZoneIsDeletable have there own SQL query, I've refactored them so they use DAO SQL Queries.

This resolves the SQL Exception thrown by both classes.

Test to confirm working order:
- deploy ACS
- Add zones / pods. -> Try to delete without resources. -> Direct success.
- Add resources to zones / pods. -> Try to delete with resources in the pod / zone. -> Correct exception thrown. (Error message is why it cannot remove the zone / pod. IE: There is still a hosts or vm or .... )

* pr/845:
  Added unit tests for checkIfPodIsDeletable() and checkIfZoneIsDeletable().
  Updated Dao classes with correct field names.
  Refactored checkIfZoneIsDeletable().
  Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl.
  Added countIPs(long dcId, boolean onlyCountAllocated) to IPAddressDao and IPAddressDaoImpl.
  Added countIPs(long dcId, boolean onlyCountAllocated) to DataCenterIpAddressDao and DataCenterIpAddressDaoImpl.
  Refactored checkIfPodIsDeletable().
  Added findByPodId(Long podId) to HostDao and HostDaoImpl.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-23 14:00:04 +02:00
sanjeev a601ae445d Merge pull request #683 from pavanb018/multivol
CLOUDSTACK-8726 : Automation for Quickly attaching multiple data disks to a new VMAttach multiple Volumes simultaneously to a Running VM ... === TestName: test_attach_multiple_volumes | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 196.931s

OK

* pr/683:
  changed the testcase skip code into setup method
  Imparting changes mentioned by nitt10prashant
  Automation for multiple disk attachments to instance

Signed-off-by: sanjeev <sanjeev@apache.org>
2015-09-23 15:23:27 +05:30
sanjeev 2f7852bc59 Merge pull request #871 from sanju1010/vmsnap
CLOUDSTACK-8893: Fixing script as per the latest functionalityPlease check https://issues.apache.org/jira/browse/CLOUDSTACK-8893 for more details.

* pr/871:
  Modified test description
  CLOUDSTACK-8893: Fixing script as per the latest functionality

Signed-off-by: sanjeev <sanjeev@apache.org>
2015-09-23 15:01:20 +05:30
sanjeev 7147627aa2 Modified test description 2015-09-23 11:52:10 +05:30
sanjeev fbc2e2e983 CLOUDSTACK-8893: Fixing script as per the latest functionality 2015-09-23 11:52:08 +05:30
Rajani Karuturi 1a474374b9 Merge pull request #863 from borisroman/CLOUDSTACK-8883
[4.6][BLOCKER]CLOUDSTACK-8883: Resolved connect/reconnect issue.Hi!

@wilderrodrigues by implementing Callable you switched a couple of methods and fields. I switched them some more!

The reason why the Agent wouldn't reconnect was due to two facts.

Problem 1: Selector was blocking.
In the while loop at [1] _selector.select(); was blocking when the connection was lost. This means at [2] _isStartup = false; was never excecuted. Therefore at [3] the call to isStartup() always returned true resulting in an infinite loop.

Resolution 1: Move the call to cleanUp() [4] before checking if isStartup() has turned to false. cleanUp() will close() the _selector resulting in _isStartup to be set to false.

Problem 2: Setting _isStartup & _isRunning to true when init() throwed an unchecked exception (ConnectException).
The exception was nicely caught, but only logged. No action was taken! Resulting in _isStartup & _isRunning being set to true. Resulting in the fact the Agent thought it was connected successfully, though it wasn't.

Resolution 2: Adding return to the catch statement [5]. This way _isStartup & _isRunning aren't set to true.

Steps to test:
1. Deploy ACS.
2. Try all combinations of stopping/starting managment server/agent.

[1]b34f86c8d5/utils/src/main/java/com/cloud/utils/nio/NioConnection.java (L128)
[2]b34f86c8d5/utils/src/main/java/com/cloud/utils/nio/NioConnection.java (L176)
[3]b34f86c8d5/agent/src/com/cloud/agent/Agent.java (L404)
[4]b34f86c8d5/agent/src/com/cloud/agent/Agent.java (L399)
[5]b34f86c8d5/utils/src/main/java/com/cloud/utils/nio/NioConnection.java (L91)

* pr/863:
  Added return statement to stop start() if there has been an ConnectException.
  Call cleanUp() before looping isStartup().

Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
2015-09-23 11:21:41 +05:30
Patrick Dube 3f8f6eb790 Fixed box location on vagrant files 2015-09-22 15:04:01 -04:00
Koushik Das 86325cbc95 Merge pull request #792 from koushik-das/CLOUDSTACK-8826
CLOUDSTACK-8826: XenServer - Use device id passed as part of attach volume API properly

If device id passed as part of API and available then use it otherwise fallback on XS to automatically assign one.
For ISO device id used is 3 and it is processed before any other entry to avoid conflict.

Signed-off-by: Koushik Das <koushik@apache.org>
2015-09-22 15:43:42 +05:30
Boris Schrijver b34f86c8d5 Added return statement to stop start() if there has been an ConnectException. 2015-09-22 00:38:16 +02:00
Remi Bergsma d543e2aa2c Merge pull request #839 from bvbharatk/CLOUDSTACK-8851
CLOUDSTACK-8851 Redundant VR getting started in the same cluster or hwe are not populating the deployment destination of the previous rvr in the avoid set of the rvr that is being created. This was resulting in both the rvrs getting deployed to same host sometimes even when it
could have gone to a different one.

Now we are updating the avoids set of the deployment plan  to fix this issue.

* pr/839:
  CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-09-21 20:03:58 +02:00
Boris Schrijver 9693b97c21 Call cleanUp() before looping isStartup(). 2015-09-21 16:54:56 +02:00
Koushik Das f5b9a96d24 CLOUDSTACK-8826: XenServer - Use device id passed as part of attach volume API properly
If device id passed as part of API and available then use it otherwise fallback on XS to automatically assign one.
For ISO device id used is 3 and it is processed before any other entry to avoid conflict.
2015-09-21 17:09:14 +05:30
SudharmaJain 96c38bf491 CLOUDSTACK-8864: Not able to add TCP port forwarding rule in VPN for specific ports 2015-09-19 23:40:21 +05:30
Boris Schrijver 5a3a3d641d Added unit tests for checkIfPodIsDeletable() and checkIfZoneIsDeletable(). 2015-09-17 17:28:29 +02:00
Boris Schrijver fa5f388fe9 Updated Dao classes with correct field names. 2015-09-17 15:54:29 +02:00
Wido den Hollander a5ca762acb Merge pull request #820 from wido/CLOUDSTACK-8840
CLOUDSTACK-8840: Systemd service for the Usage ServerThere already was a uncompleted systemd service file for the Usage
Server.

This new one replaces sysvinit and the old systemd service file.

* pr/820:
  CLOUDSTACK-8840: Do not include old systemd wrapper
  CLOUDSTACK-8840: Fix the source path of the service file
  CLOUDSTACK-8840: Systemd service for the Usage Server

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-17 10:09:58 +02:00
SudharmaJain 56d4429500 CLOUDSTACK-8863: VM doesn't reconnect to internet post VR RESTART/STOP-START/RECREATE 2015-09-17 11:50:21 +05:30
Boris Schrijver b31e64d49d Refactored checkIfZoneIsDeletable().
It now makes use of various DAO DB function instead of running a self build query.
2015-09-16 22:19:14 +02:00
Boris Schrijver 0df3357cac Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl. 2015-09-16 22:17:27 +02:00
Boris Schrijver 12fc2b4c26 Added countIPs(long dcId, boolean onlyCountAllocated) to IPAddressDao and IPAddressDaoImpl. 2015-09-16 22:15:53 +02:00
Boris Schrijver 473f1937e2 Added countIPs(long dcId, boolean onlyCountAllocated) to DataCenterIpAddressDao and DataCenterIpAddressDaoImpl. 2015-09-16 22:15:00 +02:00
Boris Schrijver 45861fa1b7 Refactored checkIfPodIsDeletable().
It now makes use of various DAO DB function instead of running a self build query.
2015-09-16 22:14:05 +02:00
Boris Schrijver 0648cb9804 Added findByPodId(Long podId) to HostDao and HostDaoImpl. 2015-09-16 22:13:10 +02:00
Wido den Hollander 0204269b96 CLOUDSTACK-8840: Do not include old systemd wrapper 2015-09-16 13:59:52 +02:00
Rohit Yadav 1525ac0791 Merge pull request #824 from shapeblue/4.5.3-upgradepath
4.5.3 upgradepath for master branchcc @remibergsma @karuturi

* pr/824:
  schema: add 4.5.3 to 4.6.0 upgrade path stubs
  schema: add 4.5.2 to 4.5.3 upgrade path stubs

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 13:23:43 +05:30
Rohit Yadav 1ba362dc01 Merge pull request #806 from sureshanaparti/CLOUDSTACK-8820
CLOUDSTACK-8820: Support for VMware vCenter 6 data centerCLOUDSTACK-8820: Showing error when try to add advance zone using VMware ESXi 6.0 host

Summary: In vCenter 6.0, response headers need to be fetched after service login for server cookie unlike previous versions of vCenter.

* pr/806:
  CLOUDSTACK-8820: Updated the code for vCenter6 data center support.
  CLOUDSTACK-8820: Showing error when try to add advance zone using VMWare ESXi 6.0 host Summary: In vCenter 6.0, response headers need to be fetched after service login for server cookie unlike previous versions of vCenter.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 12:49:52 +05:30
Rohit Yadav 8f11b459ff Merge pull request #833 from apache/systemvm-build
changed the systemvm base iso file from debian-7.8.0 to debian-7.9.07.8.0 url is not available(404 Error)

This fixes the jenkins http://jenkins.buildacloud.org/job/build-systemvm-master/624/console which is failing with the below error
```
Checking if isofile iso-cd/debian-7.8.0-i386-netinst.iso already exists.
Full path: /home/jenkins/acs/workspace/build-systemvm-master/tools/appliance/iso/iso-cd/debian-7.8.0-i386-netinst.iso
There was an error downloading http://cdimage.debian.org/cdimage/archive/7.8.0/i386/iso-cd/debian-7.8.0-i386-netinst.iso:
404 Not Found
```

This is tested and build is successful at http://jenkins.buildacloud.org/view/parameterized/job/parameterized-sytemvm/1/

* pr/833:
  changed the base iso file from debian-7.8.0 to debian-7.9.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 12:48:16 +05:30
Rohit Yadav 868706d705 Revert "changed the base iso file from debian-7.8.0 to debian-7.9.0"
This reverts commit 8bc06fc251.
2015-09-16 12:47:44 +05:30
Rohit Yadav 5c5ea5f63f Merge pull request #813 from wido/CLOUDSTACK-8625
CLOUDSTACK-8625: Systemd profile for CloudStack AgentWith CentOS 7 and Ubuntu 16.04 (to be released) using systemd
it is preferred that CloudStack's Agent is also being started using
systemd.

This commit includes a service file for the CloudStack Agent with
a wrapper script which actually executes Java

It no longer uses jsvc for daemonizing and thus this requirement
has also been dropped for CentOS 7 packaging.

The Agent log output to stdout has also been modified to no longer
include the timestamp as this is done by journalctl.

This has been tested on a CentOS 7.1 machine and the Agent starts,
stops and restarts properly.

* pr/813:
  CLOUDSTACK-8625: Remove the need of a wrapper script for the Agent
  CLOUDSTACK-8625: Updated spec file for systemd profile
  CLOUDSTACK-8443: Install the systemd wrapper script in RPM
  CLOUDSTACK-8625: Systemd profile for CloudStack Agent

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 12:40:50 +05:30
Rajani Karuturi 8bc06fc251 changed the base iso file from debian-7.8.0 to debian-7.9.0
7.8.0 url is not available(404 Error)
2015-09-16 12:34:42 +05:30
Rohit Yadav 5b5152b21b schema: add 4.5.3 to 4.6.0 upgrade path stubs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 11:53:41 +05:30
Rohit Yadav 36a43abff4 schema: add 4.5.2 to 4.5.3 upgrade path stubs
(cherry picked from commit 17166eb631)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 11:53:41 +05:30
Rajani Karuturi 61526190d0 changed the base iso file from debian-7.8.0 to debian-7.9.0
7.8.0 url is not available(404 Error)
2015-09-15 21:37:44 +05:30
wilderrodrigues 6e426fa46d Revert "Merge pull request #825 from borisroman/charset"
This reverts commit a44e2bff7e, reversing
changes made to 06cefaf493.

We are reverting the PR #825 because it breaks Master.
2015-09-15 14:58:18 +02:00
Daan Hoogland a44e2bff7e Merge pull request #825 from borisroman/charset
Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset().

* pr/825:
  Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset().

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-09-15 13:38:18 +02:00
Boris Schrijver 71929fdedd Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset(). 2015-09-15 12:00:33 +02:00
Wido den Hollander 06cefaf493 Merge pull request #804 from anshul1886/CLOUDSTACK-8834
CLOUDSTACK-8834: Fixed unable to download Template , when in multi zonesWe were listing image stores by zone id which was resulting in listing of only one image store
If in that image store its download state is not DOWNLOADED then download template is failing

* pr/804:
  CLOUDSTACK-8834: Fixed unable to download Template , when in multi zones We were listing image stores by zone id which was resulting in listing of only one image store If in that image store its download state is not DOWNLOADED then download template is failing

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-15 11:10:41 +02:00
Wido den Hollander 34caa694d0 Merge pull request #821 from wido/libvirt-rbd-logging
CLOUDSTACK-8645: Improve logging of RBD functionality in KVMA simple commit which changes a couple of log lines.

* pr/821:
  CLOUDSTACK-8645: Improve logging of RBD functionality in KVM

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-15 10:57:18 +02:00
Bharat Kumar 7439a9bbec CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available 2015-09-15 14:24:13 +05:30
Wido den Hollander 4f409a7c17 CLOUDSTACK-8645: Improve logging of RBD functionality in KVM
A simple commit which changes a couple of log lines.
2015-09-15 10:10:04 +02:00
Wido den Hollander 2c143543b5 CLOUDSTACK-8840: Fix the source path of the service file 2015-09-15 09:33:17 +02:00
Rajani Karuturi 2bd61c35b9 Merge pull request #819 from sanju1010/sg
Tagging tests appropriately to pick them for running on basic zoneAdding additional tag to the list of tags.

* pr/819:
  Tagging tests appropriately to pick them for running on basic zone

Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
2015-09-14 17:57:24 +05:30