ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.91k stars 3.4k forks source link

Do not allow selecting control-only InstanceGroup on Job Template (k8s deployments) #12583

Open rooftopcellist opened 2 years ago

rooftopcellist commented 2 years ago

Please confirm the following

Bug Summary

It is a little confusing for users in the k8s/openshift domain because for operator deployments of AWX, they can select an Instance Group containing control_plane nodes to run a JT against. But if you do that, the resulting job just sits in the pending state.

AWX version

devel

Select the relevant components

Installation method

openshift

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

Chrome

Steps to reproduce

  1. Edit the Demo Job Template to run on the controlplane InstanceGroup.
  2. Run the Demo Job Template
  3. Observe the job being stuck in the pending state perpetually

Expected results

Not to be able to add InstanceGroups in the first place on k8s deployments.

Actual results

The user should not be able to select an Instance Group that contains only control_plane type nodes in Operator deployments. The concept of a hybrid node doesn't exist in the k8s deployment.

Once we add the ability to run jobs on Remote execution VM's from a cluster deployment, we could allow running against InstanceGroups (selected on the Job Template), but for right now, I think we should add logic that doesn't allow the user to select the controlplane IG, or any IG for that matter if the deployment is on k8s/openshift.

Additional information

We can leverage the settings.IS_K8S setting to accomplish this - https://github.com/ansible/awx/blob/30c060cb2738d6623497681b267a1e10e9e7c18e/awx/settings/defaults.py#L67

hesmithrh commented 2 years ago

fyi @shanemcd @ffirg wanted to make sure you both saw this issue in case we need to address in an upcoming sprint/release. thanks!

per christian: is pretty low in priority, functionality isn't broken, but it may create confusion for the more-curious-than-average user who stumbles upon this issue definitely a nice to have if we have bandwidth for it though