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)

Attachment: pgppmk4UsCUIq.pgp
Description: PGP signature

_______________________________________________
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to