Managing tasks

The vinfra CLI tool executes some commands immediately, while for other commands (that may take some time to complete) it creates system tasks that are queued. Examples of actions performed via tasks are creating the storage or compute cluster and adding nodes to it.

To keep track of tasks being performed by vinfra, use the vinfra task list and vinfra task show commands. For example:

# vinfra task list
+----------------+---------+-----------------------------------------+
| task_id        | state   | name                                    |
+----------------+---------+-----------------------------------------+
| 8fc27e7a-<...> | success | backend.tasks.cluster.CreateNewCluster  |
| e61377db-<...> | success | backend.tasks.disks.ApplyDiskRoleTask   |
| a005b748-<...> | success | backend.tasks.node.AddNodeInClusterTask |
+----------------+---------+-----------------------------------------+
# vinfra task show 8fc27e7a-ba73-471d-9134-e351e1137cf4
+---------+----------------------------------------+
| Field   | Value                                  |
+---------+----------------------------------------+
| args    | - stor1                                |
|         | - 7ffa9540-5a20-41d1-b203-e3f349d62565 |
|         | - null                                 |
|         | - null                                 |
| kwargs  | {}                                     |
| name    | backend.tasks.cluster.CreateNewCluster |
| result  | cluster_id: 1                          |
| state   | success                                |
| task_id | 8fc27e7a-ba73-471d-9134-e351e1137cf4   |
+---------+----------------------------------------+