RFE: Add options to --disable-all-plugins/--without-all-plugins

Bug #531456 reported by BJ Dierkes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
High
Monty Taylor
Cherry
Fix Released
High
Monty Taylor

Bug Description

I think the way drizzle builds currently where it attempts to build every plugin by default is great for source builds. Most users want to just ./configure && make && make install when it comes to sources... However, with regards to packaging, having all plugins enabled by default is a bit inconvenient. Take the following:

 - RPM builds drizzle with all plugins (that it can) by default, with most/all of them enabled by default
 - RPM packages up all plugins into separate sub packages
 - User installs drizzle, drizzle-server, drizzle-client, and maybe drizzle-plugins-archive

The result is that drizzle fails to start due to all the missing plugins that aren't installed... for example:

$ sudo -u drizzle drizzled
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
100303 15:26:46 InnoDB: highest supported file format is Barracuda.
100303 15:26:46 InnoDB Plugin 1.0.4 started; log sequence number 44414
Can't open shared library '/usr/lib64/drizzle/plugin/librot13_plugin.so' (errno: 0 /usr/lib64/drizzle/plugin/librot13_plugin.so: cannot open shared object file: No such file or directory)Couldn't load plugin library named 'rot13'.
Failed to initialize plugins.Aborting
100303 15:26:46 InnoDB: Starting shutdown...
100303 15:26:47 InnoDB: Shutdown completed; log sequence number 44424
drizzled: Shutdown complete

If you install the missing plugin rpm, it fails on the next missing plugin. From a packaging standpoint it would be best to be able to build like this:

%configure --without-all-plugins --disable-all-plugins \
                   --with-archive-plugin \
                   --with-blackhole-plugin \
                   --with-theoneiwant-plugin

Or:

%configure --disable-all-plugins --enable-archive-plugin --enable-blackhole-plugin....

What you have is the ability to build and package only the plugins you want... Or building everything but disabling all by default and only enabling the few you really do want enabled by default. The alternative currently is to explicitly do a condition check on a macro and if not building that plugin pass --without-xxxxx-plugin:

%{?!_with_archive_plugin:--without-archive-plugin}
--disable-archive-plugin

This says... "If _with_archive_plugin is not defined, then pass --without-archive-plugin, and disable the archive plugin"... But this is required for each plugin (nearly 50 currently) . It gets messy and unmanageable pretty quick when you look at having new plugins added frequently and having to add them to the list of explicit '--disable's rather than just having a blanket --disable-all-plugins and allowing the packager to add new plugins as they desire.

Revision history for this message
BJ Dierkes (derks) wrote :

On a side note... if this would require a lot of coding... one could alternatively patch all plugin.ini files to set load_by_default=no at build time.

Revision history for this message
Andrew Garner (muzazzi) wrote :

You can also set the default plugins to load with --plugin_load (perhaps plugin_load=""), and enable specify plugins with plugin_add.

Revision history for this message
Monty Taylor (mordred) wrote :

This won't be very difficult to do, and I'm already hacking in that code for a related cause right now.

Changed in drizzle:
assignee: nobody → Monty Taylor (mordred)
importance: Undecided → High
Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 531456] [NEW] RFE: Add options to --disable-all-plugins/--without-all-plugins

On Wed, Mar 03, 2010 at 04:42:13PM -0000, BJ Dierkes wrote:
> $ sudo -u drizzle drizzled
> InnoDB: The InnoDB memory heap is disabled
> InnoDB: Mutexes and rw_locks use GCC atomic builtins.
> 100303 15:26:46 InnoDB: highest supported file format is Barracuda.
> 100303 15:26:46 InnoDB Plugin 1.0.4 started; log sequence number 44414
> Can't open shared library '/usr/lib64/drizzle/plugin/librot13_plugin.so' (errno: 0 /usr/lib64/drizzle/plugin/librot13_plugin.so: cannot open shared object file: No such file or directory)Couldn't load plugin library named 'rot13'.
> Failed to initialize plugins.Aborting
> 100303 15:26:46 InnoDB: Starting shutdown...
> 100303 15:26:47 InnoDB: Shutdown completed; log sequence number 44424
> drizzled: Shutdown complete

The "load_by_default" is (in my mind) meant to be a reasonable minimal
default set of plugins to have a decently usable database server....

e.g. the Innobase, HEAP and MyISAM plugins are pretty essential to
operation at this point in time.

Also, things like LENGTH() functions are also pretty much expected.
Making this too easy to not be installed and running could frustrate people...

--
Stewart Smith

Revision history for this message
BJ Dierkes (derks) wrote :

I think I am leaning toward your thoughts as well... after working with it a bit I think the majority of plugins are going to be expected... and from a packaging standpoint shouldn't be packaged separately. See https://blueprints.launchpad.net/pkg-drizzle/+spec/packaging-plugins

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.