Project

General

Profile

Bug #30948

Auto provisioning does not work across organizations

Added by Lukas Zapletal over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:

Description

Auto-provisioning does not work when Foreman core enforces taxonomy of imported host via "default_organization" (and location) global settings during import. Discovery sets taxonomy via its own mechanism, this is then overriden by the import code in Host::Base.set_taxonomies and if discovery rule and hostgroup is in a different taxonomy than the default one (Default Organization/Location), auto provisioning fails to find a rule, even when it works in as_anonymous_admin.

More info at: https://community.theforeman.org/t/discovery-auto-provisioning-not-working/20610

Reproducer:

Create an instance with Default Location and Default Lorganization, make sure these are set as default taxnonimies in Foreman core and then create the following:

    Host group 00712_Server
        Organization: MyOrg (only)
        Location: MyLoc (only)
    Subnet: 00712_OpsNet
        Organization: MyOrg (only)
        Location: MyLoc (only)
    Discovery rule 00712_W10
        Host group: 00712_Server
        Query: ip=10.59.24.175
        Hostname: ods00712w10.example.com
        Organization(s): Default Organization, MyOrg
        Location(s): Default Location, MyLoc
    “Discovered” plugin settings:
        Discovery location: MyLoc
        Discovery organization: MyOrg

Associated revisions

Revision 8c4c1100 (diff)
Added by Lukas Zapletal over 1 year ago

Fixes #30948 - autoprovisioning for non-default taxonomies

History

#1 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/509 added

#2 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases Discovery Plugin 16.0 added

#3 Updated by Anonymous over 1 year ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Lukas Zapletal over 1 year ago

  • Bugzilla link set to 1908015

Also available in: Atom PDF