Mailing List Archive

Patch to JBoss RA
I've added an option to the JBoss RA to allow specifying the JVM options. I needed this to be able to increase the memory and stack size from the JVM's defaults.


--- jboss-original 2011-05-02 14:08:37.000000000 -0500
+++ jboss 2011-05-09 09:47:08.000000000 -0500
@@ -33,6 +33,7 @@
# OCF_RESKEY_user - A user name to start a JBoss. Default is root
# OCF_RESKEY_statusurl - URL for state confirmation. Default is http://127.0.0.1:8080
# OCF_RESKEY_java_home - Home directory of the Java. Default is ${JAVA_HOME}
+# OCF_RESKEY_java_opts - Options for Java.
# OCF_RESKEY_jboss_home - Home directory of Jboss. Default is None
# is it possible to devise this string from options? I'm afraid
# that allowing users to set this could be error prone.
@@ -100,8 +101,9 @@
>> "$CONSOLE" 2>&1 &
else
su - -s /bin/bash "$JBOSS_USER" \
- -c "export JAVA_HOME=${JAVA_HOME};\n
- export JBOSS_HOME=${JBOSS_HOME};\n
+ -c "export JAVA_HOME=${JAVA_HOME};\
+ export JAVA_OPTS='${JAVA_OPTS}';\
+ export JBOSS_HOME=${JBOSS_HOME};\
$JBOSS_HOME/bin/run.sh $RUN_OPTS" \
>> "$CONSOLE" 2>&1 &
fi
@@ -127,8 +129,8 @@
>> "$CONSOLE" 2>&1 &
else
su - -s /bin/bash "$JBOSS_USER" \
- -c "export JAVA_HOME=${JAVA_HOME};\n
- export JBOSS_HOME=${JBOSS_HOME};\n
+ -c "export JAVA_HOME=${JAVA_HOME};\
+ export JBOSS_HOME=${JBOSS_HOME};\
$JBOSS_HOME/bin/shutdown.sh $SHUTDOWN_OPTS -S" \
>> "$CONSOLE" 2>&1 &

@@ -273,6 +275,14 @@
<content type="string" default=""/>
</parameter>

+<parameter name="java_opts" unique="0" required="0">
+<longdesc lang="en">
+Java options.
+</longdesc>
+<shortdesc>Java options.</shortdesc>
+<content type="string" default=""/>
+</parameter>
+
<parameter name="jboss_home" unique="1" required="1">
<longdesc lang="en">
Home directory of Jboss.
@@ -336,6 +346,7 @@
PSTRING="${OCF_RESKEY_pstring-java -Dprogram.name=run.sh}"
RUN_OPTS="${OCF_RESKEY_run_opts--c default -l lpg4j}"
SHUTDOWN_OPTS="${OCF_RESKEY_shutdown_opts--s 127.0.0.1:1099}"
+JAVA_OPTS="${OCF_RESKEY_java_opts-}"

# test if these two are set and if directories exist and if the
# required scripts/binaries exist; use OCF_ERR_INSTALLED




_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch to JBoss RA [ In reply to ]
Hi,

On Wed, Nov 02, 2011 at 09:25:01AM -0500, David Gersic wrote:
> I've added an option to the JBoss RA to allow specifying the JVM options. I needed this to be able to increase the memory and stack size from the JVM's defaults.

Hunks 2 and 3 fail, don't know if it's due to space being
mangled or the jboss RA version you worked on is old:

patching file jboss
Hunk #2 FAILED at 101.
Hunk #3 FAILED at 129.
Hunk #4 succeeded at 286 with fuzz 1 (offset 11 lines).
Hunk #5 succeeded at 357 with fuzz 2 (offset 11 lines).
2 out of 5 hunks FAILED -- saving rejects to file jboss.rej

Can you please produce a new patch and attach it to the message.

Also, was there a reason removing \n in the export lines? I
don't really mind either way, but if the change is not necessary
then we shouldn't make it.

Cheers,

Dejan

>
>
> --- jboss-original 2011-05-02 14:08:37.000000000 -0500
> +++ jboss 2011-05-09 09:47:08.000000000 -0500
> @@ -33,6 +33,7 @@
> # OCF_RESKEY_user - A user name to start a JBoss. Default is root
> # OCF_RESKEY_statusurl - URL for state confirmation. Default is http://127.0.0.1:8080
> # OCF_RESKEY_java_home - Home directory of the Java. Default is ${JAVA_HOME}
> +# OCF_RESKEY_java_opts - Options for Java.
> # OCF_RESKEY_jboss_home - Home directory of Jboss. Default is None
> # is it possible to devise this string from options? I'm afraid
> # that allowing users to set this could be error prone.
> @@ -100,8 +101,9 @@
> >> "$CONSOLE" 2>&1 &
> else
> su - -s /bin/bash "$JBOSS_USER" \
> - -c "export JAVA_HOME=${JAVA_HOME};\n
> - export JBOSS_HOME=${JBOSS_HOME};\n
> + -c "export JAVA_HOME=${JAVA_HOME};\
> + export JAVA_OPTS='${JAVA_OPTS}';\
> + export JBOSS_HOME=${JBOSS_HOME};\
> $JBOSS_HOME/bin/run.sh $RUN_OPTS" \
> >> "$CONSOLE" 2>&1 &
> fi
> @@ -127,8 +129,8 @@
> >> "$CONSOLE" 2>&1 &
> else
> su - -s /bin/bash "$JBOSS_USER" \
> - -c "export JAVA_HOME=${JAVA_HOME};\n
> - export JBOSS_HOME=${JBOSS_HOME};\n
> + -c "export JAVA_HOME=${JAVA_HOME};\
> + export JBOSS_HOME=${JBOSS_HOME};\
> $JBOSS_HOME/bin/shutdown.sh $SHUTDOWN_OPTS -S" \
> >> "$CONSOLE" 2>&1 &
>
> @@ -273,6 +275,14 @@
> <content type="string" default=""/>
> </parameter>
>
> +<parameter name="java_opts" unique="0" required="0">
> +<longdesc lang="en">
> +Java options.
> +</longdesc>
> +<shortdesc>Java options.</shortdesc>
> +<content type="string" default=""/>
> +</parameter>
> +
> <parameter name="jboss_home" unique="1" required="1">
> <longdesc lang="en">
> Home directory of Jboss.
> @@ -336,6 +346,7 @@
> PSTRING="${OCF_RESKEY_pstring-java -Dprogram.name=run.sh}"
> RUN_OPTS="${OCF_RESKEY_run_opts--c default -l lpg4j}"
> SHUTDOWN_OPTS="${OCF_RESKEY_shutdown_opts--s 127.0.0.1:1099}"
> +JAVA_OPTS="${OCF_RESKEY_java_opts-}"
>
> # test if these two are set and if directories exist and if the
> # required scripts/binaries exist; use OCF_ERR_INSTALLED
>
>
>
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch to JBoss RA [ In reply to ]
>>> On 11/3/2011 at 11:20 AM, Dejan Muhamedagic <dejan@suse.de> wrote:

> Hunks 2 and 3 fail, don't know if it's due to space being
> mangled or the jboss RA version you worked on is old:

I started with the newest JBoss RA I could find, but that was a while ago. Where can I get the current one?


> Also, was there a reason removing \n in the export lines?

To be honest, I don't remember. I think I had problems getting it working with them in. I'll re-check that though.




_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch to JBoss RA [ In reply to ]
On Fri, Nov 04, 2011 at 09:42:50AM -0500, David Gersic wrote:
> >>> On 11/3/2011 at 11:20 AM, Dejan Muhamedagic <dejan@suse.de> wrote:
>
> > Hunks 2 and 3 fail, don't know if it's due to space being
> > mangled or the jboss RA version you worked on is old:
>
> I started with the newest JBoss RA I could find, but that was a while ago. Where can I get the current one?
>
>
> > Also, was there a reason removing \n in the export lines?
>
> To be honest, I don't remember. I think I had problems getting it working with them in. I'll re-check that though.

They are wrong.
They would try to execute some binary named "n".
Yes, please, remove these bogus \n.

--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch to JBoss RA [ In reply to ]
Hi Lars,

On Sun, Nov 06, 2011 at 09:56:12PM +0100, Lars Ellenberg wrote:
> On Fri, Nov 04, 2011 at 09:42:50AM -0500, David Gersic wrote:
> > >>> On 11/3/2011 at 11:20 AM, Dejan Muhamedagic <dejan@suse.de> wrote:
> >
> > > Hunks 2 and 3 fail, don't know if it's due to space being
> > > mangled or the jboss RA version you worked on is old:
> >
> > I started with the newest JBoss RA I could find, but that was a while ago. Where can I get the current one?
> >
> >
> > > Also, was there a reason removing \n in the export lines?
> >
> > To be honest, I don't remember. I think I had problems getting it working with them in. I'll re-check that though.
>
> They are wrong.
> They would try to execute some binary named "n".

Really? Oops. I thought that this was tested and I think that
there are some that use the RA.

> Yes, please, remove these bogus \n.

No objection, as long as it's in a separate patch :)

Cheers,

Dejan

> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch to JBoss RA [ In reply to ]
Hi All,

I divided the patch which David sent into two.
1) 001-jboss.patch
It is the patch which changed '\n' to '\'.
2) 002-jboss.patch
It is a patch for the parameter addition of JAVA_OPTS.
I added export of JAVA_OPTS from a patch of David.

Regards,
Tomo

2011/11/8 Dejan Muhamedagic <dejanmm@fastmail.fm>:
> Hi Lars,
>
> On Sun, Nov 06, 2011 at 09:56:12PM +0100, Lars Ellenberg wrote:
>> On Fri, Nov 04, 2011 at 09:42:50AM -0500, David Gersic wrote:
>> > >>> On 11/3/2011 at 11:20 AM, Dejan Muhamedagic <dejan@suse.de> wrote:
>> >
>> > > Hunks 2 and 3 fail, don't know if it's due to space being
>> > > mangled or the jboss RA version you worked on is old:
>> >
>> > I started with the newest JBoss RA I could find, but that was a while ago. Where can I get the current one?
>> >
>> >
>> > > Also, was there a reason removing \n in the export lines?
>> >
>> > To be honest, I don't remember. I think I had problems getting it working with them in. I'll re-check that though.
>>
>> They are wrong.
>> They would try to execute some binary named "n".
>
> Really? Oops. I thought that this was tested and I think that
> there are some that use the RA.
>
>> Yes, please, remove these bogus \n.
>
> No objection, as long as it's in a separate patch :)
>
> Cheers,
>
> Dejan
>
>> --
>> : Lars Ellenberg
>> : LINBIT | Your Way to High Availability
>> : DRBD/HA support and consulting http://www.linbit.com
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
Re: Patch to JBoss RA [ In reply to ]
Hi,

On Mon, Nov 14, 2011 at 12:03:15PM +0900, nozawat wrote:
> Hi All,
>
> I divided the patch which David sent into two.
> 1) 001-jboss.patch
> It is the patch which changed '\n' to '\'.
> 2) 002-jboss.patch
> It is a patch for the parameter addition of JAVA_OPTS.
> I added export of JAVA_OPTS from a patch of David.

I'll apply the patches. Many thanks!

Dejan

> Regards,
> Tomo
>
> 2011/11/8 Dejan Muhamedagic <dejanmm@fastmail.fm>:
> > Hi Lars,
> >
> > On Sun, Nov 06, 2011 at 09:56:12PM +0100, Lars Ellenberg wrote:
> >> On Fri, Nov 04, 2011 at 09:42:50AM -0500, David Gersic wrote:
> >> > >>> On 11/3/2011 at 11:20 AM, Dejan Muhamedagic <dejan@suse.de> wrote:
> >> >
> >> > > Hunks 2 and 3 fail, don't know if it's due to space being
> >> > > mangled or the jboss RA version you worked on is old:
> >> >
> >> > I started with the newest JBoss RA I could find, but that was a while ago. Where can I get the current one?
> >> >
> >> >
> >> > > Also, was there a reason removing \n in the export lines?
> >> >
> >> > To be honest, I don't remember. I think I had problems getting it working with them in. I'll re-check that though.
> >>
> >> They are wrong.
> >> They would try to execute some binary named "n".
> >
> > Really? Oops. I thought that this was tested and I think that
> > there are some that use the RA.
> >
> >> Yes, please, remove these bogus \n.
> >
> > No objection, as long as it's in a separate patch :)
> >
> > Cheers,
> >
> > Dejan
> >
> >> --
> >> : Lars Ellenberg
> >> : LINBIT | Your Way to High Availability
> >> : DRBD/HA support and consulting http://www.linbit.com
> >> _______________________________________________________
> >> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> >> Home Page: http://linux-ha.org/
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
> >



> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/