Re: [ClusterLabs] Best way to create a floating identity file

2021-01-07 Thread Tony Stocker
On Thu, Jan 7, 2021 at 2:14 AM Reid Wahl wrote: > > If there will only ever be one value (e.g., "httpserver") in the file, > then yet another possibility is to use an ocf:heartbeat:symlink > resource. You could set up a file on each node (say, > /var/local/project/cluster-node-real) with

Re: [ClusterLabs] Best way to create a floating identity file

2021-01-06 Thread Reid Wahl
If there will only ever be one value (e.g., "httpserver") in the file, then yet another possibility is to use an ocf:heartbeat:symlink resource. You could set up a file on each node (say, /var/local/project/cluster-node-real) with "httpserver" as its contents. Then create a symlink resource with

Re: [ClusterLabs] Best way to create a floating identity file

2020-12-16 Thread Ken Gaillot
On Wed, 2020-12-16 at 04:46 -0500, Tony Stocker wrote: > On Tue, Dec 15, 2020 at 12:29 PM Ken Gaillot > wrote: > > > > On Tue, 2020-12-15 at 17:02 +0300, Andrei Borzenkov wrote: > > > On Tue, Dec 15, 2020 at 4:58 PM Tony Stocker < > > > akostoc...@gmail.com> > > > wrote: > > > > > > > > Just

Re: [ClusterLabs] Best way to create a floating identity file

2020-12-16 Thread Tony Stocker
On Tue, Dec 15, 2020 at 12:29 PM Ken Gaillot wrote: > > On Tue, 2020-12-15 at 17:02 +0300, Andrei Borzenkov wrote: > > On Tue, Dec 15, 2020 at 4:58 PM Tony Stocker > > wrote: > > > > Just for fun, some other possibilities: > > You could write your script/cron as an OCF RA itself, with an >

Re: [ClusterLabs] Best way to create a floating identity file

2020-12-15 Thread Ken Gaillot
On Tue, 2020-12-15 at 17:02 +0300, Andrei Borzenkov wrote: > On Tue, Dec 15, 2020 at 4:58 PM Tony Stocker > wrote: > > > > I'm trying to figure out the best way to do the following on our > > 2-node clusters. > > > > Whichever node is the primary (all services run on a single node) I > > want

Re: [ClusterLabs] Best way to create a floating identity file

2020-12-15 Thread Andrei Borzenkov
15.12.2020 17:10, Tony Stocker пишет: > On Tue, Dec 15, 2020 at 9:02 AM Andrei Borzenkov wrote: >> >> On Tue, Dec 15, 2020 at 4:58 PM Tony Stocker wrote: >>> >> >> You could simply query whether a specific resource (group) is active >> on the node where your script runs. I used a similar

Re: [ClusterLabs] Best way to create a floating identity file

2020-12-15 Thread Tony Stocker
On Tue, Dec 15, 2020 at 9:02 AM Andrei Borzenkov wrote: > > On Tue, Dec 15, 2020 at 4:58 PM Tony Stocker wrote: > > > > You could simply query whether a specific resource (group) is active > on the node where your script runs. I used a similar approach in two > node cluster (in this case I

Re: [ClusterLabs] Best way to create a floating identity file

2020-12-15 Thread Andrei Borzenkov
On Tue, Dec 15, 2020 at 4:58 PM Tony Stocker wrote: > > I'm trying to figure out the best way to do the following on our > 2-node clusters. > > Whichever node is the primary (all services run on a single node) I > want to create a file that contains an identity descriptor, e.g. >

[ClusterLabs] Best way to create a floating identity file

2020-12-15 Thread Tony Stocker
I'm trying to figure out the best way to do the following on our 2-node clusters. Whichever node is the primary (all services run on a single node) I want to create a file that contains an identity descriptor, e.g. /var/local/project/identity and the contents are "httpserver". This is so that we