[ClusterLabs] Q: Reusing date specs in crm shell

Jan Pokorný jpokorny at redhat.com
Wed Sep 12 04:37:20 EDT 2018

On 11/09/18 13:52 +0200, Ulrich Windl wrote:
> I have a set of resources with almost identical rules, one part
> being a data spec. Currently I'm using two different date specs in
> those rules. However I repeated the date spec in every rule.
> Foreseeing that I might change those one day, I wonder whether it's
> possible in crm shell to define a date spec once (outside of any
> resource for symmetry) and reference that data spec inside a rule.
> Ok, time for an example:
>         meta 1: ...default settings... \
>         meta 2: rule 0: date spec hours=7-18 weekdays=1-5 ...override settings outside prime time...

High level aside (pcs cannot currently achieve that), this is
certainly possible at the CIB encoded configuration grounds in
pacemaker, since you can reference another rule in places where
fully specified rule is usually provided.

Single common rule would hence be defined within one meta attribute
set and referenced-by-id in other ones to share the same date spec.

> In the crm manual page the reference examples use dummy primitives.

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/20180912/39059130/attachment-0002.sig>

More information about the Users mailing list