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 2000867 - [RHEL8.6] Display information about "syspurpose" tool deprecation when the tool is used
Summary: [RHEL8.6] Display information about "syspurpose" tool deprecation when the to...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1878133 (view as bug list)
Depends On: 2000883
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-03 08:39 UTC by Rehana
Modified: 2022-05-10 16:39 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.28.24-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 15:22:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2785 0 None Merged 2000867: syspurpose: show deprecation notices 2021-09-17 13:44:25 UTC
Red Hat Issue Tracker RHELPLAN-96078 0 None None None 2021-09-03 08:39:46 UTC
Red Hat Product Errata RHBA-2022:2047 0 None None None 2022-05-10 15:23:14 UTC

Description Rehana 2021-09-03 08:39:10 UTC
Description of problem:

We will be retiring syspurpose tool in RHEL 9 (Bug 1876565 ). This request is to update the existing syspurpose tool with deprecation warnings. 

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


How reproducible:
Always 

Steps to Reproduce:
1.Use syspurpose tool in RHEL 8.6 
2.
3.

Actual results:
Value gets set to system purpose attribute 

Expected results:
Value should still be set bug a additional information about deprecation should be provided and user should be directed to use the subscription-manager tooling to set the syspurpose values

Comment 1 John Sefler 2021-10-12 16:48:43 UTC
*** Bug 1878133 has been marked as a duplicate of this bug. ***

Comment 2 Zdenek Petracek 2021-11-03 15:22:42 UTC
Pre-verifying build python3-syspurpose-1.28.22-1.git.0.5118d85.el8.x86_64

[root@kvm-07-guest13 ~]# rpm -q python3-syspurpose --changelog | grep 2000867
- 2000867: syspurpose: show deprecation notices (ptoscano)

The 'syspurpose' command is deprecated and will be removed in a future major
release. Please use the 'subscription-manager syspurpose' command going
forward.

Pre-verification 1
The above message popped-up after command "syspurpose --help"

Pre-verification 2
[root@kvm-07-guest13 ~]# syspurpose set-role server
The 'syspurpose' command is deprecated and will be removed in a future major release. Please use the 'subscription-manager syspurpose' command going forward.
role set to "server".

Pre-verification 3
[root@kvm-07-guest13 ~]# syspurpose show
The 'syspurpose' command is deprecated and will be removed in a future major release. Please use the 'subscription-manager syspurpose' command going forward.
{
  "role": "server"
}

Pre-verification 4
// In pre-verification number 4 I tried the new command and it defaults to syspurpose show function 
[root@kvm-07-guest13 ~]# subscription-manager syspurpose
{
  "role": "server",
  "usage": "server"
}

Pre-verification 5
// The man page for syspurpose presents the following message:
DEPRECATION NOTICE
       This  command is deprecated and will be removed in a future major release.  Please use the subscription-manager syspurpose command going for‐
       ward.

Comment 7 Zdenek Petracek 2021-11-25 13:22:00 UTC
Version:
[root@kvm-01-guest08 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.el8

[root@kvm-01-guest08 ~]# rpm -q python3-syspurpose --changelog | grep 2000867
- 2000867: syspurpose: show deprecation notices (ptoscano)

Verification 1:
[root@kvm-01-guest08 ~]# syspurpose --help
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 Sets the value for the given property
    unset               Unsets (clears) the value for the given property
    add                 Adds the value(s) to the given property
    remove              Removes the value(s) from the given property
    set-role            Set the system role to the system syspurpose
    unset-role          Clear set role
    add-addons          Add addons to the system syspurpose
    remove-addons       Remove addons from the system syspurpose
    unset-addons        Clear set addons
    set-sla             Set the system sla
    unset-sla           Clear set sla
    set-usage           Set the system usage
    unset-usage         Clear set usage
    show                Show the current system syspurpose

optional arguments:
  -h, --help            show this help message and exit

The 'syspurpose' command is deprecated and will be removed in a future major
release. Please use the 'subscription-manager syspurpose' command going
forward.
--> PASSED

Verification 2:
[root@kvm-01-guest08 ~]# syspurpose set-role "Red Hat Enterprise Linux Server"
The 'syspurpose' command is deprecated and will be removed in a future major release. Please use the 'subscription-manager syspurpose' command going forward.
role set to "Red Hat Enterprise Linux Server".
--> PASSED

Verification 3:
[root@kvm-01-guest08 ~]# syspurpose show
The 'syspurpose' command is deprecated and will be removed in a future major release. Please use the 'subscription-manager syspurpose' command going forward.
{
  "addons": [
    "HA"
  ],
  "role": "Red Hat Enterprise Linux Server",
  "service_level_agreement": "Premium",
  "usage": "QA"
}
--> PASSED

Verification 4 - man page:
[root@kvm-01-guest08 ~]# man syspurpose

NAME
       syspurpose - Set the intended purpose for this system

SYNOPSIS
       syspurpose [COMMAND] [OPTION]...

DEPRECATION NOTICE
       This command is deprecated and will be removed in a future major release.  Please use the subscription-manager syspurpose command going forward.
--> PASSED

Comment 9 errata-xmlrpc 2022-05-10 15:22:57 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 (subscription-manager bug fix and enhancement update), 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-2022:2047


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