nomad icon indicating copy to clipboard operation
nomad copied to clipboard

[ui] Exec UI selects wrong allocation

Open Mongey opened this issue 2 years ago • 2 comments

Nomad version

1.1.2

Operating system and Environment details

Linux ip-<redacted> 4.9.0-16-amd64 #1 SMP Debian 4.9.272-1 (2021-06-21) x86_64 GNU/Linux

Issue

The exec UI is misleading about how it'll choose an allocation -- it only uses task names to filter allocations, and not group names.

Reproduction steps

Start a job with different group names, but task names the same. Navigate to the UI. Select a job under the console group.

(some bad redacting done) Screenshot 2021-07-28 at 17 25 52

Expected Result

The allocation you exec into belongs to the expected group. (in the example that would be the console group)

Actual Result

The allocation belongs to a random group.

Job file (if appropriate)

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Mongey avatar Jul 28 '21 16:07 Mongey

Hi @Mongey and thanks for raising this issue. I have assigned it to someone who has a much better understanding of the UI than myself, so they can look into this when they have availability.

jrasell avatar Aug 09 '21 09:08 jrasell

I think a fix for this issue should be prioritized. For what it's worth, I would be okay with this bug if it selected the wrong task but at least highlighted the task inside the correct task group in which it arbitrarily decided to use. But in #14362 I raised the fact that it highlights the group name for the task you selected on the left hand side, despite using the allocation ID of an identically named task in a different group. I think this presents serious risk for accidentally breaking something by connecting to the wrong task using the exec feature inside the UI, because unless you cross reference the task allocation ID manually before running a potentially destructive command, all indications appear that you are connected to a different task which gives the user a false sense of security.

jwoglom avatar Sep 01 '22 03:09 jwoglom