Bug #17056

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

Added by Swapnil Abnave 5 months ago. Updated 4 months ago.

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

Description

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:
Always

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

History

#1 Updated by Lukas Zapletal 5 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          | 10.1.1.1         
ipmi_gateway            | 10.1.1.1         
ipaddress_fake2         | 10.155.186.158   
ipaddress               | 10.170.237.141   
ipaddress_fake3         | 10.170.237.141   
ipmi_1_ipaddress        | 10.171.94.191    
ipmi_ipaddress          | 10.171.94.191    
ipaddress_fake1         | 10.174.17.11     
blockdevice.sdb_size    | 123456700        
blockdevice.sda_size    | 1234567890       
ipmi_subnet_mask        | 255.0.0.0        
ipmi_1_subnet_mask      | 255.0.0.0        
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
tfm-rubygem-hammer_cli_foreman_discovery-0.0.3-2.el7.noarch
tfm-rubygem-foreman_discovery-7.0.0-1.fm1_13.el7.noarch

What version are you using?

#2 Updated by Swapnil Abnave 5 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 5 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 4 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 4 months ago

  • Status changed from Need more information to Closed

Also available in: Atom PDF