[systemd-devel] Complicated SysVInit Migration

Mantas Mikulėnas grawity at gmail.com
Thu Jul 30 13:47:03 PDT 2015


On Thu, Jul 30, 2015 at 9:40 PM, Lesley Kimmel <ljkimmel99 at hotmail.com>
wrote:

> All;
>
> I'm struggling with figuring out how to migrate some SysVInit scripts to
> systemd. Specifically, this service launches WebLogic Managed Server (Java)
> instances Let me describe the process flow of my current service to you:
>
> -The init service/script launches a Java process called WLST which
> executes a simple script
> -This WLST process connects to an already running Java process called the
> Node Manager and issues a start command for the application server it
> wishes to start
> -The Node Manager process executes a shell script as a subprocess. This
> shell script sets up a bunch of environment variables, etc.
> -Ultimately the shell script launches a Java process which is a child of
> the shell script.
> -When this Java process reports itself as running, the initial WLST Java
> process exits.
> -In the end the actual service/process that we started, and want to
> manage, is actually the GRANDCHILD of a completely separate process from
> the initial Java process that systemd launched. How, would systemd track
> that process?
>

systemd would see it as an extra process belonging to NodeManager.service,
nothing more.

If you want systemd to track it as an independent service, go back to step
#3 (where the Node Manager executes a shell script), and make that shell
script merely run "systemctl start ..." instead of creating the new
instance directly. (Make a template foo at .service unit for the WLMS
instances.)

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150730/894a1b46/attachment.html>


More information about the systemd-devel mailing list