Bug 1643818 - Cannot update GPG Key on created product
Summary: Cannot update GPG Key on created product
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: GPG Keys
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Released
Assignee: Samir Jha
QA Contact: Sanket Jagtap
URL:
Whiteboard:
: 1654926 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-29 05:07 UTC by Sanket Jagtap
Modified: 2019-10-07 17:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:38:26 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:38:33 UTC
Foreman Issue Tracker 25412 None None None 2018-11-07 19:54:08 UTC

Description Sanket Jagtap 2018-10-29 05:07:30 UTC
Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
b'LANG=en_US.UTF-8  hammer -v -u admin -p changeme  product info --id="205" --organization-id="216"'
2018-10-28 14:54:55 - robottelo.ssh - INFO - <<< stdout
ID:           205
Name:         KeHdLNfEVNCRbOCRLFnS
Label:        RQotMzSOTcSJwEAkItvr
Description:  TmeaMZmiJOaJlWeJNquW
Sync State:   
Sync Plan ID: 
GPG:          
    GPG Key ID: 
    GPG Key:
Organization: XqsWli
Content:


2018-10-28 14:54:56 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv repository create --content-type="yum" --name="gIVKTAQyVcwXmGr" --product-id="205" --publish-via-http="true" --url="http://inecas.fedorapeople.org/fakerepos/zoo3/"'
2018-10-28 14:55:02 - robottelo.ssh - INFO - <<< stdout
Message,Id,Name
Repository created.,124,gIVKTAQyVcwXmGr


2018-10-28 14:55:02 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8  hammer -v -u admin -p changeme  repository info --id="124"'
2018-10-28 14:55:05 - robottelo.ssh - INFO - <<< stdout
ID:                 124
Name:               gIVKTAQyVcwXmGr
Label:              gIVKTAQyVcwXmGr
Organization:       XqsWli
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     yes
URL:                http://inecas.fedorapeople.org/fakerepos/zoo3/
Publish Via HTTP:   yes
Relative Path:      XqsWli/Library/custom/RQotMzSOTcSJwEAkItvr/gIVKTAQyVcwXmGr
Download Policy:    on_demand
Product:            
    ID:   205
    Name: KeHdLNfEVNCRbOCRLFnS
GPG Key:            

Sync:               
    Status: Not Synced
Created:            2018/10/28 18:54:59
Updated:            2018/10/28 18:55:01
Content Counts:     
    Packages:       0
    Source RPMS:    0
    Package Groups: 0
    Errata:         0
    Module Streams: 0


2018-10-28 14:55:06 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv gpg create --key="/tmp/caIrW4dap2" --name="rdWtNixDKl" --organization-id="216"'
2018-10-28 14:55:09 - robottelo.ssh - INFO - <<< stdout
Message,Id,Name
GPG Key created.,12,rdWtNixDKl

2018-10-28 14:55:10 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=json gpg info --id="12" --organization-id="216"'
2018-10-28 14:55:13 - robottelo.ssh - INFO - <<< stdout
{
  "ID": 12,
  "Name": "rdWtNixDKl",
  "Organization": "XqsWli",
  "Repositories": {
  },
  "Content": "cGfk345tAgFT33S8fdjEHHN8f5Ct"
}

2018-10-28 14:55:13 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv product update --gpg-key="rdWtNixDKl" --id="205" --organization-id="216"'
2018-10-28 14:55:16 - robottelo.ssh - INFO - <<< stderr
Could not update the product:
  Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject.

Actual results:
Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject.

Expected results:
GPG key should be associated

Additional info:

Comment 4 Samir Jha 2018-11-07 19:54:07 UTC
Created redmine issue http://projects.theforeman.org/issues/25412 from this bug

Comment 6 Brad Buckingham 2018-12-04 16:01:07 UTC
*** Bug 1654926 has been marked as a duplicate of this bug. ***

Comment 7 Brad Buckingham 2018-12-04 16:03:18 UTC
Moving to POST, since upstream PR is merged.

Comment 8 Sanket Jagtap 2018-12-19 06:03:18 UTC
Build: Satellite 6.5 Snap 8


hammer> product info --id 38 --organization-id 1
ID:           38
Name:         rhel_custom
Label:        rhel_custom
Description:  
Sync State:   
Sync Plan ID: 
GPG:          
    GPG Key ID: 
    GPG Key:
Organization: Default Organization
Content:      
 1) Repo Name:    fake_repo
    URL:          /custom/rhel_custom/fake_repo
    Content Type: yum

hammer> gpg list --organization-id 1
---|---------
ID | NAME    
---|---------
1  | fake_key
---|---------
hammer> product update --gpg-key=fake_key --id 38 --organization-id 1
Product updated.
hammer> product info --id 38 --organization-id 1
ID:           38
Name:         rhel_custom
Label:        rhel_custom
Description:  
Sync State:   
Sync Plan ID: 
GPG:          
    GPG Key ID: 1
    GPG Key:    fake_key
Organization: Default Organization
Content:      
 1) Repo Name:    fake_repo
    URL:          /custom/rhel_custom/fake_repo
    Content Type: yum

hammer> gpg info --id 1
ID:           1
Name:         fake_key
Organization: Default Organization
Repositories: 
 1) ID:           10
    Name:         fake_repo
    Content Type: yum
    Product:      rhel_custom
Content:      
  -----BEGIN CERTIFICATE-----
  MIIDsjCCApqgAwIBAgIBBjANBgkqhkiG9w0BAQsFADBOMRAwDgYDVQQKDAdSZWQg
  SGF0MQ0wCwYDVQQLDARwcm9kMSswKQYDVQQDDCJJbnRlcm1lZGlhdGUgQ2VydGlm
  aWNhdGUgQXV0aG9yaXR5MB4XDTE1MTAxNDE3NDc1NloXDTM1MTAwOTE3NDc1Nlow
  <Snip>

Comment 11 errata-xmlrpc 2019-05-14 12:38:26 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/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.