diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-10-20 19:09:54 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-10-21 16:15:22 +0200 |
commit | 240d559fae6bd990ad787697501cdceb76863d98 (patch) | |
tree | 77c77dee71ba7038a504539a1c4fbc4f6958d332 | |
parent | afdb9b5fcdc42e8550d1d07efff91a69ebf89b1e (diff) | |
download | clufter-240d559fae6bd990ad787697501cdceb76863d98.tar.gz clufter-240d559fae6bd990ad787697501cdceb76863d98.tar.xz clufter-240d559fae6bd990ad787697501cdceb76863d98.zip |
filters/pcsprelude2pcscompact[resources]: handle @nofailback, too
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | filters/cib/configuration/resources/__init__.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/filters/cib/configuration/resources/__init__.py b/filters/cib/configuration/resources/__init__.py index 090464d..17b0dc5 100644 --- a/filters/cib/configuration/resources/__init__.py +++ b/filters/cib/configuration/resources/__init__.py @@ -213,6 +213,44 @@ pcsprelude2pcscompact = ('''\ </xsl:copy> </xsl:for-each> <!-- + stickiness=INFINITY for each N in dedicated nodes ~ @nofailback + --> + <xsl:variable name="FailoverDomain" + select="../template[ + @provider = '%(package_name)s' + and + @type = 'temporary-failoverdomain' + and + @id = current()/meta_attributes/nvpair[ + @name = 'domain' + ]/@value + ]"/> + <xsl:if test="$FailoverDomain/meta_attributes/nvpair[ + @name = 'nofailback' + ]/@value ='1' + and + count( + $FailoverDomain/meta_attributes/nvpair[ + starts-with(@name, 'failoverdomainnode-') + ] + ) != 0"> + <meta_attributes id="{$ResourceGroup}-META-ATTRS-nofailback"> + <rule id="{$ResourceGroup}-META-RULE-stickiness" + score="INFINITY" + boolean-op="or"> + <xsl:for-each select="$FailoverDomain/meta_attributes/nvpair[ + starts-with(@name, 'failoverdomainnode-') + ]"> + <expression id="STICKINESS-{$ResourceGroup}-{@value}" + attribute="#uname" + operation="eq" + value="{@value}"> + </expression> + </xsl:for-each> + </rule> + </meta_attributes> + </xsl:if> + <!-- is-managed=false ~ @autostart in (no, 0) --> <xsl:variable name="Autostart" |