[ZBX-4407] Cannot import 1.8 template to 1.9 Created: 2011 Nov 29 Updated: 2017 May 30 Resolved: 2012 Jun 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 1.9.8 (beta) |
Fix Version/s: | 1.9.9 (beta) |
Type: | Incident report | Priority: | Major |
Reporter: | Marcel Hecko | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | comma, import | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
apache2.2 |
Description |
Error in item key: "Invalid item key format.". when importing template/host with item of type "simple", key "tcp,1520" |
Comments |
Comment by Alexander Sorokin (Inactive) [ 2011 Nov 30 ] |
Version 1.9 has new key format. You need to change keys manually. |
Comment by Igor Danoshaites (Inactive) [ 2011 Nov 30 ] |
More info about these changes are available here: http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/4_simple_checks |
Comment by richlv [ 2011 Nov 30 ] |
awwww. we just have to support 1.8 xml as an absolute minimum, otherwise most templates would be unusable. db upgrade patch converts such keys - frontend xml legacy import code (for 1.8) must convert those keys in the exact same way |
Comment by Alexander Sorokin (Inactive) [ 2011 Dec 08 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-4407 |
Comment by richlv [ 2011 Dec 08 ] |
(1) it changes (which is great) : but maybe should also change profile_mode and "profile" ? <pavels> I think $host_db['profile_mode'] should be changed to $host_db['inventory_mode'], but double check it please. <sanja> RESOLVED <richlv> i believe "isset($host_db['profile'])" should also be changed to 'inventory', but it should be doublechecked <sanja> RESOLVED <richlv> }} HOST PROFILES <sanja> RESOLVED <pavels> It's great that we fixed the notice, but profile data import doesn't work at all. Please, have a look. <richlv> this is where i'd like to refer to DeepC presentation slides again as such i would like to suggest using svn diff, and attempt to fix the issue so nobody could come and point at things missed (like i'm doing now ) so instead of pointing at specific instances, let's just remove any reference to host profiles (except for 1.8 xml format, of course). please note that we shouldn't nuke user profiles in any way <pavels> Yeah, that's I meant by "double check it please" =) I haven't tested the fix since then, so I've noticed the problem just now. Anyway, CLOSED. <richlv> as discussed, let's be pedantic enough and clear this up completely <sanja> Can not find any references! Maybe You have found some before reopening this issue? <richlv> there might be more that i missed, but here's one file with them : ./include/maps.inc.php: $hostsToGetProfiles = array(); <sanja> Fixed that and 1 more. |
Comment by richlv [ 2011 Dec 08 ] |
(2) function convertOldSimpleKey seems to be defined both in class.ctriggerexpression.php and export.inc.php - that scares me a bit... wouldn't it be better to define it only once ? <pavels> Yes, that's very very wrong. Since this conversion is required only when importing, I suggest we move it into a protected method of zbxXML class and only perform the conversion there. Plus, it shouldn't be done when creating new triggers in the trunk, only when importing old ones. <sanja> RESOLVED <pavels> CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2011 Dec 09 ] |
(4) Regarding in class.ctriggerexpression.php:235. I know we sometimes use references in foreach loops, but mostly in simple loops where we just need to perform some modifications on the arrays, like unsetting some keys. In more complex loops like this one, it's best not to use references, as it may cause unexpected problems. <sanja> RESOLVED <pavels> CLOSED. |
Comment by richlv [ 2011 Dec 21 ] |
(5) "Converts Simle key" <sanja> RESOLVED <richlv> CLOSED |
Comment by richlv [ 2011 Dec 22 ] |
(6) <pavels> It's great that we fixed the notice, but profile data import doesn't work at all. Please, have a look. <sanja> RESOLVED <pavels> The new line character should be "\r\n" to work properly on mac and windows. And there are no name conflicts between host profile fields, so we don't need to combine them there. I've corrected it, please review r24209 and r24210. Otherwise, good. <sanja> CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2011 Dec 23 ] |
TESTED. Before merging, please close (6). |
Comment by richlv [ 2011 Dec 23 ] |
we got a workflow problem here rev 24216 merged this dev branch to trunk already, but rev 24221 did changes in the dev branch after that. these changes will be lost. dev branch should be deleted, recreated, changes from rev 24221 reapplied and problem (1) fully fixed <sanja> RESOLVED <Sasha> REOPENED <sanja> RESOLVED <Sasha> CLOSED Pavels, please retest its branch. There are some changes. |
Comment by Pavels Jelisejevs (Inactive) [ 2011 Dec 30 ] |
TESTED again. Everything ok. |
Comment by richlv [ 2012 Feb 11 ] |
reopen to set proper "fix version" |