xen-orchestra icon indicating copy to clipboard operation
xen-orchestra copied to clipboard

feat(xo-server): implement XO tasks for RPR and RPU

Open b-Nollet opened this issue 10 months ago • 0 comments

Description

Implementing XO tasks for RPR and RPU

Examples : - RPR :

{
  "id": "0lvdfdbuw",
  "properties": {
    "poolId": "dca87e2f-4e8e-f7fb-51e6-459b2409726b",
    "poolName": "xcp-ng-mrn-1",
    "name": "Rolling pool reboot",
    "userId": "8bdd66b5-b6d8-4912-81e9-abc8f79f9166"
  },
  "start": 1713939574857,
  "status": "success",
  "updatedAt": 1713940613877,
  "tasks": [
    {
      "id": "xtaq5ckh76",
      "properties": {
        "name": "Restarting hosts",
        "total": 3,
        "progress": 100,
        "done": 3
      },
      "start": 1713939575007,
      "status": "success",
      "tasks": [
        {
          "id": "wi1bbrdyz9",
          "properties": {
            "name": "Restarting host 65741043-c002-432c-b09c-d6b4d09f8f25",
            "hostId": "65741043-c002-432c-b09c-d6b4d09f8f25",
            "hostName": "xcp-ng-1"
          },
          "start": 1713939575007,
          "status": "success",
          "tasks": [
            {
              "id": "dap6lw8c388",
              "properties": {
                "name": "Evacuate",
                "hostId": "65741043-c002-432c-b09c-d6b4d09f8f25",
                "hostName": "xcp-ng-1"
              },
              "start": 1713939575327,
              "status": "success",
              "end": 1713939575850
            },
            {
              "id": "9qjy02fsl9p",
              "properties": {
                "name": "Restart",
                "hostId": "65741043-c002-432c-b09c-d6b4d09f8f25",
                "hostName": "xcp-ng-1"
              },
              "start": 1713939575869,
              "status": "success",
              "end": 1713939576139
            },
            {
              "id": "9b7kzcfc9e",
              "properties": {
                "name": "Waiting for host to be up",
                "hostId": "65741043-c002-432c-b09c-d6b4d09f8f25",
                "hostName": "xcp-ng-1"
              },
              "start": 1713939576139,
              "status": "success",
              "end": 1713939756210
            }
          ],
          "infos": [
            {
              "message": "Host 65741043-c002-432c-b09c-d6b4d09f8f25 is up"
            }
          ],
          "end": 1713939756211
        },
        {
          "id": "nhvi7inzi6i",
          "properties": {
            "name": "Restarting host e8b3167b-6c3f-4830-8560-2042723580af",
            "hostId": "e8b3167b-6c3f-4830-8560-2042723580af",
            "hostName": "xcp-ng-3"
          },
          "start": 1713939756212,
          "status": "success",
          "tasks": [
            {
              "id": "himx56kai18",
              "properties": {
                "name": "Evacuate",
                "hostId": "e8b3167b-6c3f-4830-8560-2042723580af",
                "hostName": "xcp-ng-3"
              },
              "start": 1713939756624,
              "status": "success",
              "end": 1713939757088
            },
            {
              "id": "40w3vn8b5ge",
              "properties": {
                "name": "Restart",
                "hostId": "e8b3167b-6c3f-4830-8560-2042723580af",
                "hostName": "xcp-ng-3"
              },
              "start": 1713939757145,
              "status": "success",
              "end": 1713939757765
            },
            {
              "id": "qn701kzz5r",
              "properties": {
                "name": "Waiting for host to be up",
                "hostId": "e8b3167b-6c3f-4830-8560-2042723580af",
                "hostName": "xcp-ng-3"
              },
              "start": 1713939757765,
              "status": "success",
              "end": 1713940005607
            }
          ],
          "infos": [
            {
              "message": "Host e8b3167b-6c3f-4830-8560-2042723580af is up"
            }
          ],
          "end": 1713940005607
        },
        {
          "id": "yqby18niyt",
          "properties": {
            "name": "Restarting host 08592288-7a18-4c9d-a82a-81afcdadaef2",
            "hostId": "08592288-7a18-4c9d-a82a-81afcdadaef2",
            "hostName": "xcp-ng-2"
          },
          "start": 1713940005608,
          "status": "success",
          "tasks": [
            {
              "id": "ppdhrs425l",
              "properties": {
                "name": "Evacuate",
                "hostId": "08592288-7a18-4c9d-a82a-81afcdadaef2",
                "hostName": "xcp-ng-2"
              },
              "start": 1713940006099,
              "status": "success",
              "end": 1713940180463
            },
            {
              "id": "2z1jkr71fbl",
              "properties": {
                "name": "Restart",
                "hostId": "08592288-7a18-4c9d-a82a-81afcdadaef2",
                "hostName": "xcp-ng-2"
              },
              "start": 1713940180561,
              "status": "success",
              "end": 1713940181231
            },
            {
              "id": "tyatnzqtgom",
              "properties": {
                "name": "Waiting for host to be up",
                "hostId": "08592288-7a18-4c9d-a82a-81afcdadaef2",
                "hostName": "xcp-ng-2"
              },
              "start": 1713940181232,
              "status": "success",
              "end": 1713940429298
            }
          ],
          "infos": [
            {
              "message": "Host 08592288-7a18-4c9d-a82a-81afcdadaef2 is up"
            }
          ],
          "end": 1713940429299
        }
      ],
      "end": 1713940429300
    },
    {
      "id": "nro546otf7k",
      "properties": {
        "name": "Migrate VMs back"
      },
      "start": 1713940429300,
      "status": "success",
      "tasks": [
        {
          "id": "9dou13a2b68",
          "properties": {
            "name": "Migrating VMs back to host 08592288-7a18-4c9d-a82a-81afcdadaef2",
            "hostId": "08592288-7a18-4c9d-a82a-81afcdadaef2",
            "hostName": "xcp-ng-2"
          },
          "start": 1713940429300,
          "status": "success",
          "tasks": [
            {
              "id": "2kxi8g84iq9",
              "properties": {
                "name": "Migrating VM OpaqueRef:d25490b5-7174-415c-a849-666d269780d7 back to host 08592288-7a18-4c9d-a82a-81afcdadaef2",
                "hostId": "08592288-7a18-4c9d-a82a-81afcdadaef2",
                "hostName": "xcp-ng-2",
                "vmRef": "OpaqueRef:d25490b5-7174-415c-a849-666d269780d7"
              },
              "start": 1713940429321,
              "status": "success",
              "end": 1713940613876
            }
          ],
          "end": 1713940613876
        }
      ],
      "end": 1713940613877
    }
  ],
  "end": 1713940613877
}

- RPU:

{
  "id": "0lvgfb79e",
  "properties": {
    "poolId": "b7569d99-30f8-178a-7d94-801de3e29b5b",
    "poolName": "XCP 8.3.0 XO Team",
    "name": "Rolling pool update",
    "userId": "8bdd66b5-b6d8-4912-81e9-abc8f79f9166"
  },
  "start": 1714120874114,
  "status": "success",
  "updatedAt": 1714121194490,
  "tasks": [
    {
      "id": "ffg9q6teaxr",
      "properties": {
        "name": "Listing missing patches",
        "progress": 100,
        "done": 2
      },
      "start": 1714120874117,
      "status": "success",
      "tasks": [
        {
          "id": "qky4gkj3c6q",
          "properties": {
            "name": "Listing missing patches for host b61a5c92-700e-4966-a13b-00633f03eea8",
            "hostId": "b61a5c92-700e-4966-a13b-00633f03eea8",
            "hostName": "XCP XO 8.3.0 master"
          },
          "start": 1714120874118,
          "status": "success",
          "end": 1714120874119
        },
        {
          "id": "h7tvctmsv9k",
          "properties": {
            "name": "Listing missing patches for host 84e555d8-267a-4720-aa5f-fd19035aadae",
            "hostId": "84e555d8-267a-4720-aa5f-fd19035aadae",
            "hostName": "XCP XO 8.3.0 slave"
          },
          "start": 1714120874119,
          "status": "success",
          "end": 1714120874119
        }
      ],
      "end": 1714120874120
    },
    {
      "id": "ct9ccwh7iwh",
      "properties": {
        "name": "Updating and rebooting"
      },
      "start": 1714120874120,
      "status": "success",
      "tasks": [
        {
          "id": "mwz3lbed29k",
          "properties": {
            "name": "Restarting hosts",
            "total": 2,
            "progress": 100,
            "done": 2
          },
          "start": 1714120874269,
          "status": "success",
          "tasks": [
            {
              "id": "mmzvkmxd1pf",
              "properties": {
                "name": "Restarting host b61a5c92-700e-4966-a13b-00633f03eea8",
                "hostId": "b61a5c92-700e-4966-a13b-00633f03eea8",
                "hostName": "XCP XO 8.3.0 master"
              },
              "start": 1714120874270,
              "status": "success",
              "tasks": [
                {
                  "id": "6havchdvl5l",
                  "properties": {
                    "name": "Evacuate",
                    "hostId": "b61a5c92-700e-4966-a13b-00633f03eea8",
                    "hostName": "XCP XO 8.3.0 master"
                  },
                  "start": 1714120874306,
                  "status": "success",
                  "end": 1714120874555
                },
                {
                  "id": "r7lsbbybpv",
                  "properties": {
                    "name": "Installing patches",
                    "hostId": "b61a5c92-700e-4966-a13b-00633f03eea8",
                    "hostName": "XCP XO 8.3.0 master"
                  },
                  "start": 1714120874556,
                  "status": "success",
                  "end": 1714120879654
                },
                {
                  "id": "bfohwwo6dbd",
                  "properties": {
                    "name": "Restart",
                    "hostId": "b61a5c92-700e-4966-a13b-00633f03eea8",
                    "hostName": "XCP XO 8.3.0 master"
                  },
                  "start": 1714120874577,
                  "status": "success",
                  "end": 1714120874781
                },
                {
                  "id": "wjy1k5f2f8",
                  "properties": {
                    "name": "Waiting for host to be up",
                    "hostId": "b61a5c92-700e-4966-a13b-00633f03eea8",
                    "hostName": "XCP XO 8.3.0 master"
                  },
                  "start": 1714120874781,
                  "status": "success",
                  "end": 1714121034472
                }
              ],
              "infos": [
                {
                  "message": "Host b61a5c92-700e-4966-a13b-00633f03eea8 is up"
                }
              ],
              "end": 1714121034472
            },
            {
              "id": "3pyfuk28719",
              "properties": {
                "name": "Restarting host 84e555d8-267a-4720-aa5f-fd19035aadae",
                "hostId": "84e555d8-267a-4720-aa5f-fd19035aadae",
                "hostName": "XCP XO 8.3.0 slave"
              },
              "start": 1714121034473,
              "status": "success",
              "tasks": [
                {
                  "id": "o3k4hu90k4i",
                  "properties": {
                    "name": "Evacuate",
                    "hostId": "84e555d8-267a-4720-aa5f-fd19035aadae",
                    "hostName": "XCP XO 8.3.0 slave"
                  },
                  "start": 1714121034699,
                  "status": "success",
                  "end": 1714121034958
                },
                {
                  "id": "1e51nysajyr",
                  "properties": {
                    "name": "Installing patches",
                    "hostId": "84e555d8-267a-4720-aa5f-fd19035aadae",
                    "hostName": "XCP XO 8.3.0 slave"
                  },
                  "start": 1714121034958,
                  "status": "success",
                  "end": 1714121039969
                },
                {
                  "id": "5y297i5ps4t",
                  "properties": {
                    "name": "Restart",
                    "hostId": "84e555d8-267a-4720-aa5f-fd19035aadae",
                    "hostName": "XCP XO 8.3.0 slave"
                  },
                  "start": 1714121035034,
                  "status": "success",
                  "end": 1714121035185
                },
                {
                  "id": "fjq0806xfy6",
                  "properties": {
                    "name": "Waiting for host to be up",
                    "hostId": "84e555d8-267a-4720-aa5f-fd19035aadae",
                    "hostName": "XCP XO 8.3.0 slave"
                  },
                  "start": 1714121035185,
                  "status": "success",
                  "end": 1714121194488
                }
              ],
              "infos": [
                {
                  "message": "Host 84e555d8-267a-4720-aa5f-fd19035aadae is up"
                }
              ],
              "end": 1714121194488
            }
          ],
          "end": 1714121194489
        },
        {
          "id": "kpbaijk6bao",
          "properties": {
            "name": "Migrate VMs back"
          },
          "start": 1714121194489,
          "status": "success",
          "end": 1714121194490
        }
      ],
      "end": 1714121194490
    }
  ],
  "end": 1714121194490
}

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

b-Nollet avatar Apr 22 '24 07:04 b-Nollet