siclaw 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -114
- package/dist/agentbox/gateway-client.d.ts +2 -1
- package/dist/agentbox/gateway-client.js +6 -2
- package/dist/agentbox/gateway-client.js.map +1 -1
- package/dist/agentbox/http-server.js +184 -19
- package/dist/agentbox/http-server.js.map +1 -1
- package/dist/agentbox/resource-handlers.d.ts +1 -0
- package/dist/agentbox/resource-handlers.js +23 -23
- package/dist/agentbox/resource-handlers.js.map +1 -1
- package/dist/agentbox/session.js +85 -5
- package/dist/agentbox/session.js.map +1 -1
- package/dist/agentbox-main.d.ts +2 -1
- package/dist/agentbox-main.js +65 -18
- package/dist/agentbox-main.js.map +1 -1
- package/dist/cli-credentials.d.ts +1 -0
- package/dist/cli-credentials.js +109 -0
- package/dist/cli-credentials.js.map +1 -0
- package/dist/cli-first-run.d.ts +11 -0
- package/dist/cli-first-run.js +99 -0
- package/dist/cli-first-run.js.map +1 -0
- package/dist/cli-main.js +33 -11
- package/dist/cli-main.js.map +1 -1
- package/dist/cli-setup.d.ts +5 -11
- package/dist/cli-setup.js +12 -225
- package/dist/cli-setup.js.map +1 -1
- package/dist/core/agent-factory.d.ts +4 -0
- package/dist/core/agent-factory.js +102 -151
- package/dist/core/agent-factory.js.map +1 -1
- package/dist/core/config.d.ts +10 -3
- package/dist/core/config.js +11 -95
- package/dist/core/config.js.map +1 -1
- package/dist/core/extensions/deep-investigation.d.ts +2 -1
- package/dist/core/extensions/deep-investigation.js +144 -24
- package/dist/core/extensions/deep-investigation.js.map +1 -1
- package/dist/core/extensions/setup.d.ts +8 -0
- package/dist/core/extensions/setup.js +669 -0
- package/dist/core/extensions/setup.js.map +1 -0
- package/dist/core/llm-proxy.js +7 -3
- package/dist/core/llm-proxy.js.map +1 -1
- package/dist/core/mcp-client.d.ts +0 -10
- package/dist/core/mcp-client.js +0 -65
- package/dist/core/mcp-client.js.map +1 -1
- package/dist/core/prompt.d.ts +1 -1
- package/dist/core/prompt.js +42 -5
- package/dist/core/prompt.js.map +1 -1
- package/dist/core/provider-presets.d.ts +14 -0
- package/dist/core/provider-presets.js +81 -0
- package/dist/core/provider-presets.js.map +1 -0
- package/dist/cron/cron-coordinator.d.ts +2 -0
- package/dist/cron/cron-coordinator.js +46 -14
- package/dist/cron/cron-coordinator.js.map +1 -1
- package/dist/cron/cron-executor.js +33 -8
- package/dist/cron/cron-executor.js.map +1 -1
- package/dist/cron/cron-scheduler.d.ts +1 -1
- package/dist/cron/gateway-client.d.ts +5 -0
- package/dist/cron/gateway-client.js +43 -8
- package/dist/cron/gateway-client.js.map +1 -1
- package/dist/cron-main.js +39 -9
- package/dist/cron-main.js.map +1 -1
- package/dist/gateway/agentbox/client.d.ts +11 -0
- package/dist/gateway/agentbox/client.js +18 -0
- package/dist/gateway/agentbox/client.js.map +1 -1
- package/dist/gateway/agentbox/k8s-spawner.d.ts +11 -2
- package/dist/gateway/agentbox/k8s-spawner.js +95 -52
- package/dist/gateway/agentbox/k8s-spawner.js.map +1 -1
- package/dist/gateway/agentbox/local-spawner.d.ts +1 -1
- package/dist/gateway/agentbox/local-spawner.js +4 -2
- package/dist/gateway/agentbox/local-spawner.js.map +1 -1
- package/dist/gateway/agentbox/manager.d.ts +0 -10
- package/dist/gateway/agentbox/manager.js +11 -30
- package/dist/gateway/agentbox/manager.js.map +1 -1
- package/dist/gateway/agentbox/types.d.ts +6 -4
- package/dist/gateway/cron/cron-service.d.ts +49 -0
- package/dist/gateway/cron/cron-service.js +259 -0
- package/dist/gateway/cron/cron-service.js.map +1 -0
- package/dist/gateway/db/init-schema.js +44 -0
- package/dist/gateway/db/init-schema.js.map +1 -1
- package/dist/gateway/db/migrate-sqlite.js +73 -4
- package/dist/gateway/db/migrate-sqlite.js.map +1 -1
- package/dist/gateway/db/repositories/chat-repo.d.ts +56 -2
- package/dist/gateway/db/repositories/chat-repo.js +132 -2
- package/dist/gateway/db/repositories/chat-repo.js.map +1 -1
- package/dist/gateway/db/repositories/config-repo.d.ts +31 -2
- package/dist/gateway/db/repositories/config-repo.js +57 -7
- package/dist/gateway/db/repositories/config-repo.js.map +1 -1
- package/dist/gateway/db/repositories/env-repo.d.ts +14 -0
- package/dist/gateway/db/repositories/env-repo.js +15 -2
- package/dist/gateway/db/repositories/env-repo.js.map +1 -1
- package/dist/gateway/db/repositories/model-config-repo.d.ts +1 -1
- package/dist/gateway/db/repositories/model-config-repo.js +26 -12
- package/dist/gateway/db/repositories/model-config-repo.js.map +1 -1
- package/dist/gateway/db/repositories/skill-repo.d.ts +0 -5
- package/dist/gateway/db/repositories/skill-review-repo.d.ts +1 -0
- package/dist/gateway/db/repositories/skill-review-repo.js +4 -1
- package/dist/gateway/db/repositories/skill-review-repo.js.map +1 -1
- package/dist/gateway/db/repositories/skill-version-repo.js +0 -1
- package/dist/gateway/db/repositories/skill-version-repo.js.map +1 -1
- package/dist/gateway/db/repositories/system-config-repo.d.ts +1 -1
- package/dist/gateway/db/repositories/system-config-repo.js +2 -1
- package/dist/gateway/db/repositories/system-config-repo.js.map +1 -1
- package/dist/gateway/db/repositories/user-env-config-repo.d.ts +13 -0
- package/dist/gateway/db/repositories/user-env-config-repo.js +11 -0
- package/dist/gateway/db/repositories/user-env-config-repo.js.map +1 -1
- package/dist/gateway/db/repositories/workspace-repo.d.ts +3 -2
- package/dist/gateway/db/repositories/workspace-repo.js +6 -2
- package/dist/gateway/db/repositories/workspace-repo.js.map +1 -1
- package/dist/gateway/db/schema-mysql.d.ts +473 -51
- package/dist/gateway/db/schema-mysql.js +35 -4
- package/dist/gateway/db/schema-mysql.js.map +1 -1
- package/dist/gateway/db/schema-sqlite.d.ts +522 -57
- package/dist/gateway/db/schema-sqlite.js +38 -6
- package/dist/gateway/db/schema-sqlite.js.map +1 -1
- package/dist/gateway/db/schema.d.ts +471 -51
- package/dist/gateway/db/schema.js +1 -1
- package/dist/gateway/db/schema.js.map +1 -1
- package/dist/gateway/metrics-aggregator.d.ts +65 -0
- package/dist/gateway/metrics-aggregator.js +244 -0
- package/dist/gateway/metrics-aggregator.js.map +1 -0
- package/dist/gateway/plugins/channel-bridge.d.ts +4 -1
- package/dist/gateway/plugins/channel-bridge.js +78 -86
- package/dist/gateway/plugins/channel-bridge.js.map +1 -1
- package/dist/gateway/rpc-methods.d.ts +4 -2
- package/dist/gateway/rpc-methods.js +962 -163
- package/dist/gateway/rpc-methods.js.map +1 -1
- package/dist/gateway/security/cert-manager.d.ts +2 -2
- package/dist/gateway/security/cert-manager.js +4 -2
- package/dist/gateway/security/cert-manager.js.map +1 -1
- package/dist/gateway/server.d.ts +4 -8
- package/dist/gateway/server.js +297 -261
- package/dist/gateway/server.js.map +1 -1
- package/dist/gateway/skills/file-writer.js +17 -11
- package/dist/gateway/skills/file-writer.js.map +1 -1
- package/dist/gateway/skills/script-evaluator.js +12 -9
- package/dist/gateway/skills/script-evaluator.js.map +1 -1
- package/dist/gateway/web/dist/assets/index-0p17ZeTP.js +740 -0
- package/dist/gateway/web/dist/assets/index-9eP6nPUq.js +741 -0
- package/dist/gateway/web/dist/assets/index-9eP6nPUq.js.map +1 -0
- package/dist/gateway/web/dist/assets/index-CAmSY91d.js +675 -0
- package/dist/gateway/web/dist/assets/index-DMFEh8Pp.css +1 -0
- package/dist/gateway/web/dist/assets/index-DyowBCEj.css +1 -0
- package/dist/gateway/web/dist/assets/index-PDK5JJDO.css +1 -0
- package/dist/gateway/web/dist/index.html +2 -2
- package/dist/gateway-main.js +27 -10
- package/dist/gateway-main.js.map +1 -1
- package/dist/memory/embeddings.js +5 -4
- package/dist/memory/embeddings.js.map +1 -1
- package/dist/memory/indexer.d.ts +23 -3
- package/dist/memory/indexer.js +235 -23
- package/dist/memory/indexer.js.map +1 -1
- package/dist/memory/schema.js +15 -1
- package/dist/memory/schema.js.map +1 -1
- package/dist/memory/types.d.ts +18 -0
- package/dist/memory/types.js +6 -1
- package/dist/memory/types.js.map +1 -1
- package/dist/shared/detect-language.d.ts +12 -0
- package/dist/shared/detect-language.js +78 -0
- package/dist/shared/detect-language.js.map +1 -0
- package/dist/shared/diagnostic-events.d.ts +70 -0
- package/dist/shared/diagnostic-events.js +38 -0
- package/dist/shared/diagnostic-events.js.map +1 -0
- package/dist/shared/local-collector.d.ts +56 -0
- package/dist/shared/local-collector.js +284 -0
- package/dist/shared/local-collector.js.map +1 -0
- package/dist/shared/metrics-types.d.ts +64 -0
- package/dist/shared/metrics-types.js +25 -0
- package/dist/shared/metrics-types.js.map +1 -0
- package/dist/shared/metrics.d.ts +19 -0
- package/dist/shared/metrics.js +185 -0
- package/dist/shared/metrics.js.map +1 -0
- package/dist/shared/path-utils.d.ts +15 -0
- package/dist/shared/path-utils.js +23 -0
- package/dist/shared/path-utils.js.map +1 -0
- package/dist/shared/retry.d.ts +35 -0
- package/dist/shared/retry.js +61 -0
- package/dist/shared/retry.js.map +1 -0
- package/dist/tools/command-sets.d.ts +18 -2
- package/dist/tools/command-sets.js +207 -32
- package/dist/tools/command-sets.js.map +1 -1
- package/dist/tools/command-validator.d.ts +56 -0
- package/dist/tools/command-validator.js +357 -0
- package/dist/tools/command-validator.js.map +1 -0
- package/dist/tools/create-skill.js +26 -1
- package/dist/tools/create-skill.js.map +1 -1
- package/dist/tools/credential-list.js +1 -23
- package/dist/tools/credential-list.js.map +1 -1
- package/dist/tools/credential-manager.d.ts +98 -0
- package/dist/tools/credential-manager.js +313 -0
- package/dist/tools/credential-manager.js.map +1 -0
- package/dist/tools/deep-search/engine.js +184 -127
- package/dist/tools/deep-search/engine.js.map +1 -1
- package/dist/tools/deep-search/prompts.d.ts +10 -2
- package/dist/tools/deep-search/prompts.js +37 -36
- package/dist/tools/deep-search/prompts.js.map +1 -1
- package/dist/tools/deep-search/schemas.d.ts +87 -0
- package/dist/tools/deep-search/schemas.js +85 -0
- package/dist/tools/deep-search/schemas.js.map +1 -0
- package/dist/tools/deep-search/sub-agent.d.ts +21 -0
- package/dist/tools/deep-search/sub-agent.js +153 -4
- package/dist/tools/deep-search/sub-agent.js.map +1 -1
- package/dist/tools/deep-search/tool.js +1 -0
- package/dist/tools/deep-search/tool.js.map +1 -1
- package/dist/tools/deep-search/types.d.ts +2 -0
- package/dist/tools/deep-search/types.js.map +1 -1
- package/dist/tools/dp-tools.js +29 -5
- package/dist/tools/dp-tools.js.map +1 -1
- package/dist/tools/exec-utils.d.ts +85 -0
- package/dist/tools/exec-utils.js +294 -0
- package/dist/tools/exec-utils.js.map +1 -0
- package/dist/tools/fork-skill.js +14 -2
- package/dist/tools/fork-skill.js.map +1 -1
- package/dist/tools/investigation-feedback.d.ts +3 -0
- package/dist/tools/investigation-feedback.js +71 -0
- package/dist/tools/investigation-feedback.js.map +1 -0
- package/dist/tools/manage-schedule.js +16 -6
- package/dist/tools/manage-schedule.js.map +1 -1
- package/dist/tools/netns-script.js +27 -281
- package/dist/tools/netns-script.js.map +1 -1
- package/dist/tools/node-exec.d.ts +2 -14
- package/dist/tools/node-exec.js +18 -225
- package/dist/tools/node-exec.js.map +1 -1
- package/dist/tools/node-script.js +14 -168
- package/dist/tools/node-script.js.map +1 -1
- package/dist/tools/pod-exec.d.ts +1 -1
- package/dist/tools/pod-exec.js +10 -26
- package/dist/tools/pod-exec.js.map +1 -1
- package/dist/tools/pod-nsenter-exec.js +21 -225
- package/dist/tools/pod-nsenter-exec.js.map +1 -1
- package/dist/tools/pod-script.js +10 -19
- package/dist/tools/pod-script.js.map +1 -1
- package/dist/tools/restricted-bash.d.ts +1 -17
- package/dist/tools/restricted-bash.js +38 -252
- package/dist/tools/restricted-bash.js.map +1 -1
- package/dist/tools/run-skill.d.ts +3 -1
- package/dist/tools/run-skill.js +21 -1
- package/dist/tools/run-skill.js.map +1 -1
- package/dist/tools/script-resolver.d.ts +3 -1
- package/dist/tools/script-resolver.js +74 -30
- package/dist/tools/script-resolver.js.map +1 -1
- package/dist/tools/update-skill.js +17 -6
- package/dist/tools/update-skill.js.map +1 -1
- package/package.json +8 -6
- package/siclaw.mjs +10 -1
- package/skills/core/cluster-events/SKILL.md +1 -1
- package/skills/core/deep-investigation/SKILL.md +11 -0
- package/skills/core/deployment-rollout-debug/SKILL.md +1 -1
- package/skills/core/dns-debug/SKILL.md +1 -0
- package/skills/core/meta.json +12 -1
- package/skills/core/networkpolicy-debug/SKILL.md +332 -0
- package/skills/core/node-logs/scripts/get-node-logs.sh +19 -9
- package/skills/core/pod-pending-debug/SKILL.md +1 -0
- package/skills/core/quota-debug/SKILL.md +203 -0
- package/skills/core/service-debug/SKILL.md +1 -0
- package/skills/core/statefulset-debug/SKILL.md +280 -0
- package/skills/core/volcano-diagnose-pod/SKILL.md +196 -0
- package/skills/core/volcano-diagnose-pod/scripts/diagnose-pod.sh +175 -0
- package/skills/core/volcano-gang-scheduling/SKILL.md +299 -0
- package/skills/core/volcano-job-diagnose/SKILL.md +319 -0
- package/skills/core/volcano-job-diagnose/scripts/diagnose-job.sh +253 -0
- package/skills/core/volcano-node-resources/SKILL.md +334 -0
- package/skills/core/volcano-node-resources/scripts/get-node-resources.sh +281 -0
- package/skills/core/volcano-queue-diagnose/SKILL.md +294 -0
- package/skills/core/volcano-queue-diagnose/scripts/diagnose-queue.sh +283 -0
- package/skills/core/volcano-resource-insufficient/SKILL.md +315 -0
- package/skills/core/volcano-scheduler-config/SKILL.md +371 -0
- package/skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh +297 -0
- package/skills/core/volcano-scheduler-logs/SKILL.md +241 -0
- package/skills/core/volcano-scheduler-logs/scripts/get-scheduler-logs.sh +159 -0
- package/skills/platform/create-skill/SKILL.md +35 -3
- package/skills/platform/manage-skill/SKILL.md +9 -2
- package/skills/platform/update-skill/SKILL.md +17 -6
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: volcano-scheduler-config
|
|
3
|
+
description: >-
|
|
4
|
+
View Volcano scheduler configuration.
|
|
5
|
+
Check scheduler ConfigMap, actions, plugins, and tier settings.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Volcano Scheduler Configuration
|
|
9
|
+
|
|
10
|
+
View Volcano scheduler configuration to understand scheduling policies, enabled plugins, and actions. This skill helps diagnose configuration-related scheduling behaviors.
|
|
11
|
+
|
|
12
|
+
**Scope:** This skill is for **diagnosis only**. It retrieves configuration for analysis but does not modify any cluster state.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh [options]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
|
|
22
|
+
| Parameter | Required | Description |
|
|
23
|
+
|-----------|----------|-------------|
|
|
24
|
+
| `--section SECTION` | no | Show specific section: actions, plugins, tiers, all (default: all) |
|
|
25
|
+
| `--format FORMAT` | no | Output format: yaml, json, summary (default: summary) |
|
|
26
|
+
| `--raw` | no | Show raw ConfigMap data without parsing |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
Get summary of scheduler configuration:
|
|
31
|
+
```bash
|
|
32
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
View actions configuration only:
|
|
36
|
+
```bash
|
|
37
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section actions
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
View plugins configuration:
|
|
41
|
+
```bash
|
|
42
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section plugins
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Show full YAML configuration:
|
|
46
|
+
```bash
|
|
47
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --format yaml
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Get raw ConfigMap:
|
|
51
|
+
```bash
|
|
52
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --raw
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Understanding Scheduler Configuration
|
|
56
|
+
|
|
57
|
+
### Configuration Location
|
|
58
|
+
|
|
59
|
+
The Volcano scheduler configuration is stored in:
|
|
60
|
+
- **Namespace:** `volcano-system`
|
|
61
|
+
- **ConfigMap:** `volcano-scheduler-configmap`
|
|
62
|
+
- **Key:** `volcano-scheduler.conf`
|
|
63
|
+
|
|
64
|
+
### Configuration Structure
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
actions: "enqueue, allocate, backfill" # Pipeline order
|
|
68
|
+
tiers:
|
|
69
|
+
- plugins:
|
|
70
|
+
- name: priority
|
|
71
|
+
- name: gang
|
|
72
|
+
- name: conformance
|
|
73
|
+
- plugins:
|
|
74
|
+
- name: overcommit
|
|
75
|
+
- name: drf
|
|
76
|
+
- name: predicates
|
|
77
|
+
- name: proportion
|
|
78
|
+
- name: nodeorder
|
|
79
|
+
- name: binpack
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Actions
|
|
83
|
+
|
|
84
|
+
Actions define the **two-phase scheduling pipeline**:
|
|
85
|
+
1. **Enqueue phase** — PodGroup is admitted to the queue based on queue capacity (does the queue have enough deserved resources?)
|
|
86
|
+
2. **Allocate phase** — Individual pods are placed on nodes based on node resources, affinity, taints, etc.
|
|
87
|
+
|
|
88
|
+
A job can pass enqueue (PodGroup moves to `Inqueue`) but fail allocation (pods stay `Pending`) if node-level constraints block placement. This two-phase model explains the common scenario: "queue has capacity but pods won't schedule."
|
|
89
|
+
|
|
90
|
+
Actions in order:
|
|
91
|
+
|
|
92
|
+
| Action | Required | Purpose |
|
|
93
|
+
|--------|----------|---------|
|
|
94
|
+
| `enqueue` | Yes | Admit pod groups to queue |
|
|
95
|
+
| `allocate` | Yes | Allocate resources to pods |
|
|
96
|
+
| `backfill` | No | Fill idle resources with best-effort pods |
|
|
97
|
+
| `preempt` | No | Evict low-priority pods for high-priority |
|
|
98
|
+
| `reclaim` | No | Reclaim resources from over-allocated queues |
|
|
99
|
+
| `elect` | No | Select target workload (removed in v1.6+) |
|
|
100
|
+
|
|
101
|
+
### Tiers
|
|
102
|
+
|
|
103
|
+
Tiers divide plugins into priority levels:
|
|
104
|
+
- **Tier 1:** First to evaluate, results cannot be overridden
|
|
105
|
+
- **Tier 2:** Second to evaluate, lower priority
|
|
106
|
+
|
|
107
|
+
Common tier organization:
|
|
108
|
+
- **Tier 1:** Critical plugins (priority, gang, conformance)
|
|
109
|
+
- **Tier 2:** Resource and optimization plugins
|
|
110
|
+
|
|
111
|
+
### Plugins
|
|
112
|
+
|
|
113
|
+
#### Critical Plugins
|
|
114
|
+
|
|
115
|
+
| Plugin | Function | Critical For |
|
|
116
|
+
|--------|----------|--------------|
|
|
117
|
+
| `gang` | Gang scheduling | Batch jobs, ML training |
|
|
118
|
+
| `priority` | Priority sorting | Workload prioritization |
|
|
119
|
+
| `conformance` | Protect critical pods | System stability |
|
|
120
|
+
|
|
121
|
+
#### Resource Plugins
|
|
122
|
+
|
|
123
|
+
| Plugin | Function | Use Case |
|
|
124
|
+
|--------|----------|----------|
|
|
125
|
+
| `proportion` | Fair share allocation | Multi-tenant clusters |
|
|
126
|
+
| `drf` | Dominant Resource Fairness | Fair GPU/CPU sharing |
|
|
127
|
+
| `overcommit` | Allow overcommit | Resource efficiency |
|
|
128
|
+
|
|
129
|
+
#### Node Plugins
|
|
130
|
+
|
|
131
|
+
| Plugin | Function | Use Case |
|
|
132
|
+
|--------|----------|----------|
|
|
133
|
+
| `predicates` | Node filtering | Resource/affinity matching |
|
|
134
|
+
| `nodeorder` | Node ranking | Node selection optimization |
|
|
135
|
+
| `binpack` | Dense packing | Reduce fragmentation |
|
|
136
|
+
| `numaaware` | NUMA topology | HPC workloads |
|
|
137
|
+
|
|
138
|
+
#### Queue Plugins
|
|
139
|
+
|
|
140
|
+
| Plugin | Function | Use Case |
|
|
141
|
+
|--------|----------|----------|
|
|
142
|
+
| `priority` | Queue ordering | Queue prioritization |
|
|
143
|
+
| `proportion` | Proportional share | Fair queue allocation |
|
|
144
|
+
|
|
145
|
+
## Diagnostic Use Cases
|
|
146
|
+
|
|
147
|
+
### Case 1: Check If Gang Scheduling is Enabled
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section plugins
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Look for `name: gang` in the plugin list. If missing, Gang scheduling will not work.
|
|
154
|
+
|
|
155
|
+
### Case 2: Verify Reclaim is Enabled
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section actions
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Look for `reclaim` in the actions list. If missing, queues cannot reclaim resources.
|
|
162
|
+
|
|
163
|
+
### Case 3: Check Proportion Plugin Configuration
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section plugins
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Look for `name: proportion`. If missing, queue fair-share allocation is disabled.
|
|
170
|
+
|
|
171
|
+
### Case 4: Compare with Default Configuration
|
|
172
|
+
|
|
173
|
+
Default configuration:
|
|
174
|
+
```yaml
|
|
175
|
+
actions: "enqueue, allocate, backfill"
|
|
176
|
+
tiers:
|
|
177
|
+
- plugins:
|
|
178
|
+
- name: priority
|
|
179
|
+
- name: gang
|
|
180
|
+
enablePreemptable: false
|
|
181
|
+
- name: conformance
|
|
182
|
+
- plugins:
|
|
183
|
+
- name: overcommit
|
|
184
|
+
- name: drf
|
|
185
|
+
enablePreemptable: false
|
|
186
|
+
- name: predicates
|
|
187
|
+
- name: proportion
|
|
188
|
+
- name: nodeorder
|
|
189
|
+
- name: binpack
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
If your configuration differs significantly, it may explain scheduling behaviors.
|
|
193
|
+
|
|
194
|
+
### Case 5: Check Plugin Arguments
|
|
195
|
+
|
|
196
|
+
Some plugins accept arguments:
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
- name: overcommit
|
|
200
|
+
arguments:
|
|
201
|
+
overcommit-factor: "1.2"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Use `--format yaml` or `--raw` to see full plugin configurations including arguments.
|
|
205
|
+
|
|
206
|
+
## Common Configuration Issues
|
|
207
|
+
|
|
208
|
+
### Issue 1: Missing Gang Plugin
|
|
209
|
+
|
|
210
|
+
**Symptom:** PodGroups stay Pending, minMember never satisfied
|
|
211
|
+
|
|
212
|
+
**Check:**
|
|
213
|
+
```bash
|
|
214
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section plugins | grep gang
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Solution:** Add `gang` plugin to configuration
|
|
218
|
+
|
|
219
|
+
### Issue 2: Missing Reclaim Action
|
|
220
|
+
|
|
221
|
+
**Symptom:** Queues cannot reclaim resources from over-allocated queues
|
|
222
|
+
|
|
223
|
+
**Check:**
|
|
224
|
+
```bash
|
|
225
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section actions | grep reclaim
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Solution:** Add `reclaim` to actions list
|
|
229
|
+
|
|
230
|
+
### Issue 3: Wrong Action Order
|
|
231
|
+
|
|
232
|
+
**Symptom:** Unexpected scheduling behavior
|
|
233
|
+
|
|
234
|
+
**Check:**
|
|
235
|
+
```bash
|
|
236
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section actions
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Common orders:**
|
|
240
|
+
- Default: `enqueue, allocate, backfill`
|
|
241
|
+
- With preemption: `enqueue, allocate, backfill, preempt`
|
|
242
|
+
- With reclaim: `enqueue, allocate, backfill, reclaim`
|
|
243
|
+
- Full: `enqueue, allocate, backfill, preempt, reclaim`
|
|
244
|
+
|
|
245
|
+
**Important:** `enqueue` must come before `allocate`. `allocate` must be present.
|
|
246
|
+
|
|
247
|
+
### Issue 4: Plugin Tier Misconfiguration
|
|
248
|
+
|
|
249
|
+
**Symptom:** Priority/preemption not working as expected
|
|
250
|
+
|
|
251
|
+
**Check:**
|
|
252
|
+
```bash
|
|
253
|
+
bash skills/core/volcano-scheduler-config/scripts/get-scheduler-config.sh --section tiers
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Guideline:**
|
|
257
|
+
- Tier 1: Plugins that should not be overridden (priority, gang)
|
|
258
|
+
- Tier 2: Resource optimization plugins (proportion, binpack)
|
|
259
|
+
|
|
260
|
+
## Configuration Options Reference
|
|
261
|
+
|
|
262
|
+
### Plugin Arguments
|
|
263
|
+
|
|
264
|
+
| Plugin | Argument | Default | Description |
|
|
265
|
+
|--------|----------|---------|-------------|
|
|
266
|
+
| `gang` | `enablePreemptable` | `true` | Allow Gang pods to be preempted |
|
|
267
|
+
| `overcommit` | `overcommit-factor` | `1.2` | Multiplier for allocatable resources |
|
|
268
|
+
| `drf` | `enablePreemptable` | `true` | Allow DRF pods to be preempted |
|
|
269
|
+
| `nodeorder` | various weights | `0` | Node scoring weights |
|
|
270
|
+
| `proportion` | (none) | - | No arguments |
|
|
271
|
+
| `predicates` | `GPUSharingEnable` | `false` | Enable GPU sharing |
|
|
272
|
+
|
|
273
|
+
### Action-Specific Notes
|
|
274
|
+
|
|
275
|
+
#### Enqueue
|
|
276
|
+
- Evaluates `jobEnqueueableFn` from plugins
|
|
277
|
+
- Default `overcommit-factor` of 1.2 means 20% overcommit
|
|
278
|
+
|
|
279
|
+
#### Allocate
|
|
280
|
+
- Main allocation logic
|
|
281
|
+
- Calls `allocate` action for each tier
|
|
282
|
+
|
|
283
|
+
#### Backfill
|
|
284
|
+
- Only schedules best-effort pods (no resource requests)
|
|
285
|
+
- Ignores queue deserved resources
|
|
286
|
+
|
|
287
|
+
#### Preempt
|
|
288
|
+
- Requires `priority` plugin for comparison
|
|
289
|
+
- Requires `preemptableFn` from plugins
|
|
290
|
+
|
|
291
|
+
#### Reclaim
|
|
292
|
+
- Requires `proportion` plugin
|
|
293
|
+
- Requires `reclaimableFn` from plugins
|
|
294
|
+
- Reclaims from over-allocated queues
|
|
295
|
+
|
|
296
|
+
## Environment Variables
|
|
297
|
+
|
|
298
|
+
| Variable | Default | Description |
|
|
299
|
+
|----------|---------|-------------|
|
|
300
|
+
| `VOLCANO_SCHEDULER_NS` | `volcano-system` | Scheduler namespace |
|
|
301
|
+
| `VOLCANO_SCHEDULER_CONFIG` | `volcano-scheduler-configmap` | ConfigMap name |
|
|
302
|
+
|
|
303
|
+
## Output Formats
|
|
304
|
+
|
|
305
|
+
### Summary Format (default)
|
|
306
|
+
|
|
307
|
+
Human-readable summary:
|
|
308
|
+
```
|
|
309
|
+
Scheduler Configuration
|
|
310
|
+
=======================
|
|
311
|
+
Actions: enqueue, allocate, backfill
|
|
312
|
+
|
|
313
|
+
Tier 1 Plugins:
|
|
314
|
+
- priority
|
|
315
|
+
- gang
|
|
316
|
+
- conformance
|
|
317
|
+
|
|
318
|
+
Tier 2 Plugins:
|
|
319
|
+
- overcommit
|
|
320
|
+
- drf
|
|
321
|
+
- predicates
|
|
322
|
+
- proportion
|
|
323
|
+
- nodeorder
|
|
324
|
+
- binpack
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### YAML Format
|
|
328
|
+
|
|
329
|
+
Parsed YAML structure:
|
|
330
|
+
```yaml
|
|
331
|
+
actions: "enqueue, allocate, backfill"
|
|
332
|
+
tiers:
|
|
333
|
+
- plugins:
|
|
334
|
+
- name: priority
|
|
335
|
+
- name: gang
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### JSON Format
|
|
339
|
+
|
|
340
|
+
Machine-parseable:
|
|
341
|
+
```json
|
|
342
|
+
{
|
|
343
|
+
"actions": "enqueue, allocate, backfill",
|
|
344
|
+
"tiers": [
|
|
345
|
+
{
|
|
346
|
+
"plugins": [
|
|
347
|
+
{"name": "priority"},
|
|
348
|
+
{"name": "gang"}
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Raw Format
|
|
356
|
+
|
|
357
|
+
ConfigMap raw output:
|
|
358
|
+
```
|
|
359
|
+
volcano-scheduler.conf:
|
|
360
|
+
---
|
|
361
|
+
actions: "enqueue, allocate, backfill"
|
|
362
|
+
tiers:
|
|
363
|
+
...
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## See Also
|
|
367
|
+
|
|
368
|
+
- `volcano-queue-diagnose` - Queue resource analysis
|
|
369
|
+
- `volcano-gang-scheduling` - Gang scheduling issues
|
|
370
|
+
- `volcano-diagnose-pod` - Pod scheduling diagnosis
|
|
371
|
+
- `volcano-scheduler-logs` - Scheduler decision logs
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# View Volcano scheduler configuration.
|
|
3
|
+
# This script performs read-only operations using kubectl.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
show_help() {
|
|
7
|
+
cat <<EOF
|
|
8
|
+
Usage: $0 [options]
|
|
9
|
+
|
|
10
|
+
View Volcano scheduler configuration.
|
|
11
|
+
Check scheduler ConfigMap, actions, plugins, and tier settings.
|
|
12
|
+
|
|
13
|
+
Options:
|
|
14
|
+
--section SECTION Show specific section: actions, plugins, tiers, all (default: all)
|
|
15
|
+
--format FORMAT Output format: yaml, json, summary (default: summary)
|
|
16
|
+
--raw Show raw ConfigMap data without parsing
|
|
17
|
+
-h, --help Show this help message
|
|
18
|
+
|
|
19
|
+
Environment:
|
|
20
|
+
VOLCANO_SCHEDULER_NS Scheduler namespace (default: volcano-system)
|
|
21
|
+
VOLCANO_SCHEDULER_CONFIG ConfigMap name (default: volcano-scheduler-configmap)
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
$0 # Summary of all config
|
|
25
|
+
$0 --section actions # Actions only
|
|
26
|
+
$0 --section plugins # Plugins only
|
|
27
|
+
$0 --format yaml # Full YAML output
|
|
28
|
+
$0 --raw # Raw ConfigMap data
|
|
29
|
+
EOF
|
|
30
|
+
exit 0
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Parse arguments
|
|
34
|
+
SECTION="all"
|
|
35
|
+
FORMAT="summary"
|
|
36
|
+
RAW=false
|
|
37
|
+
|
|
38
|
+
while [[ $# -gt 0 ]]; do
|
|
39
|
+
case $1 in
|
|
40
|
+
-h|--help) show_help ;;
|
|
41
|
+
--section) SECTION="$2"; shift 2 ;;
|
|
42
|
+
--format) FORMAT="$2"; shift 2 ;;
|
|
43
|
+
--raw) RAW=true; shift ;;
|
|
44
|
+
*) echo "Unknown option: $1. Use --help for usage." >&2; exit 1 ;;
|
|
45
|
+
esac
|
|
46
|
+
done
|
|
47
|
+
|
|
48
|
+
# Validate arguments
|
|
49
|
+
if [[ "$SECTION" != "all" && "$SECTION" != "actions" && "$SECTION" != "plugins" && "$SECTION" != "tiers" ]]; then
|
|
50
|
+
echo "Error: Invalid section '$SECTION'. Use: all, actions, plugins, or tiers" >&2
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
if [[ "$FORMAT" != "summary" && "$FORMAT" != "yaml" && "$FORMAT" != "json" ]]; then
|
|
55
|
+
echo "Error: Invalid format '$FORMAT'. Use: summary, yaml, or json" >&2
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Environment settings
|
|
60
|
+
SCHEDULER_NS="${VOLCANO_SCHEDULER_NS:-volcano-system}"
|
|
61
|
+
CONFIG_NAME="${VOLCANO_SCHEDULER_CONFIG:-volcano-scheduler-configmap}"
|
|
62
|
+
|
|
63
|
+
echo "=== Volcano Scheduler Configuration ==="
|
|
64
|
+
echo "Namespace: $SCHEDULER_NS"
|
|
65
|
+
echo "ConfigMap: $CONFIG_NAME"
|
|
66
|
+
echo "Section: $SECTION"
|
|
67
|
+
echo "Format: $FORMAT"
|
|
68
|
+
echo
|
|
69
|
+
|
|
70
|
+
# Check if ConfigMap exists
|
|
71
|
+
if ! kubectl get cm "$CONFIG_NAME" -n "$SCHEDULER_NS" &>/dev/null; then
|
|
72
|
+
echo "Error: ConfigMap '$CONFIG_NAME' not found in namespace '$SCHEDULER_NS'" >&2
|
|
73
|
+
echo "Available ConfigMaps in $SCHEDULER_NS:" >&2
|
|
74
|
+
kubectl get cm -n "$SCHEDULER_NS" 2>/dev/null | head -10 >&2 || echo " (failed to list ConfigMaps)" >&2
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Get raw configuration
|
|
79
|
+
CONFIG_DATA=$(kubectl get cm "$CONFIG_NAME" -n "$SCHEDULER_NS" -o jsonpath='{.data.volcano-scheduler\.conf}' 2>/dev/null || echo "")
|
|
80
|
+
|
|
81
|
+
if [[ -z "$CONFIG_DATA" ]]; then
|
|
82
|
+
echo "Error: Config key 'volcano-scheduler.conf' not found in ConfigMap" >&2
|
|
83
|
+
echo "Available keys:" >&2
|
|
84
|
+
kubectl get cm "$CONFIG_NAME" -n "$SCHEDULER_NS" -o jsonpath='{.data}' 2>/dev/null | jq 'keys' 2>/dev/null || echo " (could not list keys)" >&2
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# If raw mode, just output the raw data
|
|
89
|
+
if [[ "$RAW" == "true" ]]; then
|
|
90
|
+
echo "Raw ConfigMap Data:"
|
|
91
|
+
echo "===================="
|
|
92
|
+
echo "$CONFIG_DATA"
|
|
93
|
+
echo
|
|
94
|
+
echo "=== Query Complete ==="
|
|
95
|
+
exit 0
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# Parse configuration
|
|
99
|
+
# Extract actions line
|
|
100
|
+
ACTIONS_LINE=$(echo "$CONFIG_DATA" | grep "^actions:" | head -1 || echo "")
|
|
101
|
+
ACTIONS=$(echo "$ACTIONS_LINE" | sed 's/^actions:[[:space:]]*//' | sed 's/^"//;s/"$//')
|
|
102
|
+
|
|
103
|
+
# Extract tier and plugin information
|
|
104
|
+
# This is a simple parser - for complex YAML, we'd need yq
|
|
105
|
+
parse_plugins() {
|
|
106
|
+
local tier_num=$1
|
|
107
|
+
local in_tier=false
|
|
108
|
+
local tier_count=0
|
|
109
|
+
local plugins=""
|
|
110
|
+
|
|
111
|
+
while IFS= read -r line; do
|
|
112
|
+
if [[ "$line" =~ ^[[:space:]]*-[[:space:]]*plugins: ]]; then
|
|
113
|
+
if [[ "$in_tier" == "true" ]]; then
|
|
114
|
+
break
|
|
115
|
+
fi
|
|
116
|
+
tier_count=$((tier_count + 1))
|
|
117
|
+
if [[ $tier_count -eq $tier_num ]]; then
|
|
118
|
+
in_tier=true
|
|
119
|
+
fi
|
|
120
|
+
continue
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
if [[ "$in_tier" == "true" && "$line" =~ "name:" ]]; then
|
|
124
|
+
local plugin_name
|
|
125
|
+
plugin_name=$(echo "$line" | grep -o 'name:[[:space:]]*[^[:space:]]*' | sed 's/name:[[:space:]]*//' || echo "")
|
|
126
|
+
if [[ -n "$plugin_name" ]]; then
|
|
127
|
+
plugins="$plugins$plugin_name "
|
|
128
|
+
fi
|
|
129
|
+
fi
|
|
130
|
+
done <<< "$CONFIG_DATA"
|
|
131
|
+
|
|
132
|
+
echo "$plugins"
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
# Count number of tiers
|
|
136
|
+
TIER_COUNT=$(echo "$CONFIG_DATA" | grep -c "^[[:space:]]*- plugins:" || echo "0")
|
|
137
|
+
|
|
138
|
+
# Output based on format and section
|
|
139
|
+
case "$FORMAT" in
|
|
140
|
+
summary)
|
|
141
|
+
echo "Scheduler Configuration Summary"
|
|
142
|
+
echo "================================"
|
|
143
|
+
echo
|
|
144
|
+
|
|
145
|
+
if [[ "$SECTION" == "all" || "$SECTION" == "actions" ]]; then
|
|
146
|
+
echo "Actions:"
|
|
147
|
+
echo "--------"
|
|
148
|
+
if [[ -n "$ACTIONS" ]]; then
|
|
149
|
+
echo " $ACTIONS"
|
|
150
|
+
echo
|
|
151
|
+
|
|
152
|
+
# Explain each action
|
|
153
|
+
IFS=',' read -ra action_list <<< "$ACTIONS"
|
|
154
|
+
for action in "${action_list[@]}"; do
|
|
155
|
+
action=$(echo "$action" | tr -d ' ') # Remove spaces
|
|
156
|
+
case "$action" in
|
|
157
|
+
enqueue)
|
|
158
|
+
echo " - enqueue: Admit pod groups to queue"
|
|
159
|
+
;;
|
|
160
|
+
allocate)
|
|
161
|
+
echo " - allocate: Allocate resources to pods"
|
|
162
|
+
;;
|
|
163
|
+
backfill)
|
|
164
|
+
echo " - backfill: Fill idle resources (best-effort pods)"
|
|
165
|
+
;;
|
|
166
|
+
preempt)
|
|
167
|
+
echo " - preempt: Evict low-priority pods"
|
|
168
|
+
;;
|
|
169
|
+
reclaim)
|
|
170
|
+
echo " - reclaim: Reclaim over-allocated queue resources"
|
|
171
|
+
;;
|
|
172
|
+
elect)
|
|
173
|
+
echo " - elect: Select target workload (removed in v1.6+)"
|
|
174
|
+
;;
|
|
175
|
+
esac
|
|
176
|
+
done
|
|
177
|
+
else
|
|
178
|
+
echo " (Actions not found in configuration)"
|
|
179
|
+
fi
|
|
180
|
+
echo
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
if [[ "$SECTION" == "all" || "$SECTION" == "plugins" || "$SECTION" == "tiers" ]]; then
|
|
184
|
+
echo "Tiers and Plugins:"
|
|
185
|
+
echo "------------------"
|
|
186
|
+
echo "Total Tiers: $TIER_COUNT"
|
|
187
|
+
echo
|
|
188
|
+
|
|
189
|
+
for ((i=1; i<=TIER_COUNT; i++)); do
|
|
190
|
+
tier_plugins=$(parse_plugins $i)
|
|
191
|
+
echo "Tier $i Plugins:"
|
|
192
|
+
if [[ -n "$tier_plugins" ]]; then
|
|
193
|
+
for plugin in $tier_plugins; do
|
|
194
|
+
echo " - $plugin"
|
|
195
|
+
done
|
|
196
|
+
else
|
|
197
|
+
echo " (No plugins found)"
|
|
198
|
+
fi
|
|
199
|
+
echo
|
|
200
|
+
done
|
|
201
|
+
fi
|
|
202
|
+
|
|
203
|
+
# Plugin explanations
|
|
204
|
+
if [[ "$SECTION" == "all" || "$SECTION" == "plugins" ]]; then
|
|
205
|
+
echo "Critical Plugins:"
|
|
206
|
+
echo "-----------------"
|
|
207
|
+
echo " - gang: Gang scheduling (required for batch workloads)"
|
|
208
|
+
echo " - priority: Priority handling"
|
|
209
|
+
echo " - conformance: Protect critical pods"
|
|
210
|
+
echo " - proportion: Fair queue resource allocation"
|
|
211
|
+
echo " - drf: Dominant Resource Fairness"
|
|
212
|
+
echo " - predicates: Node filtering"
|
|
213
|
+
echo
|
|
214
|
+
|
|
215
|
+
# Check for missing critical plugins
|
|
216
|
+
all_plugins=$(parse_plugins 1)$(parse_plugins 2)
|
|
217
|
+
echo "Configuration Check:"
|
|
218
|
+
echo "-------------------"
|
|
219
|
+
|
|
220
|
+
if [[ "$all_plugins" =~ "gang" ]]; then
|
|
221
|
+
echo " ✓ Gang plugin: enabled"
|
|
222
|
+
else
|
|
223
|
+
echo " ⚠ Gang plugin: NOT FOUND (Gang scheduling will not work)"
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
if [[ "$all_plugins" =~ "proportion" ]]; then
|
|
227
|
+
echo " ✓ Proportion plugin: enabled"
|
|
228
|
+
else
|
|
229
|
+
echo " ⚠ Proportion plugin: NOT FOUND (Queue fair-share disabled)"
|
|
230
|
+
fi
|
|
231
|
+
|
|
232
|
+
if [[ "$ACTIONS" =~ "reclaim" ]]; then
|
|
233
|
+
echo " ✓ Reclaim action: enabled"
|
|
234
|
+
else
|
|
235
|
+
echo " ℹ Reclaim action: not enabled (resource reclaim disabled)"
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
if [[ "$ACTIONS" =~ "preempt" ]]; then
|
|
239
|
+
echo " ✓ Preempt action: enabled"
|
|
240
|
+
else
|
|
241
|
+
echo " ℹ Preempt action: not enabled (priority preemption disabled)"
|
|
242
|
+
fi
|
|
243
|
+
fi
|
|
244
|
+
;;
|
|
245
|
+
|
|
246
|
+
yaml)
|
|
247
|
+
echo "Scheduler Configuration (YAML):"
|
|
248
|
+
echo "=============================="
|
|
249
|
+
echo
|
|
250
|
+
echo "$CONFIG_DATA"
|
|
251
|
+
;;
|
|
252
|
+
|
|
253
|
+
json)
|
|
254
|
+
# Simple JSON conversion (basic structure)
|
|
255
|
+
echo "{"
|
|
256
|
+
echo " \"namespace\": \"$SCHEDULER_NS\","
|
|
257
|
+
echo " \"configmap\": \"$CONFIG_NAME\","
|
|
258
|
+
|
|
259
|
+
if [[ -n "$ACTIONS" ]]; then
|
|
260
|
+
echo " \"actions\": ["
|
|
261
|
+
IFS=',' read -ra action_list <<< "$ACTIONS"
|
|
262
|
+
first=true
|
|
263
|
+
for action in "${action_list[@]}"; do
|
|
264
|
+
action=$(echo "$action" | tr -d ' ')
|
|
265
|
+
[[ "$first" == "false" ]] && echo ","
|
|
266
|
+
echo -n " \"$action\""
|
|
267
|
+
first=false
|
|
268
|
+
done
|
|
269
|
+
echo
|
|
270
|
+
echo " ],"
|
|
271
|
+
fi
|
|
272
|
+
|
|
273
|
+
echo " \"tiers\": ["
|
|
274
|
+
for ((i=1; i<=TIER_COUNT; i++)); do
|
|
275
|
+
[[ $i -gt 1 ]] && echo ","
|
|
276
|
+
tier_plugins=$(parse_plugins $i)
|
|
277
|
+
echo " {"
|
|
278
|
+
echo " \"tier\": $i,"
|
|
279
|
+
echo " \"plugins\": ["
|
|
280
|
+
pfirst=true
|
|
281
|
+
for plugin in $tier_plugins; do
|
|
282
|
+
[[ "$pfirst" == "false" ]] && echo ","
|
|
283
|
+
echo -n " \"$plugin\""
|
|
284
|
+
pfirst=false
|
|
285
|
+
done
|
|
286
|
+
echo
|
|
287
|
+
echo " ]"
|
|
288
|
+
echo -n " }"
|
|
289
|
+
done
|
|
290
|
+
echo
|
|
291
|
+
echo " ]"
|
|
292
|
+
echo "}"
|
|
293
|
+
;;
|
|
294
|
+
esac
|
|
295
|
+
|
|
296
|
+
echo
|
|
297
|
+
echo "=== Query Complete ==="
|