You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2013/02/26 20:33:26 UTC
git commit: refs/heads/4.1 - Summary: Packaging fixes for usage
Updated Branches:
refs/heads/4.1 6977e7bd4 -> 62d7dc9d3
Summary: Packaging fixes for usage
Make the usage server look in the /etc/cloudstack/usage server for the db.properties
Add the /etc/cloudstack/usage to the package as an empty dir
(cherry picked from commit d92725e84651650963da7a7e84dd78e0ace29603)
Separate stderr and stdout output from jsvc
(cherry picked from commit 0fa3ed9b74becc06cd58f2773bc8a534b090508c)
Signed-off-by: Hugo Trippaers <ht...@schubergphilis.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/62d7dc9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/62d7dc9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/62d7dc9d
Branch: refs/heads/4.1
Commit: 62d7dc9d37843213922a880159cd26227c9f60a5
Parents: 6977e7b
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Tue Feb 26 16:40:35 2013 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Tue Feb 26 20:26:37 2013 +0100
----------------------------------------------------------------------
packaging/centos63/cloud-agent.rc | 2 +-
packaging/centos63/cloud-usage.rc | 4 ++--
packaging/centos63/cloud.spec | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/62d7dc9d/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index 65b0cd0..d885dad 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -69,7 +69,7 @@ start() {
echo -n $"Starting $PROGNAME: "
if hostname --fqdn >/dev/null 2>&1 ; then
$JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \
- -errfile $LOGDIR/cloudstack-agent.out -outfile $LOGDIR/cloudstack-agent.out $CLASS
+ -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
RETVAL=$?
echo
else
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/62d7dc9d/packaging/centos63/cloud-usage.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-usage.rc b/packaging/centos63/cloud-usage.rc
index 6eff123..76f0e06 100755
--- a/packaging/centos63/cloud-usage.rc
+++ b/packaging/centos63/cloud-usage.rc
@@ -63,7 +63,7 @@ JCP="/usr/share/java/commons-daemon.jar"
# We need to append the JSVC daemon JAR to the classpath
# AgentShell implements the JSVC daemon methods
-export CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/sysconfig"
+export CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/cloudstack/usage"
start() {
if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
@@ -81,7 +81,7 @@ start() {
echo -n "Starting $PROGNAME" "$SHORTNAME"
if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
- -errfile $LOGDIR/cloudstack-usage.out -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
+ -errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
RETVAL=$?
then
rc=0
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/62d7dc9d/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index bcf9078..05fdcec 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -263,6 +263,7 @@ install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-%{_maventa
cp plugins/hypervisors/kvm/target/dependencies/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib
# Usage server
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib
install -D usage/target/cloud-usage-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/cloud-usage-%{_maventag}.jar
cp usage/target/dependencies/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib/
@@ -408,6 +409,7 @@ fi
%attr(0644,root,root) %{_datadir}/%{name}-usage/*.jar
%attr(0644,root,root) %{_datadir}/%{name}-usage/lib/*.jar
%dir /var/log/%{name}/usage
+%dir %{_sysconfdir}/%{name}/usage
%doc LICENSE
%doc NOTICE