[ZBX-9796] NetBSD's diskspace.c VFS_FS_SIZE always returns SYSINFO_RET_FAIL Created: 2015 Aug 20  Updated: 2017 May 30  Resolved: 2015 Oct 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.4.4, 2.4.6
Fix Version/s: 2.2.11rc1, 2.4.7rc1, 3.0.0alpha3

Type: Incident report Priority: Critical
Reporter: HÃ¥vard Eidnes Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: netbsd, patch, trivial
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

NetBSD/i386 6.1.5



 Description   

Fix an obvious error in VFS_FS_SIZE; don't always
return SYSINFO_RET_FAIL, but instead return the
return value of the helper function we ended up calling.

--- src/libs/zbxsysinfo/netbsd/diskspace.c.orig 2015-02-23 12:28:14.000000000 +0000
+++ src/libs/zbxsysinfo/netbsd/diskspace.c
@@ -183,7 +183,7 @@ int VFS_FS_SIZE(AGENT_REQUEST *request, 
                return SYSINFO_RET_FAIL;
        }
 
-       return SYSINFO_RET_FAIL;
+       return ret;
 }
 
 int    VFS_FS_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result)


 Comments   
Comment by Viktors Tjarve [ 2015 Aug 25 ]

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

Comment by Sandis Neilands (Inactive) [ 2015 Aug 26 ]

(1) Exactly the same kind of problem exists for HP-UX. Check revision history of VFS_FS_SIZE() function for HP-UX and NetBSD to see which revision introduced this problem and then check other changes within that revision to see if same kind of mistake is not left somewhere else.

viktors.tjarve After examining the whole revision which introduced this problem it appeared only with HP-UX and NetBSD. RESOLVED in r55330

<dimir> CLOSED

Comment by Viktors Tjarve [ 2015 Sep 01 ]

After careful investigation it is clear that the issue with VFS_FS_SIZE() function has appeared only for HP-UX and NetBSD after r34023 (starting form 2.2.11rc1). The bug did remain unnoticed because correct values where returned before reaching the end of this function.
After r45668 (pre-2.3.0) return value on HP-UX was fixed but remained unnoticed on NetBSD. That is when VFS_FS_SIZE() function on NetBSD would return only SYSINFO_RET_FAIL.
With r55330 fixed for both HP-UX and NetBSD from 2.2.11rc1.
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9796

Comment by dimir [ 2015 Sep 08 ]

(2) There is an extra ';' in freebsd/diskspace.c.

dimir RESOLVED: please review my small change in r55478.

viktors.tjarve Change accepted. Task CLOSED in r55478.

Comment by Viktors Tjarve [ 2015 Sep 21 ]

Released in:

  • pre-2.2.11rc1 r55520
  • pre-2.4.7rc1 r55669
  • pre-3.0.0alpha3 r55672
Comment by Alexander Vladishev [ 2015 Oct 08 ]

(3) ChangeLog entry is uninformative for users and incorrect for branches 2.4 and trunk

viktors.tjarve DOCUMENTED. ChangeLog entires have been corrected in:

  • 2.2.11rc1 r55994
  • 2.4.7rc1 r55997
  • 3.0.0alpha3 r55998

sasha CLOSED

Generated at Fri Apr 26 13:28:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.