Bug #3176
closedENC output base64 encoded
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==
Updated by Greg Sutcliffe about 11 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...?
Updated by Dominic Cleal about 11 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.
Updated by Dominic Cleal about 11 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?
Updated by Romain Vrignaud about 11 years ago
I'm on Ubuntu 13.04 with ruby 1.9.3p194
Updated by Dominic Cleal about 11 years ago
- Related to Refactor #3539: Drop foreman-mysql added
Updated by Dominic Cleal about 11 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.
Updated by Benjamin Papillon almost 11 years ago
- Status changed from Feedback to Closed
Bug solved by switching to mysql2.