Manager Functions

class ai.backend.client.func.manager.Manager

Provides controlling of the gateway/manager servers.

New in version 18.12.

classmethod await status()

Returns the current status of the configured API server.

classmethod await freeze(force_kill=False)

Freezes the configured API server. Any API clients will no longer be able to create new compute sessions nor create and modify vfolders/keypairs/etc. This is used to enter the maintenance mode of the server for unobtrusive manager and/or agent upgrades.

Parameters

force_kill (bool) – If set True, immediately shuts down all running compute sessions forcibly. If not set, clients who have running compute session are still able to interact with them though they cannot create new compute sessions.

classmethod await unfreeze()

Unfreezes the configured API server so that it resumes to normal operation.

classmethod await get_announcement()

Get current announcement.

classmethod await update_announcement(enabled=True, message=None)

Update (create / delete) announcement.

Parameters
  • enabled (bool) – If set False, delete announcement.

  • message (Optional[str, None]) – Announcement message. Required if enabled is True.

classmethod await scheduler_op(op, args)

Perform a scheduler operation.

Parameters
  • op (str) – The name of scheduler operation.

  • args (Any) – Arguments specific to the given operation.