| Summary: | Disconnect between pulp and katello sync tasks in terms of date format | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Og Maciel <omaciel> |
| Component: | Content Management | Assignee: | Justin Sherrill <jsherril> |
| Status: | CLOSED ERRATA | QA Contact: | Og Maciel <omaciel> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.0.0 | CC: | inecas, jrist, mmccune, tsanders |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-05-15 18:54:18 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Og Maciel
2012-02-29 20:06:10 UTC
Task creation was done via web ui Looks like we weren't considering time zone whatsoever sadly. Made changes to set it in the model as local time. It gets saved to our database as UTC, so we also have to convert it back to locatime for display. katello master: 03ebd42de82298a04a08d7ee4fd5d6baee0961eb Fixed additional problems introduced in previous commit
bd0c5564e35a10dfa1aba0600a7bcdbbfa4411a0
This code was used to convert UTC to local timezone:
self.sync_date.to_time.in_time_zone(Time.now.zone).to_datetime
Two problems are with it:
1. current timezone is used (which might be different from the time the sync
plan was created)
2. for some timezones (e.g. EDT, which we turned on east cost today) this line fails with
undefined method `period_for_utc' for nil:NilClass
Replacing with:
self.sync_date.localtime.to_datetime
Justin, could you provide me with steps to validate this? There were no messages displayed in pulp.log this time, so I assume I need to extract data from a database? Thanks in advance, Og Hey Og, Couple ways to test it, I would do both :) 1. Apply a Sync Schedule, make sure sync happens when it should. 2. Use pulp-admin to check the set sync schedule. They should be on the repo object themselves, so something like: pulp-admin auth login --username=foo --password=bar pulp-admin repo list find the repo in the product you applied it to, and look for "Sync Schedule" Verified: * candlepin-0.5.26-1.el6.noarch * candlepin-tomcat6-0.5.26-1.el6.noarch * katello-0.1.304-1.el6.noarch * katello-all-0.1.304-1.el6.noarch * katello-candlepin-cert-key-pair-1.0-1.noarch * katello-certs-tools-1.0.4-1.el6.noarch * katello-cli-0.1.105-1.el6.noarch * katello-cli-common-0.1.105-1.el6.noarch * katello-common-0.1.304-1.el6.noarch * katello-configure-0.1.106-1.el6.noarch * katello-glue-candlepin-0.1.304-1.el6.noarch * katello-glue-foreman-0.1.304-1.el6.noarch * katello-glue-pulp-0.1.304-1.el6.noarch * katello-qpid-broker-key-pair-1.0-1.noarch * katello-qpid-client-key-pair-1.0-1.noarch * katello-selinux-0.1.9-1.el6.noarch * pulp-1.0.0-5.el6.noarch * pulp-admin-1.0.0-5.el6.noarch * pulp-client-lib-1.0.0-5.el6.noarch * pulp-common-1.0.0-5.el6.noarch * pulp-selinux-server-1.0.0-5.el6.noarch Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0665.html |