Bug #5772
closedRudder agent refuses to update promises when its hostname is uppercase
Description
If an agent is hosted on a host with an uppercase hostname, it can be refused by the server.
The problem is from cf-serverd that refuses it.
To work around it, edit /var/rudder/configuration-repository/techniques/system/common/1.0/cf-served.st and change the access rules to force lower case :
&if(SKIPIDENTIFY)& &MANAGED_NODES_NAME, MANAGED_NODES_ID : {host, uuid | "/var/rudder/share/&uuid&/" maproot => { string_downcase(escape("&host&")) }, admit => { string_downcase(escape("&host&")) }; } & &else& &MANAGED_NODES_NAME, MANAGED_NODES_ID : {host, uuid | "/var/rudder/share/&uuid&/" maproot => { host2ip("&host&"), string_downcase(escape("&host&")) }, admit => { host2ip("&host&"), string_downcase(escape("&host&")) }; } & &endif&
Updated by Jonathan CLARKE about 10 years ago
- Category set to System techniques
- Status changed from New to Discussion
- Assignee set to Nicolas CHARLES
- Target version set to 3.0.0~beta1
This looks like a crazy cfengine bug. Nicolas, do you see any reason why we shouldn't include this by default? Will there be a big performance hit?
Updated by Jonathan CLARKE about 10 years ago
- Target version changed from 3.0.0~beta1 to 3.0.0~beta2
Updated by Matthieu CERDA about 10 years ago
- Status changed from Discussion to Pending technical review
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/595
Updated by Matthieu CERDA about 10 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset policy-templates:commit:f6c004972f475e4315991e0151ceff7e8d35fd4a.
Updated by Jonathan CLARKE about 10 years ago
Applied in changeset policy-templates:commit:bd11bdce31efd7769ad33564c7ca8949f04cd9d9.
Updated by Nicolas CHARLES about 10 years ago
Why as it been fixed only on 3.0 ?
Updated by Jonathan CLARKE about 10 years ago
Nicolas CHARLES wrote:
Why as it been fixed only on 3.0 ?
I think because it is CFEngine 3.6-specific. The string_downcase function only exists in CFEngine 3.6+. It should probably have been 2.11 for that reason, but not before.
Could you backport the fix?
Updated by Vincent MEMBRÉ about 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.0.0~beta2, which were these days.
- Announcement 3.0
- Changelog 3.0
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/