Bug 1131269 - unable to add custom products[subscription] created to activation-key
Summary: unable to add custom products[subscription] created to activation-key
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-18 20:30 UTC by Kedar Bidarkar
Modified: 2019-09-26 14:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:22:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7266 0 High Closed unable to add custom products[subscription] created to activation-key 2020-05-15 17:36:44 UTC

Description Kedar Bidarkar 2014-08-18 20:30:19 UTC
Description of problem:

Unable to add products[subscriptions] created via UI to activation-key.

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

How reproducible:



Steps to Reproduce:
1. create few prd & repos via cli 
2. sync and promote
3. create few prd & repos via webui
4. sync and promote
5. observe that only those products created via cli, are now seen under subscriptions while adding subs to the aactivation-keys.

Actual results:
observe that only those products created via cli, are now seen under subscriptions while adding subs to the aactivation-keys.


Expected results:
there should be consistency between webui and CLI actions. 
subscriptions created via webui should be visible no matter how the subscriptions[ here products] are created.


Additional info:

Comment 2 Justin Sherrill 2014-08-18 21:30:29 UTC
Note this affect cli too, this satellite server got into a weird state where pools were being created but were not showing up.... Investigating...

Note this also affects anything to do with subscribing to that product.

Comment 3 Justin Sherrill 2014-08-18 21:48:23 UTC
According to zeus the pools are being created in the future:

    candlepin=# select id, startdate, enddate from cp_pool where owner_id= '8ac1492a47ea14670147ea15c9400001';
                    id                |         startdate         |          enddate          
    ----------------------------------+---------------------------+---------------------------
     8ac1492a47ea9f670147eb01e46c0035 | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea9f670147eaf4e672002c | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea9f670147eaee7fe10025 | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea9f670147eae42dfe001d | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea9f670147eae026b10017 | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea9f670147eaae308c0006 | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea14670147ea65330f0030 | 2014-08-19 05:30:00+05:30 | 2044-08-11 05:30:00+05:30
     8ac1492a47ea14670147ea4688620028 | 2014-08-18 05:30:00+05:30 | 2044-08-10 05:30:00+05:30
     8ac1492a47ea14670147ea3ef6660021 | 2014-08-18 05:30:00+05:30 | 2044-08-10 05:30:00+05:30
     8ac1492a47ea14670147ea3884d7001a | 2014-08-18 05:30:00+05:30 | 2044-08-10 05:30:00+05:30
     8ac1492a47ea14670147ea347f020013 | 2014-08-18 05:30:00+05:30 | 2044-08-10 05:30:00+05:30
     8ac1492a47ea14670147ea3310d1000c | 2014-08-18 05:30:00+05:30 | 2044-08-10 05:30:00+05:30
     8ac1492a47ea14670147ea32515f0005 | 2014-08-18 05:30:00+05:30 | 2044-08-10 05:30:00+05:30


Current time on the box is:  Tue Aug 19 03:11:20 IST 2014

Comment 4 Justin Sherrill 2014-08-18 21:49:14 UTC
I should say with a startdate in the future

Comment 6 Jesus M. Rodriguez 2014-08-20 03:05:04 UTC
Based on some investigation, our JSON parser Jackson handles dates as GMT. http://wiki.fasterxml.com/JacksonFAQDateHandling

So if the date comes in as 2014-08-19 and it is treated as 2014-08-19 00:00:00 then it changes it to GMT by subtracting 4 hours making it 2014-08-19 20:00:00 here in the US (EDT -4). And in Pune it makes it 2014-08-19 05:30:00 since 00:00:00 + 5:30 = 05:30:00. 

Still investigating.

Comment 7 Jesus M. Rodriguez 2014-08-21 13:20:29 UTC
For now, the easiest fix is to use DateTime.now instead of Date.today. DateTime.now includes the timestamp which causes Candlepin to store the time given.

                id                |       startdate        |        enddate         |          created           |          updated           
----------------------------------+------------------------+------------------------+----------------------------+----------------------------
 8a8d089d47f4f0620147f4f0bb5a018b | 2014-08-20 15:42:02-04 | 2015-08-20 15:42:02-04 | 2014-08-20 15:42:03.098-04 | 2014-08-20 15:42:03.098-04
 8a8d089d47f4f0620147f4f0bb5f018f | 2014-08-20 15:42:02-04 | 2015-08-20 15:42:02-04 | 2014-08-20 15:42:03.103-04 | 2014-08-20 15:42:03.103-04
 8a8d089d47f4f0620147f4f0bb660192 | 2014-08-20 15:42:02-04 | 2015-08-20 15:42:02-04 | 2014-08-20 15:42:03.11-04  | 2014-08-20 15:42:03.11-04
 8a8d089d47f4f0620147f4f0bb5c018c | 2014-08-20 15:42:02-04 | 2015-08-20 15:42:02-04 | 2014-08-20 15:42:03.1-04   | 2014-08-20 15:42:03.1-04
 8a8d089d47f4f0620147f4f0bb5e018e | 2014-08-20 15:42:02-04 | 2015-08-20 15:42:02-04 | 2014-08-20 15:42:03.102-04 | 2014-08-20 15:42:03.102-04
 

Before on a US machine it would store them with a time of 20:00:00-04 regardless of when they came in.

Comment 8 Kedar Bidarkar 2014-08-22 12:54:09 UTC
Steps to Reproduce:

1) Reproducing this bug depends on Satellite6's box timezone.
2) For example, if the sat6box's timezone is IST which is GMT+5:30, 
3) All the custom products/repos created after 00:00 HRS are not visible under subscriptions until 0530 HRS.

Comment 9 Justin Sherrill 2014-08-26 15:31:22 UTC
Created redmine issue http://projects.theforeman.org/issues/7266 from this bug

Comment 12 Kedar Bidarkar 2014-09-01 21:03:11 UTC
Tested with Sat6-GA-snap7

Followed the above mentioned steps in comment8


Installed Packages

    candlepin-0.9.23-1.el6_5.noarch
    candlepin-common-1.0.1-1.el6_5.noarch
    candlepin-scl-1-5.el6_4.noarch
    candlepin-scl-quartz-2.1.5-5.el6_4.noarch
    candlepin-scl-rhino-1.7R3-1.el6_4.noarch
    candlepin-scl-runtime-1-5.el6_4.noarch
    candlepin-selinux-0.9.23-1.el6_5.noarch
    candlepin-tomcat6-0.9.23-1.el6_5.noarch
    createrepo-0.9.9-21.2.pulp.el6sat.noarch
    elasticsearch-0.90.10-6.el6sat.noarch
    katello-1.5.0-30.el6sat.noarch
    katello-certs-tools-1.5.6-1.el6sat.noarch
    katello-default-ca-1.0-1.noarch
    katello-installer-0.0.64-1.el6sat.noarch
    katello-server-ca-1.0-1.noarch
    mod_wsgi-3.4-1.pulp.el6sat.x86_64
    pulp-katello-0.3-4.el6sat.noarch
    pulp-nodes-common-2.4.1-0.5.rc1.el6sat.noarch
    pulp-nodes-parent-2.4.1-0.5.rc1.el6sat.noarch
    pulp-puppet-plugins-2.4.1-0.5.rc1.el6sat.noarch
    pulp-puppet-tools-2.4.1-0.5.rc1.el6sat.noarch
    pulp-rpm-plugins-2.4.1-0.6.beta.el6sat.noarch
    pulp-selinux-2.4.1-0.5.rc1.el6sat.noarch
    pulp-server-2.4.1-0.5.rc1.el6sat.noarch
    python-gofer-qpid-1.3.0-1.el6sat.noarch
    python-isodate-0.5.0-1.pulp.el6sat.noarch
    python-kombu-3.0.15-12.pulp.el6sat.noarch
    python-pulp-bindings-2.4.1-0.5.rc1.el6sat.noarch
    python-pulp-common-2.4.1-0.5.rc1.el6sat.noarch
    python-pulp-puppet-common-2.4.1-0.5.rc1.el6sat.noarch
    python-pulp-rpm-common-2.4.1-0.6.beta.el6sat.noarch
    python-qpid-0.22-14.el6sat.noarch
    python-qpid-qmf-0.22-37.el6.x86_64
    qpid-cpp-client-0.22-42.el6.x86_64
    qpid-cpp-server-0.22-42.el6.x86_64
    qpid-cpp-server-linearstore-0.22-42.el6.x86_64
    qpid-java-client-0.22-6.el6.noarch
    qpid-java-common-0.22-6.el6.noarch
    qpid-proton-c-0.7-1.el6.x86_64
    qpid-qmf-0.22-37.el6.x86_64
    qpid-tools-0.22-12.el6.noarch
    ruby193-rubygem-katello-1.5.0-86.el6sat.noarch
    rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch
    rubygem-smart_proxy_pulp-1.0.1-1.1.el6sat.noarch

Comment 13 Bryan Kearney 2014-09-11 12:22:51 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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