Issue #7209 has been updated by Jacob Helwig.
I was able to reproduce this by:
1. Migrating a clean DB, before installing the baseline plugin.
1. Clone baseline plugin into `vendor/plugins/puppet_baseline`.
1. `rake puppet:plugin:install PLUGIN=puppet_baseline`.
The s/_rb/.rb/ thing is easy enough to fix, especially after looking at what it
would take to reasonably fix the "uninitialized constant" error.
It looks like we'll need to enforce some conventions on plugin authors to be
able to sanely handle running their migrations. Right now the "uninitialized
constant" error comes up, because we rename their migrations to ensure that
they will never collide with any migrations from the dashboard, or another
plugin. Because of this rename, the file name no longer matches the class that
is defined within it, thus causing the error.
If we require that plugin authors create their migrations of the form
`"#{timestamp}_plugin_#{plugin_name}_*.rb"`, then we avoid any of the
file/class name collisions we were looking to avoid in renaming the files, and
we also avoid having to modify the class name inside of the migration itself.
This does limit end users from using two plugins with the same name, but
different functionality/features, without manual intervention. This seems like
a rather unlikely scenario, however, and can probably be ignored.
----------------------------------------
Bug #7209: Cannot install baseline_plugin
https://projects.puppetlabs.com/issues/7209
Author: Randall Hansen
Status: Accepted
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
Affected URL:
Affected Dashboard version:
The puppet_baseline plugin installation fails in interesting ways. After
plugin installation, any database access with a baseline-enabled Dashboard
results in errors like this:
Baseline Columns (0.0ms) Mysql::Error: Table
'dashboard_production.baselines' doesn't exist: SHOW FIELDS FROM `baselines`
This may be related to the production environment. There are at least two
problems:
1. the migration ends with _rb instead of .rb
2. the migration name confuses rake: "uninitialized constant
Plugin_puppetBaseline_createBaselines"
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.