Bug 783124 - After defining the sync plan, the 'sync plan list' shows incorrect start date/time.
Summary: After defining the sync plan, the 'sync plan list' shows incorrect start date...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2012-01-19 13:05 UTC by Sachin Ghai
Modified: 2019-09-26 13:28 UTC (History)
0 users

Fixed In Version: katello-cli-0.1.48-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:21:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
UI is showing correct sync start date/time (39.37 KB, image/png)
2012-01-19 13:07 UTC, Sachin Ghai
no flags Details
Incorrect sync time on UI after defining sync plan from cli. (40.86 KB, image/png)
2012-01-31 08:03 UTC, Sachin Ghai
no flags Details

Description Sachin Ghai 2012-01-19 13:05:34 UTC
Description of problem:
I created a sync plan as below:

katello> sync_plan create --name sync_f15 --org sghai_org  --interval hourly --date 2012-01-20 --time 22:30:00
Successfully created environment [ sync_f15 ]

Please note that here:
- start date is 2012-01-20 and 
- time is 22:30 ( 10:30 PM )


sync plan list:
===============
katello> sync_plan list --org sghai_org
-----------------------------------------------------------------------------
                               Sync Plan List

 Id   Name       Description   Start Date            Interval  
-----------------------------------------------------------------------------
 1    sync_f15   None          2012/01/21 04:00:00   hourly    


Please note that in "sync_plan list", date/time both get changed. however it should be similar to what we define in sync_plan create.

Version-Release number of selected component (if applicable):
[root@dhcp201-163 f15]# rpm -qa | grep -ie katello-0 -ie pulp-0
pulp-0.0.258-1.el6.noarch
katello-0.1.178-1.el6.noarch
katello-glue-pulp-0.1.178-1.el6.noarch
[root@dhcp201-163 f15]# 


How reproducible:
always

Steps to Reproduce:
1. Create sync plan
2. list sync_plan
3.
  
Actual results:
Sync_plan list shows different sync start date/time from what we have defined at the time of creation

Expected results:
Should be same.

Additional info:

Comment 1 Sachin Ghai 2012-01-19 13:07:11 UTC
Created attachment 556268 [details]
UI is showing correct sync start date/time

Comment 4 Sachin Ghai 2012-01-30 10:43:14 UTC
Hi Tomas, I don't have the machine where I tested this earlier. However I tried to retest this again and this time I found half an hour difference.

I defined the time 22:30 ( 10:30 PM), however 'list' cmd showing 23:00 (11 PM).



[root@dhcp201-143 ~]# katello -u admin -p admin shell
katello> sync_plan create --name sync_pulpy --org ACME_Corporation --interval hourly --date 2012-01-30 --time 22:30:00
Successfully created environment [ sync_pulpy ]


katello> sync_plan list --org ACME_Corporation
--------------------------------------------------------------------------------
                                 Sync Plan List

 Id   Name         Description   Start Date            Interval  
--------------------------------------------------------------------------------
 1    sync_pulpy   None          2012/01/30 23:00:00   hourly    
katello> exit

[root@dhcp201-143 ~]# date
Mon Jan 30 15:58:40 IST 2012


I retested this with:
[root@dhcp201-143 ~]# rpm -qa | grep -ie katello-0 -ie katello-cli-0 -ie pulp-0
pulp-0.0.261-1.el6.noarch
katello-cli-0.1.42-1.el6.noarch
katello-0.1.195-1.el6.noarch

Comment 5 Sachin Ghai 2012-01-30 10:46:18 UTC
Also as you suggested  I tried to pass timezone (IST) as in input. 

Here I input the sync time 22:30 (10:30 PM IST)

However, the 'list' command again showing 30 min difference. Showing 22:00 (10PM) 

katello> sync_plan create --name sync_pulp --org ACME_Corporation --interval hourly --date 2012-01-30 --time 22:30:00 IST
Successfully created environment [ sync_pulp ]

katello> sync_plan list --org ACME_Corporation--------------------------------------------------------------------------------
                                 Sync Plan List

 Id   Name         Description   Start Date            Interval  
--------------------------------------------------------------------------------
 1    sync_pulpy   None          2012/01/30 23:00:00   hourly    
 2    sync_pulp    None          2012/01/30 22:00:00   hourly    
katello> 


Please suggest if I'm missing anything here.

Comment 6 Tomas Strachota 2012-01-30 13:54:35 UTC
There was one more problem with half hour time shifts. Fixed in katello-cli-0.1.48-1

Testing notes:
- when you don't enter the timezone, your local timezone is assumed
- if you want to enter the timezone, the format is 00:00:00+01:30 (abbreviations like IST won't work)

Comment 7 Sachin Ghai 2012-01-31 08:01:22 UTC
Verified with following katello build:

katello-0.1.206-1.el6.noarch
pulp-0.0.263-1.el6.noarch
katello-cli-0.1.48-1.el6.noarch

sync plan with passing timezone: Input time 14:30 and displayed correctly as 14:30
===============================

katello> sync_plan create --name sync_pulp --org ACME_Corporation --interval daily --date 2012-01-31 --time 14:30:00+05:30 
Successfully created environment [ sync_pulp ]


katello> sync_plan list --org ACME_Corporation
------------------------------------------------------------------
                          Sync Plan List

 Id   Name        Description   Start Date            Interval  
------------------------------------------------------------------
 1    sync_pulp   None          2012/01/31 14:30:00   daily     
katello> 


I also tried without passing the timezone with time as below:


sync_plan without passing Timezone:
======================================

katello> sync_plan create --name sync_pulp_notz --org ACME_Corporation --interval daily --date 2012-01-31 --time 14:30:00
Successfully created environment [ sync_pulp_notz ]



katello> sync_plan list --org ACME_Corporation------------------------------------------------------------------
                          Sync Plan List

 Id   Name             Description   Start Date            Interval  
------------------------------------------------------------------
 1    sync_pulp        None          2012/01/31 14:30:00   daily     
 2    sync_pulp_notz   None          2012/01/31 14:30:00   daily     



However this time UI is showing incorrect time and in both cases (9:00 AM).

Comment 8 Sachin Ghai 2012-01-31 08:03:25 UTC
Created attachment 558557 [details]
Incorrect sync time on UI after defining sync plan from cli.

Comment 9 Sachin Ghai 2012-01-31 08:05:53 UTC
Hi Tomas. Thanks for fixing this bug from cli.. however now I'm finding incorrect time on UI. not sure if its related to change in cli.

Comment 10 Tomas Strachota 2012-01-31 09:51:29 UTC
It's the timezone trick again. UI presents (and expects!) all times as GMT while CLI uses local.  We have to solve this confusing inconsistency.

Comment 11 Sachin Ghai 2012-01-31 12:58:49 UTC
As per comment7, sync_plan list is correctly showing the sync time.. So moving this defect to verified state. However there is still an issue with UI as time sync time in cli is not consistent with UI. 

As per IRC chat.. Tomas is logging another defect for UI. So moving this to verified.


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