[ZBX-15373] Problem persists after item was deleted Created: 2018 Dec 27  Updated: 2024 Apr 10  Resolved: 2019 Jan 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 4.0.3
Fix Version/s: 4.0.4rc1, 4.2.0alpha3, 4.2 (plan)

Type: Problem report Priority: Blocker
Reporter: Khatsayuk Alexander Assignee: Valdis Murzins
Resolution: Fixed Votes: 6
Labels: lld, problems, server
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: CentOS 7.6.1810
Zabbix Server: 4.0.3
DB: Percona Server for MySQL 5.7.24-27
Web: Apache 2.4.6, PHP 5.4.16


Attachments: JPEG File Untitled.jpg     JPEG File image-2018-12-27-14-30-26-339.png     JPEG File zbx_1.jpg     PNG File zbx_2.png     JPEG File zbx_3.jpg     JPEG File zbx_4.jpg    
Issue Links:
Causes
caused by ZBX-14648 slow deletion of item in template lin... Closed
Duplicate
is duplicated by ZBX-15393 Deleting items keeps orphan triggers Closed
is duplicated by ZBX-15458 Undefined offset: 0 [ in report2.php:... Closed
is duplicated by ZBX-15583 Zabbix doesn't remove LLD triggers af... Closed
Team: Team B
Team: Team B
Sprint: Sprint 47, Dec 2018, Sprint 48, Jan 2019
Story Points: 0.125

 Description   

Steps to reproduce:

  1. Create LLD rule with items and triggers prototypes;
  2. Create items and triggers with the LLD rule;
  3. Let some trigger to be armed and problem will appears;
  4. Change the LLD rule filter to deiscovered earlier items start to be undiscoverable;
  5. Delete that items from the host manually with "Delete" button;

Result:
Problems still persists on the "Problems" tab and doesn't has no link to HOST

Expected:
Earlier, such problems disappeared after items where it belongs was deleted



 Comments   
Comment by Arturs Lontons [ 2018 Dec 27 ]

Hi!

Thank you for reporting the issue. I was able to reproduce the issue by following the provided steps. I will be forwarding this ticket to our development team so they can take a look at the existing logic and develop a fix for the issue.

Comment by Maxim Berezovskiy [ 2019 Jan 04 ]

The same problem:
Environment:
OS: Ubuntu 16.04
Zabbix Server: 4.0.3 
DB: PostgreSQL 9.5.14
Web: Apache 2.4.18, PHP 7.0.32
 
If I delete the "problem" item I have the same situation as described above. Even if I try to close problem manually (after item deleting) I have the opened problem with status - "CLOSING"
 

Comment by Valdis Murzins [ 2019 Jan 09 ]

This problem occurred because of error in item delete procedure.
When item is being deleted, all related triggers should also be deleted, but after ZBX-14648 it was not done for items and triggers created by LLD.

Comment by Valdis Murzins [ 2019 Jan 09 ]

FIXED in development branch svn://svn.zabbix.com/branches/dev/ZBX-15373

Comment by Ingus Vilnis [ 2019 Jan 14 ]

Will this fix in 4.0.4 delete also the orphaned entries left now by 4.0.3?

Comment by Valdis Murzins [ 2019 Jan 14 ]

ingus.vilnis Such problems can be removed manually by removing related (orphaned) triggers, but if necessary, please, create separate issue.

To remove them manually, you need to remove the trigger. It can be done in 2 ways:
1) In Configuration->Hosts->Triggers show triggers from all hosts and groups (or wait till ZBXNEXT-221 to have more flexible filter). Find it there and delete it.
2) In Problems view click on problem name for the orphaned problem. And from context menu select Configuration. In the opened trigger edit page, there will be Delete button.

Comment by Ingus Vilnis [ 2019 Jan 14 ]

Valdi, Thank you very much for the follow-up!

But so to understand it correctly - there is/will be NO automatic removal of such orphaned entries, correct? Guys, a regression was introduced after ZBX-14648 but this fix is not dealing with the mess the former did create in 4.0.3?

Comment by Valdis Murzins [ 2019 Jan 14 ]

ingus.vilnis In short - yes. There is no and is not planned to do automatic removal of orphaned entries.
The reason behind this is that it is very heavy DB patch that would be executed for all users. When in reality, only few of users are affected with this problem.

Comment by Ingus Vilnis [ 2019 Jan 14 ]

Ok, now it is clear. Probably exact steps for cleanup would be very beneficial in 4.0.4 upgrade notes. 

Comment by richlv [ 2019 Jan 14 ]

Is it correct that this only affected frontend/API, and the server did everything properly?

Comment by Valdis Murzins [ 2019 Jan 14 ]

richlv The problem is only in API. Namely in CItemManager::delete().
For this problem, server is working correctly and is not changed in scope of this task.

I hope, it answers your question.

Comment by Valdis Murzins [ 2019 Jan 14 ]

Fixed in:

  • 4.0.4rc1 r88611
  • 4.2.0alpha3 (trunk) r88613
Comment by richlv [ 2019 Jan 14 ]

Thanks, then the number of affected users should indeed be quite low, and documenting this in the upgrade notes (as Ingus suggested) - and known issues for the affected versions - should be sufficient.

Comment by Valdis Murzins [ 2019 Jan 18 ]

Documentation changes:

Comment by dimir [ 2019 Feb 08 ]

Another proof from forum that the bug is fixed: https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/372361-availability-report-items-with-unknow-and-message-undefined-offset-0

Generated at Sat Apr 20 15:11:54 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.