Project

General

Profile

Actions

Bug #3176

closed

ENC output base64 encoded

Added by Romain Vrignaud over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
External Nodes
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,
In my new setup (Foreman 1.3) installed from sources,
I have ENC output encoded in base64 (see below).

It seems that it's this commit (91ad276d660) that's bringing
this buggy behavior.

---
classes:
  !binary "YmFzZQ==": 
  !binary "YmFzZTo6cGxvdWY=": 
  !binary "YmluZDo6c2xhdmU=": 
  !binary "cG9zdGZpeA==": 
  !binary "dXNlcjo6Zml0emRzbA==": 
parameters:
  puppetmaster: !binary |-
    amFpbC5maXR6ZHNsLm5ldA==
  foreman_env: !binary |-
    cHJvZHVjdGlvbg==
environment: !binary |-
  cHJvZHVjdGlvbg==

Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #3539: Drop foreman-mysqlClosedLukas Zapletal10/29/2013Actions
Actions #1

Updated by Greg Sutcliffe over 10 years ago

http://projects.theforeman.org/projects/foreman/repository/revisions/91ad276d660b9f1d37bc82a9ad738351c347dc9d is the link. As you can see, there are no changes to app/models/host/managed.rb (which is where the enc method is defined).

There are tests covering this output too (https://github.com/theforeman/foreman/blob/develop/test/functional/hosts_controller_test.rb#L98) which are not failing.

So I wonder what's different between our environments...?

Actions #2

Updated by Dominic Cleal over 10 years ago

My only thought is that no longer loading Puppet into the app has changed the behaviour?

The base64 encoded ENC output is still valid, so I don't think the test would break even if .to_yaml provided base64-encoded data.

Actions #3

Updated by Dominic Cleal over 10 years ago

I forgot to say, I don't see this on my installations - all Ruby 1.9.3. Which Ruby version are you using Romain?

Actions #4

Updated by Romain Vrignaud over 10 years ago

I'm on Ubuntu 13.04 with ruby 1.9.3p194

Actions #5

Updated by Dominic Cleal over 10 years ago

Actions #6

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Feedback

It seems this is caused by the 'mysql' adapter somehow, perhaps something is triggering it to return strings with the wrong encoding (a guess). However the 'mysql2' adapter appears to work correctly, so please install foreman-mysql2 and change the adapter in /etc/foreman/database.yml to adapter2.

Actions #7

Updated by Benjamin Papillon about 10 years ago

  • Status changed from Feedback to Closed

Bug solved by switching to mysql2.

Actions

Also available in: Atom PDF