[ZBX-8371] Cannot add maintenance because of duplicate invisible instance Created: 2014 Jun 18  Updated: 2017 May 30  Resolved: 2014 Jul 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.3
Fix Version/s: 2.2.6rc1

Type: Incident report Priority: Minor
Reporter: Bart Verwilst Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: duplicates, maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File maintenance-add-error.png     PNG File maintenance-periods.png    
Issue Links:
Duplicate
duplicates ZBX-8165 Maintenance can stay without host or ... Closed

 Description   

When trying to add a new maintenance period with the name 'Fleethours update', we get the message 'ERROR: Cannot add maintenance' and details "Maintenance "Fleethours update" already exists". However, as can be seen be the screen shot, we cannot find it in the list of available maintenances. We added a maintenance with the same name before though.



 Comments   
Comment by richlv [ 2014 Jun 18 ]

is that user a superadmin ?

Comment by Bart Verwilst [ 2014 Jun 18 ]

Yes he is.

Comment by Oleksii Zagorskyi [ 2014 Jun 19 ]

Do you see it in database?
SELECT * FROM maintenances;

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jun 19 ]

This might be caused by ZBX-8165.

Comment by Bart Verwilst [ 2014 Jun 19 ]

Yes i do!

+---------------+-----------------------------+------------------+-------------------------------------------------------------+--------------+-------------+
| maintenanceid | name                        | maintenance_type | description                                                 | active_since | active_till |
+---------------+-----------------------------+------------------+-------------------------------------------------------------+--------------+-------------+
|             1 | Fleethours load             |                0 | Nightly batch jobs                                          |   1365663780 |  2145913200 |
|             5 | Test servers                |                0 | Servers that do not need alerting                           |   1360241160 |  2147431560 |
|             6 | Flashcopy database replicas |                0 | Maintenance period for database replica restart / flashcopy |   1368538980 |  1905082980 |
|             7 | Temporary maintenance       |                0 | OTRS                                                        |   1370112060 |  1685990460 |
|             9 | Temporary                   |                0 | Temporary maintenance of hosts                              |   1356994800 |  1672527600 |
|            10 | vodafone issues             |                0 |                                                             |   1375308000 |  1375329600 |
|            11 | bugfix upgrade              |                0 |                                                             |   1381046700 |  1381050000 |
|            12 | firewall testing            |                1 |                                                             |   1381746900 |  1382351700 |
|            15 | Fleethours update           |                0 | Logicway will update fleethours                             |   1387258200 |  1578351600 |
|            16 | flccockpit upgrade          |                0 |                                                             |   1387483200 |  1387483800 |
|            17 | FW restart                  |                0 |                                                             |   1388603880 |  1577906280 |
|            18 | V7000 backup maintenance    |                0 | V7000 maintenance to avoid flashcopy renewals to alert      |   1395916380 |  2147337180 |
|            19 | Update fleetworks 1.50.6    |                0 |                                                             |   1402819200 |  1402907400 |
|            20 | Fleethours update 2         |                0 |                                                             |   1403042400 |  1718748000 |
+---------------+-----------------------------+------------------+-------------------------------------------------------------+--------------+-------------+
Comment by richlv [ 2014 Jun 19 ]

in older versions of zabbix, maintenance entries w/o hosts/groups were visible to superadmins. it was changed, and all kinds of problems appeared. let's change it back so that superadmins always see all maintenance entries

Comment by nms_user [ 2014 Jul 10 ]

Same problem here... When the last host of a maintenance gets deleted, the maintenance isn't shown in the GUI anymore but exists in the database further as a 'ghost'-entry.

We have several maintenances affected by this 'bug' and I get constant calls because of this.

Why do you don't allow empty maintenances (for all type of zabbix users)? We don't create maintenances for every single activity on a particular machine. Instead we have long-running (active till 2022 for example) 'template'-maintenances and only adjust the period and affected hosts on every task at the machines.

Please fix this!

Thanks

Comment by Krists Krigers (Inactive) [ 2014 Jul 15 ]

Fixed issue in r47331, branch svn://svn.zabbix.com/branches/dev/ZBX-8371.

Comment by Oleg Egorov (Inactive) [ 2014 Jul 16 ]

(1) String changes?

kristsk No string changes. RESOLVED.

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2014 Jul 16 ]

Not critical issue, but...

	if ($pageFilter->groupsSelected) {
		if ($pageFilter->groupid > 0) {
			$options['groupids'] = $pageFilter->groupid;
		}
		else {
			$options['groupids'] = null;
		}
	}
	else {
		$options['groupids'] = array();
	}

Simplify this code with ternary operator

Comment by Oleg Egorov (Inactive) [ 2014 Jul 16 ]

TESTED

Comment by Krists Krigers (Inactive) [ 2014 Jul 17 ]

Issue fixed and merged to 2.2.6rc1 in r47425.

Comment by richlv [ 2014 Jul 17 ]

(2) it's totally unclear what was done here - could you please mention what was actually changed ?
also, changelog entry is very cryptic, it would be nice to actually explain what was done.
and changelog entry is missing in the trunk changelog

kristsk A maintenance period must have a host(s) and/or host group(s) specified on create. Before fix maintenance periods were accessible by filtering on either an EXISTING host group or filter option "all". Selecting option "all" actually meant that maintenance periods for all EXISTING host groups will be listed. From this behavior follows the problem - if host group(s) of some maintenance period are deleted, the maintenance period is no longer accessible for configuration, but at the same time it is impossible to create a new maintenance period with same name, hence the confusion from users. The fix is to change what is listed when "all" filter is used - after the fix this shows ALL maintenance periods, regardless of host group(s). Any maintenance period then can be updated by user.

<richlv> would the following be an accurate summary then ?
"changed maintenance configuration to display maintenance periods without any hosts or host groups for superadmins"
(i assume such periods pop up for superadmins only, not for admins)

kristsk Currently periods without host groups are not available to admins. According to jelisejev and that is not how it should be and will be fixed in ZBX-8492.

<richlv> changelog entry is still unclear. let's improve it

Comment by Krists Krigers (Inactive) [ 2014 Jul 21 ]

As discussed, this will be resolved in ZBX-8492.

Generated at Thu Apr 25 11:13:30 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.