ZABBIX BUGS AND ISSUES

DB error occurs hostgroup.massupdate method with duplicate hostid

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.3
  • Fix Version/s: 2.0.4, 2.1.0
  • Component/s: API (A)
  • Labels:
  • Zabbix ID:
    NA

Description

DB error occurs hostgroup.massupdate with duplicate hostid.

MySQL error:

Error in query [INSERT INTO hosts_groups (hostgroupid, hostid, groupid) VALUES (100100000173493, 100100000027416, 100100000000252)] [Duplicate entry '100100000027416-100100000000252' for key 'hosts_groups_1']18:49:13 SQL: INSERT INTO hosts_groups (hostgroupid, hostid, groupid) VALUES (100100000173493, 100100000027416, 100100000000252)

Activity

Hide
Eduards Samersovs added a comment -

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5860

Show
Eduards Samersovs added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5860
Hide
Oleg Egorov added a comment - - edited

API REQUEST:

{
"hosts": [
            {
                "hostid": "10120"
            },
            {
                "hostid": "10120"
            }
],
"groups": [
            {
                "groupid": "5"
            }
],
        "status": 0
}

RESULT:
SQL statement execution has failed \"INSERT INTO hosts_groups (hostid,groupid,hostgroupid) VALUES ('10120','5','136');

If use native group or only one host, then OK.

This issue exist only for host.massupdate

CLOSED

Show
Oleg Egorov added a comment - - edited API REQUEST:
{
"hosts": [
            {
                "hostid": "10120"
            },
            {
                "hostid": "10120"
            }
],
"groups": [
            {
                "groupid": "5"
            }
],
        "status": 0
}
RESULT: SQL statement execution has failed \"INSERT INTO hosts_groups (hostid,groupid,hostgroupid) VALUES ('10120','5','136'); If use native group or only one host, then OK. This issue exist only for host.massupdate CLOSED
Hide
Oleg Egorov added a comment -

TESTED!

Show
Oleg Egorov added a comment - TESTED!
Hide
Eduards Samersovs added a comment -

Fixed in versions pre-2.1.0 (beta) r31653, pre-2.0.4rc1 r31651

Show
Eduards Samersovs added a comment - Fixed in versions pre-2.1.0 (beta) r31653, pre-2.0.4rc1 r31651
Hide
Oleksiy Zagorskyi added a comment -

This change caused a regression, reported in ZBX-6214

Show
Oleksiy Zagorskyi added a comment - This change caused a regression, reported in ZBX-6214

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: