Bug 1033365 - [RFE] request to improve unfriendly message: Quantity '1' is not a multiple of instance multiplier '2'
Summary: [RFE] request to improve unfriendly message: Quantity '1' is not a multiple o...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-11-21 23:54 UTC by John Sefler
Modified: 2015-05-14 14:53 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-09-29 19:05:06 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1034329 0 unspecified CLOSED [RFE] bind requests that do not specify a quantity should automatically use max(suggested,instance_multiplier,1) for ins... 2021-02-22 00:41:40 UTC

Internal Links: 1034329

Description John Sefler 2013-11-21 23:54:50 UTC
Description of problem:
With the introduction of instance based subscriptions, this message is possible when attempting to attach an instance based subscription with a quantity that is not an even multiple of the instance_multiplier.  RFE bug 1008647 reduces the likelihood of encountering this message, but it does not eliminate it.  In the case that a user attampts to attach an instance based subscription that is not necessary for compliance, the suggested quantity will be zero and the bind request will default to 1 which will give rise to this message.

My complaint is that this message is unfriendly and introduces terminology (instance multiplier) that the user may not understand.  I'd like to improve the message...

Current message: Quantity '1' is not a multiple of instance multiplier '2'
Suggest message: Subscription '<name>' must be attached using a quantity evenly divisible by '<instance_multiplier>'.


How reproducible:


Steps to Reproduce:
[root@ibm-x3550m3-11 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription --force
Password: 
The system has been registered with ID: d247fa08-84ec-4d23-bfd3-e9a3b071b3a5 
[root@ibm-x3550m3-11 ~]# subscription-manager  list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server Beta for HPC Compute Node
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00072
Contract:          10299495
Pool ID:           8a99f9844228f57b01423348142a5cac
Available:         988
Suggested:         0
Service Level:     Self-Support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              11/06/2014
System Type:       Physical

[root@ibm-x3550m3-11 ~]# subscription-manager attach --pool 8a99f9844228f57b01423348142a5cac
Quantity '1' is not a multiple of instance multiplier '2'


Actual results:
Quantity '1' is not a multiple of instance multiplier '2'

Expected results:
Subscription 'Red Hat Enterprise Linux Server Beta for HPC Compute Node' must be attached using a quantity evenly divisible by '2'.

Comment 1 Carter Kozak 2013-11-25 14:44:27 UTC
Reworked the behavior while working on "smart activation keys"  There have probably been some other changes since the stage build as well.  For instance, default quantity on future subscriptions uses the date that it begins rather than today.

commit a121556d1039400c483d8414fcdb1f5374f31df6
Author: ckozak <ckozak>
Date:   Wed Oct 23 15:00:53 2013 -0400

    ActKeys can take null quantity, pick quantity upon activation

Comment 2 John Sefler 2013-11-25 16:46:21 UTC
Comment 1 addresses a different issue.
Flipping back to NEW as this bug is simply requesting a string change.

Comment 3 Matt Reid 2013-12-03 21:10:56 UTC
Your suggestion is an improvement John, but perhaps we could streamline it a bit more?

This seems a little cleaner to me:
"Attach failed, this subscription must be attached in increments of '<$INSTANCE_MULTIPLIER>'."

I'd rather not encourage people to attempt mental math if we can avoid it :) Saying "in increments of 2" tells me that I have to say 2, 4, 6, etc, but I'd be curious if it sounds reasonable to others. Also, its very specific that their last request failed and gives them context why, hopefully letting them update their quantity and fix their problem.

If they just specified the pool, do you think it's worthwhile to list the subscription name? Our names can be pretty huge, if it's something they probably just looked up, I'd lean towards not cluttering up the error message with the name, especially since given our naming, it's probably not even likely to indicate a type difference in the name. 

What do you think? Better? Worse?

Comment 4 John Sefler 2013-12-03 22:59:14 UTC
We do need to print out the subscription name.  Here's an example why...

[root@jsefler-7server ~]# subscription-manager attach --quantity 1 --pool 8a99f9844228f57b014233437f345c4d --pool 8a99f9844228f57b0142334889e65cc4 --pool 8a99f9844228f57b0142334d24145d06 --pool 8a99f9844228f57b0142334975185cde --pool 8a99f9844228f57b0142334d243f5d17 --pool 8a99f9844228f57b01423348142a5cac --pool 8a99f9844228f57b01423347ab895c98 --pool 8a99f9844228f57b01423347ab6b5c85
Successfully attached a subscription for: Red Hat Enterprise Linux Server Beta
Successfully attached a subscription for: Red Hat Enterprise Linux Desktop Beta
Successfully attached a subscription for: All Add-on Beta
Successfully attached a subscription for: Red Hat Enterprise Linux Workstation Beta
Successfully attached a subscription for: Red Hat Enterprise Linux 7 High Touch Beta
Quantity '1' is not a multiple of instance multiplier '2'
Quantity '1' is not a multiple of instance multiplier '2'
Quantity '1' is not a multiple of instance multiplier '2'
[root@jsefler-7server ~]# 

When attaching multiple subscriptions from the command line, we don't know which subscriptions failed to attach.  Notice that we give feedback for the successfully attached subscription name, but not the failed attachment.  How about this message:

Failed to attach subscription '<$NAME>'. It must be attached in increments of '<$INSTANCE_MULTIPLIER>'.

Comment 5 Matt Reid 2013-12-04 13:45:58 UTC
That's what I was afraid of... in that case, I agree we have to show names. I like that message.

Is that subscription name in the success message or product name?

Comment 6 Carter Kozak 2013-12-23 13:27:36 UTC
I'm afraid to say a subscription must be attached in increments of 2 because it sounds like I'd need to attach quantity 2 three times if I really need quantity 6.

Writing a patch that uses the original language John suggested.

Comment 7 John Sefler 2013-12-30 14:10:33 UTC
Candlepin commit e7e709f2f5ae255cf12379fa6d7e974d462329e4

    1033365: Added cleaner instance multiplier exception message

Comment 8 John Sefler 2014-02-28 21:31:57 UTC
Verifying Version...
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management     <======= candlepin-0.9.3
subscription management server: Unknown
subscription-manager: 1.10.14-3.el7
python-rhsm: 1.10.12-1.el7


[root@jsefler-7 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: aa406244-4a06-4cd3-9d1f-83a4af13eeb5 
[root@jsefler-7 ~]# subscription-manager  list --available | egrep "Subscription Name:|Pool ID:|Suggested:"
Subscription Name: Red Hat Enterprise Linux Server Beta
Pool ID:           8a99f9844228f57b014233437f345c4d
Suggested:         4
Subscription Name: Red Hat Enterprise Linux Desktop Beta
Pool ID:           8a99f9844228f57b0142334889e65cc4
Suggested:         8
Subscription Name: All Add-on Beta
Pool ID:           8a99f9844228f57b0142334d24145d06
Suggested:         4
Subscription Name: Red Hat Enterprise Linux Workstation Beta
Pool ID:           8a99f9844228f57b0142334975185cde
Suggested:         4
Subscription Name: Red Hat Enterprise Linux 7 High Touch Beta
Pool ID:           8a99f9844228f57b0142334d243f5d17
Suggested:         4
Subscription Name: Red Hat Enterprise Linux Server Beta for HPC Compute Node
Pool ID:           8a99f9844228f57b01423348142a5cac
Suggested:         2
[root@jsefler-7 ~]# subscription-manager subscribe --pool=8a99f9844228f57b014233437f345c4d --pool=8a99f9844228f57b0142334889e65cc4 --pool=8a99f9844228f57b0142334d24145d06 --pool=8a99f9844228f57b0142334975185cde --pool=8a99f9844228f57b0142334d243f5d17 --pool=8a99f9844228f57b01423348142a5cac --quantity=1
Subscription 'Red Hat Enterprise Linux Server Beta' must be attached using a quantity evenly divisible by 2
Subscription 'Red Hat Enterprise Linux Desktop Beta' must be attached using a quantity evenly divisible by 2
Subscription 'All Add-on Beta' must be attached using a quantity evenly divisible by 2
Subscription 'Red Hat Enterprise Linux Workstation Beta' must be attached using a quantity evenly divisible by 2
Subscription 'Red Hat Enterprise Linux 7 High Touch Beta' must be attached using a quantity evenly divisible by 2
Subscription 'Red Hat Enterprise Linux Server Beta for HPC Compute Node' must be attached using a quantity evenly divisible by 2
[root@jsefler-7 ~]# 

VERIFIED: The failure message to attach instance-based subscriptions with an odd quantity is now much friendly.

Comment 10 Bryan Kearney 2014-09-29 19:05:06 UTC
These bugs were fixed during 7.0 but not moved to CLOSED. They have been delivered


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