Commit Graph

28907 Commits

Author SHA1 Message Date
Murali Reddy f751cf24fb update VM password databag only when there is vm_password.json configuration update
from the management server

from the managment server. With out thix fix, password data bag is getting
updated on every network rule configuration and hence VR serving the password for guest
instance password requests every time
2016-12-04 23:36:28 +05:30
Murali Reddy d42f641f86 CS-499: VR Performance Improvement
add /etc/hosts entry to resolve router name to 127.0.0.1 as well
2016-11-04 08:56:15 +05:30
Marc-Aurèle Brothier 5d141cb2e5 CLOUDSTACK-9544: Check access on account trying to generate user API keys
This fixes CVE-2016-6813

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 0cfffd149b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-27 16:38:13 +05:30
Murali Reddy edc359080c CLOUDSTACK-9548: PVLAN: VM migrate commands fails due to wrong casting
Fix ensures, getting DomainRouterVO and UserVmVO properly from the VirtualMachineProfile
2016-10-19 15:44:42 +05:30
Murali Reddy 38a28698c3 CLOUDSTACK-9536: PVLAN: DhcpPvlanRules command bieng sent before processing finalize start command answers
fix ensures DhcpPvlanRules command is sent to the VR only after finalize start answers are processed
2016-10-17 16:32:01 +05:30
Murali Reddy 2cc3efbdd1 CLOUDSTACK-9475: Attaching to PVLAN on VMware dvSwtich fails on VR reboot
handle casting VmwareDistributedVirtualSwitchVlanSpec, to appropriate class
corresponding to vlan and pvlan. For pvvlan cast to VmwareDistributedVirtualSwitchPvlanSpec
for vlan cast to VmwareDistributedVirtualSwitchVlanIdSpec
2016-10-17 16:32:00 +05:30
Murali Reddy 63fe32e78f CLOUDSTACK-9498: VR CsFile search utility methods fail when search string has char *, + etc
there is no real use of python 're' in CsFile.py utility methods searchString, deleteLine
 Replacing with regular string search instead.
2016-10-17 16:32:00 +05:30
Murali Reddy 39524a1c1e streamlining the iptable FW_EGRESS table rules for all protocols icmp,tcp,udp and all 2016-10-17 16:32:00 +05:30
Murali Reddy 37131b5f1d fix for below two issues with egress rule behavior
CLOUDSTACK-9480: Egress Firewall: Incorrect use of Allow/Deny for ICMP
fix ensures, ICMP, TCP, UDP are handled similalry w.r.t egress rule action

CLOUDSTACK-9495: Egress rules functionalty broken when protocol=all specified
when protocol=all specified, CIDR was ignored. Fix ensures if CIDR is specified
its always used in configuring iptable rules

2 new marvin test cases to test /32 CIDR
2016-09-16 15:18:48 +05:30
root 9bd2ad1bfe On plug nic, use '/proc/sys/net/ipv4/conf' contnet while waiting for the interface to come up 2016-09-05 19:18:45 +05:30
Murali Reddy c803daec17 Use mangle table PREROUTING chain to ensure traffic from any public interface on VPC VR
is connection marked. Traffic from RELATED, ESTABLISHED connectinso on guest network
interfaces on VPC VR connection marking is restored.
2016-09-06 03:32:35 +05:30
Murali Reddy 88721b2f3c interpretting first ip on interface correctly 2016-09-04 16:56:08 +05:30
Murali Reddy 29d60b8353 ensure ip's associated with deviced are retrieved properly in CsIP.list()
avoid duplicate calling of post_confiugre() after IP delete in configure(),
2016-09-04 12:30:05 +05:30
Murali Reddy 3ae3a32c09 remove "from all lookup tablename" rule thats gets created when an entry is
added in '/etc/iproute2/rt_tables'. with out removing rule will interfere with
unintended traffic
2016-09-03 17:48:16 +05:30
Murali Reddy b6e64d06d8 use correct gateway from cmd_line boot args for public network
gateway will be used in the routing table, so we need the right one
2016-09-02 18:57:30 +05:30
Murali Reddy d935e7dc11 use adding first ip on interface, and removing last ip from interface
as special case to add and remove route tables
2016-09-02 10:44:57 +05:30
Murali Reddy 92a0d96ef8 use echo 'table-no table-name' to create route table 2016-09-02 10:43:38 +05:30
Murali Reddy 4d4cb1e1dd handle case where 'nic_device_id' is not present in address present ip_association.json dbag
this happens when IP is to be deleted and its the last ip associated with the interface
retrieve original nic_device_id from current ips.json for merge
2016-09-02 10:38:36 +05:30
Murali Reddy f724cb6c1a add support to generic rule in CsRule
ability to delete fwmark rule for the device specific routing table
2016-09-02 10:37:20 +05:30
Murali Reddy 6cb094719f Fixes issue where default gateway is not added to the device specific routing table.
Hence packets were always looked up through main routing table. Fix basically add
default gateway to the device specific routing tables a route entry
2016-08-05 15:24:41 +05:30
Peter Farmer a3ff3e7cb4 Backport of CLOUDSTACK-9296 (#1)
Backport of CLOUDSTACK-9296 (PR 1423 from apache/cloudstack) to enable ipsec service when remote vpn is enabled.
2016-08-03 12:00:02 -04:00
Murali Reddy 0ddb6e25b3 Fix address below issues
- Allow forwarding on all public interfaces. Regression in 4.6 restricted only to 4.6.
     + for traffic originating from eth0 and outbound on any public interface forward to FW_OUTBOUND chain
     + for traffic on reverse path from eth0 and on any public interface use RELATED,ESTABLISHED to allow the traffic

  - for each public interface, traffic originatig from the interace be marked with device number. On reverse path
    corresponding 'ip rules' table will be looked for routing decision
2016-08-02 04:34:24 +05:30
Rohit Yadav 1d52b3af89 CLOUDSTACK-9437: Create egress chain on upgrade and cleanup for allow all traffic
- Ensure that FW_EGRESS_RULE chain exists after upgrading the router
- Flush allow all egress rule on 0.0.0.0/0, if such a rule exists in the config
  it will be added later (CLOUDSTACK-9437)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-07-22 19:08:15 +05:30
Rohit Yadav bc2e2cf427 Updating pom.xml version numbers for release 4.6.2.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-25 12:18:19 +05:30
Rohit Yadav c663d9d170 Updating pom.xml version numbers for release 4.6.2.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-25 12:13:54 +05:30
Rohit Yadav 86ae03e3d3 CLOUDSTACK-9369: Restrict default login to ldap/native users
- Restricts default login auth handler to ldap and native-cloudstack users
- Refactors and create re-usable method to find domain by id/path
- Adds unit test for refactored method in DomainManagerImpl
- Adds smoke test for login handler

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-25 11:57:04 +05:30
Rohit Yadav 44731ca15d CLOUDSTACK-9376: Restrict listTemplates API with filter=all for root admin
Restricts use of listemplates API with templatefilter=all for root admin only.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-25 11:52:58 +05:30
Remi Bergsma 10e0130dd6 Updating pom.xml version numbers for release 4.6.2
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 19:14:35 +01:00
Daan Hoogland 5774b965f3 Merge pull request #1209 from ustcweizhou/free-deviceid
CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic count
when we restart vpc tiers, the old nics will be removed, and create a new nic.
however, the device_id was set to the nic count, which may be already used.
this commit get the first device_id not in use as the device_id of new nic.

This issue also happen when we add multiple networks to a vm and remove them.

* pr/1209:
  CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic count

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-13 18:43:30 +01:00
Remi Bergsma d7b7171870 Merge pull request #1235 from remibergsma/fix-passwd-server-logging
CLOUDSTACK-9155 make sure logrotate is effective for cloud.logMany processes on the VRs log to cloud.log. When log rotate kicks in, the file is rotated but the scripts still write to the old inode (cloud.log.1 after rotate). Tis quickly fills up the tiny log partition.

Using 'copytruncate' is a small tradeoff, there is a slight change of missing a log entry, but in the old situation nothing ended up in cloud.log after rotate (except for stuff that was (re)started) so I think this is the best solution until we properly rewrite the script to either use their own script or syslog.

More details: https://issues.apache.org/jira/browse/CLOUDSTACK-9155

* pr/1235:
  CLOUDSTACK-9155 make sure logrotate is effective

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 14:30:07 +01:00
Remi Bergsma 636efa2da3 CLOUDSTACK-9155 make sure logrotate is effective
Many processes on the VRs log to cloud.log. When logrotate
kicks in, the file is rotated but the scripts still write
to the old inode (cloud.log.1 after rotate). Tis quickly
fills up the tiny log partition.

Using 'copytruncate' is a tradeoff, there is a slight
change of missing a log entry, but in the old situation
we were missing all of them after logrotate.
2015-12-13 12:07:20 +01:00
Remi Bergsma fcccaaad3f Merge pull request #1231 from ekholabs/fix/vrid-rvpc-CLOUDSTACK-9151
CLOUDSTACK-9151 - As a Developer I want the VRID to be set within the limits of KeepaliveDThis PR fixes a blocker issue!

   - Just like with RVRs, use the VRID 51 instead of making it dependent on the VPCID
   - Reason: arbitary unique number 0..255 used to differentiate multiple instances of vrrpd running on the same NIC (and hence same socket). virtual_router_id 51

* pr/1231:
  CLOUDSTACK-9151 - Removes the replacement of the VRID in the CsRedundant file

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 00:13:37 +01:00
Remi Bergsma a7b098ff16 Implement 4.6.1 -> 4.6.2 upgrade path 2015-12-13 00:06:02 +01:00
Daan Hoogland 1063508003 Merge pull request #1186 from remibergsma/462_version
Updating pom.xml version numbers for release 4.6.2-SNAPSHOTSet next version in 4.6 release branch to version 4.6.2-SNAPSHOT.

Using ` ./tools/build/setnextversion.sh`.

Ping @bhaisaab @DaanHoogland before we merge this, how will we be creating the upgrade paths from 4.6.2 to 4.7? After this PR is merged, we need to manually do a fwd-merge and make sure we keep the pom versions in master/4.7. Much like in #1071.

* pr/1186:
  Fixed typo in iam/pom.xml
  Updating pom.xml version numbers for release 4.6.2-SNAPSHOT

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-12 23:17:19 +01:00
Remi Bergsma c456eeb959 Fixed typo in iam/pom.xml 2015-12-12 21:51:48 +01:00
Remi Bergsma 5147dec4ff Updating pom.xml version numbers for release 4.6.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 21:49:37 +01:00
Wilder Rodrigues 2bebb7f8a3 CLOUDSTACK-9151 - Removes the replacement of the VRID in the CsRedundant file
- Just like with RVRs, use the VRID 51 instead of making it dependent on the VPCID
   - Reason: arbitary unique number 0..255 used to differentiate multiple instances of vrrpd running on the same NIC (and hence same socket). virtual_router_id 51
2015-12-12 16:26:00 +01:00
Remi Bergsma 1597a4c749 Merge pull request #1211 from ustcweizhou/delete-acl-items
[UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal usersOnly the owner or domain admin/admin can access the page (vpc->Network ACL Lists), they are also able to remove the network ACL lists, which is not allowed on UI.

* pr/1211:
  [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 14:40:17 +01:00
Daan Hoogland 8c78f89c91 Merge pull request #1132 from shapeblue/4.6-vmware-diskcontrollers
[4.6] CLOUDSTACK-4787 - vmware diskcontrollersSame as #1131 (see this for screenshots etc)

* pr/1132:
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-12 14:38:28 +01:00
Remi Bergsma 65bf2edfa1 Merge pull request #1182 from ustcweizhou/CLOUDSTACK-9113-getVmStats
[4.6] CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStatson KVM, if there is a vm has inconsistent state between hypervisor and db, the getVmStat will terminate and return null, all vm stats will not be updated.
we should skip the vm which has inconsistent state, and continue on others.

* pr/1182:
  CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStats

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 13:58:49 +01:00
Remi Bergsma 61ebb53e17 Merge pull request #1227 from remibergsma/git-pr-show-commits
Show actual diff in commits after merge with git-pr / git-fwd-mergeThis shows the diff in commits after using `git-pr` and `git-fwd-merge` tools, like this:

```
44e8c92 Merge pull request #1226 from borisroman/CLOUDSTACK-9148
0554610 Removed .pydevproject from plugin kvm hypervisor.
```

That helps in quickly seeing what change is applied and whether it makes sense. It doesn't touch the actual code base. I'm using this patch for some time already.

* pr/1227:
  Show actual diff in commits after merge

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 13:55:20 +01:00
Remi Bergsma 52edbbb6cc Show actual diff in commits after merge 2015-12-12 11:22:32 +01:00
Remi Bergsma b14dfca82d Merge pull request #1187 from nlivens/4.6_test_improvement
Adapted HypervisorUtilsTest to no longer give false positives

* pr/1187:
  Adapted HypervisorUtilsTest to no longer give false positives

This closes #1185

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-10 16:20:19 +01:00
Wei Zhou 709e0c555e [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users 2015-12-10 14:09:45 +01:00
Wei Zhou acfc19dc82 CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic count
when we restart vpc tiers, the old nics will be removed, and create a new nic.
however, the device_id was set to the nic count, which may be already used.
this commit get the first device_id not in use as the device_id of new nic.

This issue also happen when we add multiple networks to a vm and remove them.
2015-12-10 14:02:02 +01:00
Remi Bergsma 3515f574c3 Merge pull request #1189 from ekholabs/fix/4.6-rvr_routers_state-CLOUDSTACK-9118
CLOUDSTACK-9118 - As a Developer I want the checkrouter.sh script to report the right information about RVR routers stateThis PR fixes the RVR routers state information retrieved by the Management Server via the ```checkrouter.sh``` script.

In order to cover the changes, a new test has been added to the component/test_routers_network_ops.py test suite: test_03_RVR_Network_check_router_state

* pr/1189:
  CLOUDSTACK-9118 - Adds integration test to cover routers state.
  CLOUDSTACK-9118 - Improves the existing checkrouter.sh script

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-08 20:10:15 +01:00
Wilder Rodrigues 848ef78158 CLOUDSTACK-9118 - Adds integration test to cover routers state.
- Refactoring the existing tests
2015-12-08 11:06:35 +01:00
Wilder Rodrigues f81a29351d CLOUDSTACK-9118 - Improves the existing checkrouter.sh script 2015-12-08 11:06:35 +01:00
Nick Livens 132c35639b Adapted HypervisorUtilsTest to no longer give false positives 2015-12-08 08:12:58 +01:00
Remi Bergsma 6d3fffa229 Merge pull request #1184 from ekholabs/fix/4.6-rvpc-pvtgw-CLOUDSTACK-9106
CLOUDSTACK-9106 - As a Developer I want the Redundant VPC private gateway feature fixedThis PR contains the same fixes from PR #1179, which was created against the master branch.

In addition, the points mentioned by @DaanHoogland were handled in this new PR:

* Made the code more consistent
  - result = result && methodCall(), instead of throwing exceptions in some places or not checking 2 consecutive returns - in case of rVPC.
* Added an unit test to cover changes in the VpcRouterElementImpl.applyVpnUsers() method. The method returns an array of String, so I had to make sure it would contain the users from 2 consecutive calls. There are 2 tests to cover negative scenarios.

* pr/1184:
  CLOUDSTACK-9106 - Makes Enum name compliant with Java code conventions.
  CLOUDSTACK-9106 - Adds a test to cover the changes in the applyVpnUsers() method
  CLOUDSTACK-9106 - Makes the router commands call more consistent.
  CLOUDSTACK-9106 - Enables private gateway tests on Redundant VPCs
  CLOUDSTACK-9106 - Refactor the createPrivateNicProfileForGateway() method
  CLOUDSTACK-9106 - Reduces the amount of iterations through the routers of a VPC

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-07 21:18:01 +01:00