Icon

    This is the documentation for for an older version of Qube.

    Documentation for the latest release is available here.

    Overview

    Database administration can be performed from the WranglerView utility's Administration menu.  

    There are two types of admininstration:

    1. Database table file corruption checks and repairs, usually necessitated by file-system level corruption due to a power outage or out-of-disk-space scenario
    2. Database integrity checks, most of which also remove or alter the offending records caused by anomalous supervisor operation; some instances of database integrity issues can also be caused by running out of disk space.

    Use of an encrypted database root password will disable the Database Administration menus

    Icon

    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.

    Database Health Check and Repair:

    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:

    • There must be a running MySQL server on the local machine.
    • There must be a database named "qube"
    • If there is a database_password defined in the qb.conf, it must stored in plaintext, not as an encrypted 64-character hash.

    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. 

    Icon

    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.

    Database Health Check

    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.

    Database Repair

    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

    Icon
    New in Qube 6.6

    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:

    • the user has been granted the qube admin privilege
    • WranglerView is running on the supervisor  

    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.

    • No labels