64cbbd543e
- deployRemote branches on runtime: pve-ct/pve-vm on proxmox nodes invoke runtime.Registry.Prepare+Start (creates LXC/VM via SSH); process runtime on linux nodes uses systemd emitter; process on proxmox is rejected with clear error - deployRemote emits Traefik dynamic config when spec has ports (TraefikEmitter.Render + SSH-push to /etc/traefik/dynamic/) - model.Job: added Node field so job list --json reports deployed node - job run remote case: inserts model.Job + alloc_history after deployRemote succeeds (job list and job stop now work for remote) - --target name lookup: legacy dispatcher tries NodeID match - job list UX: short 8-char IDs, NODE column, conditional EXIT (- for non-terminal statuses) - emitter/traefik.go: directory provider (was single file), pve-ct/pve-vm registered in RegisterTraefik - runtime/pve.go: shellQuote for image, idempotent create check ---ci--- project: orca milestone: v0.12.18 phase: C status: complete requirements: covered: [166] ---/ci---
53 lines
1.5 KiB
Go
53 lines
1.5 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
type JobStatus string
|
|
|
|
const (
|
|
JobStatusPending JobStatus = "pending"
|
|
JobStatusRunning JobStatus = "running"
|
|
JobStatusComplete JobStatus = "complete"
|
|
JobStatusFailed JobStatus = "failed"
|
|
JobStatusStopped JobStatus = "stopped"
|
|
)
|
|
|
|
type Job struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Spec string `json:"spec"`
|
|
Status JobStatus `json:"status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
StartedAt *time.Time `json:"started_at,omitempty"`
|
|
EndedAt *time.Time `json:"ended_at,omitempty"`
|
|
ExitCode int `json:"exit_code"`
|
|
Node string `json:"node,omitempty"`
|
|
}
|
|
|
|
type TaskStatus string
|
|
|
|
const (
|
|
TaskStatusPending TaskStatus = "pending"
|
|
TaskStatusRunning TaskStatus = "running"
|
|
TaskStatusComplete TaskStatus = "complete"
|
|
TaskStatusFailed TaskStatus = "failed"
|
|
TaskStatusKilled TaskStatus = "killed"
|
|
)
|
|
|
|
type Task struct {
|
|
ID string `json:"id"`
|
|
JobID string `json:"job_id"`
|
|
Command string `json:"command"`
|
|
Args []string `json:"args"`
|
|
Env []string `json:"env,omitempty"`
|
|
PID int `json:"pid"`
|
|
ExitCode int `json:"exit_code"`
|
|
Node string `json:"node,omitempty"`
|
|
Status TaskStatus `json:"status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
StartedAt *time.Time `json:"started_at,omitempty"`
|
|
EndedAt *time.Time `json:"ended_at,omitempty"`
|
|
Stdout string `json:"stdout,omitempty"`
|
|
Stderr string `json:"stderr,omitempty"`
|
|
}
|