1287 Commits

Author SHA1 Message Date
Edison Su
a6ce66e55a move a lot of code into vmsnapshot strategy
fix compile

fix compile

add vm_snapshot_details table in db

add vmsnapshot test cases
2013-10-25 15:09:04 -07:00
Sheng Yang
484d6c4eb7 CLOUDSTACK-2792: Call savepassword.sh inside VR
Also only set password when password service is running, thus avoid setting for
redundant router BACKUP router.
2013-10-17 20:04:44 -07:00
Sheng Yang
ab124a17fa Remove Network Parameter for VPN service provider
It's unnecessary since RemoteAccessVpnVO already have network ID binding with it.
2013-10-17 17:55:47 -07:00
Min Chen
25acfbad78 CLOUDSTACK-4816:provide configurable option to choose single vs
multipart upload to S3 object storage based on object size.
2013-10-17 10:28:59 -07:00
Anshul Gangwar
93172df556 CLOUDSTACK-3994: fix for Wrong error notification is generated when Primary storage is added with wrong path
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-10-17 13:21:58 +05:30
John Kinsella
c10ee5dde4 Summary: Updated Ethernet regex for vlan-tagged "p1p1.2" style interfaces
Detail: Checks for other Ethernet interface names uses startsWith(),
whereas the p1p1 style interface uses a regex that doesn't allow for
tailing characters, and so blocks vlan IDs. Fixed.

BUG-ID: CLOUDSTACK-4884
Bugfix-for: 4.2.1
Reviewed-by:
Reported-by:
Signed-off-by: John Kinsella <jlk@stratosec.co> 1381965250 -0700
2013-10-16 16:14:10 -07:00
Marcus Sorensen
3467c99e73 CLOUDSTACK-2823: This affects Ubuntu as well, since qemu version is 1.0.0
I don't think host kernel version has any bearing on it. Original code
was tested with CentOS 6.3 and 6.4, but it seems to succeed or fail per-host,
e.g. a fast host might work and a slow host might not. I was getting intermittent
failures with ubuntu 12.04.3 prior to this patch.
2013-10-16 00:27:22 -06:00
Hugo Trippaers
8cfafbe44e Remove some stuff that is no longer used 2013-10-15 14:04:34 +02:00
Chris Suich
aad1cda7e0 Added categorized sorting to SnapshotStrategy and DataMotionStrategy 2013-10-14 15:20:42 -07:00
Marcus Sorensen
b344bb4cf3 KVM: Change new volume/template downloads to use UUID in database
rather than creating a fresh random UUID, so admins can match
volumes frontend to backend
2013-10-11 17:16:48 -06:00
Min Chen
f1895ea39a CLOUDSTACK-4816: Make S3 upload multipart or singlepart configurable. 2013-10-04 18:21:25 -07:00
Kelven Yang
16b022b1b1 CLOUDSTACK-4802: Change VM start flow to better support VM snapshot on certian version of vSphere, (vSphere 5.0 Update 2). If we detect that VM has pending VM snapshot, we will fully honor VM disk info from vCenter, since in some version of vSphere (vSphere 5.0 U2) does not allow disk-editting when VM has pending snapshot. 2013-10-04 16:13:56 -07:00
Mike Tutkowski
bced4c7e8b Add support for hypervisor snapshots to CloudStack-managed storage (for XenServer and VMware) 2013-10-04 15:41:20 -06:00
Chris Suich
180cfa19e8 Refactor Storage Related Resource Code
These changes are a joint effort between Edison and I to refactor some
of the code around snapshotting VM volumes and creating
templates/volumes from VM volume snapshots. In general, we were working
towards allowing PrimaryDataStoreDrivers to create snapshots on primary
storage and not requiring the snapshots to be transferred to secondary
storage.

High level changes:
-Added uuid to NfsTO, SwiftTO & S3TO to cut down on the requirement of
PrimaryDataStoreTO and ImageStoreTO which don't really serve much of a
purpose
-Initial work towards enable reverting VM volume from snapshots
-Added hypervisor commands for introducing and forgetting new hypervisor
objects (snapshots, templates & volumes)

Signed-off-by: Edison Su <sudison@gmail.com>
2013-10-04 13:06:42 -07:00
Laszlo Hornyak
bd8536739c remove txn attribute from DB
txn attribute was never actually used

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-04 10:15:39 -07:00
Kelven Yang
a3babdd61c CLOUDSTACK-4790: Skip reserved VMware scsi device number for SCSI disks 2013-10-02 17:53:56 -07:00
Darren Shepherd
aed5e9dc2a Add Manage Context framework
The managed context framework provides a simple way to add logic
to ACS at the various entry points of the system.  As threads are
launched and ran listeners can be registered for onEntry or onLeave
of the managed context.  This framework will be used specifically
to handle DB transaction checking and setting up the CallContext.
This framework is need to transition away from ACS custom AOP to
Spring AOP.
2013-10-02 13:09:52 -07:00
Darren Shepherd
efbfae723e Switch to setter injection for extensibility
Various classes are using member injection to inject extensible objects.
Really those object should come from an AdapterList that is injected in.
This patch switches the code to use setter injection that will later allow
spring to inject an AdapterList or something similar to allow
extensibility.
2013-09-30 09:45:07 -07:00
Darren Shepherd
692535f928 Cleanup DefaultUserAuthenticator and removed masking _name variable
DefaultUserAuthenticator maskes the _name varible in ComponentLifecycleBase
making the setName() method not work as expected.  This patch cleans up the
code such that getName() will be getClass().getSimpleName() unless
overridden in the Spring configuration.
2013-09-30 09:33:33 -07:00
Alex Huang
b60eef3e82 Added comments and finished off the work 2013-09-28 07:53:28 -07:00
Alex Huang
e8cac2c5d8 Changed SearchCriteria2 to GenericQueryBuilder to reflect the same placement 2013-09-28 07:53:26 -07:00
Alex Huang
e2988902c9 Changed SearchCriteria2 to GenericQueryBuilder to reflect the same placement 2013-09-28 07:53:25 -07:00
Alex Huang
af8832f6bd Unified both the SearchBuilder and SearchCriteriaService 2013-09-28 07:53:24 -07:00
Kelven Yang
f3c917db05 CLOUDSTACK-4734: Validate and Fail-over to another VmwareContext object when it is from the pool 2013-09-27 15:57:56 -07:00
Kelven Yang
08c3b6596d CLOUDSTACK-4659: Vmware allows destroying VM that has pending tasks, worker VM GC actually relies on the assumption that Vmware is protected from that which is a false assumption. Recycle Worker VM only it is from previous session 2013-09-27 15:57:02 -07:00
Kelven Yang
159d798a19 Disable VMwareTools detection to avoid unreliable result caused by race-condition when VMwareTools is not ready in guest OS yet and the API is called. This is the corrected commit 2013-09-27 15:56:43 -07:00
ynojima
a45ee749ac CLOUDSTACK-2328: Linux native VXLAN support on KVM hypervisor
Initial patch for VXLAN support.
Fully functional, hopefully, for GuestNetwork - AdvancedZone.

Patch Note:
 in cloudstack-server
- Add isolation method VXLAN
- Add VxlanGuestNetworkGuru as plugin for VXLAN isolation
- Modify NetworkServiceImpl to handle extended vNet range for VXLAN isolation
- Add VXLAN isolation option in zoneWizard UI

 in cloudstack-agent (kvm)
- Add modifyvxlan.sh script that handle bridge/vxlan interface manipulation script
-- Usage is exactly same to modifyvlan.sh
- BridgeVifDriver will call modifyvxlan.sh instead of modifyvlan.sh when VXLAN is used for isolation

Database changes:
- No change in database structure.
- VXLAN isolation uses same tables that VLAN uses to store vNet allocation status.

Known Issue and/or TODO:
- Some resource still says 'VLAN' in log even if VXLAN is used
- in UI, "Network - GuestNetworks" dosen't display VNI
-- VLAN ID field displays "N/A"
- Documentation!

Signed-off-by : Toshiaki Hatano <haeena@haeena.net>
2013-09-26 23:37:18 +09:00
Edison Su
81ff4795df fix compile errors 2013-09-25 17:59:54 -07:00
Edison Su
3420f2d016 CLOUDSTACK-4641: fix create volume from snapshot timeout issue 2013-09-25 16:32:55 -07:00
Edison Su
4fb4593553 CLOUDSTACK-4618: fix CLVM 2013-09-25 16:29:16 -07:00
Edison Su
0eb3944fc8 kvm upgrade issue from 2.2.14: 1. the uuid passed by mgt server is malformat, libvirt can't start vm. 2. the template path on primary storage is incorrect, which contains absolute path 2013-09-25 16:20:06 -07:00
Edison Su
3ddc6da10b CLOUDSTACK-4405: fix vm migration during the upgrade to 4.2
Conflicts:

	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
2013-09-25 16:19:53 -07:00
Edison Su
a96f6b306b CLOUDSTACK-4459: fix silly bug, one more time 2013-09-25 16:17:54 -07:00
Edison Su
2227eb191a CLOUDSTACK-3535: fix regression introduced in 5d9fa5d42e13a8c8ee10df14c466f66de678e954 2013-09-25 16:16:34 -07:00
Edison Su
49d8e44491 CLOUDSTACK-4459: one more try, bypass libvirt to find volume if libvirt call failed
Conflicts:

	server/src/com/cloud/template/TemplateManagerImpl.java
2013-09-25 16:16:10 -07:00
Edison Su
b695484dc7 CLOUDSTACK-4459:
Libvirt reports:
org.libvirt.LibvirtException: Storage volume not found: no storage vol
with matching name
in some cases, if the volume is created on one kvm host, while accessed
from other host.
It's possible due to concurrent access(read/write) storage.
The current fix is to try serveral times, and wait for 30 seconds for
each retry.
If the issue still there, then need to sync the storage pool access
2013-09-25 16:13:38 -07:00
Edison Su
dda1133f12 CLOUDSTACK-4436: in case of older kvm host, we'd better try serveral times to make sure we passed cmdline parameters to system vms
Conflicts:

	core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
2013-09-25 16:10:57 -07:00
Edison Su
9fa56e28ec CLOUDSTACK-4459: need to sychronize create storage pool, otherwise, we can create the same pool with the same uuid in parallel 2013-09-25 16:09:11 -07:00
Edison Su
b5f7e307a1 CLOUDSTACK-4456:
CLOUDSTACK-4457:
CLOUDSTACK-4459:
harden kvm getvolume. It's possible that one volume created on other kvm host, won't show up on another host, try more times to refresh storage pool if volume won't shown up

Conflicts:

	engine/storage/integration-test/test/org/apache/cloudstack/storage/test/FakeDriverTestConfiguration.java
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
2013-09-25 16:01:45 -07:00
Edison Su
5e94e1675b CLOUDSTACK-2729: another try to solve libvirt storage pool missing issue: if the storage pool is missing, then recreate it 2013-09-25 15:52:03 -07:00
Edison Su
b3ac12e171 delete snapshot_store_ref if the snapshot is in error state 2013-09-25 15:51:55 -07:00
Wei Zhou
3dc4284a34 add missing jna-4.0.0.jar to cloudstack-agent library by changing scope from provided to default runtime 2013-09-25 11:08:57 +02:00
Wei Zhou
258118efa6 CLOUDSTACK-4405: additional patch for bridge name and firewall rules issues after KVM upgrade to 4.2
There still exist two issues after Edison's commits.
(1) Migration from new hosts to old hosts failed.
The bridge name on old host is set to cloudVirBr* if network.bridge.name.schema is set to 3.0 in /etc/cloudstack/agent/agent.properties, but the actual bridge name is breth*-* after running cloudstack-agent-upgrade.
(2) all ports of vms (Basic zone, or Advanced zone with security groups) on old hosts are open, because the iptables rules are binding to device (bridge) name which is changed by cloudstack-agent-upgrade.

After this, the KVM upgrade steps :
a. Install 4.2 cloudstack agent on each kvm host
b. Run "cloudstack-agent-upgrade". This script will upgrade all the existing bridge name to new bridge name, and update related firewall rules.
c. install a libvirt hook:
    c1. mkdir /etc/libvirt/hooks
    c2. cp /usr/share/cloudstack-agent/lib/libvirtqemuhook /etc/libvirt/hooks/qemu
    c3. chmod +x /etc/libvirt/hooks/qemu
    c4. service libvirtd restart
    c5. service cloudstack-agent restart

Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-09-24 09:55:00 +02:00
Edison Su
e325fb66ab CLOUDSTACK-4405: fix vm migration during the upgrade to 4.2
Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-09-24 09:53:55 +02:00
Hugo Trippaers
399d17df62 Fix redundant groupId in pom.xml 2013-09-21 17:44:18 +08:00
Hugo Trippaers
15a97ec412 Cleanup pom.xml in various projects to properly use managed versions and other defaults 2013-09-21 17:21:06 +08:00
Hugo Trippaers
d37b87d97a Fix a few xml wellformedness issues 2013-09-21 14:58:56 +08:00
Hugo Trippaers
7f2481486e Rename nonoss to noredist to better reflect what the flag is used for. 2013-09-21 12:32:09 +08:00
Abhinandan Prateek
c7cc79181b Revert "Cleanup DefaultUserAuthenticator and removed masking _name variable"
This reverts commit 4d01ce8fc766423d795955bd5784b56969ce11a8.
2013-09-20 19:33:50 +05:30
Darren Shepherd
4d01ce8fc7 Cleanup DefaultUserAuthenticator and removed masking _name variable 2013-09-20 17:40:00 +05:30