Problems with Facts

Hi All,

Having problems with facts. Running foreman 1.2 puppet and foreman are on
the same system. When I run :-

rake puppet:import:hosts_and_facts RAILS_ENV=production

I get the error message :-

undefined method `assets' for #<Rails::Application::Configuration:0x7f72a9975c98>

I have downloaded the script from the foreman web site and when I run the
script, if i look in the httpd logs I can see that its trying to post but
its getting redirected to the login page. I have tried adding the host name
into trusted_puppetmaster_hosts but this doesn't seem to have any affect.

Thanks,

Richie.

Hello Richie,

what is your setup? Are you able to send me (personally) foreman-debug
output tarball?

What platform? How did you install? Isn't this a bundler setup?

LZ

··· On Thu, Aug 08, 2013 at 06:58:06AM -0700, Richie Rees wrote: > Hi All, > > Having problems with facts. Running foreman 1.2 puppet and foreman are on > the same system. When I run :- > > *rake puppet:import:hosts_and_facts RAILS_ENV=production* > > > I get the error message :- > > > *undefined method `assets' for #* > > > I have downloaded the script from the foreman web site and when I run the > script, if i look in the httpd logs I can see that its trying to post but > its getting redirected to the login page. I have tried adding the host name > into trusted_puppetmaster_hosts but this doesn't seem to have any affect. > > Thanks, > > Richie. > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out. > >


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi,

Will happily send you the tar ball send me your address.

Thanks,

Richie.

PS Happy Friday Everyone :slight_smile:

··· On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees wrote: > > Hi All, > > Having problems with facts. Running foreman 1.2 puppet and foreman are on > the same system. When I run :- > > *rake puppet:import:hosts_and_facts RAILS_ENV=production* > > > I get the error message :- > > > *undefined method `assets' for #* > > > I have downloaded the script from the foreman web site and when I run the > script, if i look in the httpd logs I can see that its trying to post but > its getting redirected to the login page. I have tried adding the host name > into trusted_puppetmaster_hosts but this doesn't seem to have any affect. > > Thanks, > > Richie. >

Ok i think I may have found the cause (accidently) The domain that the
foreman sits in is the domain sample.com the systems being provisioned are
in testing.sample.com so we could delegate the DNS to the smart host while
testing. I accidently created a machine in the sample.com domain and I can
see the facts. So where do I tell foreman/puppet also trust
testing.sample.com ?

··· On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees wrote: > > Hi All, > > Having problems with facts. Running foreman 1.2 puppet and foreman are on > the same system. When I run :- > > *rake puppet:import:hosts_and_facts RAILS_ENV=production* > > > I get the error message :- > > > *undefined method `assets' for #* > > > I have downloaded the script from the foreman web site and when I run the > script, if i look in the httpd logs I can see that its trying to post but > its getting redirected to the login page. I have tried adding the host name > into trusted_puppetmaster_hosts but this doesn't seem to have any affect. > > Thanks, > > Richie. >

I have added a line in auth and now getting this error message in
production.log

Started POST "/fact_values/create?format=yml" for 192.168.0.1 at
2013-08-12 12:46:16 +0100

Processing by FactValuesController#create as YML

  • Parameters: {"facts"=>"[FILTERED]"}*
    Failed to save system.testing.sample.com: ERF51-9911: Host is pending for
    Build
  • Rendered text template (0.0ms)*
    Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 1.8ms)
··· On Friday, 9 August 2013 15:51:13 UTC+1, Richie Rees wrote: > > Ok i think I may have found the cause (accidently) The domain that the > foreman sits in is the domain sample.com the systems being provisioned > are in testing.sample.com so we could delegate the DNS to the smart host > while testing. I accidently created a machine in the sample.com domain > and I can see the facts. So where do I tell foreman/puppet also trust > testing.sample.com ? > > On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees wrote: >> >> Hi All, >> >> Having problems with facts. Running foreman 1.2 puppet and foreman are on >> the same system. When I run :- >> >> *rake puppet:import:hosts_and_facts RAILS_ENV=production* >> >> >> I get the error message :- >> >> >> *undefined method `assets' for #* >> >> >> I have downloaded the script from the foreman web site and when I run the >> script, if i look in the httpd logs I can see that its trying to post but >> its getting redirected to the login page. I have tried adding the host name >> into trusted_puppetmaster_hosts but this doesn't seem to have any affect. >> >> Thanks, >> >> Richie. >> >

let me extract the error for you:

Failed to save system.testing.sample.com: ERF51-9911: Host is pending for
Build

··· * * *:)* *Ohad*

On Mon, Aug 12, 2013 at 2:48 PM, Richie Rees richard.rees77@gmail.comwrote:

I have added a line in auth and now getting this error message in
production.log

Started POST “/fact_values/create?format=yml” for 192.168.0.1 at
2013-08-12 12:46:16 +0100

Processing by FactValuesController#create as YML

  • Parameters: {“facts”=>"[FILTERED]"}*
    Failed to save system.testing.sample.com: ERF51-9911: Host is pending
    for Build
  • Rendered text template (0.0ms)*
    Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 1.8ms)

On Friday, 9 August 2013 15:51:13 UTC+1, Richie Rees wrote:

Ok i think I may have found the cause (accidently) The domain that the
foreman sits in is the domain sample.com the systems being provisioned
are in testing.sample.com so we could delegate the DNS to the smart host
while testing. I accidently created a machine in the sample.com domain
and I can see the facts. So where do I tell foreman/puppet also trust
testing.sample.com ?

On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees wrote:

Hi All,

Having problems with facts. Running foreman 1.2 puppet and foreman are
on the same system. When I run :-

rake puppet:import:hosts_and_facts RAILS_ENV=production

I get the error message :-

undefined method `assets’ for #Rails::Application::Configuration:0x7f72a9975c98

I have downloaded the script from the foreman web site and when I run
the script, if i look in the httpd logs I can see that its trying to post
but its getting redirected to the login page. I have tried adding the host
name into trusted_puppetmaster_**hosts but this doesn’t seem to have
any affect.

Thanks,

Richie.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Yes i can see the error. But what does it mean ? The host has been built
has all the puppet classes installed (bar the ones failing that depend on
facts) and is actually operational. So why is it still pending for build ?
The system where facts are being returned more from this status.

··· On Monday, 12 August 2013 12:59:39 UTC+1, ohad wrote: > > let me extract the error for you: > > *Failed to save system.testing.sample.com: ERF51-9911: Host is pending > for Build* > * > * > *:)* > *Ohad* > > On Mon, Aug 12, 2013 at 2:48 PM, Richie Rees <richard...@gmail.com > > wrote: > >> I have added a line in auth and now getting this error message in >> production.log >> >> >> *Started POST "/fact_values/create?format=yml" for 192.168.0.1 at >> 2013-08-12 12:46:16 +0100* >> *Processing by FactValuesController#create as YML* >> * Parameters: {"facts"=>"[FILTERED]"}* >> *Failed to save system.testing.sample.com: ERF51-9911: Host is pending >> for Build* >> * Rendered text template (0.0ms)* >> *Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 1.8ms)* >> >> >> On Friday, 9 August 2013 15:51:13 UTC+1, Richie Rees wrote: >>> >>> Ok i think I may have found the cause (accidently) The domain that the >>> foreman sits in is the domain sample.com the systems being provisioned >>> are in testing.sample.com so we could delegate the DNS to the smart >>> host while testing. I accidently created a machine in the sample.comdomain and I can see the facts. So where do I tell foreman/puppet also >>> trust testing.sample.com ? >>> >>> On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees wrote: >>>> >>>> Hi All, >>>> >>>> Having problems with facts. Running foreman 1.2 puppet and foreman are >>>> on the same system. When I run :- >>>> >>>> *rake puppet:import:hosts_and_facts RAILS_ENV=production* >>>> >>>> >>>> I get the error message :- >>>> >>>> >>>> *undefined method `assets' for #* >>>> >>>> >>>> I have downloaded the script from the foreman web site and when I run >>>> the script, if i look in the httpd logs I can see that its trying to post >>>> but its getting redirected to the login page. I have tried adding the host >>>> name into trusted_puppetmaster_**hosts but this doesn't seem to have >>>> any affect. >>>> >>>> Thanks, >>>> >>>> Richie. >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > >

At the end of a kickstart or preseed, there's a wget line in the
%post/finish script that calls Foreman to notify it that the build has
completed. It's possible that this didn't run, or failed for some
reason (it calls to the proxy to remove autosign.conf entries, which is
a common cause).

You can also flip the status manually from the host page in the Foreman
web interface ("Cancel Build").

Check for a GET "/unattended/built" logging block in
/var/log/foreman/production.log and see if there were errors.

··· -- Dominic Cleal Red Hat Engineering

On 12/08/13 13:05, Richie Rees wrote:

Yes i can see the error. But what does it mean ? The host has been built
has all the puppet classes installed (bar the ones failing that depend
on facts) and is actually operational. So why is it still pending for
build ? The system where facts are being returned more from this status.

On Monday, 12 August 2013 12:59:39 UTC+1, ohad wrote:

let me extract the error for you:

/Failed to save system.testing.sample.com
<http://system.testing.sample.com/>: ERF51-9911: Host is pending for
Build/
/
/
/:)/
/Ohad/

On Mon, Aug 12, 2013 at 2:48 PM, Richie Rees <richard...@gmail.com >     <javascript:>> wrote:

    I have added a line in auth and now getting this error message
    in production.log


    /Started POST "/fact_values/create?format=yml" for 192.168.0.1
    at 2013-08-12 12:46:16 +0100/
    /Processing by FactValuesController#create as YML/
    /  Parameters: {"facts"=>"[FILTERED]"}/
    /Failed to save system.testing.sample.com
    <http://system.testing.sample.com>: ERF51-9911: Host is pending
    for Build/
    /  Rendered text template (0.0ms)/
    /Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 1.8ms)/


    On Friday, 9 August 2013 15:51:13 UTC+1, Richie Rees wrote:

        Ok i think I may have found the cause (accidently) The
        domain that the foreman sits in is the domain sample.com
        <http://sample.com> the systems being provisioned are in
        testing.sample.com <http://testing.sample.com> so we could
        delegate the DNS to the smart host while testing. I
        accidently created a machine in the sample.com
        <http://sample.com> domain and I can see the facts. So where
        do I tell foreman/puppet also trust testing.sample.com
        <http://testing.sample.com> ?

        On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees wrote:

            Hi All,

            Having problems with facts. Running foreman 1.2 puppet
            and foreman are on the same system.  When I run :-

            /rake puppet:import:hosts_and_facts RAILS_ENV=production/


            I get the error message :-


            /undefined method `assets' for #<Rails::Application::__Configuration:0x7f72a9975c98>/


            I have downloaded the script from the foreman web site
            and when I run the script, if i look in the httpd logs I
            can see that its trying to post but its getting
            redirected to the login page. I have tried adding the
            host name into trusted_puppetmaster___hosts but this
            doesn't seem to have any affect. 

            Thanks,

            Richie.

    -- 
    You received this message because you are subscribed to the
    Google Groups "Foreman users" group.
    To unsubscribe from this group and stop receiving emails from
    it, send an email to foreman-user...@googlegroups.com <javascript:>.
    To post to this group, send email to forema...@googlegroups.com
    <javascript:>.
    Visit this group at http://groups.google.com/group/foreman-users
    <http://groups.google.com/group/foreman-users>.
    For more options, visit https://groups.google.com/groups/opt_out
    <https://groups.google.com/groups/opt_out>.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Dominic :slight_smile:

Do you know how to get facts returned if they are in DNS sub domain ? I
have tried adding a line to auth.conf, but this has not working and I can
still see it in the logs getting a 403 error and redirected to the signin
page.

··· On Tuesday, 13 August 2013 08:14:17 UTC+1, Dominic Cleal wrote: > > At the end of a kickstart or preseed, there's a wget line in the > %post/finish script that calls Foreman to notify it that the build has > completed. It's possible that this didn't run, or failed for some > reason (it calls to the proxy to remove autosign.conf entries, which is > a common cause). > > You can also flip the status manually from the host page in the Foreman > web interface ("Cancel Build"). > > Check for a GET "/unattended/built" logging block in > /var/log/foreman/production.log and see if there were errors. > > -- > Dominic Cleal > Red Hat Engineering > > On 12/08/13 13:05, Richie Rees wrote: > > Yes i can see the error. But what does it mean ? The host has been built > > has all the puppet classes installed (bar the ones failing that depend > > on facts) and is actually operational. So why is it still pending for > > build ? The system where facts are being returned more from this status. > > > > On Monday, 12 August 2013 12:59:39 UTC+1, ohad wrote: > > > > let me extract the error for you: > > > > /Failed to save system.testing.sample.com > > : ERF51-9911: Host is pending > for > > Build/ > > / > > / > > /:)/ > > /Ohad/ > > > > On Mon, Aug 12, 2013 at 2:48 PM, Richie Rees > > wrote: > > > > I have added a line in auth and now getting this error message > > in production.log > > > > > > /Started POST "/fact_values/create?format=yml" for 192.168.0.1 > > at 2013-08-12 12:46:16 +0100/ > > /Processing by FactValuesController#create as YML/ > > / Parameters: {"facts"=>"[FILTERED]"}/ > > /Failed to save system.testing.sample.com > > : ERF51-9911: Host is pending > > for Build/ > > / Rendered text template (0.0ms)/ > > /Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 1.8ms)/ > > > > > > On Friday, 9 August 2013 15:51:13 UTC+1, Richie Rees wrote: > > > > Ok i think I may have found the cause (accidently) The > > domain that the foreman sits in is the domain sample.com > > the systems being provisioned are in > > testing.sample.com so we could > > delegate the DNS to the smart host while testing. I > > accidently created a machine in the sample.com > > domain and I can see the facts. So > where > > do I tell foreman/puppet also trust testing.sample.com > > ? > > > > On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees > wrote: > > > > Hi All, > > > > Having problems with facts. Running foreman 1.2 puppet > > and foreman are on the same system. When I run :- > > > > /rake puppet:import:hosts_and_facts > RAILS_ENV=production/ > > > > > > I get the error message :- > > > > > > /undefined method `assets' for > #/ > > > > > > I have downloaded the script from the foreman web site > > and when I run the script, if i look in the httpd logs I > > can see that its trying to post but its getting > > redirected to the login page. I have tried adding the > > host name into trusted_puppetmaster___hosts but this > > doesn't seem to have any affect. > > > > Thanks, > > > > Richie. > > > > -- > > You received this message because you are subscribed to the > > Google Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from > > it, send an email to foreman-user...@googlegroups.com. > > To post to this group, send email to forema...@googlegroups.com > > . > > Visit this group at http://groups.google.com/group/foreman-users > > . > > For more options, visit https://groups.google.com/groups/opt_out > > . > > > > > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/groups/opt_out. > >

Can you provide the log entry of the 403? Puppet's auth.conf and DNS
subdomains should be irrelevant.

··· -- Dominic Cleal Red Hat Engineering

On 13/08/13 09:03, Richie Rees wrote:

Thanks Dominic :slight_smile:

Do you know how to get facts returned if they are in DNS sub domain ? I
have tried adding a line to auth.conf, but this has not working and I
can still see it in the logs getting a 403 error and redirected to the
signin page.

On Tuesday, 13 August 2013 08:14:17 UTC+1, Dominic Cleal wrote:

At the end of a kickstart or preseed, there's a wget line in the
%post/finish script that calls Foreman to notify it that the build has
completed.  It's possible that this didn't run, or failed for some
reason (it calls to the proxy to remove autosign.conf entries, which is
a common cause).

You can also flip the status manually from the host page in the Foreman
web interface ("Cancel Build").

Check for a GET "/unattended/built" logging block in
/var/log/foreman/production.log and see if there were errors.

-- 
Dominic Cleal
Red Hat Engineering

On 12/08/13 13:05, Richie Rees wrote:
> Yes i can see the error. But what does it mean ? The host has been
built
> has all the puppet classes installed (bar the ones failing that
depend
> on facts) and is actually operational. So why is it still pending for
> build ? The system where facts are being returned more from this
status.
>
> On Monday, 12 August 2013 12:59:39 UTC+1, ohad wrote:
>
>     let me extract the error for you:
>
>     /Failed to save system.testing.sample.com
<http://system.testing.sample.com>
>     <http://system.testing.sample.com/
<http://system.testing.sample.com/>>: ERF51-9911: Host is pending for
>     Build/
>     /
>     /
>     /:)/
>     /Ohad/
>
>     On Mon, Aug 12, 2013 at 2:48 PM, Richie Rees >     <richard...@gmail.com >     >     <javascript:>> wrote:
>
>         I have added a line in auth and now getting this error
message
>         in production.log
>
>
>         /Started POST "/fact_values/create?format=yml" for
192.168.0.1
>         at 2013-08-12 12:46:16 +0100/
>         /Processing by FactValuesController#create as YML/
>         /  Parameters: {"facts"=>"[FILTERED]"}/
>         /Failed to save system.testing.sample.com
<http://system.testing.sample.com>
>         <http://system.testing.sample.com
<http://system.testing.sample.com>>: ERF51-9911: Host is pending
>         for Build/
>         /  Rendered text template (0.0ms)/
>         /Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord:
1.8ms)/
>
>
>         On Friday, 9 August 2013 15:51:13 UTC+1, Richie Rees wrote:
>
>             Ok i think I may have found the cause (accidently) The
>             domain that the foreman sits in is the domain
sample.com <http://sample.com>
>             <http://sample.com> the systems being provisioned are in
>             testing.sample.com <http://testing.sample.com>
<http://testing.sample.com> so we could
>             delegate the DNS to the smart host while testing. I
>             accidently created a machine in the sample.com
<http://sample.com>
>             <http://sample.com> domain and I can see the facts. So
where
>             do I tell foreman/puppet also trust testing.sample.com
<http://testing.sample.com>
>             <http://testing.sample.com> ?
>
>             On Thursday, 8 August 2013 14:58:06 UTC+1, Richie Rees >     wrote:
>
>                 Hi All,
>
>                 Having problems with facts. Running foreman 1.2
puppet
>                 and foreman are on the same system.  When I run :-
>
>                 /rake puppet:import:hosts_and_facts
RAILS_ENV=production/
>
>
>                 I get the error message :-
>
>
>                 /undefined method `assets' for
#<Rails::Application::__Configuration:0x7f72a9975c98>/
>
>
>                 I have downloaded the script from the foreman web
site
>                 and when I run the script, if i look in the httpd
logs I
>                 can see that its trying to post but its getting
>                 redirected to the login page. I have tried adding the
>                 host name into trusted_puppetmaster___hosts but this
>                 doesn't seem to have any affect.
>
>                 Thanks,
>
>                 Richie.
>
>         --
>         You received this message because you are subscribed to the
>         Google Groups "Foreman users" group.
>         To unsubscribe from this group and stop receiving emails from
>         it, send an email to foreman-user...@googlegroups.com
<javascript:>.
>         To post to this group, send email to
forema...@googlegroups.com
>         <javascript:>.
>         Visit this group at
http://groups.google.com/group/foreman-users
<http://groups.google.com/group/foreman-users>
>         <http://groups.google.com/group/foreman-users
<http://groups.google.com/group/foreman-users>>.
>         For more options, visit
https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>
>         <https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>>.
>          
>          
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it,
send
> an email to foreman-user...@googlegroups.com <javascript:>.
> To post to this group, send email to forema...@googlegroups.com
<javascript:>.
> Visit this group at http://groups.google.com/group/foreman-users
<http://groups.google.com/group/foreman-users>.
> For more options, visit https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.