Problem:
discovery lists the host, but no rules found until 10-20 seconds later:
[root@foreman ~]# hammer discovery list
---|------|-----|------|--------|------------|------------|--------|------------
ID | NAME | MAC | CPUS | MEMORY | DISK COUNT | DISKS SIZE | SUBNET | LAST REPORT
---|------|-----|------|--------|------------|------------|--------|------------
[root@foreman ~]# hammer discovery list
----|-----------------|-------------------|------|--------|------------|------------|-------------------------|--------------------
ID | NAME | MAC | CPUS | MEMORY | DISK COUNT | DISKS SIZE | SUBNET | LAST REPORT
----|-----------------|-------------------|------|--------|------------|------------|-------------------------|--------------------
478 | macd0946619f150 | d0:94:66:19:f1:50 | 2 | 64315 | 1 | 114474 | provision (10.1.0.0/16) | 2018/04/08 18:02:30
----|-----------------|-------------------|------|--------|------------|------------|-------------------------|--------------------
[root@foreman ~]# hammer discovery auto-provision --id 478
Could not create the host:
No rule found for host macd0946619f150
[root@foreman ~]# hammer discovery auto-provision --id 478
Could not create the host:
No rule found for host macd0946619f150
[root@foreman ~]# hammer discovery auto-provision --id 478
Could not create the host:
No rule found for host macd0946619f150
[root@foreman ~]# hammer discovery auto-provision --id 478
Host created
[root@foreman ~]#
Expected outcome:
Once the host is seen by discovery, it should be eligible for auto-provision
Foreman and Proxy versions:
1.15.6
|katello|Content and Subscription Management plugin for Foreman|N/A|3.4.5|
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
Can you show us your rules - particularly search conditions.
Then I’d be interested in grabbing facts right after you discover a host and then before you provision it via rules. Nodes reupload facts after every 30 seconds or minute (can’t remember), maybe there is something which changes overtime that makes your rule to trigger. Ideally make a diff of these facts to see the difference.
Interesting, okay. How did you “modified the facts script”? Is that a runtime extension? That could be a bug.
Automatic discovery sends are triggered via systemd service while if you do explicit refresh it’s actually facter module from smart proxy, so these are two different code paths.