Adding a Resource with Constraints without affecting the existing Resources into a Cluster

This document (7023856) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise High Availability Extension 12
SUSE Linux Enterprise High Availability Extension 11

Situation

Assuming there is a setup from a Best Practice Guide, for example a Clustered Hana in Performance optimized Scenario as

   killer  (stonith:external/sbd): Started oldhanaa1
   rsc_ip_HA0_HDB00        (ocf::heartbeat:IPaddr2):       Started oldhanaa1
    Master/Slave Set: msl_SAPHana_HA0_HDB00 [rsc_SAPHana_HA0_HDB00]
        Masters: [ oldhanaa1 ]
        Slave: [ oldhanaa2 ]
    Clone Set: cln_SAPHanaTopology_HA0_HDB00 [rsc_SAPHanaTopology_HA0_HDB00]
        Started: [ oldhanaa1 oldhanaa2 ]

with

 property cib-bootstrap-options: \
        have-watchdog=true \
        dc-version="1.1.19+20180928.0d2680780-1.8-1.1.19+20180928.0d2680780" \
        cluster-infrastructure=corosync \
        cluster-name=theben \
        stonith-timeout=28 \
        last-lrm-refresh=1557221612
 rsc_defaults rsc-options: \
        resource-stickiness=500 \
        migration-threshold=5000


and one wanted to add a MailTo Resource with a colocation to the IP Address to this setup, to get a notification on Resource Change from the cluster via Mail.

   primitive rsc_mail MailTo \
           params email="root@oldholborn.hwlab.suse.de" subject="Cluster HA0"
   colocation col_mailto_
ip_HA0_HDB00 inf: rsc_mail rsc_ip_HA0_HDB00


This could potentially lead to the situation that the running setup would be disturbed by the new Resource because of the new constraint.

Resolution

To resolve this without affecting the running resources one has to make sure, that the new Resource follows the existing resources and not the other way around. In this scenario the use of the

    inf:

Value for constraints will be bad and have the effect that the Hana IP fails over to the other node, dragging the Hana Master with it. It is the value of this colocation that is critical for the behaviour of the cluster.

To do this the correct one has to take the resource-stickiness into account, which is defined either per resource or by default in the

   rsc_defaults

Section of the cib.

Considering that there is in this example a

resource-stickiness=500

and the constraint between the Master and the IP is 2000 as in

colocation col_saphana_ip_HA0_HDB00 2000: rsc_ip_HA0_HDB00:Started msl_SAPHana_HA0_HDB00:Master

the correct value is higher than 500 but less than 2000.

In this example a working snippet would be

   primitive rsc_mail MailTo \
           params email="root@oldholborn.hwlab.suse.de" subject="Cluster HA0"
   colocation col_mailto_
ip_HA0_HDB00 501: rsc_mail rsc_ip_HA0_HDB00

which can be injected with

   crm configure load update /path_to_my_snippet_file


Cause

Sola dosis facit venenum

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023856
  • Creation Date: 07-May-2019
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise High Availability Extension

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center