System update management
Overview
Allows you to manage system updates. Backup of the system at update is implemented, system rollback in automatic mode is not foreseen.
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Downloading the update
Request
POST /api/admin/v1/update/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=-----------boundary_69df8120352a996e
-----------boundary_69df8120352a996e
Content-Type: application/octet-stream
Content-Disposition: form-data; name="filename"; filename="fw_update_incoplax_amd64.zip"
Content-Transfer-Encoding: binary
BINARY BODY OF 'fw_update_incoplax_amd64.zip'
-----------boundary_69df8120352a996e--
Copying an update file from disk
The method allows you to copy the update file from the specified path to the updates folder on the active folder mc.
Request
| Name | Type | Description |
|---|---|---|
|
|
The full path to the update file to copy (in the following format url-encoded). |
POST /api/admin/v1/update/copyfrom HTTP/1.1
Content-Type: application/x-www-form-urlencoded
filepath=%2Fhome%2Fadmin%2Fera_update%fw_update_incoplax_amd64.zip
Obtaining the update status
The method returns the current state of update application by servers and sites.
Response
HTTP/1.1 200 OK
{
"resultcode": 0,
"resultmsg": "OK",
"data": {
"slave2": {
"ic": {
"node": "ic21@192.168.0.126",
"state": "idle",
"current_vsn": "1.4.0"
},
"servers": {
"server3@192.168.0.126": {
"state": "idle",
"product": "incoplax",
"product_vsn": "2018.4.29-nightly"
},
"server4@192.168.0.127": {
"state": "idle",
"product": "incoplax",
"product_vsn": "2018.4.29-nightly"
}
}
},
"central": {
"mic": {
"node": "mic@192.168.0.123",
"state": "idle",
"upfilename": "undefined"
},
"ic": {
"node": "ic1@192.168.0.123",
"state": "idle",
"current_vsn": "1.4.0"
},
"servers": {
"server2@192.168.0.124": {
"state": "idle",
"product": "incoplax",
"product_vsn": "2021.4.29-nightly"
},
"server1@192.168.0.123": {
"state": "idle",
"product": "incoplax",
"product_vsn": "2021.4.29-nightly"
}
}
}
}
}
| Name | Description |
|---|---|
|
|
|
the update service is initialized. |
|
idle state, the system does not apply an update. |
|
update is downloaded via ws or by copying from disk. |
|
preparations are made for the upgrade. |
|
preparation is successfully completed, the MC is ready to provide the update file to all SCs. The undo and apply update command is available. |
|
the command to apply the update is received and forwarded to all SC. |
|
the command to cancel the update has been received, the transition to the idle. |
|
server is blocked, because MC of newer version was found. |
|
|
|
the update service is initialized. |
|
idle state, the system does not apply an update. |
|
update preparations are underway. |
|
preparation was unsuccessful, the download of the update file from the MC. |
|
preparation was successful, the SC is ready to provide the update file to all SrvCs. The undo and apply update command is available. |
|
the command to apply the update is received and forwarded to all SrvC. |
|
|
|
the update service is initialized. |
|
idle state, the system does not apply an update. |
|
update preparations are underway. |
|
preparation was unsuccessful, the download of the update file from the SC. |
|
preparation was successful. The undo and apply update command is available. |
|
update application command received, update process started. |
Start preparing for the upgrade
Starts update preparation with the specified update file. Runs asynchronously. The current state of preparation is displayed in get_upstate.
Application of the update
Applies a distributed update to the system servers. Copying with possible replacement or deletion of the new distribution files, followed by a reboot of each server.
Getting the list of update files
Displays update files (and unpacked directories) by site and server.
Response
HTTP/1.1 200 OK
{
"resultcode": 0,
"resultmsg": "OK",
"data": {
"central": [
{
"dirs": ["fw_update_incoplax_amd64"],
"files": ["fw_update_incoplax_amd64.zip"],
"node": "mic@192.168.0.127",
"result": "ok"
},
{
"dirs": ["fw_update_incoplax_amd64"],
"files": ["fw_update_incoplax_amd64.zip"],
"node": "ic1@192.168.0.127",
"result": "ok"
},
{
"dirs": ["fw_update_incoplax_amd64"],
"files": ["fw_update_incoplax_amd64.zip"],
"node": "server1@192.168.0.127",
"result": "ok"
}
],
"slave2": [
{
"dirs": ["fw_update_incoplax_amd64"],
"files": ["fw_update_incoplax_amd64.zip"],
"node": "ic21@192.168.0.124",
"result": "ok"
},
{
"dirs": ["fw_update_incoplax_amd64"],
"files": ["fw_update_incoplax_amd64.zip"],
"node": "server3@192.168.0.124",
"result": "ok"
}
]
}
}
Deleting an update file
Allows you to remove the update file (and unpacked directories) from all servers on the system