Bug 1459643 - Attaching a future pool that will start one year from today changes the supposedly inactive subscription to current subscription
Attaching a future pool that will start one year from today changes the suppo...
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
2.0
Unspecified Unspecified
high Severity high
: ---
: 2.0
Assigned To: William Poteat
Katello QA List
: Regression, Triaged
Depends On: 1440180
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-07 13:05 EDT by Michael Stead
Modified: 2017-06-16 11:37 EDT (History)
8 users (show)

See Also:
Fixed In Version: candlepin-2.0.37-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1440180
Environment:
Last Closed: 2017-06-16 11:37:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github candlepin/candlepin/pull/1596 None None None 2017-06-13 10:30 EDT

  None (edit)
Description Michael Stead 2017-06-07 13:05:36 EDT
+++ This bug was initially created as a clone of Bug #1440180 +++

Description of problem:
Create a future pool that will start one year from today's date , list --avail --ondate <todays date> doesnot display that future subscription , list --avail --ondate <One year from today> displays that subscription , when you attach the pool , subscription (that should still be a future entitlement) becomes a current subscription

Version-Release number of selected component (if applicable):
[root@dhcp70-154 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.1.0-1
subscription management rules: 5.23
subscription-manager: 1.19.4-1.el7
python-rhsm: 1.19.2-1.el7


How reproducible:


Steps to Reproduce:
[root@Shwetha-candlepin ~]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"product":{"id":"Test-product"},"quantity":3,"providedProducts":[{"id":"100000000000002"}],"endDate":"Sun, 7 Apr 2019 18:32:47 +0530","contractNumber":599211967,"accountNumber":11426197,"startDate":"Sat, 7 Apr 2018 18:32:47 +0530"}' --header 'accept: application/json' --header 'content-type: application/json' https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions
{"created":null,"updated":null,"id":"f55454142d434c4ca09ee7fb76a72dae","owner":{"id":"8ac6a3185b4872bd015b4873822d0004","key":"admin","displayName":"Admin Owner","href":"/owners/admin"},"product":{"created":null,"updated":null,"uuid":null,"id":"Test-product","name":null,"multiplier":null,"attributes":null,"dependentProductIds":null,"href":null,"productContent":null},"derivedProduct":null,"providedProducts":[{"created":null,"updated":null,"uuid":null,"id":"100000000000002","name":null,"multiplier":null,"attributes":null,"dependentProductIds":null,"href":null,"productContent":null}],"derivedProvidedProducts":[],"branding":[],"quantity":3,"startDate":"2018-04-07T13:02:47+0000","endDate":"2019-04-07T13:02:47+0000","contractNumber":"599211967","accountNumber":"11426197","modified":null,"orderNumber":null,"upstreamPoolId":null,"upstreamEntitlementId":null,"upstreamConsumerId":null,"cdn":null,"certificate":null,"stacked":false,"stackId":null}[root@Shwetha-candlepin ~]# 
[root@Shwetha-candlepin ~]# 
[root@Shwetha-candlepin ~]# 
[root@Shwetha-candlepin ~]# curl --stderr /dev/null --insecure --user admin:admin --request PUT https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions
[root@Shwetha-candlepin ~]# curl --stderr /dev/null --insecure --user admin:admin --request GET 'https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools?activeon=2018-04-07T18%3A32%3A47.437%2B05%3A30' | python -m simplejson/tool
/usr/bin/python: No module named simplejson/tool
[root@Shwetha-candlepin ~]# curl --stderr /dev/null --insecure --user admin:admin --request GET 'https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools?activeon=2018-04-07T18%3A32%3A47.437%2B05%3A30' | python -mjson.tool
[
    {
        "accountNumber": "11426197",
        "activeSubscription": true,
        "attributes": [],
        "branding": [],
        "calculatedAttributes": {
            "compliance_type": "Standard"
        },
        "consumed": 0,
        "contractNumber": "599211967",
        "created": "2017-04-07T13:02:47+0000",
        "derivedProductAttributes": [],
        "derivedProvidedProducts": [],
        "developmentPool": false,
        "endDate": "2019-04-07T13:02:47+0000",
        "exported": 0,
        "href": "/pools/8ac6a3185b4872bd015b48828fc60ab2",
        "id": "8ac6a3185b4872bd015b48828fc60ab2",
        "owner": {
            "displayName": "Admin Owner",
            "href": "/owners/admin",
            "id": "8ac6a3185b4872bd015b4873822d0004",
            "key": "admin"
        },
        "productAttributes": [
            {
                "name": "warning_period",
                "value": "30"
            },
            {
                "name": "variant",
                "value": "server"
            },
            {
                "name": "arch",
                "value": "ALL"
            },
            {
                "name": "type",
                "value": "SVC"
            },
            {
                "name": "version",
                "value": "1.0"
            }
        ],
        "productId": "BugzillaTest-product",
        "productName": "BugillaTestInactiveSubscription BITS",
        "providedProducts": [
            {
                "productId": "100000000000002",
                "productName": "Awesome OS for x86_64 Bits"
            }
        ],
        "quantity": 3,
        "stacked": false,
        "startDate": "2018-04-07T13:02:47+0000",
        "subscriptionId": "58a5adf8cb224fac8afcc30b16c37f6d",
        "subscriptionSubKey": "master",
        "type": "NORMAL",
        "updated": "2017-04-07T13:06:07+0000"
    },
    {
        "accountNumber": "11426197",
        "activeSubscription": true,
        "attributes": [],
        "branding": [],
        "calculatedAttributes": {
            "compliance_type": "Standard"
        },
        "consumed": 0,
        "contractNumber": "599211967",
        "created": "2017-04-07T13:05:50+0000",
        "derivedProductAttributes": [],
        "derivedProvidedProducts": [],
        "developmentPool": false,
        "endDate": "2019-04-07T13:02:47+0000",
        "exported": 0,
        "href": "/pools/8ac6a3185b4872bd015b488559c40aba",
        "id": "8ac6a3185b4872bd015b488559c40aba",
        "owner": {
            "displayName": "Admin Owner",
            "href": "/owners/admin",
            "id": "8ac6a3185b4872bd015b4873822d0004",
            "key": "admin"
        },
        "productAttributes": [
            {
                "name": "warning_period",
                "value": "30"
            },
            {
                "name": "variant",
                "value": "server"
            },
            {
                "name": "arch",
                "value": "ALL"
            },
            {
                "name": "type",
                "value": "SVC"
            },
            {
                "name": "version",
                "value": "1.0"
            }
        ],
        "productId": "Test-product",
        "productName": "TestInactiveSubscription BITS",
        "providedProducts": [
            {
                "productId": "100000000000002",
                "productName": "Awesome OS for x86_64 Bits"
            }
        ],
        "quantity": 3,
        "stacked": false,
        "startDate": "2018-04-07T13:02:47+0000",
        "subscriptionId": "f55454142d434c4ca09ee7fb76a72dae",
        "subscriptionSubKey": "master",
        "type": "NORMAL",
        "updated": "2017-04-07T13:05:50+0000"
    }
]



[root@Shwetha-candlepin ~]# curl --stderr /dev/null --insecure --user admin:admin --request GET 'https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools?activeon=2018-04-07T18%3A32%3A47.437%2B05%3A30' | python -mjson.tool
[
    {
        "accountNumber": "11426197",
        "activeSubscription": true,
        "attributes": [],
        "branding": [],
        "calculatedAttributes": {
            "compliance_type": "Standard"
        },
        "consumed": 0,
        "contractNumber": "599211967",
        "created": "2017-04-07T13:02:47+0000",
        "derivedProductAttributes": [],
        "derivedProvidedProducts": [],
        "developmentPool": false,
        "endDate": "2019-04-07T13:02:47+0000",
        "exported": 0,
        "href": "/pools/8ac6a3185b4872bd015b48828fc60ab2",
        "id": "8ac6a3185b4872bd015b48828fc60ab2",
        "owner": {
            "displayName": "Admin Owner",
            "href": "/owners/admin",
            "id": "8ac6a3185b4872bd015b4873822d0004",
            "key": "admin"
        },
        "productAttributes": [
            {
                "name": "warning_period",
                "value": "30"
            },
            {
                "name": "variant",
                "value": "server"
            },
            {
                "name": "arch",
                "value": "ALL"
            },
            {
                "name": "type",
                "value": "SVC"
            },
            {
                "name": "version",
                "value": "1.0"
            }
        ],
        "productId": "BugzillaTest-product",
        "productName": "BugillaTestInactiveSubscription BITS",
        "providedProducts": [
            {
                "productId": "100000000000002",
                "productName": "Awesome OS for x86_64 Bits"
            }
        ],
        "quantity": 3,
        "stacked": false,
        "startDate": "2018-04-07T13:02:47+0000",
        "subscriptionId": "58a5adf8cb224fac8afcc30b16c37f6d",
        "subscriptionSubKey": "master",
        "type": "NORMAL",
        "updated": "2017-04-07T13:06:07+0000"
    },
    {
        "accountNumber": "11426197",
        "activeSubscription": true,
        "attributes": [],
        "branding": [],
        "calculatedAttributes": {
            "compliance_type": "Standard"
        },
        "consumed": 0,
        "contractNumber": "599211967",
        "created": "2017-04-07T13:05:50+0000",
        "derivedProductAttributes": [],
        "derivedProvidedProducts": [],
        "developmentPool": false,
        "endDate": "2019-04-07T13:02:47+0000",
        "exported": 0,
        "href": "/pools/8ac6a3185b4872bd015b488559c40aba",
        "id": "8ac6a3185b4872bd015b488559c40aba",
        "owner": {
            "displayName": "Admin Owner",
            "href": "/owners/admin",
            "id": "8ac6a3185b4872bd015b4873822d0004",
            "key": "admin"
        },
        "productAttributes": [
            {
                "name": "warning_period",
                "value": "30"
            },
            {
                "name": "variant",
                "value": "server"
            },
            {
                "name": "arch",
                "value": "ALL"
            },
            {
                "name": "type",
                "value": "SVC"
            },
            {
                "name": "version",
                "value": "1.0"
            }
        ],
        "productId": "Test-product",
        "productName": "TestInactiveSubscription BITS",
        "providedProducts": [
            {
                "productId": "100000000000002",
                "productName": "Awesome OS for x86_64 Bits"
            }
        ],
        "quantity": 3,
        "stacked": false,
        "startDate": "2018-04-07T13:02:47+0000",
        "subscriptionId": "f55454142d434c4ca09ee7fb76a72dae",
        "subscriptionSubKey": "master",
        "type": "NORMAL",
        "updated": "2017-04-07T13:05:50+0000"
    }
]


[root@dhcp70-154 ~]# subscription-manager list --avail --ondate 2018-04-08
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   TestInactiveSubscription BITS
Provides:            Awesome OS for x86_64 Bits
SKU:                 Test-product
Contract:            599211967
Pool ID:             8ac6a3185b4872bd015b488559c40aba
Provides Management: No
Available:           3
Suggested:           1
Service Level:       
Service Type:        
Subscription Type:   Standard
Ends:                04/07/2019
System Type:         Physical

[root@dhcp70-154 ~]# subscription-manager attach --pool 8ac6a3185b4872bd015b488559c40aba
Successfully attached a subscription for: TestInactiveSubscription BITS
[root@dhcp70-154 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   TestInactiveSubscription BITS 
Provides:            Awesome OS for x86_64 Bits
SKU:                 Test-product
Contract:            599211967
Account:             11426197
Serial:              6431145778591668532
Pool ID:             8ac6a3185b4872bd015b488559c40aba
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current   >>>> subscription is current
Subscription Type:   Standard
Starts:              04/07/2017
Ends:                04/07/2019
System Type:         Physical

Actual results:
Subscription is current

Expected results:
subscription should be Inactive

Additional info:

--- Additional comment from Shwetha Kallesh on 2017-04-07 10:31:49 EDT ---

it was working fine with older candlepin deployment and is demonstrated below

[root@dhcp70-154 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.27-1
subscription management rules: 5.21
subscription-manager: 1.19.4-1.el7
python-rhsm: 1.19.2-1.el7

[root@Shwetha-candlepin server]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"multiplier":1,"name":"TestInactiveSubscription BITS","attributes":[{"name":"warning_period","value":"30"},{"name":"variant","value":"server"},{"name":"arch","value":"ALL"},{"name":"type","value":"SVC"},{"name":"version","value":"1.0"}],"id":"Test-product"}' --header 'accept: application/json' --header 'content-type: application/json' https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/products
{"created":"2017-04-07T14:23:54+0000","updated":"2017-04-07T14:23:54+0000","uuid":"8ac6a3185b48c98c015b48ccd3811146","id":"Test-product","name":"TestInactiveSubscription BITS","multiplier":1,"attributes":[{"created":"2017-04-07T14:23:54+0000","updated":"2017-04-07T14:23:54+0000","name":"warning_period","value":"30"},{"created":"2017-04-07T14:23:54+0000","updated":"2017-04-07T14:23:54+0000","name":"variant","value":"server"},{"created":"2017-04-07T14:23:54+0000","updated":"2017-04-07T14:23:54+0000","name":"arch","value":"ALL"},{"created":"2017-04-07T14:23:54+0000","updated":"2017-04-07T14:23:54+0000","name":"type","value":"SVC"},{"created":"2017-04-07T14:23:54+0000","updated":"2017-04-07T14:23:54+0000","name":"version","value":"1.0"}],"dependentProductIds":[],"href":"/products/8ac6a3185b48c98c015b48ccd3811146","productContent":[]}
[root@Shwetha-candlepin server]# 
[root@Shwetha-candlepin server]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"product":{"id":"Test-product"},"quantity":3,"providedProducts":[{"id":"100000000000002"}],"endDate":"Sun, 7 Apr 2019 18:32:47 +0530","contractNumber":599211967,"accountNumber":11426197,"startDate":"Sat, 7 Apr 2018 18:32:47 +0530"}' --header 'accept: application/json' --header 'content-type: application/json' https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions
{"created":null,"updated":null,"id":"7ad02232f04245bb91d68d476f4730c8","owner":{"id":"8ac6a3185b48c98c015b48c9ac140004","key":"admin","displayName":"Admin Owner","href":"/owners/admin"},"product":{"created":null,"updated":null,"uuid":null,"id":"Test-product","name":null,"multiplier":null,"attributes":null,"dependentProductIds":null,"href":null,"productContent":null},"derivedProduct":null,"providedProducts":[{"created":null,"updated":null,"uuid":null,"id":"100000000000002","name":null,"multiplier":null,"attributes":null,"dependentProductIds":null,"href":null,"productContent":null}],"derivedProvidedProducts":[],"branding":[],"quantity":3,"startDate":"2018-04-07T13:02:47+0000","endDate":"2019-04-07T13:02:47+0000","contractNumber":"599211967","accountNumber":"11426197","modified":null,"orderNumber":null,"upstreamPoolId":null,"upstreamEntitlementId":null,"upstreamConsumerId":null,"cdn":null,"certificate":null,"stacked":false,"stackId":null}[root@Shwetha-candlepin server]#  
[root@Shwetha-candlepin server]# curl --stderr /dev/null --insecure --user admin:admin --request GET 'https://Shwetha-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools?activeon=2018-04-07T18%3A32%3A47.437%2B05%3A30' | python -mjson.tool
[
    {
        "accountNumber": "11426197",
        "activeSubscription": true,
        "attributes": [],
        "branding": [],
        "calculatedAttributes": {
            "compliance_type": "Standard"
        },
        "consumed": 0,
        "contractNumber": "599211967",
        "created": "2017-04-07T14:24:23+0000",
        "derivedProductAttributes": [],
        "derivedProvidedProducts": [],
        "developmentPool": false,
        "endDate": "2019-04-07T13:02:47+0000",
        "exported": 0,
        "href": "/pools/8ac6a3185b48c98c015b48cd4410114c",
        "id": "8ac6a3185b48c98c015b48cd4410114c",
        "owner": {
            "displayName": "Admin Owner",
            "href": "/owners/admin",
            "id": "8ac6a3185b48c98c015b48c9ac140004",
            "key": "admin"
        },
        "productAttributes": [
            {
                "created": "2017-04-07T14:23:54+0000",
                "entityVersion": 2008389264,
                "name": "warning_period",
                "updated": "2017-04-07T14:23:54+0000",
                "value": "30"
            },
            {
                "created": "2017-04-07T14:23:54+0000",
                "entityVersion": -800167297,
                "name": "variant",
                "updated": "2017-04-07T14:23:54+0000",
                "value": "server"
            },
            {
                "created": "2017-04-07T14:23:54+0000",
                "entityVersion": 219409238,
                "name": "arch",
                "updated": "2017-04-07T14:23:54+0000",
                "value": "ALL"
            },
            {
                "created": "2017-04-07T14:23:54+0000",
                "entityVersion": 261267225,
                "name": "type",
                "updated": "2017-04-07T14:23:54+0000",
                "value": "SVC"
            },
            {
                "created": "2017-04-07T14:23:54+0000",
                "entityVersion": -102204262,
                "name": "version",
                "updated": "2017-04-07T14:23:54+0000",
                "value": "1.0"
            }
        ],
        "productId": "Test-product",
        "productName": "TestInactiveSubscription BITS",
        "providedProducts": [
            {
                "productId": "100000000000002",
                "productName": "Awesome OS for x86_64 Bits"
            }
        ],
        "quantity": 3,
        "stacked": false,
        "startDate": "2018-04-07T13:02:47+0000",
        "subscriptionId": "7ad02232f04245bb91d68d476f4730c8",
        "subscriptionSubKey": "master",
        "type": "NORMAL",
        "updated": "2017-04-07T14:24:23+0000"
    }
]


[root@dhcp70-154 ~]# subscription-manager register --force --org admin
The system with UUID 955ce25b-70de-4a4d-b1e5-8c8cd10ed98d has been unregistered
Registering to: Shwetha-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
The system has been registered with ID: 23858c70-b1c0-4643-8586-b81b584d8f5e 
[root@dhcp70-154 ~]# subscription-manager list --avail --ondate 2018-04-08
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   TestInactiveSubscription BITS
Provides:            Awesome OS for x86_64 Bits
SKU:                 Test-product
Contract:            599211967
Pool ID:             8ac6a3185b48c98c015b48cd4410114c
Provides Management: No
Available:           3
Suggested:           1
Service Level:       
Service Type:        
Subscription Type:   Standard
Ends:                04/07/2019
System Type:         Physical

[root@dhcp70-154 ~]# subscription-manager attach --pool 8ac6a3185b48c98c015b48cd4410114c
Successfully attached a subscription for: TestInactiveSubscription BITS
[root@dhcp70-154 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   TestInactiveSubscription BITS
Provides:            Awesome OS for x86_64 Bits
SKU:                 Test-product
Contract:            599211967
Account:             11426197
Serial:              1340409678232250065
Pool ID:             8ac6a3185b48c98c015b48cd4410114c
Provides Management: No
Active:              False
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription has not begun
Subscription Type:   Standard
Starts:              04/07/2018
Ends:                04/07/2019
System Type:         Physical

--- Additional comment from Kevin Howell on 2017-04-10 10:50:57 EDT ---

Shwetha, did this also affect the results of overall status (`subscription-manager status`)?

Note to dev: possibly introduced w/ the installed products enrichment optimization.

Two things to test:
1. No current entitlement and a future-dated entitlement.
2. With a current entitlement and a gap between the current entitlement and a future-dated entitlement.

--- Additional comment from John Sefler on 2017-04-17 14:18:06 EDT ---

I also have automated tests that are failing on future subscriptions....

For example...  Here is a pool (from candlepin-2.1.0-1) generated with the candlepin TESTDATA that starts in the future:

[root@jsefler-rhel7 ~]# curl --stderr /dev/null --insecure --user admin:admin --request GET 'https://jsefler-candlepin.usersys.redhat.com:8443/candlepin/pools/8a90860f5b7cd08b015b7cd257bc01c8' | python -m json/tool
{
    "accountNumber": "12331131231",
    "activeSubscription": true,
    "attributes": [],
    "branding": [
        {
            "created": "2017-04-17T16:50:11+0000",
            "name": "Branded Awesome OS Server Basic (multi-entitlement)",
            "productId": "37060",
            "type": "OS",
            "updated": "2017-04-17T16:50:11+0000"
        }
    ],
    "calculatedAttributes": {
        "compliance_type": "Multi-Entitleable"
    },
    "consumed": 0,
    "contractNumber": "1",
    "created": "2017-04-17T16:50:11+0000",
    "derivedProductAttributes": [],
    "derivedProvidedProducts": [],
    "developmentPool": false,
    "endDate": "2018-04-17T00:00:00+0000",
    "exported": 0,
    "href": "/pools/8a90860f5b7cd08b015b7cd257bc01c8",
    "id": "8a90860f5b7cd08b015b7cd257bc01c8",
    "orderNumber": "order-8675309",
    "owner": {
        "displayName": "Admin Owner",
        "href": "/owners/admin",
        "id": "8a90860f5b7cd08b015b7cd1ce090004",
        "key": "admin"
    },
    "productAttributes": [
        {
            "name": "management_enabled",
            "value": "0"
        },
        {
            "name": "multi-entitlement",
            "value": "yes"
        },
        {
            "name": "vcpu",
            "value": "4"
        },
        {
            "name": "warning_period",
            "value": "30"
        },
        {
            "name": "variant",
            "value": "ALL"
        },
        {
            "name": "sockets",
            "value": "2"
        },
        {
            "name": "support_level",
            "value": "None"
        },
        {
            "name": "support_type",
            "value": "Self-Support"
        },
        {
            "name": "arch",
            "value": "ALL"
        },
        {
            "name": "type",
            "value": "MKT"
        },
        {
            "name": "version",
            "value": "1.0"
        }
    ],
    "productId": "awesomeos-server-basic-me",
    "productName": "Awesome OS Server Basic (multi-entitlement)",
    "providedProducts": [
        {
            "productId": "37060",
            "productName": "Awesome OS Server Bits"
        }
    ],
    "quantity": 15,
    "stacked": false,
    "startDate": "2018-04-07T00:00:00+0000",        <====== FUTURE START DATE
    "subscriptionId": "source_sub_-uth5uznL",
    "subscriptionSubKey": "master",
    "type": "NORMAL",
    "updated": "2017-04-17T17:36:34+0000"
}
[root@jsefler-rhel7 ~]# 


As shown below, I can attach it successfully; however...
1. The list --consumed Start/End dates do NOT coincide with the actual pool dates. They appear to be current dates which is wrong.  Moreover, I believe the TESTDATA's future pools used to last more than 10 days.
2. The system status/compliance shows that the system is invalid, which is true if the pool is truly a future pool.
3. The status details on the installed product should say "Future Subscription".
4. When the entitlement comes from a future subscription, there should not be any content repositories available.


[root@jsefler-rhel7 ~]# subscription-manager attach --pool=8a90860f5b7cd08b015b7cd257bc01c8
Successfully attached a subscription for: Awesome OS Server Basic (multi-entitlement)
[root@jsefler-rhel7 ~]# 
[root@jsefler-rhel7 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Awesome OS Server Basic (multi-entitlement)
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-server-basic-me
Contract:            1
Account:             12331131231
Serial:              4644489922476343242
Pool ID:             8a90860f5b7cd08b015b7cd257bc01c8
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       None
Service Type:        Self-Support
Status Details:      Subscription is current <==== EXPECTED Subscription has not begun
Subscription Type:   Multi-Entitleable
Starts:              04/17/2017   <============ EXPECTED 04/07/2018
Ends:                04/16/2018   <============ EXPECTED 04/17/2018
System Type:         Physical

[root@jsefler-rhel7 ~]# 
[root@jsefler-rhel7 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Awesome OS Server Bits:
- Not supported by a valid subscription.  <=========== TRUE, IF THE POOL INDEED STARTS IN THE FUTURE

[root@jsefler-rhel7 ~]# 
[root@jsefler-rhel7 ~]# subscription-manager list --installed

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.  <===== EXPECTED "Future Subscription"
Starts:         
Ends:           

[root@jsefler-rhel7 ~]# 
[root@jsefler-rhel7 ~]# subscription-manager repos    <===== EXPECTED AN EMPTY LIST
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   content-label-empty-gpg
Repo Name: content-emptygpg
Repo URL:  https://cdn.redhat.com/foo/path
Enabled:   0

Repo ID:   content-label
Repo Name: content
Repo URL:  https://cdn.redhat.com/foo/path
Enabled:   0

Repo ID:   content-label-no-gpg
Repo Name: content-nogpg
Repo URL:  https://cdn.redhat.com/foo/path
Enabled:   0

Repo ID:   never-enabled-content
Repo Name: never-enabled-content
Repo URL:  https://cdn.redhat.com/foo/path/never
Enabled:   0




Now, if we attach a truly current entitlement as requested in question 2 of comment 2, then the status reflects the current entitlement, but the consumption of the future subscription appears wrong....

[root@jsefler-rhel7 ~]# subscription-manager list --avail --match-installed 
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Awesome OS Server Basic
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-server-basic
Contract:            1
Pool ID:             8a90860f5b7cd08b015b7cd256d701ad
Provides Management: No
Available:           10
Suggested:           1
Service Level:       None
Service Type:        Self-Support
Subscription Type:   Standard
Ends:                04/16/2018
System Type:         Physical

[root@jsefler-rhel7 ~]# subscription-manager attach --pool=8a90860f5b7cd08b015b7cd256d701ad
Successfully attached a subscription for: Awesome OS Server Basic

[root@jsefler-rhel7 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

[root@jsefler-rhel7 ~]# subscription-manager list --installed 

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Subscribed
Status Details: 
Starts:         04/16/2017
Ends:           04/16/2018

[root@jsefler-rhel7 ~]# subscription-manager list --consumed 
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Awesome OS Server Basic (multi-entitlement)
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-server-basic-me
Contract:            1
Account:             12331131231
Serial:              4644489922476343242
Pool ID:             8a90860f5b7cd08b015b7cd257bc01c8
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       None
Service Type:        Self-Support
Status Details:      Subscription is current  <==== SHOULD BE Subscription has not begun
Subscription Type:   Multi-Entitleable
Starts:              04/17/2017               <============ EXPECTED 04/07/2018
Ends:                04/16/2018               <============ EXPECTED 04/17/2018
System Type:         Physical

Subscription Name:   Awesome OS Server Basic
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-server-basic
Contract:            1
Account:             12331131231
Serial:              5874386829633510216
Pool ID:             8a90860f5b7cd08b015b7cd256d701ad
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       None
Service Type:        Self-Support
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              04/16/2017
Ends:                04/16/2018
System Type:         Physical



Bumping up the severity due to the Regression

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