Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1716294

Summary: Could not create host via hammer : Unable to delete PuppetCA certificate
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: HostsAssignee: Ewoud Kohl van Wijngaarden <ekohlvan>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: egolov, inecas, jyejare, kgaikwad, pcreech, sghai, sjagtap
Target Milestone: 6.6.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-proxy-1.22.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 13:30:45 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:

Description Nikhil Kathole 2019-06-03 07:26:25 UTC
Description of problem:

Could not create host via hammer.

[ERROR 2019-06-03T03:19:15 API] 422 Unprocessable Entity
[DEBUG 2019-06-03T03:19:15 API] {
    "errors" => {
                   "conflict" => [],
        "interfaces.conflict" => [],
                       "base" => [
            [0] "Cleanup PuppetCA certificates for test.example.com task failed with the following error: ERF12-7740 [ProxyAPI::ProxyException]: Unable to delete PuppetCA certificate for test.example.com ([RestClient::NotAcceptable]: 406 Not Acceptable) for Capsule https://qe-sat6-feature-example.com:9090/puppet/ca"
        ]
    }
}
[DEBUG 2019-06-03T03:19:15 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_unprocessable_entity
[ERROR 2019-06-03T03:19:15 Exception] <NilClass> nil
Could not create the host


Version-Release number of selected component (if applicable):
Satellite 6.6 snap 4


How reproducible: always


Steps to Reproduce:
1. # hammer hostgroup info --organization-id=1 --location-id=2 --name="RHEL 7 Server 64-bit HG"Id:                    2
Name:                  RHEL 7 Server 64-bit HG
Title:                 RHEL 7 Server 64-bit HG
Puppet Environment:    production
Puppet CA Proxy:       qe-sat6-feature-example.com
Puppet Master Proxy:   qe-sat6-feature-example.com
Network:               
    Subnet ipv4: katello_latest
    Domain:      example.com
Operating system:      
    Architecture:     x86_64
    Operating System: RedHat 7.6
    Partition Table:  Kickstart default
    PXE Loader:       PXELinux BIOS
Puppetclasses:         
    access_insights_client
    foreman_scap_client
Parameters:            
    kt_activation_keys => ak-rhel-7
Locations:             
    Default Location
Organizations:         
    Default Organization
OpenSCAP Proxy:        
Content View:          
    ID:   2
    Name: RHEL 7 CV
Lifecycle Environment: 
    ID:   2
    Name: DEV
Content Source:        
    ID:   1
    Name: qe-sat6-feature-example.com
Kickstart Repository:  
    ID:   19
    Name: 19


2. hammer --debug host create --name=test --root-password='changeme' --organization-id=1 --location-id=2 --hostgroup="RHEL 7 Server 64-bit HG" --compute-resource='libvirt' --compute-attributes="cpus=1, memory=1073741824, start=1" --interface="primary=true, compute_type=bridge, compute_bridge=katello_latest, compute_model=virtio" --volume="capacity=10G,format_type=qcow2"

Actual results:

Hammer throws error as "Could not create the host" but when you see in UI, it is successfully created.


Expected results:

Hammer should not throw error.


Additional info: Regression.

Comment 8 Jitendra Yejare 2019-06-14 06:56:12 UTC
The issue is observed while provisioning:
        - from UI also
        - on VMWare and GCE

Comment 9 Marek Hulan 2019-06-24 12:30:01 UTC
Linking a known upstream issue, should be fixed by now (since snap 6)

Comment 10 Nikhil Kathole 2019-06-24 12:40:56 UTC
FailedQA

Version tested:
Satellite 6.6 snap 7

# rpm -qa | grep satellite
satellite-maintain-0.0.1-1.el7sat.noarch
satellite-installer-6.6.0.11-1.beta.el7sat.noarch
satellite-cli-6.6.0-5.beta.el7sat.noarch
satellite-common-6.6.0-5.beta.el7sat.noarch
satellite-6.6.0-5.beta.el7sat.noarch
tfm-rubygem-foreman_theme_satellite-4.0.1.1-1.el7sat.noarch

PR linked is not part of satellite snap. I guess we are missing cherry-pick.

Comment 11 Bryan Kearney 2019-06-24 14:05:12 UTC
Upstream bug assigned to ekohlvan

Comment 13 Ewoud Kohl van Wijngaarden 2019-06-26 11:29:02 UTC
Not sure why the automation didn't pick this up and moved it to POST, but upstream it's been fixed in 1.22.0-RC2.

Comment 14 Nikhil Kathole 2019-07-03 10:58:43 UTC
VERIFIED

version tested:
Satellite 6.6.0 snap 9

Successfully created host with hammer.

Comment 17 errata-xmlrpc 2019-10-22 13:30:45 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, 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/RHBA-2019:3175