Project

General

Profile

Actions

Bug #21275

closed

content-override done by hammer has no effect when using AK

Added by Brad Buckingham over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Activation Key
Target version:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1489760

Description of problem:
overriding to enabled/disabled in hammer doesn't work.
Though hammer content-overide command finishes successfully, it has no effect when using AK while overriding in UI has.

Version-Release number of selected component (if applicable):
katello-3.4.5-1.el7sat.noarch
foreman-1.15.3-2.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create the AK
  1. hammer activation-key create --name AK --lifecycle-environment-id 1 --content-view-id 1 --organization-id 1
2. Create product with a repository
  1. hammer product create --name Product --organization-id 1
  2. hammer repository create --name Repo --url "http://some.useful.repo/x86_64/os/" --content-type yum --product Product --organization-id 1
  3. hammer product synchronize --name Product --organization-id 1

3. Assign the product to the AK
sub_id=$(hammer --csv subscription list --organization-id 1 | awk -F, '$3=="Product"{print$1}')
hammer activation-key add-subscription --name AK --organization-id 1 --subscription-id $sub_id

4. Override custom content in AK to disabled (since the default is enabled)
  1. hammer activation-key content-override --name AK --organization-id 1 --content-label Default_Organization_Product_Repo --value 0
    Updated content override
  1. hammer activation-key product-content --name AK --organization-id 1
    --------------|------|------|-----|---------|-----------------------------------|----------|---------
    ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? | OVERRIDE
    --------------|------|------|-----|---------|-----------------------------------|----------|---------
    1504093523357 | Repo | | | | Default_Organization_Product_Repo | yes | ak:0
    --------------|------|------|-----|---------|-----------------------------------|----------|---------

UI check says "Enabled" (no effect?)

5. @client: Register using AK
  1. subscription-manager register --activationkey AK --org Default_Organization
    The system has been registered with ID: a2adfb49-722b-46d1-8a88-59822f4ac29e

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Not Subscribed

Unable to find available subscriptions for all your installed products.

6. Check repos available
  1. yum repolist
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    repo id repo name status
    !Default_Organization_Product_Repo Repo 304
    repolist: 304

BAD repo is not disabled (it has really no effect)

Actual results:
content-override done by hammer has no effect

Expected results:
content-override done by hammer works

Actions

Also available in: Atom PDF