[ZBX-8486] Web scenario can't be re-linked Created: 2014 Jul 18 Updated: 2017 May 30 Resolved: 2014 Dec 02 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | API (A) |
| Affects Version/s: | 2.2.4 |
| Fix Version/s: | 2.2.8rc1, 2.4.3rc1, 2.5.0 |
| Type: | Incident report | Priority: | Critical |
| Reporter: | Marc | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | httptest, undefinedindex, webmonitoring | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
zabbix-web-pgsql-2.2.4-1.el6.noarch (upstream) |
||
| Issue Links: |
|
||||||||
| Description |
|
Details were originally posted in DBfetch() appears to return lowercase indexes while camel case are expected. The following diff is not meant to be a patch hence not attached. --- BEGIN unified diff ---
--- ./api/classes/managers/CHttpTestManager.php.orig 2014-07-17 21:49:52.000000000 +0200
+++ ./api/classes/managers/CHttpTestManager.php 2014-07-17 21:52:30.000000000 +0200
@@ -446,8 +446,8 @@
);
while ($dbItems = DBfetch($dbCursor)) {
DB::update('items', array(
- 'values' => array('templateid' => $dbItems['parentId']),
- 'where' => array('itemid' => $dbItems['childId'])
+ 'values' => array('templateid' => $dbItems['parentid']),
+ 'where' => array('itemid' => $dbItems['childid'])
));
}
@@ -464,8 +464,8 @@
);
while ($dbItems = DBfetch($dbCursor)) {
DB::update('items', array(
- 'values' => array('templateid' => $dbItems['parentId']),
- 'where' => array('itemid' => $dbItems['childId'])
+ 'values' => array('templateid' => $dbItems['parentid']),
+ 'where' => array('itemid' => $dbItems['childid'])
));
}
}
--- END unified diff ---
I'm pretty sure to have tested it agains plain vanilla. |
| Comments |
| Comment by Marc [ 2014 Aug 08 ] |
|
This is another issue preventing to re-link, that may happen somehow - dunno why yet though Given is: After unlinking T1 from H1 and trying to re-link T2 to H1 the procedure fails and complains about already existing Web scenario. A quick analysis of compareHttpSteps() for this particular case shows the reason: return '5Log off4Security3Profile2Log on1Welcome' == '1Welcome2Log on3Profile4Security5Log off' In fact there T1 was linked to more hosts previously and the same procedure worked well. Just the last of the hosts (here H1) makes problems. |
| Comment by Fernando Schmitt [ 2014 Nov 03 ] |
|
I've tried the patch above (I know it's not intended as a patch |
| Comment by Alexander Vladishev [ 2014 Nov 19 ] |
|
The issue is not reproducible with MySQL backend. |
| Comment by Krists Krigers (Inactive) [ 2014 Nov 24 ] |
|
Cause of problems was PostgreSQL specifics:
Fixed in r50774, branch svn://svn.zabbix.com/branches/dev/ZBX-8486 (copy of branches/2.2). |
| Comment by Alexander Vladishev [ 2014 Nov 25 ] |
|
(1) arrays in compareHttpSteps() should be sorted by using the same algorythm. Now it works, but we can change CArrayHelper::sort() method in the future. It is a potential bug. kristsk RESOLVED in r50828. sasha CLOSED |
| Comment by Krists Krigers (Inactive) [ 2014 Nov 27 ] |
|
Fixed and merged:
|
| Comment by Krists Krigers (Inactive) [ 2014 Nov 27 ] |
|
(1) Updated API changelogs:
Is this the right way/place? This affects a number of APIs (host, template, httptest) I thought of putting it in "General" section. sasha Excuse me. I was incorrectly made copy/paste. Please put it in right place. RESOLVED martins-v Reviewed. CLOSED. |