hashicorp / hashicorp/nomad

Child jobs are invisible in Nomad UI once parent jobs are stopped/GC'd

Open
#26,850 1 comment 0 reactions 0 assignees View on GitHub
hcc/jira theme/ui type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version

1.8.10 LTS

### Operating system and Environment details

N/A

### Issue

Running/pending child jobs are completely invisible in the Nomad UI if the parent job has been stopped and garbage collected.

As described in https://github.com/hashicorp/nomad/issues/24669, when a parent job is stopped any previously dispatched parameterized child jobs, or pending periodic jobs are not also stopped and are left behind. Once the parent job has been garbage collected, these no longer show up in the UI at all (likely because the main jobs list only shows parent jobs).

I've discovered this in two ways recently:
- `nomad setup vault -check` reports jobs needing migration to workload identities which are invisible in the UI
- Attempts to delete a namespace failed while no jobs were visible in the UI.

Not being able to see child jobs left behind when parent job is stopped makes it hard to cleanup left behind jobs, and leaves nasty surprises which disrupt future maintenance tasks.

### Reproduction steps

- Create a parameterized job
- Dispatch an instance of the parameterized job
- Stop and purge the parent job
- Parameterized job now cannot be accessed by clicking around the UI starting at the jobs list view

#### Expected Result

Nomad UI should allow to list/view all running jobs. Child jobs without a parent job might need a placeholder entry in the main jobs list.

#### Actual Result

No entry in the main jobs list for either the parent job (since GC'd), or the child job.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Reproduce the parameterized-job sequence, then trace the Nomad UI's main jobs list and child-job navigation to determine why orphaned running jobs are omitted. Done means running child jobs remain listable and viewable after their parent is stopped and garbage collected.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.