Skip to content

DOCTEAM-1775: HA resources and constraints#674

Open
tahliar wants to merge 54 commits into
mainfrom
DOCTEAM-1775-HA-resources-constraints
Open

DOCTEAM-1775: HA resources and constraints#674
tahliar wants to merge 54 commits into
mainfrom
DOCTEAM-1775-HA-resources-constraints

Conversation

@tahliar

@tahliar tahliar commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

PR creator: Description

At long last, here are the articles for managing resources and constraints. Sorry it's such a big PR; the content was too inter-related to split up.

These aren't the most ideal Smart Docs, but this generic content does need to exist as it's the foundation of how to use the product. I will be doing plenty of focused articles on specific tasks later.

PDFs:

Configuring HA Cluster Resources: HA-resources-configuring_en.pdf

Adding Constraints to HA Cluster Resources: HA-resources-adding-constraints_en.pdf

Managing HA Cluster Resources: HA-resources-managing_en.pdf

Note that the crmsh/Hawk procedures appear one after the other in the PDFs, but in the published HTML they'll look like this:

image image

This was the the smoothest solution I could see for having two methods to do things; having a separate topic for each method would blow out to way too many topics to reasonably keep track of.

Tasks for later:

There was more I still wanted to do, but I can't keep working on one PR forever, so I split some things off for later. If a topic seems to be missing, it might be in this list:

PR creator: Are there any relevant issues/feature requests?

  • jsc#DOCTEAM-1775

PR reviewer: Checklist for editorial review

Apart from the usual checks, please double-check also the following:

@tahliar tahliar force-pushed the DOCTEAM-1775-HA-resources-constraints branch from a501f66 to 5e3f1f0 Compare April 20, 2026 23:57
</section>

<section xml:id="ha-resources-constraints-what-is-sets">
<title>Resource sets</title>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the kind of the main section to explain the "Resource set" concept. It might be good to mention three different sets: curly brackets, round brackets, and square brackets, and could run "crm help Resourcesets" if want to understand them a bit more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're right of course, thank you. In fact I did originally have a note in the file to add a description of the bracket types, but it got away from me a bit while editing 😬

From my testing, it seemed that order constraints accept round brackets, location constraints accept curly brackets, and colocation constraints accept square brackets. Otherwise I got errors when I tried different bracket types with each constraint to see what happened.

I can add the bracket types to each list item in this section, and I'll definitely add "crm help Resourcesets" here too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a bit more info about the brackets in 7d001b4. Please let me know if this makes sense :)

@gao-yan gao-yan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, @tahliar !

I found some time to start looking into a few sections. I'll continue reviewing the rest as time allows.

Comment thread concepts/ha-resources-constraints-what-is.xml Outdated
Comment thread concepts/ha-resources-what-is.xml Outdated
</listitem>
</itemizedlist>
<para>
For more information, see <link xlink:href="https://clusterlabs.org/projects/pacemaker/doc/3.0/Pacemaker_Explained/html/collective.html#determining-which-instance-is-promoted"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow, in the PDF, if I hover over somewhere around the link, the link will break due to the extra - in the first line of the link text.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh weird... I see what you mean in the text about the line-joining - (Pacemak-er), but it doesn't break anything for me; the link still works. I wonder why it breaks for you? I'm not sure if there's anything I can do about it 🤔

@tomschr Do you know if there's a way to stop the PDF build from adding a - when a link spans two lines?

E.g.
image

@tomschr tomschr May 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tahliar Thanks for the notice. 👍

I'm aware of this situation and I haven't found a good solution. We had some line breaking algorithm in the past, however, I disabled that as it was unreliable.

I have a dilemma here: I could disable hyphenation for links completely. However, that would result in gaps, excessively long lines, or lines extending beyond the margin.

If we leave it like this, it will break in unfortunate places. So either way, it's bad.

If you want to solve this, you need to play a bit around. You can try one of the following ideas:

  • Add a link text into <link xlink:href="...">The text</link>

    This may not solve the issue, but it may introduce some text that can shift the unfavorable line breaks.

  • Offer some breaking points with ZERO WIDTH SPACE (U+200B)

    It's not a guarantee that FOP will follow that. The idea is to add the URL in the xlink:href attribute, but add the link as text together with an U+200B character.

    <link xlink:href="https://...">https://clusterlabs.org/projects/pacemaker/doc/3.0/&#x200b;Pacemaker&#x200b;_Explained/html/..."</link>
  • Enable or disable the hyphenation algorithm

    In your DC file, set the XSLT parameter ulink.hyphenate to an empty string:

    XSLTPARAM+=" --param ulink.hyphenate 1"
    XSLTPARAM+=" --stringparam ulink.hyphenate.chars=:/@&?.#&#x200B;"
    
  • Combine U+200B with ulink.hyphenate

For more information, see

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh weird... I see what you mean in the text about the line-joining - (Pacemak-er), but it doesn't break anything for me; the link still works. I wonder why it breaks for you? I'm not sure if there's anything I can do about it 🤔

It doesn't break if the cursor is exactly on the link text. But if the cursor is somewhere nearby, the link breaks.

@gao-yan gao-yan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just went through a few more sections.

Comment thread snippets/ha-resource-agent.xml Outdated
Comment thread tasks/ha-resources-adding-colocation-constraints.xml Outdated
Comment thread tasks/ha-resources-adding-colocation-constraints.xml
Comment thread tasks/ha-resources-adding-location-constraints.xml Outdated
Comment thread tasks/ha-resources-adding-location-constraints.xml Outdated

@gao-yan gao-yan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more sections.

Comment thread tasks/ha-resources-configuring-clones.xml Outdated
Comment thread tasks/ha-resources-configuring-clones.xml Outdated
Comment thread tasks/ha-resources-configuring-clones.xml Outdated
Comment thread tasks/ha-resources-configuring-clones.xml Outdated
Comment thread tasks/ha-resources-configuring-clones.xml Outdated
Comment thread tasks/ha-resources-configuring-primitives.xml Outdated
Comment thread tasks/ha-resources-configuring-primitives.xml Outdated
Comment thread tasks/ha-resources-configuring-primitives.xml
Comment thread tasks/ha-resources-configuring-primitives.xml Outdated

@gao-yan gao-yan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleksei-burlakov, you definitely want to go through all the parts that involve hawk. Please especially pay attention to the issues of hawk that we are bringing up in all the relevant comments.

Comment thread snippets/ha-resource-agent.xml Outdated
Comment thread tasks/ha-resources-adding-colocation-constraints.xml
Comment thread tasks/ha-resources-adding-colocation-constraints.xml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants