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:
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.
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
I should say with a startdate in the future
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.
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.
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.
Created redmine issue http://projects.theforeman.org/issues/7266 from this bug
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
This was delivered with Satellite 6.0 which was released on 10 September 2014.