[ZBX-14331] Possible to change type for used host interface by API Created: 2018 May 07  Updated: 2024 Apr 10  Resolved: 2019 Jan 20

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

Type: Problem report Priority: Trivial
Reporter: Valdis Murzins Assignee: Gregory Chalenko
Resolution: Fixed Votes: 0
Labels: interface
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team D
Sprint: Sprint 46, Nov 2018, Sprint 47, Dec 2018, Sprint 48, Jan 2019
Story Points: 1

 Description   

Steps to reproduce:

  1. Create host with one Agent interface
  2. Create item that uses this interface
  3. Make following API call:
    {
        "jsonrpc": "2.0",
        "method": "host.update",
        "params": {
            "hostid": "host_id_here",
            "status": 0,
            "interfaces": [
                {
                    "type": 2,
                    "interfaceid": "interface_id_here",
                    "main": 1,
                    "useip": 1,
                    "ip": "127.0.0.1",
                    "dns": false,
                    "port": 10050
                }
            ]
        },
        "auth": "auth_code_here",
        "id": 1
    }

Result: Host is successfully updated. By opening item, it is seen, that there are no interfaces assigned to this item.
Expected: Error message - Interface is linked to item "X" on "Y".



 Comments   
Comment by Gregory Chalenko [ 2018 Nov 26 ]

Resolved in development branch svn://svn.zabbix.com/branches/dev/ZBX-14331.

Comment by Gregory Chalenko [ 2019 Jan 07 ]

Fixed in:

  • 3.0.25rc1 r88287
  • 4.0.4rc1 r88289
  • 4.2.0alpha3 r88290
Comment by richlv [ 2019 Jan 22 ]

(1) The changelog entry seems to be a bit mangled here:

fixed error allowed to change interface type which is already used by items

gcalenko Thank you. RESOLVED in r89076

Generated at Sat Apr 27 04:58:03 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.