This is an automated email from the ASF dual-hosted git repository.

rafael pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new df6288f  Extend PR#2535 to enable remote debugging for CentOS63 as 
well (#3128)
df6288f is described below

commit df6288f4bcfa813fcbe6702345c46ab9f0a6dbf5
Author: Rafael Weingärtner <rafaelweingart...@gmail.com>
AuthorDate: Mon Jan 14 22:15:01 2019 -0200

    Extend PR#2535 to enable remote debugging for CentOS63 as well (#3128)
    
    This PR is an extension of #2535. By doing this, we also create an easy 
method to enable remote debug in CentOS63 as well.
---
 packaging/centos63/cloud-management.rc          |  2 +-
 packaging/centos63/cloud-usage.rc               |  2 +-
 packaging/systemd/cloudstack-management.default | 12 +++++++++---
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/packaging/centos63/cloud-management.rc 
b/packaging/centos63/cloud-management.rc
index 0ef5fc4..eb075da 100755
--- a/packaging/centos63/cloud-management.rc
+++ b/packaging/centos63/cloud-management.rc
@@ -88,7 +88,7 @@ start() {
 
     echo -n "Starting $PROGNAME" "$SHORTNAME"
 
-    if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" 
-pidfile "$PIDFILE" -user "$USER" \
+    if daemon --pidfile $PIDFILE $DAEMON $JAVA_DEBUG -home "$JAVA_HOME" -cp 
"$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
       -errfile $LOGDIR/cloudstack-management.err $JAVA_OPTS $CLASS
         RETVAL=$?
     then
diff --git a/packaging/centos63/cloud-usage.rc 
b/packaging/centos63/cloud-usage.rc
index 7741137..15e9ee5 100755
--- a/packaging/centos63/cloud-usage.rc
+++ b/packaging/centos63/cloud-usage.rc
@@ -96,7 +96,7 @@ start() {
 
     echo -n "Starting $PROGNAME" "$SHORTNAME"
 
-    if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" 
-pidfile "$PIDFILE" -user "$USER" \
+    if daemon --pidfile $PIDFILE $DAEMON $JAVA_DEBUG -home "$JAVA_HOME" -cp 
"$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
       -errfile $LOGDIR/cloudstack-usage.err -outfile 
$LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
         RETVAL=$?
     then
diff --git a/packaging/systemd/cloudstack-management.default 
b/packaging/systemd/cloudstack-management.default
index 05f4a50..cd6a1ca 100644
--- a/packaging/systemd/cloudstack-management.default
+++ b/packaging/systemd/cloudstack-management.default
@@ -34,6 +34,12 @@ 
CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cl
 
 BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon
 
-#You can uncomment this if you want to enable Java remote debugging.
-#You can change the parameters at your will. The 'address' field defines the 
port to be used. 
-#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
\ No newline at end of file
+################################################################################################
+#You can uncomment one of these options if you want to enable Java remote 
debugging.           #
+#You can change the parameters at your will. The 'address' field defines the 
port to be used.  #
+################################################################################################
 
+# This option here should be used with 'systemmd' based operating systems such 
as CentOS7, Ubuntu 16, and so on.
+#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
+
+# On the other hand, this option is used by CentOS6.
+#JAVA_DEBUG="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
\ No newline at end of file

Reply via email to