1.2. 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-ba73-471d-9134-e351e1137cf4 | success | backend.tasks.cluster.CreateNewCluster  |
| e61377db-9df4-4282-99aa-6a4ae73a7f96 | success | backend.tasks.disks.ApplyDiskRoleTask   |
| a005b748-cb85-40f8-a09d-291a8599bb9c | 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   |
+---------+----------------------------------------+