Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Foreman] (Satellite 6) source host_filters no longer working #7225

Closed
jadestorm opened this issue Jun 2, 2020 · 7 comments
Closed

[Foreman] (Satellite 6) source host_filters no longer working #7225

jadestorm opened this issue Jun 2, 2020 · 7 comments

Comments

@jadestorm
Copy link

ISSUE TYPE
  • Bug Report
SUMMARY

In upgrading from 11.0.0 to 11.2.0, I found that my inventory source host_filters were no longer being honored. Instead, they were pulling the entire list of hosts from Foreman as if no filter was applied. (for example host_filters: 'os = windows' should only pull windows hosts)

ENVIRONMENT
  • AWX version: 11.2.0
  • AWX install method: docker on linux
  • Ansible version: [whatever is in the task container]
  • Operating System: RHEL7
  • Web Browser: Chrome
STEPS TO REPRODUCE
  1. Set up an Inventory with a Red Hat Satellite 6 source as you normally would.
    2 In Source Variables put something like:
---
host_filters: 'os = windows'
  1. Run the source pull -- you'll see it ignores the filter completely and pulls all of your hosts from Foreman.
EXPECTED RESULTS

I expect it to honor the host_filters setting as it did in 11.0.0. =) I should have ended up with a handful of Windows hosts we have in Foreman.

ACTUAL RESULTS

I got all hosts from Foreman, Linux and Windows alike.

ADDITIONAL INFORMATION

I didn't see anything in the debug output that looked relevant.

@jadestorm
Copy link
Author

(BTW I looked at "blame" on the foreman.py inventory plugin and I see nothing that has changed recently that seems related)

@jadestorm
Copy link
Author

Also rolling back to 11.0.0 immediately fixed the issue.

@awxbot awxbot added the type:bug label Jun 2, 2020
@jainnikhil30
Copy link
Contributor

@jadestorm this is a known issue in the foreman plugin that awx uses. Already fixed in the plugin

theforeman/foreman-ansible-modules#823

Waiting for the release of respective collection, so that it can be used in awx.

@jadestorm
Copy link
Author

Fantastic! Thank you!

@jladdjr jladdjr changed the title Foreman (Satellite 6) source host_filters no longer working [Foreman] (Satellite 6) source host_filters no longer working Jun 5, 2020
@jladdjr
Copy link
Contributor

jladdjr commented Jun 5, 2020

  • Just merged a change that pins awx to the 0.8.1 version of the foreman collection (that was released this morning), and
  • .. confirmed that 0.8.1 includes the fix for host_filters

@jladdjr
Copy link
Contributor

jladdjr commented Jun 5, 2020

cc @kdelee

@kdelee
Copy link
Member

kdelee commented Jun 10, 2020

confirmed on awx 12.0.0 this is now working, closing (adding test coverage downstream)

@kdelee kdelee closed this as completed Jun 10, 2020
@kdelee kdelee self-assigned this Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants