statistics/"OS Distribution"

Does anyone know why under statistics: I see only one version of
Centos (5.4), when I have different versions on my registered
hosts…? all appropriately defined via facter facts

 As a matter of fact, I can actually do a search under hosts for

hosts with other OS releases, yet, statistics/"OS Distribution" only
shows 5.4

Both Foreman and Puppet are pointing to the same storedconfigs DB,

so this feature should work flawlessly.

Thanks,

Henry

> select * from operatingsystems;
id | major | name | minor | nameindicator | created_at |
updated_at | family_id | release_name |

··· +----+-------+--------+-------+---------------+--------------------- +---------------------+-----------+--------------+ > 3 | 5 | CentOS | 4 | NULL | 2010-09-21 20:53:04 | 2010-09-21 20:53:04 | NULL | NULL |

Only has the one OS version, yet, you can still search for other OS’s
version via search on the hosts…

On Sep 22, 10:33 am, CraftyTech hmmed...@gmail.com wrote:

 Does anyone know why under statistics: I see only one version of

Centos (5.4), when I have different versions on my registered
hosts…? all appropriately defined via facter facts

 As a matter of fact, I can actually do a search under hosts for

hosts with other OS releases, yet, statistics/“OS Distribution” only
shows 5.4

Both Foreman and Puppet are pointing to the same storedconfigs DB,

so this feature should work flawlessly.

Thanks,

Henry

Which version of Foreman are you using? this might have been resolved
already Bug #336: Facts not imported when running the task puppet:import:hosts_and_facts - Foreman.

Ohad

··· On Wed, Sep 22, 2010 at 5:22 PM, CraftyTech wrote:

select * from operatingsystems;
id | major | name | minor | nameindicator | created_at |
updated_at | family_id | release_name |
±—±------±-------±------±--------------±--------------------
±--------------------±----------±-------------+
3 | 5 | CentOS | 4 | NULL | 2010-09-21 20:53:04 |
2010-09-21 20:53:04 | NULL | NULL |

Only has the one OS version, yet, you can still search for other OS’s
version via search on the hosts…

On Sep 22, 10:33 am, CraftyTech hmmed...@gmail.com wrote:

 Does anyone know why under statistics: I see only one version of

Centos (5.4), when I have different versions on my registered
hosts…? all appropriately defined via facter facts

 As a matter of fact, I can actually do a search under hosts for

hosts with other OS releases, yet, statistics/“OS Distribution” only
shows 5.4

Both Foreman and Puppet are pointing to the same storedconfigs DB,

so this feature should work flawlessly.

Thanks,

Henry


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Hello Ohad,

 I'm using Foreman Version 1-5.  I tried using the amended host.rb

you posted few days ago, but that didn't work for me. I started
getting "Rendering /apps/foreman/public/500.html (500 Internal Server
Error)", just by changing that file around (host.rb).

 When using the original host.rb from 0.1-5, I get the following:

Processing StatisticsController#index (for 172.27.118.60 at 2010-10-01
14:34:08) [GET]
Parameters: {"action"=>"index", "controller"=>"statistics"}
skipped as it has has no label
skipped as it has has no label
Rendering template within layouts/standard
Rendering statistics/index
Completed in 355ms (View: 60, DB: 19) | 200 OK [http://puppet/
statistics]

what's the "skipped as it has has no label" about?

Thanks,

Henry

··· On Sep 22, 3:25 pm, Ohad Levy wrote: > Which version of Foreman are you using? this might have been resolved > alreadyhttp://theforeman.org/issues/336. > > Ohad > > > > On Wed, Sep 22, 2010 at 5:22 PM, CraftyTech wrote: > > > select * from operatingsystems; > > id | major | name | minor | nameindicator | created_at | > > updated_at | family_id | release_name | > > +----+-------+--------+-------+---------------+--------------------- > > +---------------------+-----------+--------------+ > > > 3 | 5 | CentOS | 4 | NULL | 2010-09-21 20:53:04 | > > 2010-09-21 20:53:04 | NULL | NULL | > > > Only has the one OS version, yet, you can still search for other OS's > > version via search on the hosts.... > > > On Sep 22, 10:33 am, CraftyTech wrote: > > > Does anyone know why under statistics: I see only one version of > > > Centos (5.4), when I have different versions on my registered > > > hosts...? all appropriately defined via facter facts > > > > As a matter of fact, I can actually do a search under hosts for > > > hosts with other OS releases, yet, statistics/"OS Distribution" only > > > shows 5.4 > > > > Both Foreman and Puppet are pointing to the same storedconfigs DB, > > > so this feature should work flawlessly. > > > > Thanks, > > > > Henry > > > -- > > You received this message because you are subscribed to the Google Groups > > "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to > > foreman-users+unsubscribe@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/foreman-users?hl=en.

Hi Henry,

It would be a bit hard to test the scenario you have using a stable version
and a patch from the development tree,
is it possible for you to try the latest devel (git develop branch, or
nightly snapshot) version?

I hope to release a 0.1-6RC1, in a few days if you need an rpm etc.

as usual, a good place to chat is the irc channel #theforeman on freenode.

Ohad

··· On Fri, Oct 1, 2010 at 8:41 PM, CraftyTech wrote:

Hello Ohad,

I'm using Foreman Version 1-5.  I tried using the amended host.rb

you posted few days ago, but that didn’t work for me. I started
getting “Rendering /apps/foreman/public/500.html (500 Internal Server
Error)”, just by changing that file around (host.rb).

When using the original host.rb from 0.1-5, I get the following:

Processing StatisticsController#index (for 172.27.118.60 at 2010-10-01
14:34:08) [GET]
Parameters: {“action”=>“index”, “controller”=>“statistics”}
skipped as it has has no label
skipped as it has has no label
Rendering template within layouts/standard
Rendering statistics/index
Completed in 355ms (View: 60, DB: 19) | 200 OK [http://puppet/
statistics]

what’s the “skipped as it has has no label” about?

Thanks,

Henry

On Sep 22, 3:25 pm, Ohad Levy ohadl...@gmail.com wrote:

Which version of Foreman are you using? this might have been resolved
alreadyhttp://theforeman.org/issues/336.

Ohad

On Wed, Sep 22, 2010 at 5:22 PM, CraftyTech hmmed...@gmail.com wrote:

select * from operatingsystems;
id | major | name | minor | nameindicator | created_at |
updated_at | family_id | release_name |
±—±------±-------±------±--------------±--------------------
±--------------------±----------±-------------+
3 | 5 | CentOS | 4 | NULL | 2010-09-21 20:53:04 |
2010-09-21 20:53:04 | NULL | NULL |

Only has the one OS version, yet, you can still search for other OS’s
version via search on the hosts…

On Sep 22, 10:33 am, CraftyTech hmmed...@gmail.com wrote:

 Does anyone know why under statistics: I see only one version of

Centos (5.4), when I have different versions on my registered
hosts…? all appropriately defined via facter facts

 As a matter of fact, I can actually do a search under hosts for

hosts with other OS releases, yet, statistics/“OS Distribution” only
shows 5.4

Both Foreman and Puppet are pointing to the same storedconfigs

DB,

so this feature should work flawlessly.

Thanks,

Henry


You received this message because you are subscribed to the Google
Groups

“Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
<foreman-users%2Bunsubscribe@goog legroups.com>

.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Ohad,

 I&#39;m re-visiting this issue.  Unfortunately it hasn&#39;t been resolved 

yet… At the moment, I'm running foreman-0.1.6-2(RPM), CentOS 5.4, with
Apache/Passenger. It doesn't matter whether I do a: "rake
puppet:import:hosts_and_facts RAILS_ENV=production" or script that runs on
remote puppetmasters that you wish to import their nodes facts into Foreman,
not everything gets imported into "Statistics". When I click on statistics
I know things are off because it only reflects nodes with CentOS 5.5 and
5.4, but the pie-chart says nothing of my 5.3,2 nodes… I don't see any
error messages in the production logs. Do you have any idea as to why not
all the nodes and facts come into foremen?

 It actually says that&#39;s importing them (fqdn), yet nothing actucally 

comes in.

Thanks,

Henry

You could try opening a console (i.e. ./script/console production) and
trying to reproduce what the statitics page is doing (basicilly each
line in the app/controllers/statistics_controller.rb after the begin
statement).

maybe this will give some more ideas for where your problem is coming
from.

btw: did you try running the rake puppet:migrate:populate_hosts task?

Ohad

··· On Mon, 2011-02-14 at 12:58 -0800, CraftyTech wrote: > Ohad, > > > I'm re-visiting this issue. Unfortunately it hasn't been > resolved yet.. At the moment, I'm running foreman-0.1.6-2(RPM), > CentOS 5.4, with Apache/Passenger. It doesn't matter whether I do a: > "rake puppet:import:hosts_and_facts RAILS_ENV=production" or script > that runs on remote puppetmasters that you wish to import their nodes > facts into Foreman, not everything gets imported into "Statistics". > When I click on statistics I know things are off because it only > reflects nodes with CentOS 5.5 and 5.4, but the pie-chart says nothing > of my 5.3,2 nodes.... I don't see any error messages in the > production logs. Do you have any idea as to why not all the nodes and > facts come into foremen? > > > It actually says that's importing them (fqdn), yet nothing > actucally comes in.

I hadn't before, but when I run it now, I get:

sudo rake puppet:migrate:populate_hosts --trace
(in /usr/share/foreman)
** Invoke puppet:migrate:populate_hosts (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute puppet:migrate:populate_hosts
rake aborted!
Could not find table 'hosts'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in
table_structure&#39; /usr/share/foreman/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb:39:inreturning'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in
table_structure&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:228:incolumns'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1271:in
columns&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1279:incolumns_hash'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1389:in
descends_from_active_record?&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1395:infinder_needs_type_condition?'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1803:in
add_conditions!&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1687:inconstruct_finder_sql'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1548:in
find_every&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:615:infind'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/batches.rb:63:in
find_in_batches&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:2143:inwith_scope'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/batches.rb:62:in
find_in_batches&#39; /usr/share/foreman/vendor/rails/activerecord/lib/active_record/batches.rb:25:infind_each'
/usr/share/foreman/lib/tasks/puppet.rake:30
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in call&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:inexecute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in each&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:inexecute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain&#39; /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in
invoke_with_call_chain&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:ininvoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in invoke_task&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:intop_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in each&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:intop_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in
standard_exception_handling&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:intop_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in run&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:instandard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in run&#39; /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:inload'
/usr/bin/rake:19

I'll try the console next…

sudo script/console production
Loading production environment (Rails 2.3.5)
/usr/share/foreman/config/…/vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning:
Gem::Dependency#version_requirements is deprecated and will be removed on or
after August 2010. Use #requirement
>> @os_count = Host.count_distribution :operatingsystem
=> {"CentOS 5.4"=>4, "CentOS 5.5"=>13}

hmmm, it doesn't show anything 5.2 or 5.3…

> I hadn't before, but when I run it now, I get:
>
>
> sudo rake puppet:migrate:populate_hosts --trace

try exprot RAILS_ENV=production first :slight_smile:

··· On Tue, 2011-02-15 at 06:39 -0800, CraftyTech wrote: > (in /usr/share/foreman) > ** Invoke puppet:migrate:populate_hosts (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute puppet:migrate:populate_hosts > rake aborted! > Could not find table 'hosts' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in `table_structure' > /usr/share/foreman/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb:39:in `returning' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in `table_structure' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:228:in `columns' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1271:in `columns' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1279:in `columns_hash' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1389:in `descends_from_active_record?' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1395:in `finder_needs_type_condition?' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1803:in `add_conditions!' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1687:in `construct_finder_sql' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1548:in `find_every' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:615:in `find' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/batches.rb:63:in `find_in_batches' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:2143:in `with_scope' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/batches.rb:62:in `find_in_batches' > /usr/share/foreman/vendor/rails/activerecord/lib/active_record/batches.rb:25:in `find_each' > /usr/share/foreman/lib/tasks/puppet.rake:30 > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in > `invoke_with_call_chain' > /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in > `invoke_with_call_chain' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in > `invoke_task' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in > `standard_exception_handling' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in > `standard_exception_handling' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run' > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > > > > I'll try the console next... > > -- > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to foreman-users > +unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en.

> select operatingsystem_id from hosts where
name="client.dev.domain.com";

··· +--------------------+ > operatingsystem_id | +--------------------+ > NULL | +--------------------+ 1 row in set (0.01 sec)