Foreman-installer could not get default values, cannot continue

Hello,

I want to add some plugins using Foreman-installer.

Ii used to work but now I get :

Error: random_password(): Requires a non-negative integer value to work
with on node ***
Error: random_password(): Requires a non-negative integer value to work
with on node ***

[ERROR 2014-08-12 12:38:22 main] Could not get default values, cannot
continue

How can I fix this ?

into modules/foreman/lib/puppet/parser/functions/random_password.rb

if size.is_a?(String) and size.match(/^\d+$/)
size = size.to_i
else
raise Puppet::ParseError, 'random_password(): Requires a non-negative
' +
'integer value to work with'
end

looks broken
In my case, size if a Fixnum

If I comment this check, I get :
root@deploy:/usr/share/foreman-installer# foreman-installer -i
File not found
/usr/share/foreman-installer/_build/modules/foreman/manifests/init.pp,
check you answer file

and cat /etc/foreman/foreman-installer-answers.yaml |grep -i _build
returns nothing

Broken :confused:

··· > >

> into modules/foreman/lib/puppet/parser/functions/random_password.rb
>
> if size.is_a?(String) and size.match(/^\d+$/)
> size = size.to_i
> else
> raise Puppet::ParseError, 'random_password(): Requires a
> non-negative ' +
> 'integer value to work with'
> end
>
> looks broken
> In my case, size if a Fixnum

I think that happens if you have Puppet's future parser enabled. This
commit fixes it, will be in 1.6 or is in the released 2.2.x module:

https://github.com/theforeman/puppet-foreman/commit/d964a00522d92432ec82b2c7df3134ee0daec137

> If I comment this check, I get :
> root@deploy:/usr/share/foreman-installer# foreman-installer -i
> File not found
> /usr/share/foreman-installer/_build/modules/foreman/manifests/init.pp,
> check you answer file
>
> and cat /etc/foreman/foreman-installer-answers.yaml |grep -i _build
> returns nothing

Change directory to anywhere else, e.g. back to your home directory.
It's an oddity about running the installer from
/usr/share/foreman-installer due to a second config file in the package.

··· On 12/08/14 12:37, Vincent Miszczak wrote:


Dominic Cleal
Red Hat Engineering

Hello,

Indeed I activated future parser.
Gonna test without.

I don't run the installer from its directory usually, I was just back from
patching stuff to make it work.
Another tip I write down.

Thank you.

··· Le mercredi 13 août 2014 09:20:12 UTC+2, Dominic Cleal a écrit : > > On 12/08/14 12:37, Vincent Miszczak wrote: > > into modules/foreman/lib/puppet/parser/functions/random_password.rb > > > > if size.is_a?(String) and size.match(/^\d+$/) > > size = size.to_i > > else > > raise Puppet::ParseError, 'random_password(): Requires a > > non-negative ' + > > 'integer value to work with' > > end > > > > looks broken > > In my case, size if a Fixnum > > I think that happens if you have Puppet's future parser enabled. This > commit fixes it, will be in 1.6 or is in the released 2.2.x module: > > > https://github.com/theforeman/puppet-foreman/commit/d964a00522d92432ec82b2c7df3134ee0daec137 > > > If I comment this check, I get : > > root@deploy:/usr/share/foreman-installer# foreman-installer -i > > File not found > > /usr/share/foreman-installer/_build/modules/foreman/manifests/init.pp, > > check you answer file > > > > and cat /etc/foreman/foreman-installer-answers.yaml |grep -i _build > > returns nothing > > Change directory to anywhere else, e.g. back to your home directory. > It's an oddity about running the installer from > /usr/share/foreman-installer due to a second config file in the package. > > -- > Dominic Cleal > Red Hat Engineering >