Foreman default host group plugin not workin

Problem:
Foreman 2.2 upgrade from foreman 2.1 breaking default host group plugin behaviour
Expected outcome:
new host puppet run should land host on respective hostgroup asper deafult_hostgroup.yaml regex
Foreman and Proxy versions:
2.2
Foreman and Proxy plugin versions:
tfm-rubygem-foreman_default_hostgroup-5.0.0-4.fm2_1.el7.noarc
Distribution and version:

Other relevant data:

we are using below plugin.

Anybody have idea how this plugin works.

I think this is related to the change introduced by Refactor #30127: Extract import_facts entry point from host class and create HostFactImporter - Foreman. The main method this plugins extends has been moved to another class. I’d say this plugin should become a generic core functionality, it’s not specific to puppet. User could set the host group based on any kind of facts (cfgmgmt, discovered, subscription manager etc).

Any thoughts @ezr-ondrej on how to make it work for 2.2? Or should we move the code to the core?

Looks like there is already a PR fixing this issue:
https://github.com/theforeman/foreman_default_hostgroup/pull/46
but the plugin seems to be unmaintained at the moment.

1 Like

Thanks Marek and Tbrisker. I have applied new PR plugine changes manully on the existing plugin and getting syntax issue. Its need to be tested i guess.