Child pages
  • WHM API 1 Functions - background_mysql_upgrade_status
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

 

Description

This function retrieves the status of a background MySQL® or MariaDB® upgrade.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/background_mysql_upgrade_status?api.version=1&upgrade_id=mysql_upgrade.20141108-172923
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/background_mysql_upgrade_status?api.version=1&upgrade_id=mysql_upgrade.20141108-172923
 Command Line
whmapi1 background_mysql_upgrade_status upgrade_id=mysql_upgrade.20141108-172923


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "error":0,
    "log":"Starting
 process with log file at 
/var/cpanel/logs/mysql_upgrade.20141108-172923/unattended_background_upgrade.log\nBeginning
 "MariaDB 10.0" upgrade...\nObtained version information from 
system.\nEnsuring the "MariaDB100" repository is available and 
working.\ncheckyum version 22.3\nEnsuring that the package 
"MariaDB-client" with version matching "10.0" is available.\nEnsuring 
that the package "MariaDB-common" with version matching "10.0" is 
available.\nEnsuring that the package "MariaDB-devel" with version 
matching "10.0" is available.\nEnsuring that the package 
"MariaDB-server" with version matching "10.0" is available.\nEnsuring 
that the package "MariaDB-shared" with version matching "10.0" is 
available.\nEnsuring that the package "coreutils" is 
available.\nEnsuring that the package "grep" is available.\nEnsuring 
that the package "perl-DBI" is available.\n your MariaDB server version 
for the right syntax to use near '.`netcopya0I5KfqYTfHqJr`  FOR UPGRADE'
 at line 1 when executing 'CHECK TABLE ...  FOR UPGRADE'\nFATAL ERROR: 
Upgrade failed\nDone building configuration.\nHooks system 
enabled.\nChecking for and running RPM::Versions 'post' hooks for any 
RPMs about to be installed\nAll required 'post' hooks have been 
run\nRunning: /usr/local/cpanel/scripts/check_cpanel_rpms 
--targets=MySQL41,MySQL50,MySQL51,MySQL55,MySQL56,MariaDB100,MariaDB101 
--fix\nRestarting mysql service.\nWaiting for "mysql" to restart 
............................................................waiting for "mysql" to initialize 
.........finished.\n\u001b[1;32mMariaDB upgrade completed 
successfully\u001b[0m\n------------------------------------\nChecking 
for Ruby update...\nNo Ruby update 
required.\n------------------------------------\n",
    "state":"success"
 },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "background_mysql_upgrade_status"
  }
}
 Output (XML)
<result>
    <data>
       <error>0</error>
       <log>Starting
 process with log file at 
/var/cpanel/logs/mysql_upgrade.20141108-172923/unattended_background_upgrade.log\nBeginning
 "MariaDB 10.0" upgrade...\nObtained version information from 
system.\nEnsuring the "MariaDB100" repository is available and 
working.\ncheckyum version 22.3\nEnsuring that the package 
"MariaDB-client" with version matching "10.0" is available.\nEnsuring 
that the package "MariaDB-common" with version matching "10.0" is 
available.\nEnsuring that the package "MariaDB-devel" with version 
matching "10.0" is available.\nEnsuring that the package 
"MariaDB-server" with version matching "10.0" is available.\nEnsuring 
that the package "MariaDB-shared" with version matching "10.0" is 
available.\nEnsuring that the package "coreutils" is 
available.\nEnsuring that the package "grep" is available.\nEnsuring 
that the package "perl-DBI" is available.\n your MariaDB server version 
for the right syntax to use near '.`netcopya0I5KfqYTfHqJr`  FOR UPGRADE'
 at line 1 when executing 'CHECK TABLE ...  FOR UPGRADE'\nFATAL ERROR: 
Upgrade failed\nDone building configuration.\nHooks system 
enabled.\nChecking for and running RPM::Versions 'post' hooks for any 
RPMs about to be installed\nAll required 'post' hooks have been 
run\nRunning: /usr/local/cpanel/scripts/check_cpanel_rpms 
--targets=MySQL41,MySQL50,MySQL51,MySQL55,MySQL56,MariaDB100,MariaDB101 
--fix\nRestarting mysql service.\nWaiting for "mysql" to restart 
............................................................waiting for "mysql" to initialize 
.........finished.\n\u001b[1;32mMariaDB upgrade completed 
successfully\u001b[0m\n------------------------------------\nChecking 
for Ruby update...\nNo Ruby update 
required.\n------------------------------------\n</log>
       <state>success</state>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>background_mysql_upgrade_status</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ReturnTypeDescriptionPossible valuesExample
upgrade_idstring

Required

The logfile's name.

Note:

 Log files exist in the /var/cpanel/logs/ directory.

A valid filename.
mysql_upgrade.20141108-172923

Returns

ReturnTypeDescriptionPossible valuesExample
errorinteger

An error code.

  • 0 — Successful upgrade.
  • -1 — Child process died from a signal.
  • 4 — MySQL upgrade failed error code.
  • 5 — Ruby upgrade failed error code.
  • 8 — EasyApache upgrade failed error code.
0
logstringThe upgrade's log file.A valid log file.
 Click to view...
Starting
 process with log file at 
/var/cpanel/logs/mysql_upgrade.20141108-172923/unattended_background_upgrade.log\nBeginning
 “MariaDB 10.0” upgrade...\nObtained version information from 
system.\nEnsuring the “MariaDB100” repository is available and 
working.\ncheckyum version 22.3\nEnsuring that the package 
“MariaDB-client” with version matching “10.0” is available.\nEnsuring 
that the package “MariaDB-common” with version matching “10.0” is 
available.\nEnsuring that the package “MariaDB-devel” with version 
matching “10.0” is available.\nEnsuring that the package 
“MariaDB-server” with version matching “10.0” is available.\nEnsuring 
that the package “MariaDB-shared” with version matching “10.0” is 
available.\nEnsuring that the package “coreutils” is 
available.\nEnsuring that the package “grep” is available.\nEnsuring 
that the package “perl-DBI” is available.\n your MariaDB server version 
for the right syntax to use near '.`netcopya0I5KfqYTfHqJr`  FOR UPGRADE'
 at line 1 when executing 'CHECK TABLE ...  FOR UPGRADE'\nFATAL ERROR: 
Upgrade failed\nDone building configuration.\nHooks system 
enabled.\nChecking for and running RPM::Versions 'post' hooks for any 
RPMs about to be installed\nAll required 'post' hooks have been 
run\nRunning: /usr/local/cpanel/scripts/check_cpanel_rpms 
--targets=MySQL41,MySQL50,MySQL51,MySQL55,MySQL56,MariaDB100,MariaDB101 
--fix\nRestarting mysql service.\nWaiting for “mysql” to restart 
……………………………………………………waiting for “mysql” to initialize 
………finished.\n\u001b[1;32mMariaDB upgrade completed 
successfully\u001b[0m\n------------------------------------\nChecking 
for Ruby update...\nNo Ruby update 
required.\n------------------------------------\n

 

 

statestringThe upgrade's state.
  • success
  • failed
  • in progress
success
  • No labels