Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1971693

Summary: Remove depreciation warning from syspurpose tool on RHEL 8.5
Product: Red Hat Enterprise Linux 8 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 8.5CC: redakkan
Target Milestone: betaKeywords: Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.19-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:37:58 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 John Sefler 2021-06-14 15:10:32 UTC
Description of problem:

Referencing Bug 1878133 - Display deprecation warning when syspurpose tool is used
The message that was implemented in bug 1878133 states...

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

The problem is that the 'subscription-manager syspurpose' command has not been implemented for RHEL-8 and may not be cherry pickable in the time frame for RHEL-8.5.

Suggestion is to change the message to...

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

Version-Release number of selected component (if applicable):
[root@kvm-05-guest16 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.28.17-1.el8
[root@kvm-05-guest16 ~]# rpm -q subscription-manager --changelog | grep 1878133
- 1878133: Deprecation message for syspurpose (#2421) (wpoteat)


How reproducible:


Steps to Reproduce:
[root@kvm-05-guest16 ~]# 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.
{}
[root@kvm-05-guest16 ~]# 
[root@kvm-05-guest16 ~]# subscription-manager syspurpose
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules: 

  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
  refresh        Pull the latest subscription data from the server
  register       Register this system to the Customer Portal or another subscription management service
  release        Configure which operating system release to use
  remove         Remove all or specific subscriptions from this system
  status         Show status information for this system's subscriptions and products
  unregister     Unregister this system from the Customer Portal or another subscription management service

Other Modules:   

  addons         Modify or view the addons attribute of the system purpose
  auto-attach    Set if subscriptions are attached on a schedule (default of daily)
  clean          Remove all local system and subscription data without affecting the server
  config         List, set, or remove the configuration parameters in use by this system
  environments   Display the environments available for a user
  facts          View or update the detected system information
  identity       Display the identity certificate for this system or request a new one
  import         Import certificates which were provided outside of the tool
  orgs           Display the organizations against which a user can register a system
  plugins        View and configure with 'subscription-manager plugins'
  redeem         Attempt to redeem a subscription for a preconfigured system
  repo-override  Manage custom content repository settings
  repos          List the repositories which this system is entitled to use
  role           Modify system purpose role
  service-level  Manage service levels for this system
  subscribe      Deprecated, see attach
  unsubscribe    Deprecated, see remove
  usage          Manage usage setting for this system
  version        Print version information

[root@kvm-05-guest16 ~]# 


Actual results:
  above - notice that the help syntax is displayed after running the 'subscription-manager syspurpose' command as suggested by the deprecation warning, but the command does not exist.


Expected results:


Additional info:

Comment 1 Rehana 2021-06-22 14:24:13 UTC
Based on the discussion in the triage meeting today , We would like the deprecation warning to go out once the new combined syspurpose module is available in RHEL 8. The combined module has been implemented in RHEL 9 Beta ( 1898563 ) and will be working on making the module available in RHEL 8 too. Since we have very less time remaining for RHEL 8.5 , we will be targeting to introduce the "syspurpose" module in the next release (RHEL 8.6). 


New Expectations on this bug will change to 

Remove the depreciation  warning "The 'syspurpose' command is deprecated and will be removed in a future major release. Please use the 'subscription-manager syspurpose' command going forward." from RHEL 8.5

Comment 2 Rehana 2021-07-01 14:31:55 UTC
Reproducing on :
===============
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.28.17-1.el8

# syspurpose set-role "RHEL"
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 "RHEL".

# man syspurpose | grep deprecated -A1 -B1

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


Pre-Verifying on :
=================
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.28.17-1.git.41.5224c70.el8

# syspurpose set-role "RHEL"; syspurpose show
role set to "RHEL".
{
  "role": "RHEL"
}

# man syspurpose | grep deprecated
# 

Notice the deprecation warning are now removed. Based on the observations, setting the bug to Verified:Tested

Comment 5 Rehana 2021-07-16 10:41:11 UTC
Verifying on :
============

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.19-1
subscription management rules: 5.41
subscription-manager: 1.28.19-1.el8

# rpm -qa subscription-manager --changelog | grep 1971693
- 1971693: syspurpose: remove deprecation notices (#2683) (ptoscano)

# syspurpose set-role "RHEL"; syspurpose show
role set to "RHEL".
{
  "role": "RHEL"
}

# man syspurpose | grep deprecated

# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: ***
Password: 
The system has been registered with ID: ********
The registered system name is: ******

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

^^ Deprecation warning has been removed from RHEL 8.5 .

Comment 7 errata-xmlrpc 2021-11-09 19:37:58 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-2021:4390