Foreman_statistics 2.0.0 plugin with 3.0.x or 3.1.x

Bonjour,

When I upgrade from 2.6 to 3.0, I was getting an error for Enviroment Distribution and Class Distribution
(Request Failed With Status Code 500).

Now I am running 3.1.1, Class Distribution is working but a lot other statistics are missing
(OS, Architecture, Host Group, Compute Resource, Location, Organization and Environment)

I have the following warnings :

2022-02-04T09:33:59 [W|app|586efe23] undefined local variable or method logger' for #<ForemanStatistics::Statistics::CountHosts:0x0000000012758b60> 2022-02-04T09:33:59 [W|app|2f053bbb] undefined local variable or method logger’ for #ForemanStatistics::Statistics::CountHosts:0x0000000012608198
2022-02-04T09:33:59 [W|app|fdd964d9] undefined local variable or method logger' for #<ForemanStatistics::Statistics::CountHosts:0x00007ffb75aaa140> 2022-02-04T09:33:59 [W|app|4b7ef2ef] undefined local variable or method logger’ for #ForemanStatistics::Statistics::CountHosts:0x00007ffb7481e7d8
2022-02-04T09:34:00 [W|app|f6204e22] undefined local variable or method logger' for #<ForemanStatistics::Statistics::CountHosts:0x000000000b2b8120> 2022-02-04T09:34:00 [W|app|27c37525] undefined local variable or method logger’ for #ForemanStatistics::Statistics::CountHosts:0x000000000f1d1cf8
2022-02-04T09:34:00 [W|app|6c0406a9] undefined local variable or method `logger’ for #ForemanStatistics::Statistics::CountHosts:0x0000000014ad7398

Any idea ?

Thank you

Regards,

Frederic.

In the production.log

Bonjour,

I tried to remove the plugin, using foreman-installer --no-enable-foreman-plugin-statistics
and yum erase tfm-rubygem-foreman_statistics-2.0.0-1.fm3_1.el7.noarch

and reinstall it foreman-installer --enable-foreman-plugin-statistics

without succes :frowning:

Thank you

Regards,

Frederic

Hi Frederic, I’m running into the same issue. Were you able to solve it, or did you already open a bug report?

Bonjour,

I have just opened an issue ( https://github.com/theforeman/foreman_statistics/issues/39 )

Regards,

Frederic

1 Like

Ondřej Ezr solves the problem here https://github.com/theforeman/foreman_statistics/pull/40/files

Many thanks to him :wink:

2 Likes