465 Commits

Author SHA1 Message Date
Edison Su
492127c035 fix kvm 2013-05-12 18:27:37 -07:00
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Alex Huang
342624e0eb Merged with head 2013-05-10 16:33:57 -07:00
Alex Huang
3047929367 Merged 2013-05-10 16:21:43 -07:00
Edison Su
42e25a22fc refactor kvm/vmware resource code 2013-05-09 23:10:05 -07:00
Sheng Yang
70da1b3be3 PVLAN: Fix KVM ovs driver cannot get vlan id issue 2013-05-02 16:32:07 -07:00
Jayapal
1f1467974f CLOUDSTACK-1828 Source Nat on private gateway feature 2013-05-02 15:40:15 +05:30
Sheng Yang
3c3d67769b PVLAN: PvlanSetupCommand for KVM support 2013-05-01 13:23:09 -07:00
Marcus Sorensen
33006ff197 Summary: Don't add secondary storage to KVM heartbeat
BUG-ID: CLOUDSTACK-2173
Bugfix-for: 4.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1366865750 -0600
2013-04-24 22:55:50 -06:00
Edison Su
435f4bceb2 in case vm doesn't exist on kvm host, getconnectionbyname will throw exception, need to catch the exception, and return the default connection 2013-04-24 10:39:07 -07:00
Marcus Sorensen
26fea7b660 CLOUDSTACK-2067 - ACS4.2 - throw LibvirtException instead of squelching it
so that callers of startVM in LibvirtComputingResource know that a vm failed
to start

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1366224775 -0600
2013-04-17 12:52:55 -06:00
Marcus Sorensen
2057221f4f CLOUDSTACK-2051 - The previous patch ensures that holes in deleting storage
pools the proper way won't cause problems for KVM HA Monitor, this patch closes
holes. Call the KVMStoragePool deleteStoragePool that properly removes it from
the KVMHA hashmap, instead of the pools direct delete() call.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1366172318 -0600
2013-04-16 22:18:38 -06:00
Marcus Sorensen
202930fd55 CLOUDSTACK-2051 Allow KVM HA Monitor to verify that a NfsStoragePool is
valid before running the script that mounts it and touches the HA files.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1366135635 -0600
2013-04-16 12:07:15 -06:00
Min Chen
bb64672715 Refactor DownloadMonitorImpl code, move some functionalities to
TemplateServiceImpl and VolumeServiceImpl.
2013-04-11 18:09:42 -07:00
Edison Su
f18a1d6f14 fix bunch of bugs related to zone wide storage 2013-04-03 21:51:17 -07:00
Dave Cahill
eddf7b9357 MidoNet Networking Plugin
- Supports DHCP, Source NAT, Static NAT, Firewall rules, Port Forwarding
- Renamed MidokuraMidonet to MidoNet
- Related Jira ticket is CLOUDSTACK-996

Signed-off-by: Dave Cahill <dcahill@midokura.com>
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-04-03 12:03:11 +02:00
Wido den Hollander
ea0daeaee3 CLOUDSTACK-1158: Wrap qemu-img into it's own util
Signed-off-by: Edison Su <sudison@gmail.com>
2013-04-01 16:37:58 -07:00
Phong Nguyen
aa79ccf985 CLOUDSTACK-922: LXC Support in Cloudstack.
Signed-off-by: Edison Su <sudison@gmail.com>
2013-04-01 15:41:42 -07:00
Bharat Kumar
7a3a1c792a Cloudstack-1739
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-04-01 10:36:19 +05:30
Marcus Sorensen
5a16e70de9 CLOUDSTACK-1846, CLOUDSTACK-1845 - KVM Storage, sometimes KVMHA will remount
deleted NFS pools, causing failures when defining new storage pools. Sometimes
a storage pool has never been used on a host, and getStoragePool fails when
copying templates or in storage migration. deleteStoragePool(pool) often fails
silently, leaving no pool defined in libvirt, but a mountpoint left behind.
This patch handles some of these exceptions and brings forward any issues via
logging.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1364603486 -0600
2013-03-29 18:31:26 -06:00
Prasanna Santhanam
4f09138364 Fix the kvm vncAddr test
This test was broken because we reverted to the old listen on all
interfaces for vnc.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-03-23 20:59:29 +05:30
Marcus Sorensen
ff6177d119 CLOUDSTACK-1761 - Available local storage disk capacity incorrectly reported in
KVM to manager. This adds collection of available storage to KVM, not
     just used.

Bugfix-for: 4.0.2, 4.1, master
Submitted-by: Ted Smith <darnoth@gmail.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363966235 -0600
2013-03-22 09:30:35 -06:00
Edison Su
ff63854b4d CLOUDSTACK-1772: revert bc94948e0604e0e5931759be3c3d3155e84686f6, doesn't specify vnc listening port, make live migration work 2013-03-22 12:46:50 +00:00
Wei Zhou
0d604c636d CLOUDSTACK-1666: Fix NetworkUsage for VPC on KVM
The collection of network usage from VPC virtual router on KVM does not work,
because there is no corresponding procedure to deal with VPC virtual router
(cmd.isForVpc() = true).

Reviewed-by: Kishan Kavala <kishan@apache.org>
Reported-by: Wei Zhou <w.zhou@leaseweb.com>

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-03-22 10:51:27 +05:30
Jayapal Uradi
edaa72d0fc CLOUDSTACK-24: mipn feature for basiczone kvmhost
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-03-15 10:22:56 +05:30
Marcus Sorensen
a94ff361dd CLOUDSTACK-1648 - KVM - make storage pools non-persistent in libvirt. Persisting
cloud-defined resources on the host has caused various problems. As a backward
compatible fix, if an existing pool with a different name collides with a pool
being created (by path), the pool will be redefined with the name cloudstack
knows about. This is actually what brought up the bug, a persisted storage pool
cloudstack wasn't managing.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363210149 -0600
2013-03-13 15:29:09 -06:00
Marcus Sorensen
97d2e3fe77 Summary: KVM - remove harmless message about domain not found on VM stop
Detail: When we stop a VM, it's definition is no longer valid. Therefore, we
need to catch the exception thrown from libvirt in trying to lookup a
non-existent domain by UUID while trying to check if it's shut down.

BUG-ID:CLOUDSTACK-600
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363201066 -0600
2013-03-13 12:57:46 -06:00
Marcus Sorensen
8d7d1cd562 Summary: KVM - undefine persistent VMs on stop
Detail: A previous patch fixed an issue where we are defining VMs to persist
locally on KVM hosts, which can cause issues if the agent isn't running and
libvirt decides to start the VM unbeknownst to cloudstack. The previous patch
stopped defining VMs as persistent. This patch adds compatibility for existing
cloudstack environments, removing the persistent definition on stop if needed.

BUG-ID: CLOUDSTACK-600
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363194656 -0600
2013-03-13 11:10:56 -06:00
Marcus Sorensen
1f28e644a3 Summary: Remove unused createFileBasedStoragePool from LibvirtStorageAdaptor
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363154115 -0600
2013-03-12 23:55:15 -06:00
Marcus Sorensen
9ad54a082c Summary: KVM - use virtio socket to communicate config to system vms
Detail: This gets rid of the patchdisk method of passing cmdline and
authorized_keys to KVM system VMs. It instead passes them to a virtio socket,
which the KVM guest reads from the character device /dev/vport0p1 during
cloud-early-config. Tested to work on CentOS 6.3 and Ubuntu 12.04. Should
work with even older versions of libvirt.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1362691685 -0700
2013-03-07 14:28:05 -07:00
Hiroaki Kawai
19c6d8054b CLOUDSTACK-1535: kvm agent will silently ignore many exceptions
Current kvm agent will silently ignore many exception, and there's no
way to see what really happened. This patch will log in trace level log
that was silently ignored. And also, it will fix huge bare Exception
catch, which is very harmful because it also catches RuntimeException.
2013-03-06 10:22:44 -08:00
Marcus Sorensen
d81f7156dc Summary: KVM - Add virtio-serial device to libvirt xml for system vms
Detail: This device can be used for remotely controlling the system vms through
a local socket on the host. We will attempt to replace the KVM patchdisk with
it. Tested, successfully deploys VM, and if system vm has proper driver it
will create a /dev/vport0p1 device within the VM. We will be updating the
system VM in 4.2/5.0 and will support this.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1362527352 -0700
2013-03-05 16:49:12 -07:00
Wido den Hollander
e14e057f3d packaging: Use the JNA version from the distribution
Libvirt-java 0.4.9 works just fine with JNA 3.2.4 which is in
all distributions.

Future libvirt version require at least JNA 3.5.1 due to new methods
and memory management, but that is not our concern now.

By depending on the JNA in the distribution and adding it to the classpath
we can work just fine.
2013-03-05 16:10:38 +01:00
Dave Cahill
ff099fa651 Adding support for multiple VIF drivers in KVM
- Building map of {trafficType, vifDriver} at configure time
- Use the relevant VIF driver for the given traffic type when call plug()
- Inform all vif drivers when call unplug(), as we no longer know traffic type
- Refactor VIF driver choosing code and add unit tests
- Basic unit tests, just test default case
- Also slight refactor of unit test code, and use jUnit 4 instead of 3, to match rest of codebase

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-03-04 20:56:34 +01:00
Hugo Trippaers
2eae9a1390 Summary: few fixes to the pom
Only one dependency to the ovm hypervisor is enough

Depend on the right jna package
2013-03-01 20:52:17 +01:00
Hugo Trippaers
092d5e4cd8 Tweak the jna dependency 2013-03-01 20:09:41 +01:00
Wido den Hollander
24c974dc03 agent: Add net.java.dev.jna.platform as a runtime dependency
This is required for newer versions of libvirt-java
2013-03-01 16:47:05 +01:00
Wido den Hollander
0b7f2eb178 CLOUDSTACK-1410: Add a Unit test to verify if it actually works.
This is also the first Unit Test for LibvirtComputingResource
2013-02-27 17:34:06 +01:00
Noa Resare
2f135be15f CLOUDSTACK-1415: Debian & Ubuntu packaging work
Some concepts included:

* the replace.properties location used by maven is parameterized to allow
  for a build that does not modify the currently git tracked files
* package naming is updated along the lines of what was discussed on the
  -dev mailing list and between committers at the Build a Cloud Day in Belgi
* package version pattern is updated (since we redo all package names,
  we might as well drop the epoch)
2013-02-27 15:44:46 +00:00
Wido den Hollander
2e28f69d3e CLOUDSTACK-1410: >4.1 agents should be able to communicatie with <=4.1 management servers
The recently added overcommit feature breaks compatibility between older management servers
and 4.2 agents.

This patch fixes that by falling back if needed.
2013-02-27 16:23:21 +01:00
Bharat Kumar
667aa17512 CLOUDSTACK 711: CPU and RAM overcommit update cluster part 2013-02-22 20:09:50 +05:30
Bharat Kumar
23e54bb0f4 Cloudstack-711: Cpu and Ram Overcommit Ratio. 2013-02-22 17:31:06 +05:30
Rohit Yadav
80d58b6c73 CLOUDSTACK-1317: Bump CloudStack package version to 4.2.0-SNAPSHOT in all poms
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-20 16:42:56 +05:30
Marcus Sorensen
298c5ee06b Summary: Adjust systemvm.iso path for KVM, due to packaging changes
Detail: Removing references to /usr/lib/cloud and /usr/lib64/cloud so that old
systemvm.iso files aren't found by accident. systemvm.iso should exist in
/usr/share/cloudstack-common/vms now.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360860243 -0700
2013-02-14 09:45:57 -07:00
Marcus Sorensen
35cf56862f Summary: KVM - Fix physical net parsing when traffic label points to tagged dev
Detail: If your traffic label points to a bridge that is on a tagged interface
rather than a real physical interface, cloudstack may not parse the physical
interface correctly, bringing up tagged interfaces on the tagged interface.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360798665 -0700
2013-02-13 16:45:18 -07:00
Wido den Hollander
a5f0be186f agent: Rename startDomain to startVM
The other methods are called stopVM and rebootVM, so it makes
sence to use startVM.
2013-02-07 23:07:10 +01:00
Wido den Hollander
5dfcd309f1 agent: Do not define domains persistent in libvirt
We used to define domains persistent in libvirt, which caused XML definitions
to stay there after a reboot of the hypervisor.

We however don't do anything with those already defined domains, actually, we wipe
all defined domains when starting the agent.

Some users however reported that libvirt started these domains after a reboot
before the CloudStack agent was started.

By starting domains from the XML description and not defining them we prevent
them from ever being stored in libvirt.
2013-02-07 23:07:05 +01:00
Wido den Hollander
f6c4b22139 agent: Remove the main() method from LibvirtComputingResource
Seems like very ancient code which is not needed.
2013-02-07 23:06:44 +01:00
Wido den Hollander
303fb650cb agent: Use FileUtil.readFileAsString for reading RX and TX bytes
Since we already have this un utils it's better to use it here
then do the whole File/FileInputStream magic.

Keeps the code simpler and more readable.
2013-02-05 22:17:40 +01:00
Marcus Sorensen
3535f88d16 Summary: Disallow shrinking volume type QCOW2 to fail with better message
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360093176 -0700
2013-02-05 12:39:36 -07:00