Bug 1868901

Summary: Remote Execution Capsules are not listed when querying the subnet using API and hammer.
Product: Red Hat Satellite Reporter: Hao Chang Yu <hyu>
Component: Remote ExecutionAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: ahumbe, aruzicka, inecas, mmccune, nkim, zhunting
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman_remote_execution-4.1.0 hammer_cli_foreman_remote_execution-0.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1890909 (view as bug list) Environment:
Last Closed: 2021-04-21 13:17:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
hotfix-1868901-2.tar none

Description Hao Chang Yu 2020-08-14 07:40:37 UTC
Description of problem:
Remote Execution Capsules are not listed when querying the subnet using API and hammer.

Version-Release number of selected component (if applicable):

Steps to Reproduce:

Uses either the following hammer command or API

# hammer subnet info --id 1
# curl -v -k -u "myusername:mypass"  https://mysatellite.example.com/api/subnets/1 | python -m json.tool

Example API output:
{
    ...
    "dns_secondary": "",
    "domains": [
        {
            "id": 2,
            "name": "example.com"
        }
    ],
    "from": "",
    "gateway": "xxx.xxx.xxx.xxx",
    "httpboot": {
        "id": 1,
        "name": "mysatellite.example.com",
        "url": "https://mysatellite.example.com:9090"
    },
    "httpboot_id": 1,
    "httpboot_name": "mysatellite.example.com",
    "id": 1,
    "interfaces": [
        ...
    ],
    "ipam": "None",
    "locations": [
        {
            "description": "",
            "id": 2,
            "name": "somewhere",
            "title": "somewhere"
        },
    ],
    ...
    "organizations": [
        {
            "description": "",
            "id": 1,
            "name": "redhat",
            "title": "redhat"
        },
    ],
    "parameters": [],
    "priority": null,
    "template": {
        "id": 1,
        "name": "mysatellite.example.com",
        "url": "https://mysatellite.example.com:9090"
    },
    "template_id": 1,
    "template_name": "mysatellite.example.com",
    "tftp": {
        "id": 1,
        "name": "mysatellite.example.com",
        "url": "mysatellite.example.com:9090"
    },
    "tftp_id": 1,
    "tftp_name": "mysatellite.example.com",
    ...
}

Actual results:
Missing Remote execution Capsules

Expected results:
Remote execution Capsules should be listed

Comment 1 Adam Ruzicka 2020-08-17 11:33:11 UTC
Created redmine issue http://projects.theforeman.org/issues/30651 from this bug

Comment 2 Bryan Kearney 2020-08-17 16:01:45 UTC
Upstream bug assigned to aruzicka

Comment 3 Bryan Kearney 2020-08-17 16:01:47 UTC
Upstream bug assigned to aruzicka

Comment 4 Bryan Kearney 2020-08-27 12:01:46 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30651 has been resolved.

Comment 5 Mike McCune 2020-10-15 21:54:33 UTC
2 builds included in this hotfix:

tfm-rubygem-foreman_remote_execution-2.0.10.2-3.HFRHBZ1868901.el7sat.noarch.rpm
tfm-rubygem-hammer_cli_foreman_remote_execution-0.1.0-6.HFRHBZ1868901.el7sat.noarch.rpm

*** Satellite 6.7.4 Hotfix Available ***

1) Download hotfix-1868901.tar from this bugzilla to your Satellite

2) stop services:

satellite-maintain service stop

3) Install:

tar xvf hotfix-1868901-2.tar 
rpm -Uvh tfm-*.rpm

4) restart:

satellite-maintain service start

5) resume operations

Should then see proxies on the info command, eg:

# hammer subnet info --id 1
Id:                       1
Name:                     test-subnet
Description:              
  
Protocol:                 IPv4
Priority:                 
Network Addr:             10.8.0.1
Network Prefix:           24
Network Mask:             255.255.255.0
Gateway Addr:             10.8.0.1
Primary DNS:              
Secondary DNS:            
Smart Proxies:            
    DNS:  
    TFTP: 
    DHCP:
Remote execution proxies: 
    Id:   1
    Name: sat-example-1.redhat.com
IPAM:                     None
Start of IP Range:        
End of IP Range:          
VLAN ID:                  
MTU:                      1500
Boot Mode:                DHCP
Domains:                  
    lab.eng.rdu2.redhat.com
Locations:                
    Default Location
Organizations:            
    Default Organization
Parameters:

Comment 6 Mike McCune 2020-10-15 21:54:57 UTC
Created attachment 1721908 [details]
bad archive

Comment 7 Mike McCune 2020-10-16 14:43:28 UTC
Created attachment 1722112 [details]
hotfix-1868901-2.tar

Comment 10 Peter Ondrejka 2021-03-02 09:00:40 UTC
Verified on Satellite 6.9 snap 15, information on remote execution capsules is included both in cli and api subnet info output

Comment 13 errata-xmlrpc 2021-04-21 13:17:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313