[ZBX-5532] broken times of IT Service after migration to 2.0 Created: 2012 Aug 31 Updated: 2017 May 30 Resolved: 2014 May 15 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.0, 2.0.1, 2.0.2 |
Fix Version/s: | 2.0.5rc1, 2.1.0 |
Type: | Incident report | Priority: | Critical |
Reporter: | Mauro Junior | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | itservices, upgrade | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | image1.jpg image2.jpg oleksiy's_broken18-20upgrade.png | ||||
Issue Links: |
|
Description |
In some clients we have a "custom IT Services work time" for some hosts, like the attached image. But, after migrate from 1.8.x to 2.0.x that is what happens (attached image) - (wrong value for day xxx) The historical remains there, the problem, apparently occurs only in the presentation or something with timezones. After i remove all values and added again, the values were displayed correctly. /etc/php5/apache2/php.ini
Thx |
Comments |
Comment by Oleksii Zagorskyi [ 2012 Sep 02 ] |
Note that it would be better to attach screenshots with English GUI locale. |
Comment by Oleksii Zagorskyi [ 2013 Jan 09 ] |
See attached oleksiy's_broken18-20upgrade.png I used latest 1.8.16rc1 to create an IT service times, Used PHP timezone is "Europe/Riga" Content of "services_times" created in 1.8, the same in 2.0 after upgrade: mysql> select * from services_times; +--------+-----------+------+------------+------------+------+ | timeid | serviceid | type | ts_from | ts_to | note | +--------+-----------+------+------------+------------+------+ | 1 | 3 | 0 | 1358154000 | 1358186400 | | | 2 | 3 | 0 | 1358240400 | 1358272800 | | | 3 | 3 | 0 | 1357722000 | 1357754400 | | | 4 | 3 | 0 | 1357808400 | 1357840800 | | | 5 | 3 | 0 | 1357894800 | 1357927200 | | +--------+-----------+------+------------+------------+------+ 5 rows in set (0.00 sec) Content of "services_times" created in 2.0.4 (times as shown in 1.8 version): mysql> select * from services_times; +--------+-----------+------+---------+--------+------+ | timeid | serviceid | type | ts_from | ts_to | note | +--------+-----------+------+---------+--------+------+ | 4 | 1 | 0 | 126000 | 158400 | | | 5 | 1 | 0 | 212400 | 244800 | | | 6 | 1 | 0 | 298800 | 331200 | | | 7 | 1 | 0 | 385200 | 417600 | | | 8 | 1 | 0 | 471600 | 504000 | | +--------+-----------+------+---------+--------+------+ 5 rows in set (0.00 sec) CONFIRMED |
Comment by Oleksii Zagorskyi [ 2013 Jan 09 ] |
I'm changing: RTR -> RTF |
Comment by Oleg Egorov (Inactive) [ 2013 Jan 22 ] |
(2) Sunday 00:00 should be "0", but now is "86400", and Saturday 23 59 now is "691140", but should be ~"604740" oleg.egorov Reviewed r33070, CLOSED jelisejev Now Sunday 00:00 is converted to "3600". REOPENED jelisejev It seems the patch works incorrectly when there are different timezones for PHP and MySQL. There's currently no way to resolve this. CLOSED. |
Comment by Eduards Samersovs (Inactive) [ 2013 Jan 24 ] |
(3) PostgreSql and Oracle upgrade patches require. Eduards RESOLVED r.33097, 33100 jelisejev When I try the Oracle patch it converts Sunday 0:00 to 597600. Is it another timezone issue? |
Comment by Oleksii Zagorskyi [ 2013 Jan 24 ] |
(4) It should be described somewhere in documentation. martins-v Added to the suggested place. Please review. zalex_ua I clarified it a bit, please check and it could be closed. martins-v Looking good. CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 29 ] |
(5) No DB2 patch? Eduards All convertation will be in PHP side. CLOSED |
Comment by Eduards Samersovs (Inactive) [ 2013 Jan 30 ] |
(6) Implemented 1.8 converting logic into PHP side. Eduards RESOLVED r.33268 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 31 ] |
(7) I've configured three time periods in 1.8 Uptime: Sunday 00:00 - Thursday 00:00 When I open them in 2.0 they are displayed as Eduards RESOLVED r.33321 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 31 ] |
(8) The prepareServiceTime() function is service-specific, so I suggest you move it to services.inc.php Eduards RESOLVED r.33321 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 31 ] |
(9) service.get selectTimes must return already converted values. When you fix this, you can revert changes in CService::calculateSla(), they will be unnecessary. Eduards RESOLVED r.33321 jelisejev The conversion must only be done for periodical uptimes and downtimes, one-time downtimes must remain as they are. If you're going to add a "type" check before the converion, keep in mind, that the "type" property may not be present in the result if it's not requested. You need to make it's present by adding it to the extendOutputOption() call. REOPENED. Eduards RESOLVED r.33338 jelisejev Please review my changes in r33340: unsetExtraFields() must be called after all the conversions are done, otherwise the "type" field will be unset. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 31 ] |
(10) the service.update and service.create methods must not accept old timestamps. The changes you've made to checkServiceTime() must be frontend-specific. Eduards RESOLVED r.33321 jelisejev CLOSED. |
Comment by richlv [ 2013 Jan 31 ] |
(11) this will have to be documented in known issues and probably also upgrade notes zalex_ua it duplicates (4) |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Feb 01 ] |
Fir for 2.0 is TESTED. Please close (9) before merging. |
Comment by Eduards Samersovs (Inactive) [ 2013 Feb 01 ] |
Fixed in versions pre-2.0.5rc1 r33342 |
Comment by Eduards Samersovs (Inactive) [ 2013 Feb 01 ] |
(12) Needs database upgrade patch in server side for trunk. sasha RESOLVED in r34940. wiper successfully tested. sasha Available in version pre-2.1.0 (trunk) r34996. CLOSED |
Comment by Oleksii Zagorskyi [ 2013 Apr 12 ] |
REOPENED because (1) and (4) not closed |