Cluster Hosts

Represents the site-local cluster formed by supd running on each host.

Retrieve all cluster hosts

SecurityaccessToken
Request
query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

keys
string <enumeration>

Retrieve only the keys for the list

Value: "true"
count
string <enumeration>

Retrieve only the number of elements in the list

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/system/cluster/hosts
Response samples
- cluster-hostname: udc1-001
  version: dev-ff7b2dfc
  oper-status: up
  started-at: 2023-03-17T08:40:55Z
  maintenance-mode: off
  hostname: h03
  host-id: 17fdf47c-5b55-432a-85ec-da8d76f094ad
  controller: true
  labels:
    system/controller: "true"
  system-volumes:
    daemon-socket: /var/run/my-daemon.sock
  device-labels:
    camera: nicon
  devices:
    - name: stuff
      labels:
        camera: nicon
  gpu-labels:
    - name: gpu-all
      max-number-gpus: 2
      matching-gpus:
        - id: GPU-1234a3bb-46cb-4554-8860-ae8958e6a87a
        - id: GPU-e5b3b738-a420-4a49-a705-61c4c0f4f286
  gpus:
    - id: GPU-1234a3bb-46cb-4554-8860-ae8958e6a87a
      vendor: NVIDIA
      name: Some other NVIDIA
      serial: "182356738"
      memory: 1024 MiB
      driver-version: 525.85.05
      compute-mode: Default
      compute-capability: "8.9"
      display-mode: Disabled
      labels:
        - gpu-all
    - id: GPU-e5b3b738-a420-4a49-a705-61c4c0f4f286
      vendor: NVIDIA
      name: NVIDIA GeForce XTX 100080 Ti
      serial: "382356738"
      memory: 1048576 MiB
      driver-version: 525.85.05
      compute-mode: Default
      compute-capability: "100.64"
      display-mode: Enabled
      labels:
        - gpu-all
  local-volumes:
    - name: volume1
      status: up
      filesystem:
        type: ext4
        size-limit-support: false
      is-mountpoint: true
      space:
        total: 5 MiB
        allocated: 5 MiB
        free: 0 B
      service-volumes:
        tenants:
          - name: acme
            applications:
              - name: volumes-sched
                service-instances:
                  - name: b-2
                    volumes:
                      - any-storage
                  - name: b-1
                    volumes:
                      - any-storage
  host-network:
    ip-addresses:
      - 192.168.100.103
      - fe80::5054:ff:fe01:3fb2
  site-overlay-network:
    status: up
    ip-addresses:
      - 172.27.0.1
  network-interfaces:
    - name: default
      os-interface-name: eth0
      ingress-ipv4-address-allocation:
        summary:
          unallocated: 1
          allocated: 0
        unallocated:
          ranges:
            - 192.168.100.253
        allocated:
          tenants:
            - name: acme
              applications:
                - name: ingress
                  service-instances:
                    - name: my-srv-0
                      addresses:
                        - 192.168.100.252
                        - 192.168.100.253
                        - 192.168.100.254
        active-pool: interface-specific
  

Retrieve a cluster host

SecurityaccessToken
Request
path Parameters
cluster-host-cluster-hostname
required
string <domain-name>

The cluster-internal name of the host.

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/system/cluster/hosts/{cluster-host-cluster-hostname}
Response samples
cluster-hostname: udc1-001
version: dev-ff7b2dfc
oper-status: up
started-at: 2023-03-17T08:40:55Z
maintenance-mode: off
hostname: h03
host-id: 17fdf47c-5b55-432a-85ec-da8d76f094ad
controller: true
labels:
  system/controller: "true"
system-volumes:
  daemon-socket: /var/run/my-daemon.sock
device-labels:
  camera: nicon
devices:
  - name: stuff
    labels:
      camera: nicon
gpu-labels:
  - name: gpu-all
    max-number-gpus: 2
    matching-gpus:
      - id: GPU-1234a3bb-46cb-4554-8860-ae8958e6a87a
      - id: GPU-e5b3b738-a420-4a49-a705-61c4c0f4f286
gpus:
  - id: GPU-1234a3bb-46cb-4554-8860-ae8958e6a87a
    vendor: NVIDIA
    name: Some other NVIDIA
    serial: "182356738"
    memory: 1024 MiB
    driver-version: 525.85.05
    compute-mode: Default
    compute-capability: "8.9"
    display-mode: Disabled
    labels:
      - gpu-all
  - id: GPU-e5b3b738-a420-4a49-a705-61c4c0f4f286
    vendor: NVIDIA
    name: NVIDIA GeForce XTX 100080 Ti
    serial: "382356738"
    memory: 1048576 MiB
    driver-version: 525.85.05
    compute-mode: Default
    compute-capability: "100.64"
    display-mode: Enabled
    labels:
      - gpu-all
local-volumes:
  - name: volume1
    status: up
    filesystem:
      type: ext4
      size-limit-support: false
    is-mountpoint: true
    space:
      total: 5 MiB
      allocated: 5 MiB
      free: 0 B
    service-volumes:
      tenants:
        - name: acme
          applications:
            - name: volumes-sched
              service-instances:
                - name: b-2
                  volumes:
                    - any-storage
                - name: b-1
                  volumes:
                    - any-storage
host-network:
  ip-addresses:
    - 192.168.100.103
    - fe80::5054:ff:fe01:3fb2
site-overlay-network:
  status: up
  ip-addresses:
    - 172.27.0.1
network-interfaces:
  - name: default
    os-interface-name: eth0
    ingress-ipv4-address-allocation:
      summary:
        unallocated: 1
        allocated: 0
      unallocated:
        ranges:
          - 192.168.100.253
      allocated:
        tenants:
          - name: acme
            applications:
              - name: ingress
                service-instances:
                  - name: my-srv-0
                    addresses:
                      - 192.168.100.252
                      - 192.168.100.253
                      - 192.168.100.254
      active-pool: interface-specific

Invoke the create-auto-volume operation

Create a local-volume with name auto and label auto on the same partition as /var/lib/supd/volumes catalog. In general it is recommended to create volumes on dedicated disks to prevent the applications from competing for disk storage with the OS or the Avassa platform. Because this action contradicts this recommendation it is not recommended to be used in production.

SecurityaccessToken
Request
path Parameters
cluster-host-cluster-hostname
required
string <domain-name>

The cluster-internal name of the host.

query Parameters
site
string

Send the request to the specfifed site

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/system/cluster/hosts/{cluster-host-cluster-hostname}/create-auto-volume

Invoke the drain operation

DEPRECATED - will be removed. Use system cluster drain-host instead.

Put the host into drain mode. While in drain mode, service instances scheduled to this host will be stopped or rescheduled to other hosts, and no new service instances will be scheduled to this host.

Putting a host in drain mode can be useful in order to e.g., upgrade the operating system or hardware, or do host replacement, with minimal impact on running applications.

When this operation returns successfully, the host is in drain mode. If the result parameter is drained, no services are running on the host.

Drain mode is an ephemeral state, which means that if supd is restarted, the host is no longer in drain mode. In order to ensure that the host will not run any service instances even after a restart, configure the host's maintenance-mode to blocked.

SecurityaccessToken
Request
path Parameters
cluster-host-cluster-hostname
required
string <domain-name>

The cluster-internal name of the host.

query Parameters
site
string

Send the request to the specfifed site

Request Body schema:
One of:
no-reschedule
boolean

Must have the value true.

If this parameter is given, existing service instances will be stopped but not rescheduled to other hosts. This can be useful if the host will be down for a brief period of time.

Note that if the host is not restarted, the service instances will not automatically be rescheduled.

timeout
string <duration | infinity>
Default: "infinity"
  • duration: A duration in years, days, hours, minutes and seconds.
    Format is [<digits>y][<digits>d][<digits>m][<digits>s].
    Examples: 1y2d5h, 5h or 10m30s
  • infinity: - infinity

Wait at most the given time before returning. A timeout of 0s sets the host in drain mode and returns immediately.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/system/cluster/hosts/{cluster-host-cluster-hostname}/drain
Request samples
No sample
Response samples
No sample

Invoke the get-udevs operation

SecurityaccessToken
Request
path Parameters
cluster-host-cluster-hostname
required
string <domain-name>

The cluster-internal name of the host.

query Parameters
site
string

Send the request to the specfifed site

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/system/cluster/hosts/{cluster-host-cluster-hostname}/get-udevs
Response samples
udevs:
  - name: /dev/ttyS2
    attributes:
      - SUBSYSTEMS=="platform"
      - SUBSYSTEM=="tty"
      - KERNELS=="serial8250"
      - KERNEL=="ttyS2"
      - DRIVERS=="serial8250"
      - DRIVER==""
      - ATTRS{driver_override}=="(null)"
      - ATTR{xmit_fifo_size}=="0"
      - ATTR{uartclk}=="1843200"
      - ATTR{type}=="0"
      - ATTR{port}=="0x3E8"
      - ATTR{line}=="2"
      - ATTR{irq}=="4"
      - ATTR{iomem_reg_shift}=="0"
      - ATTR{iomem_base}=="0x0"
      - ATTR{io_type}=="0"
      - ATTR{flags}=="0x10000040"
      - ATTR{custom_divisor}=="0"
      - ATTR{console}=="N"
      - ATTR{closing_wait}=="3000"
      - ATTR{close_delay}=="50"

Invoke the reload-volumes operation

Notify the system that the underlying properties of one or more volumes defined in local-volumes list have changed.

SecurityaccessToken
Request
path Parameters
cluster-host-cluster-hostname
required
string <domain-name>

The cluster-internal name of the host.

query Parameters
site
string

Send the request to the specfifed site

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/system/cluster/hosts/{cluster-host-cluster-hostname}/reload-volumes