Bug #2374

The policy instance Hosts Management has the variable "Force the file content" multivalued

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

Status:Released Start date:2012-03-15
Priority:1 Due date:
Assignee:Nicolas CHARLES % Done:

100%

Category:Techniques - Others
Target version:2.3.7
Needs translating:No Pull Request:

Description

Oliver - lkco reported an issue on his version of Rudder (2.3.6) where he created a policy instance to add entries in his hosts files, but ended up with a cleared hosts files (as it was not expected)
The generated promises are here : http://pastebin.com/0LewURbv
The variables are policyInstanceVariable: HOSTS_ENFORCE0:false

After investigation, the Force the file content value is multivalued, and repeted with each field. However, in the code, the behavior is setted with a stringtemplate comparision, and thus where we expected a Boolean, we had an array, thus failing, thus emptying the file.

The variable HOSTS_ENFORCE should not be in multivalued section, but outside

Associated revisions

Revision 8256507e
Added by Nicolas CHARLES over 2 years ago

Fixes #2374: make the force file content non-multivalued in the hosts management PT

History

#1 Updated by Nicolas CHARLES over 2 years ago

  • Subject changed from The policy instance Hosts Management empties the file content even if we ask it not to to The policy instance Hosts Management has the variable "Force the file content" multivalued
  • Description updated (diff)

#2 Updated by Nicolas CHARLES over 2 years ago

  • Status changed from New to Pending technical review
  • % Done changed from 0 to 100

Applied in changeset commit:8256507e35baf45af94ae47b911c215bbdab808f.

#3 Updated by Matthieu CERDA over 2 years ago

Everything looks fine, except a small typo that was corrected later. All good !

#4 Updated by Jonathan CLARKE over 2 years ago

  • Status changed from Pending technical review to Released

Also available in: Atom PDF