Project

General

Profile

Actions

Bug #30948

closed

Auto provisioning does not work across organizations

Added by Lukas Zapletal over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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

Actions #1

Updated by The Foreman Bot over 3 years ago

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

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases Discovery Plugin 16.0 added
Actions #3

Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Lukas Zapletal over 3 years ago

  • Bugzilla link set to 1908015
Actions

Also available in: Atom PDF