[ClusterLabs] Fwd: Re: ocf on dotnet
Jan Pokorný
jpokorny at redhat.com
Tue Nov 6 06:06:56 EST 2018
Hello Jiří,
On 05/11/18 18:49 +0100, jiri pijacek wrote:
>> could enyone help me with OCF for dotnet
>> /usr/lib/ocf/resource.d/heartbeat/dotnet
looks like some context is missing so now, we can only guess you ask
for help with writing said agent. The best you can do is to look around
how other agents are structured, e.g. see this "minimum viable" agent:
https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/Dummy
Also, do forget to check the developer's guide:
https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc
Per the systemd service file you provided (reformatted slightly):
>> my config /usr/lib/systemd/system/dotnet.service
>> --------------------------------------------------------------------------------------
>> [Unit]
>> Description=Demo service
>> After=network.target
>>
>> [Service]
>> WorkingDirectory=/home/web/
>> ExecStart=/usr/bin/dotnet /home/web/bin/Debug/netcoreapp2.1/web.dll
>> Restart=on-failure
>> SyslogIdentifier=dotnet-web
>> User=root
>>
>> [Install]
>> WantedBy=multi-user.target
One of the parameters to pass to the agent will be dynamic library
presumably implementing the actual service logic.
Note that since you have the service file already, you don't need
the OCF wrapping at all, since pacemaker is fluent with native systemd
units, just configure "systemd:dotnet.service" primitive resource.
Note that you'll likely want to omit "Restart=on-failure" since that
shall rather be fully under pacemaker's control once said delegation
is in effect.
--
Nazdar,
Jan (Poki)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20181106/5443d9ae/attachment-0002.sig>
More information about the Users
mailing list