From 5b19a5e731ad6a6a943f3c4202b76b4c9af9e119 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Mon, 13 Jun 2011 18:14:42 -0400 Subject: [PATCH] reduce agent package size --- agent/src/com/cloud/agent/AgentShell.java | 14 +++++++------- debian/cloud-agent-deps.install | 3 +++ debian/control | 20 ++++++++++++++++---- 3 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 debian/cloud-agent-deps.install diff --git a/agent/src/com/cloud/agent/AgentShell.java b/agent/src/com/cloud/agent/AgentShell.java index 9089a70ba84..d877fe98223 100644 --- a/agent/src/com/cloud/agent/AgentShell.java +++ b/agent/src/com/cloud/agent/AgentShell.java @@ -484,19 +484,19 @@ public class AgentShell implements IAgentShell { ServerResource resource = (ServerResource)constructor.newInstance(); launchAgent(getNextAgentId(), resource); } catch (final ClassNotFoundException e) { - throw new ConfigurationException("Resource class not found: " + name); + throw new ConfigurationException("Resource class not found: " + name + " due to: " + e.toString()); } catch (final SecurityException e) { - throw new ConfigurationException("Security excetion when loading resource: " + name); + throw new ConfigurationException("Security excetion when loading resource: " + name + " due to: " + e.toString()); } catch (final NoSuchMethodException e) { - throw new ConfigurationException("Method not found excetion when loading resource: " + name); + throw new ConfigurationException("Method not found excetion when loading resource: " + name + " due to: " + e.toString()); } catch (final IllegalArgumentException e) { - throw new ConfigurationException("Illegal argument excetion when loading resource: " + name); + throw new ConfigurationException("Illegal argument excetion when loading resource: " + name + " due to: " + e.toString()); } catch (final InstantiationException e) { - throw new ConfigurationException("Instantiation excetion when loading resource: " + name); + throw new ConfigurationException("Instantiation excetion when loading resource: " + name + " due to: " + e.toString()); } catch (final IllegalAccessException e) { - throw new ConfigurationException("Illegal access exception when loading resource: " + name); + throw new ConfigurationException("Illegal access exception when loading resource: " + name + " due to: " + e.toString()); } catch (final InvocationTargetException e) { - throw new ConfigurationException("Invocation target exception when loading resource: " + name); + throw new ConfigurationException("Invocation target exception when loading resource: " + name + " due to: " + e.toString()); } } } diff --git a/debian/cloud-agent-deps.install b/debian/cloud-agent-deps.install new file mode 100644 index 00000000000..da5b54a866e --- /dev/null +++ b/debian/cloud-agent-deps.install @@ -0,0 +1,3 @@ +/usr/share/java/cloud-gson.jar +/usr/share/java/cloud-libvirt-0.4.5.jar +/usr/share/java/cloud-apache-log4j-extras-1.0.jar diff --git a/debian/control b/debian/control index 0aea39138a1..b69f4b7c95f 100644 --- a/debian/control +++ b/debian/control @@ -17,6 +17,18 @@ Description: Cloud.com library dependencies not shipped by distributions, required to run the Cloud.com Cloud Stack. +Package: cloud-agent-deps +Provides: cloud-agent-deps +Conflicts: cloud-agent-deps +Replaces: cloud-agent-deps +Architecture: any +Depends: openjdk-6-jre +Description: Cloud.com agent library dependencies + This package contains a number of third-party dependencies + not shipped by distributions, required to run the Cloud.com + Cloud Stack. + + Package: cloud-utils Provides: vmops-utils Conflicts: vmops-utils @@ -86,7 +98,7 @@ Provides: vmops-core Conflicts: vmops-core Replaces: vmops-core Architecture: any -Depends: openjdk-6-jre, cloud-deps (= ${source:Version}), cloud-utils (= ${source:Version}) +Depends: openjdk-6-jre, cloud-utils (= ${source:Version}) Description: Cloud.com core library The Cloud.com core libraries provide a set of Java classes used in the Cloud.com Cloud Stack. @@ -131,7 +143,7 @@ Description: Cloud.com Python library Package: cloud-agent-libs Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), libcommons-httpclient-java, libcommons-collections-java, libcommons-dbcp-java, libcommons-pool-java, libcommons-logging-java +Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), libcommons-httpclient-java, libcommons-collections-java, libcommons-dbcp-java, libcommons-pool-java, libcommons-logging-java Description: Cloud.com agent libraries The Cloud.com agent libraries are used by the Cloud Agent and the Cloud Console Proxy. @@ -141,7 +153,7 @@ Provides: vmops-agent Conflicts: vmops-agent Replaces: vmops-agent Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), python, cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-agent-scripts (= ${source:Version}), libcommons-httpclient-java, libcommons-collections-java, libcommons-dbcp-java, libcommons-pool-java, libcommons-logging-java, libvirt0, cloud-daemonize, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, jnetpcap, ebtables, vlan +Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), python, cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-agent-scripts (= ${source:Version}), libcommons-httpclient-java, libcommons-collections-java, libcommons-dbcp-java, libcommons-pool-java, libcommons-logging-java, libvirt0, cloud-daemonize, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, jnetpcap, ebtables, vlan, libcglib-java, libcommons-httpclient-java, libservlet2.5-java, liblog4j1.2-java, libjna-java Description: Cloud.com agent The Cloud.com agent is in charge of managing shared computing resources in a Cloud.com Cloud Stack-powered cloud. Install this package if this computer @@ -149,7 +161,7 @@ Description: Cloud.com agent Package: cloud-agent-premium Architecture: any -Depends: cloud-agent +Depends: cloud-agent, libjetty-java Description: Cloud.com agent premium The Cloud.com agent is in charge of managing shared computing resources in a Cloud.com Cloud Stack-powered cloud. Install this package if this computer