On Mon, 2020-03-09 at 11:42 +0100, Ulrich Windl wrote: > > > > Ken Gaillot <kgail...@redhat.com> schrieb am 06.03.2020 um > > > > 16:00 in > > Nachricht > <bed62f6d2c3d92d09f7306f4108195ccc6f1b99f.ca...@redhat.com>: > > On Fri, 2020‑03‑06 at 08:19 +0100, Ulrich Windl wrote: > > > > > > Ondrej <ondrej‑clusterl...@famera.cz> schrieb am 06.03.2020 > > > > > > um > > > > > > 01:45 in > > > > > > Nachricht > > > < > > > > > 7499_1583455563_5E619D4B_7499_1105_1_2a18c389‑059e‑cf6f‑a840‑ > dec26437fdd1@famer > > > .cz>: > > > > On 3/5/20 9:24 PM, Ulrich Windl wrote: > > > > > Hi! > > > > > > > > > > I'm wondering whether it's possible to pause/freeze specific > > > > > resource > > > > > > > > operations through rules. > > > > > The idea is something like this: If your monitor operation > > > > > needes > > > > > (e.g.) > > > > > > > > some external NFS server, and thst NFS server is known to be > > > > down, > > > > it seems > > > > better to delay the monitor operation until NFS is up again, > > > > rather > > > > than > > > > forcing a monitor timeout that will most likely be followed by > > > > a > > > > stop > > > > operation that will also time out, eventually killing the node > > > > (which has no > > > > problem itself). > > > > > > > > > > As I guess it's not possible right now, what would be needed > > > > > to > > > > > make this > > > > > > > > work? > > > > > In case it's possible, how would an example scenario look > > > > > like? > > > > > > > > > > Regards, > > > > > Ulrich > > > > > > > > > > > > > Hi Ulrich, > > > > > > > > To determine _when_ this state should be enabled and disabled > > > > would > > > > be a > > > > different story. > > > > > > For the moment let's assume I know it ;‑) ping‑node, maybe. > > > > I believe that limited scenario is possible, but imperfectly. > > > > You could configure an ocf:pacemaker:ping resource to ping the NFS > > server IP. Then in the dependent resource, configure the recurring > > monitor logically like this: > > > > monitor interval=N > > meta attributes > > rule when ping attribute lt 1 or not defined > > enabled=false > > Assuming my attribute is named "n_up", would the syntax be (sorry, > I'm not > fluent with rules): > "rule when n_up lt1 or not defined" > > From your example it's not quite clear which words are placeholders > and which > are reserved words... > > [...]
They're all placeholders :) because the syntax is different in XML, pcs and crm shell. The XML syntax is described at: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#idm47160816617536 In this case, a separate <meta_attributes> block for the operation would contain something like this: <rule id="rule1" score="INFINITY" boolean-op="or"> <expression id="expr1" attribute="n_up" operation="lt" value="1"/> <expression id="expr2" attribute="n_up" operation="not_defined"/> </rule> <nvpair id="nvp1" name="enabled" value="false"/> See the man pages for pcs and crm shell for their equivalent syntax. (Or maybe someone more familiar can reply with it.) -- Ken Gaillot <kgail...@redhat.com> _______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/