Child pages
  • WHM API 1 Functions - background_mysql_upgrade_status

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

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

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledMySQLRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/background_mysql_upgrade_status?api.version=1&upgrade_id=mysql_upgrade.20141108-172923



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/background_mysql_upgrade_status?api.version=1&upgrade_id=mysql_upgrade.20141108-172923



Expand
titleCommand Line


Code Block
languagebash
whmapi1 background_mysql_upgrade_status upgrade_id=mysql_upgrade.20141108-172923

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "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"
  }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<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>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

   


Parameters

ReturnTypeDescriptionPossible valuesExample
upgrade_idstring

Required

The logfile's name.

Note
titleNote:

 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.


Expand
titleClick 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