[ZBX-8530] Cannot delete interface and unlink template at the same time Created: 2014 Jul 28 Updated: 2017 May 30 Resolved: 2014 Aug 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.2.4, 2.2.5 |
Fix Version/s: | 2.3.4 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Kazuo Ito | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | interfaces, templatelinking | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
||||
Issue Links: |
|
Description |
How to reproduce: 1) Create Host
2) Unlink Template SNMP OS Linux (without saving) |
Comments |
Comment by Krists Krigers (Inactive) [ 2014 Aug 07 ] |
Hello kazuo.ito, did You use "Unlink" or "Unlink and clear" link to unlink template? Simply unlinking a template does not remove items created by it and therefore you get an error because interface being removed has items (from now unlinked template) using it. This is correct behavior. On the other hand - when using "Unlink and clear" to unlink a template items created when linking to template are removed. Interface then can be removed without problems. |
Comment by Kazuo Ito [ 2014 Aug 07 ] |
Hello Krists Krigers, I tried both. |
Comment by Krists Krigers (Inactive) [ 2014 Aug 07 ] |
Fixed template linking and interface update order, commited in r47914, branch svn://svn.zabbix.com/branches/dev/ZBX-8530. |
Comment by Ivo Kurzemnieks [ 2014 Aug 08 ] |
(1) I executed host.update with the following code: { "hostid": "10258", "interfaces": [ { "type": 1, "main": 1, "useip": 1, "ip": "192.168.3.1", "dns": "", "port": "10050" } ], "templates_clear ": [ { "templateid": "10069" } ] } and received the same error. kristsk RESOLVED - given API data has extra space in element key - "templates_clear ". Without this extra space API call works as expected. iivs Ok, sorry then. |
Comment by Ivo Kurzemnieks [ 2014 Aug 19 ] |
TESTED. Note that this works with "unlink and clear". Simple unlinking does not delete items. |
Comment by Krists Krigers (Inactive) [ 2014 Aug 20 ] |
Fixed and merged to 2.3.4 (trunk) in r48241. API changelog updated: |