RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1841156 - System Purpose allows to set any arbitrary text as a role or usage when using the syspurpose command line utility
Summary: System Purpose allows to set any arbitrary text as a role or usage when using...
Keywords:
Status: CLOSED DUPLICATE of bug 1634023
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.2
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-28 13:48 UTC by Sayan Das
Modified: 2023-12-15 18:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-19 10:29:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sayan Das 2020-05-28 13:48:16 UTC
Description of problem:

When using the syspurpose command-line utility, It allows setting any arbitrary values for the role\sla\usage.


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

How reproducible:
Always

Steps to Reproduce:

1. Create an RHEL 8 VM and register with Satellite 6.

2. Execute following commands.
# syspurpose set-sla blah
# syspurpose set-role anything
# syspurpose set-usage test

3. Check back the output of "syspurpose show".

4. Check the host from Satellite GUI --> Hosts --> Content Hosts.


Actual results:

1. We will be able to see that everything that give as an input will be accepted as a valid value.

# syspurpose set-sla blah
service_level_agreement set to "blah".

# syspurpose set-usage test
usage set to "test".

# syspurpose set-role anything
role set to "anything".

# syspurpose show
{
  "role": "anything",
  "service_level_agreement": "blah",
  "usage": "test"
}


2. From Satellite UI, if we navigate to the content host and see the "System Purpose" section, we will be able to see above values set and with the status as "Mismatched.



Expected results:

1. syspurose should not allow setting any arbitrary values from the command line.

2. syspurpose should have the hardcoded values for roles\usage\sla and those values should be available by the user to see by using --help.

3. If anyone is trying to set any wrong values, it should throw some kind of error message and then ask user to check --help to get the list of possible valid inputs which can be shared.


Additional info:

I am sure it's not RHEL or Satellite specific, but the syspurpose itself allows to set any arbitrary value which is not helpful.

Comment 2 Rehana 2020-05-29 14:36:53 UTC
Hi, 

Thanks for opening this request. We have existing RFEs Bug 1634023  and Bug 1632283 that will address these concerns.

We would like to track this bug to improve the help messages on the tooling and will remain in open state until fixed

thanks,
Rehana

Comment 3 Peter Vreman 2020-05-29 15:03:49 UTC
Rehana,

Good to see that there are already RFEs.
Sad to see that they are private only. It would have saved me a couple of hours in 're-inventing the wheel' if the RFEs were public

Peter

Comment 4 Rich Jerrido 2020-06-02 16:37:04 UTC
(In reply to Peter Vreman from comment #3)
> Rehana,
> 
> Good to see that there are already RFEs.
> Sad to see that they are private only. It would have saved me a couple of
> hours in 're-inventing the wheel' if the RFEs were public
> 
> Peter

Those BZs are public now. They were inadvertently made private

Comment 6 Peter Vreman 2020-10-08 16:08:24 UTC
Rich,

For me this BZ can be closed as dup of https://bugzilla.redhat.com/show_bug.cgi?id=1634023 that already includes updated help texts

Peter

Comment 7 Rehana 2021-02-19 10:29:16 UTC
As per comment 6 , closing this bug as duplicate of Bug 1634023

*** This bug has been marked as a duplicate of bug 1634023 ***


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