Project

General

Profile

Bug #5597

Call ncf configuration bundle from Rudder, to ensure configuration used is correct

Added by Nicolas CHARLES over 5 years ago. Updated over 5 years ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

We override the port for using with Rudder, but on Enterprise, the port should not change.


Subtasks

Bug #5683: Update dependency of rudder to ncfRejected2014-10-22Matthieu CERDAActions

Related issues

Related to ncf - Bug #5682: Add a configuration file when using enterprise editionReleased2014-10-22Jonathan CLARKEActions
#1

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from New to Pending technical review
  • Assignee set to Benoît PECCATTE
#2

Updated by Jonathan CLARKE over 5 years ago

I think you're trying to fix this in the wrong place. ncf has a configuration option for the port number. The whole point of a configuration option is that you don't need to modify the code.

It looks like you need a different ncf.conf file for Windows hosts. That would make sense. Can you see that working?

#3

Updated by Jonathan CLARKE over 5 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES
#4

Updated by Jonathan CLARKE over 5 years ago

  • Project changed from ncf to Rudder
  • Category set to System integration
  • Target version changed from 0.x to 2.10.7

This is a Rudder specific bug. The default ncf configuration just uses the standard port. You're having trouble because Rudder modifies that port.

#5

Updated by Nicolas CHARLES over 5 years ago

  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE

This can't be only Rudder specific
There is no way in ncf to change the port based on specific of the system. On policy server, with both community and enterprise, there is no way to have different config file, unless we rewrite all promises.packaging to have 2 ncfs

#6

Updated by Jonathan CLARKE over 5 years ago

  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES

Of course it is Rudder specific - only Rudder uses two different ports for CFEngine!

I don't think we need to have 2 ncfs, just 2 ncf.conf files. Why is that a problem?

#7

Updated by Nicolas CHARLES over 5 years ago

Because ncf.conf is read directly by ncf, in 10_ncf_internals/configuration.cf, not by Rudder

#8

Updated by Jonathan CLARKE over 5 years ago

Right, but it's read on each node. And each node copies the files that Rudder's configs tell it to. Why can't you copy a different ncf.conf for Enteprise nodes, or maybe edit the ncf.conf on those nodes, or something like that?

I'm sorry if I seem to be causing you trouble here, but this really is an engineering problem: we have many moving parts, and need to figure out which one to change to fix this issue. I can tell from a simple rule of thumb that your original proposed change is not the right moving part because this simple rule dictates that no exceptions should be made in ncf's code on account of Rudder. However, maybe your solution lies in adding a different configuration option to ncf, that Rudder could take advantage of. Or maybe Rudder can just use the existing configuration option.

Whatever the solution, you're the one that knows the constraints here, and until you share them, I can't help more than giving you the occasional pointer. Currently, I don't know why you don't think using 2 different config files is an option. Until I do, I don't know what else to suggest.

#9

Updated by Nicolas CHARLES over 5 years ago

You have nodes withs both Enterprise and Community, like the Rudder server root, and Server Relay. On ncf.conf file would not be enough for these nodes

Editing ncf.conf to have specifics means that you'll always have promises repaired for ncf copy, unless you:
- copy all directories, but 10, with purge
- in 10, copy all files, but ncf.conf, without purge
- finally copy ncf.conf based on some parameters
It is clunky, and fragile.
You cannot exclude a specific file from copy with purge, otherwise it is removed from the destination (as it is not in the source list, it must be removed from the destination list), so always removed

#10

Updated by Nicolas CHARLES over 5 years ago

Ok, I don't even understand how this can work in Rudder... bundle configuration is never called, but thanks to some magic it is evaluated, read the file and fill the variable.
But we are relying on side effect here, which is clearly not future-proof

#11

Updated by Nicolas CHARLES over 5 years ago

  • Subject changed from File copy with ncf on CFEngine enterprise fails to Call configuration bundle from Rudder, to ensure that is is effectively called

Ok, for modularity, and better integration with Rudder, i'll make the bundle configuration configurable with different conf file, and default value.
I'm opening a ticket in ncf for this, and keeping this ticket in Rudder to call the configure

#12

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/544
#13

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 2.10.7 to 2.10.8
#14

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Pending technical review to Rejected

i'm rejecting this approach, as changing ncf and rudder at the same time is too tricky

#15

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Rejected to In progress
  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES

I am reopening this ticket : we need to ensure that the configuration bundle is effectively called. It does work (for the moment) without it, as a side effect of parsing, but it should nbot remain like that.
Plus, with #5682, we need to really call this bundle to ensure that the template is expanded

#16

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
  • Pull Request changed from https://github.com/Normation/rudder-techniques/pull/544 to https://github.com/Normation/rudder-techniques/pull/601
#17

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset policy-templates:commit:1421ee7e5a81d48bc54ea79db6c8a8c74ecbb22a.

#18

Updated by Jonathan CLARKE over 5 years ago

Applied in changeset policy-templates:commit:9da2f26c7305b089031e035441c411033d2f7dff.

#19

Updated by Vincent MEMBRÉ over 5 years ago

  • Subject changed from Call configuration bundle from Rudder, to ensure that is is effectively called to Call ncf configuration bundle from Rudder, to ensure configuration used is correct
#20

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.8 and 2.11.5, which were released today (16/12/14)

Also available in: Atom PDF