Bug #17056

[Hammer-CLI] Exception is raised for discovery facts command

Added by Swapnil Abnave 12 months ago. Updated 11 months ago.

Assigned To:Swapnil Abnave
Target version:Foreman - Team Anurag backlog
Difficulty:medium Bugzilla link:1386831
Found in release: Pull request:
Story points-
Velocity based estimate-


Description of problem:
When I try to get all associated facts for specific discovered hosts, error is raised:

hammer -u admin -p changeme discovery facts --id=2
FACT                   | VALUE                                                                           
link_lo                | true                                                                            
link_eth0              | true
lib                    | /usr/share/fdi/facts:/opt/extension/facts                                       
Error: undefined method `meta' for #<Array:0x0000000391d270>

Version-Release number of selected component (if applicable):
Satellite ​6.2.3-1.1

How reproducible:

Steps to Reproduce:
1. Discover PXE or PXEless host
2. Try to get facts for it

Actual results:
Error is raised

Expected results:
Facts are returned successfully


#1 Updated by Lukas Zapletal 12 months ago

Hello, I just tried it on 1.13 stable and it works fine:

[root@fseven ~]# hammer -u admin -p changeme discovery facts --id=7
FACT                    | VALUE            
ipmi_1_gateway          |         
ipmi_gateway            |         
ipaddress_fake2         |   
ipaddress               |   
ipaddress_fake3         |   
ipmi_1_ipaddress        |    
ipmi_ipaddress          |    
ipaddress_fake1         |     
blockdevice.sdb_size    | 123456700        
blockdevice.sda_size    | 1234567890       
ipmi_subnet_mask        |        
ipmi_1_subnet_mask      |        
physicalprocessorcount  | 3                
ipmi_1_macaddress       | 52:54:00:16:17:41
ipmi_macaddress         | 52:54:00:16:17:41
macaddress_fake2        | 52:54:00:23:bf:3d
discovery_bootif        | 52:54:00:23:bf:3d
macaddress_fake3        | 52:54:00:77:53:e5
macaddress              | 52:54:00:77:53:e5
macaddress_fake1        | 52:54:00:84:1a:0f
memorysize_mb           | 900              
ipmi_ipaddress_source   | DHCP Address     
ipmi_1_ipaddress_source | DHCP Address     
interfaces              | fake1,fake2,fake3
ipmi_enabled            | true             
[root@fseven ~]# rpm -qa | grep disco

What version are you using?

#2 Updated by Swapnil Abnave 12 months ago

  • Project changed from Hammer CLI to Foreman
  • Category deleted (Hammer core)
  • Target version set to Team Anurag backlog

#3 Updated by Dominic Cleal 12 months ago

  • Status changed from New to Need more information

Why is this in the Foreman project? Is there any information you can add to the above?

#4 Updated by Swapnil Abnave 11 months ago

  • Project changed from Foreman to Hammer CLI

As said by Lukas. This has been fixed in 1.13 stable.

#5 Updated by Swapnil Abnave 11 months ago

  • Status changed from Need more information to Closed

Also available in: Atom PDF