Database administration can be performed from the WranglerView utility's Administration menu.
There are two types of admininstration:
Use of an encrypted database_password in the qb.conf will prevent either the Database Administration options from actually be executed, since the WranglerView utility is unable to decrypt the password and supply it to the mysqlcheck command-line. |
In this case, a dialogue box is shown instead, instructing the user to find the appropriate command to run in the QubeGUI Log Panel, and to copy & paste this command into a terminal window or cmd prompt and to supply the MySQL root user's password at the command-line.
Qube! stores all job-related information (with the exception of the job logs) in a set of MySQL databases on the supervisor. When the supervisor host crashes, is powered off without being gracefully shut down, or runs out of disk space, individual tables in these databases can become corrupt at the file-system level and need to be repaired. In most cases, Qube! will continue to run with these databases in a corrupt state, but supervisor performance will be impaired.
There are 2 operations available from within the QubeGUI to aid a Qube! administrator in database maintenance: a health check, and a repair.
The following conditions must be met before these menu items are enabled and available to be run:
Both operations can be performed while the supervisor is running, but your users may experience slowdowns if you run these during periods of peak load. Both operations are performed from the QubeGUI->Administration-Database Administration menu, but are actually accomplished via the MySQL mysqlcheck command-line utility.
Even the (relatively) quicker Health check can take hours to complete on a large set of databases, and it may be 10 minutes or longer for a single table to be checked/repaired. If you are unsure whether the operation has completed, please view the Log Pane for a message indicating the check or repair operation has completed. |
The health check is a quick way to ensure that all databases are intact. If errors are found within any tables in any databases, the names of the individual tables that contain these error conditions are cached, and a subsequent Database Repair will be performed only on these tables. If the QubeGUI is restarted, the list of tables with errors is not saved.
Performing a database repair is a more exhaustive check of the internal database structure, and so more time is required for each table compared to a simple health check.
If a Database Health Check has not yet been performed since the QubeGUI has been started, there is no way to know which (if any) databases contain tables with errors, so all tables in all databases must be scanned.
It is usually quicker to first run a Database Health Check to find tables with errors, and then run the Database Repair to fix only the tables that need repairs. If tables are found in need of repair by a prior 'Health Check', the number of tables in need of repair will be updated in the 'Database Repair' menu item.
A first pass at a repair attempt is done in a relatively quick manner that catches all but the most egregious of error conditions. If this first repair pass fails, a second more exhaustive repair is attempted which involves rebuilding all the table indices by performing a full table scan. (The mysqlcheck "–use-frm"
option is used.)
Database Integrity Checks
There are times where the database tables are intact at the file-system level, but contain errors or inconsistent data. To repair these logical errors in the database tables, there are Database Integrity checks available in WranglerView. If there are more than 5000 jobs in the Qube database, the last 2 "Check for jobs" menu items will be prefaced with a "-Long-:" All checks are enabled if all of the following are true:
If you're a qube admin on a remote machine (like most wranglers), you can still perform some checks, the ones that are disabled not only check but clean up as well. |