[ZBX-12660] Result of hostinterface.replacehostinterfaces is null. Created: 2017 Sep 02  Updated: 2024 Apr 10  Resolved: 2018 Feb 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: None
Fix Version/s: 3.0.11rc1, 3.2.8rc1, 3.4.2rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Kazuo Ito Assignee: Alexander Vladishev
Resolution: Fixed Votes: 0
Labels: api
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix3.0.8


Attachments: PNG File sc01.png    
Issue Links:
Duplicate
Team: Team B
Sprint: Sprint 16
Story Points: 0.5

 Description   

In the manual it says that the interface ID will be returned, but null was returned.

Left is manual, right is execution result.


Interface replacing is performed normally.

Interface table before and after API execution.

mysql> select h.name, i.* from interface i inner join hosts h on h.hostid = i.hostid;
+---------------+-------------+--------+------+------+-------+---------------+-----+-------+------+
| name          | interfaceid | hostid | main | type | useip | ip            | dns | port  | bulk |
+---------------+-------------+--------+------+------+-------+---------------+-----+-------+------+
| Zabbix server |           1 |  10084 |    1 |    1 |     1 | 127.0.0.1     |     | 10050 |    1 |
| xxxxxxxxxxxxx |           2 |  10105 |    1 |    1 |     1 | 192.168.xx.xx |     | 10050 |    1 |
| test          |           4 |  10106 |    1 |    1 |     1 | 127.0.0.1     |     | 10050 |    1 |
+---------------+-------------+--------+------+------+-------+---------------+-----+-------+------+
3 rows in set (0.00 sec)

mysql> select h.name, i.* from interface i inner join hosts h on h.hostid = i.hostid;
+---------------+-------------+--------+------+------+-------+---------------+-----+-------+------+
| name          | interfaceid | hostid | main | type | useip | ip            | dns | port  | bulk |
+---------------+-------------+--------+------+------+-------+---------------+-----+-------+------+
| Zabbix server |           1 |  10084 |    1 |    1 |     1 | 127.0.0.1     |     | 10050 |    1 |
| xxxxxxxxxxxxx |           2 |  10105 |    1 |    1 |     1 | 192.168.xx.xx |     | 10050 |    1 |
| test          |           5 |  10106 |    1 |    1 |     1 | 127.0.0.2     |     | 10550 |    1 |
+---------------+-------------+--------+------+------+-------+---------------+-----+-------+------+
3 rows in set (0.00 sec)

mysql>


 Comments   
Comment by Alexander Vladishev [ 2017 Sep 04 ]

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

Comment by Ivo Kurzemnieks [ 2017 Sep 06 ]

(1) No translation string changes.

sasha CLOSED

Comment by Alexander Vladishev [ 2017 Sep 07 ]

Fixed in:

  • 3.0.11rc1 r72349
  • 3.2.8rc1 r72350
  • 3.4.2rc1 r72351
  • 4.0.0alpha1 (trunk) r72352
Comment by Ivo Kurzemnieks [ 2018 Feb 13 ]

(2) [D] API documentation doesn't metion this fix.

sasha WON'T FIX

Generated at Wed Apr 24 03:10:57 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.