Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #13753 - adding statistics on compute_resources usage #3196

Closed
wants to merge 17 commits into from
Closed

Fixes #13753 - adding statistics on compute_resources usage #3196

wants to merge 17 commits into from

Conversation

jhutar
Copy link

@jhutar jhutar commented Feb 17, 2016

This depends on Lukas's branch lzap:debug-db-13703 and that is being reviewed in #3184

Because I hope to his soonest possible release (1.11?) I wanted to ask for a review now, while only relevant commit is e919755.

I have not tested on MySQL, so I would appreciate help here.

Thank you very much in advance for a review.

lzap and others added 17 commits February 16, 2016 16:23
All models etc. referenced within the Rails environment startup,
including in initialisers should load without making any reference to
the database.  This ensures when running `rake test` without a test DB
set up already that the Rails env can be loaded first by Rails before
it prepares the test DB from db/schema.rb (itself created by a
db:migrate in dev/prod envs).

The table_name for Ptable needed to be overridden, matching
ProvisioningTemplate as it defaulted to 'ptables' rather than
'templates' when the `attribute_names` call was removed from
validate_inclusion_in_families.

References to attribute_names in API controller wrapping overrides
were replaced by reusing the protected_attribute lists, which don't use
the database and are also more consistent than the existing lists.
We already use json 1.8, this workaround is no longer needed.
JSON is included in Ruby stdlib >= 1.9
Rubocop can enforce what timezone to store in the database ,
so we can ensure everything is stored using UTC and we don't
miss these things in code reviews. When objects are displayed,
they must use the time provided by set_timezone in the
controller.

This is particularly relevant for Trends, Puppet graphs, etc... to
ensure they are stored always properly
apparently, the PO generator treats underscore as something important,
it assumes it's the GetText underscore method, thus, breaking
things in a spactacular way.
removing it solves it.
@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 94a669d must be in the format fixes #redmine_number - brief description.
  • af4ea5e must be in the format fixes #redmine_number - brief description.

If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project.

More guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@tbrisker
Copy link
Member

@jhutar Please rebase your branch against the current develop branch.

@lzap
Copy link
Member

lzap commented Feb 17, 2016

I can just put the

add_sql "select count(hosts.name), compute_resources.type from hosts, compute_resources where hosts.compute_resource_id = compute_resources.id group by compute_resources.type" compute_resources-stats

line in my patch. Or just wait once my work is merged, then rebase on top of that.

@jhutar
Copy link
Author

jhutar commented Feb 17, 2016

Thank you @lzap. Please add it to your patch or if that would not be possible (or will cause any troubles), I'll wait till #3184 is merged and will rebase on top of that.

@jhutar jhutar closed this Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet