Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aquilon doc: add documentation on configuring cluster #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jouvin
Copy link
Contributor

@jouvin jouvin commented Oct 30, 2018

No description provided.

@jouvin jouvin requested review from ned21, jrha, XaF and gombasg October 30, 2018 15:30
@jouvin jouvin force-pushed the aq_clusters branch 2 times, most recently from 2f13253 to 46820f3 Compare October 30, 2018 16:08
@jouvin
Copy link
Contributor Author

jouvin commented Oct 30, 2018

Failing test is caused by the fix of an invalid link in an old post... This post is then checked and full of "spelling mistakes"...

_aquilon/technical_details.md Outdated Show resolved Hide resolved
@jouvin jouvin force-pushed the aq_clusters branch 3 times, most recently from 08f4d06 to 262b832 Compare October 31, 2018 08:42
@jouvin jouvin changed the title Aquilon doc: add documentation on configuring cluster [WIP] Aquilon doc: add documentation on configuring cluster Oct 31, 2018
_aquilon/management.md Show resolved Hide resolved
@@ -124,6 +124,10 @@ thresholds associated with the cluster, like the minimum or maximum number of ho
any time. Clusters can also be used to describe a HA cluster. Note that Aquilon is not a replacement for the
cluster middleware: it just allows to represent a group of machines managed by such a middleware.

Clusters, like hosts, have an archetype and personality attached. It allows to ensure that all hosts that are
Copy link
Contributor

Choose a reason for hiding this comment

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

I would say:

Clusters, like hosts, have an archetype and personality attached. It allows for cluster-wide configuration to be applied by including a new file after the host personality but before archetype/final. That file is $host-archetype/$cluster-archetype/$cluster-personality/config (relative to the LOADPATH).

Typically relative to the root of your template-king domain the file is:

$host-archetype/features/$host-archetype/$cluster-archetype/$cluster-personality/config

Copy link
Contributor Author

@jouvin jouvin Nov 2, 2018

Choose a reason for hiding this comment

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

@ned21 are you sure you want to give these details. These templates are plenary templates. An Aquilon user should not try (and probably will not be able) to access them directly. He/she should use aq cat. At the end it works line for any other personality... What about the new wording?

Copy link

@XaF XaF Nov 2, 2018

Choose a reason for hiding this comment

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

I like the start of the paragraph that Nathan proposed:

Clusters, like hosts, have an archetype and personality attached. It allows for cluster-wide configuration to be applied by including a new file after the host personality

Not sure for the rest of the paragraph. If we decide to have it also, I would recommend clarifying the variable names (perhaps like in bash with ${cluster-personality} for instance, as when reading it for now I was not sure at first glance if it was ${cluster}-personality or the above)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@XaF I still don't understand... The last version of this PR has this sentence copy/pasted. The rest of the § proposed by @ned21 IMO is not appropriate and I phrased it differently.

Copy link

Choose a reason for hiding this comment

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

Sorry, checking from my phone and github mobile version is not that clean to navigate. I'm good with the current version of that sentence.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ned21 are you sure you want to give these details. These templates are plenary templates. An Aquilon user should not try (and probably will not be able) to access them directly. He/she should use aq cat.

These are not plenaries, they are files that must appear in template-king if you want the cluster personality to influence the host profile.

At the end it works line for any other personality...

Not really. I think this is the confusing thing about clusters: the cluster object is a separate PAN-generated object profile. The personality is the configuration of that cluster object. You can use PAN's $object:/path/ syntax to access attributes of that object from within the Host profile but the cluster object is an independent entity. The inclusion of a template file named after the cluster $archetype/$personality is what allows the cluster object to add configuration to the member hosts, but that's just a standard include hook and has no relation to the Cluster object.

(The development of this data model predates my employment at MS. :-)

What about the new wording?

The new wording is good but I am concerned that if the path I referenced isn't documented here, it's not documented anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ned21 The inclusion logic you mention for cluster personalities is not what I'm seeing... at the end of a host template you have the cluster/$cluster_name/client' included (just before final.pan`) and it includes the cluster personality template if it exists. There is no direct reference to the cluster object.

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm.. This may be LOADPATH dependent. I've just spotted that my original filename reference version is perhaps slightly incorrect. I believe what gets included is: features/$cluster-archetype/$cluster-personality/config which traditionally means that must appear under the host's archetype because the cluster archetype is not added to the host's LOADPATH. i.e. the full path to that is:

$host-archetype/features/$host-archetype/$cluster-archetype/$cluster-personality/config

This is not the same file as:

$cluster-archetype/personality/$cluster-personality/config

@jouvin jouvin force-pushed the aq_clusters branch 4 times, most recently from 5f3e9d0 to 80ac303 Compare November 2, 2018 12:08
@jouvin jouvin changed the title [WIP] Aquilon doc: add documentation on configuring cluster Aquilon doc: add documentation on configuring cluster Nov 2, 2018
@jouvin
Copy link
Contributor Author

jouvin commented Nov 2, 2018

As for me, ready for merging. Should cover the main operations related to the creation of a cluster.

@jouvin jouvin changed the title Aquilon doc: add documentation on configuring cluster [WIP] Aquilon doc: add documentation on configuring cluster Nov 2, 2018
@jouvin jouvin changed the title [WIP] Aquilon doc: add documentation on configuring cluster Aquilon doc: add documentation on configuring cluster Nov 2, 2018
@@ -124,6 +124,10 @@ thresholds associated with the cluster, like the minimum or maximum number of ho
any time. Clusters can also be used to describe a HA cluster. Note that Aquilon is not a replacement for the
cluster middleware: it just allows to represent a group of machines managed by such a middleware.

Clusters, like hosts, have an archetype and personality attached. It allows to ensure that all hosts that are
Copy link
Contributor

Choose a reason for hiding this comment

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

@ned21 are you sure you want to give these details. These templates are plenary templates. An Aquilon user should not try (and probably will not be able) to access them directly. He/she should use aq cat.

These are not plenaries, they are files that must appear in template-king if you want the cluster personality to influence the host profile.

At the end it works line for any other personality...

Not really. I think this is the confusing thing about clusters: the cluster object is a separate PAN-generated object profile. The personality is the configuration of that cluster object. You can use PAN's $object:/path/ syntax to access attributes of that object from within the Host profile but the cluster object is an independent entity. The inclusion of a template file named after the cluster $archetype/$personality is what allows the cluster object to add configuration to the member hosts, but that's just a standard include hook and has no relation to the Cluster object.

(The development of this data model predates my employment at MS. :-)

What about the new wording?

The new wording is good but I am concerned that if the path I referenced isn't documented here, it's not documented anywhere.

thresholds associated with the cluster, like the minimum or maximum number of hosts that must be running at
any time. Clusters can also be used to describe a HA cluster. Note that Aquilon is not a replacement for the
cluster middleware: it just allows to represent a group of machines managed by such a middleware.

Clusters, like hosts, have an archetype and personality attached. It allows to ensure that all hosts that are
part of the cluster receive the same configuration. The cluster personality is added to the host, in addition
Copy link
Contributor

Choose a reason for hiding this comment

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

The cluster personality is added to the host, in addition to the host personality.

To me this wording implies the cluster personality is "merged to" the host personality which is not strictly true. I am not sure if I am just nitpicking the wording here or if the model is just so complex I haven't managed to explain it properly yet. :-(

This was the reason I thought it was good to reference the file being include ($host-archetype/$cluster-archetype/$cluster-personality/config) because if that file doesn't exist compilation will continue, and so if you don't know that's the path you have to create, it's hard to figure out how to add cluster-driven configuration to the host profile--I doubt that file path is properly documented anywhere else.

@jouvin
Copy link
Contributor Author

jouvin commented Nov 12, 2018

I update the text related to cluster archetypes and reconfiguration, based on quattor/aquilon#124 (comment).

I still need to check and figure out what needs to be said about LOADPATH-related issues mentionned by @ned21 in his last comments.

@jouvin
Copy link
Contributor Author

jouvin commented Nov 13, 2018

@ned21 after looking more carefully at the inclusion code for the cluster personality, I see your point. I didn't check carefully enough the resulting profile to realise that the feature was not included (I haven't tried yet to deploy the cluster members). And, as the include is with if_exists, the missing template is silently ignored... I'll improve the doc on this point.

BTW, is there a good reason (probably yes!) to use if_exists here as it clearly makes easy to miss the point without any easy way to get an information about the error... What does mean exactly saying that a cluster member must have a given feature configured as part of the cluster personality and having some nodes where configuring this feature is just ignored (because the corresponding template is missing). If you think we should rediscuss this, I'll open an issue in aquilon repo which is more appropriate.

@ned21
Copy link
Contributor

ned21 commented Nov 17, 2018

BTW, is there a good reason (probably yes!) to use if_exists here as it clearly makes easy to miss the point without any easy way to get an information about the error.

I don't think so. A lot of the older PAN and Aquilon code from pre-2010 seems to favour if_exists and in practice it has led to a hard to debug errors and oddities. I don't believe it would be a problem for our site to replace it with a normal include.

@jouvin
Copy link
Contributor Author

jouvin commented Nov 17, 2018

Good then! I'll submit a PR along these lines when I find some quiet time...

@jouvin
Copy link
Contributor Author

jouvin commented Mar 23, 2022

I should try to deal with my very old backlog and finish this one... I'll try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants