Skip to content

feat(BA-1443): backend.ai mgr scheduler last-execution-time command #4507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 28, 2025

Conversation

kyujin-cho
Copy link
Member

@kyujin-cho kyujin-cho commented May 26, 2025

resolves #4506 (BA-1443). This PR adds new command set to manager CLI implementation (not client-py).
The command accepts scheduler_name, which refers target scheduler name to look up, and --manager-id, which defines which manager node to fetch information of, being set as the local manager executing the command by default. When not specifying scheduler_name` argument, the command will return status of every schedulers operated from the target manager node. On a complicated cluster with multiple active Backend.AI managers operating concurrently, Backend.AI keeps track of each manager node's last execution time of each scheduler locally, not on a global redis key namespace, hence requiring CLI users to fetch status of each manager individually.
Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue

@github-actions github-actions bot added size:M 30~100 LoC comp:manager Related to Manager component comp:cli Related to CLI component labels May 26, 2025
kyujin-cho and others added 4 commits May 26, 2025 07:32
.feature.md -> 4507.feature.md

Co-authored-by: octodog <mu001@lablup.com>
@github-actions github-actions bot added size:L 100~500 LoC and removed size:M 30~100 LoC labels May 26, 2025
@kyujin-cho kyujin-cho requested a review from HyeockJinKim May 26, 2025 08:18
Comment on lines +48 to +57
@click.argument("scheduler_name", required=False)
@click.pass_obj
def last_execution_time(
cli_ctx: CLIContext,
scheduler_name: str | None,
*,
format: Literal["plain"] | Literal["csv"] | Literal["json"] = "plain",
manager_id: str | None = None,
) -> None:
"""Queries manager's scheduler execution footprint from Redis. When scheduler name is not specified, this command will return informations of all schedulers in store."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like last_execution_time returns more information than the name.
Would footprint be a better name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"footprint" looks good, perhaps we can count more generic term like "information".

@HyeockJinKim HyeockJinKim added this pull request to the merge queue May 28, 2025
Merged via the queue into main with commit 04e9f23 May 28, 2025
26 checks passed
@HyeockJinKim HyeockJinKim deleted the feat/scheduler-health-check-command branch May 28, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:cli Related to CLI component comp:manager Related to Manager component size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make manager CLI command to check each scheduler's last execution time
2 participants