-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fixes #21952: Documentation for FQDN overriding #930
Closed
fanf
wants to merge
1
commit into
Normation:branches/rudder/7.1
from
fanf:enh_21952/documentation_for_fqdn_overriding
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
src/reference/modules/usage/pages/advanced_node_management.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,53 @@ | ||
= Advanced node management | ||
|
||
[[override-node-fqdn]] | ||
== Override node FQDN | ||
|
||
Sometime, the node's FQDN reported in inventory is not the correct one. For example, the configured | ||
FQDN is an internal name, or it's incorrectly set-up by OS or not found in a normalized format by the agent. | ||
|
||
This can be problematic and for example break the possibility for Rudder to trigger an agent run from node's | ||
compliance page. | ||
|
||
In these cases, you can override the FQDN from the node thanks to a xref:extend-nodes-inventory[node inventory extension]. | ||
|
||
The inventory extension must define the reserved property key `rudder_override_hostname` with a string value. | ||
|
||
If that key is defined, it is prefered to other values retrieved in agent inventory (`<RUDDER><HOSTNAME>` or else | ||
`<OPERATINGSYSTEM><FQDN>`) as the FQDN for the node. | ||
|
||
When the override is used, an additional inventory extension key `rudder_original_hostname` is also defined. That key's value | ||
contains the original node hostname which would have been used without an override. | ||
|
||
[NOTE] | ||
|
||
==== | ||
The value used for overriding FQDN must be legit https://datatracker.ietf.org/doc/html/rfc1123#page-13](https://datatracker.ietf.org/doc/html/rfc1123#page-13[as of RFC1123 (section 2.1)] | ||
else it won't be used in place of the original one. | ||
==== | ||
|
||
Example inventory hook script to put on the node so that the node will be | ||
see on Rudder with the FQDN `"node1-overridden.rudder.local.override`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the extra " |
||
|
||
---- | ||
|
||
$ cat /var/rudder/hooks.d/override-hostname.sh | ||
echo '{"rudder_override_hostname": "node1-overridden.rudder.local.override"}' | ||
|
||
---- | ||
|
||
Example of resulting node properties (in Rudder UI and API): | ||
|
||
---- | ||
|
||
{ | ||
"rudder_override_hostname": "node1-overridden.rudder.local.override", | ||
"rudder_original_hostname": "agent1.rudder.local" | ||
} | ||
|
||
---- | ||
|
||
|
||
== Reinitialize policies for a Node | ||
|
||
To reinitialize the policies for a Node, delete the local copy of the applied | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preferred