Project

General

Profile

Actions

Bug #5772

closed

Rudder agent refuses to update promises when its hostname is uppercase

Added by Benoît PECCATTE about 10 years ago. Updated about 10 years ago.

Status:
Released
Priority:
N/A
Assignee:
Jonathan CLARKE
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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&

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #6037: Support uppercase hostname when updating promisesReleasedNicolas CHARLES2014-12-22Actions
Actions #1

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?

Actions #2

Updated by Jonathan CLARKE about 10 years ago

  • Target version changed from 3.0.0~beta1 to 3.0.0~beta2
Actions #3

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
Actions #4

Updated by Matthieu CERDA about 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset policy-templates:commit:f6c004972f475e4315991e0151ceff7e8d35fd4a.

Actions #5

Updated by Jonathan CLARKE about 10 years ago

Applied in changeset policy-templates:commit:bd11bdce31efd7769ad33564c7ca8949f04cd9d9.

Actions #6

Updated by Nicolas CHARLES about 10 years ago

Why as it been fixed only on 3.0 ?

Actions #7

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?

Actions #8

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.

Actions

Also available in: Atom PDF