You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This inventory path query for a VM should work even if a folder matches "F*": /F0/DC0/vm/**/F*
Actual behavior:
The folder is incorrectly added to the result set due to a missing type check. This subsequently causes the type coercion to the result type to fail with a panic as follows:
panic: reflect.Set: value of type mo.Folder is not assignable to type mo.VirtualMachine
goroutine 36 [running]:
testing.tRunner.func1(0xc0002f4100)
/usr/local/go/src/testing/testing.go:830 +0x392
panic(0x1927fe0, 0xc0000e1750)
/usr/local/go/src/runtime/panic.go:522 +0x1b5
reflect.Value.assignTo(0x1b11860, 0xc000336b60, 0x99, 0x1b9171a, 0xb, 0x1b74c40, 0x0, 0x97, 0xc00042f980, 0x18ff960)
/usr/local/go/src/reflect/value.go:2339 +0x437
reflect.Value.Set(0x1b74c40, 0xc000290800, 0x199, 0x1b11860, 0xc000336b60, 0x99)
/usr/local/go/src/reflect/value.go:1473 +0xa8
reflect.Append(0x18ff960, 0xc0003525c0, 0x197, 0xc000443840, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:1964 +0xe3
github.com/influxdata/telegraf/plugins/inputs/vsphere.objectContentToTypedArray(0xc0003cfa40, 0x18bd1e0, 0xc0003525c0, 0xc0000ee440, 0x6)
/Users/prydin/go/src/github.com/influxdata/telegraf/plugins/inputs/vsphere/finder.go:206 +0x3d0
github.com/influxdata/telegraf/plugins/inputs/vsphere.(*Finder).Find(0xc0003cfe38, 0x1d2da80, 0xc0000ee000, 0x1b94838, 0xe, 0x1b9671b, 0x10, 0x18bd1e0, 0xc0003525c0, 0x0, ...)
/Users/prydin/go/src/github.com/influxdata/telegraf/plugins/inputs/vsphere/finder.go:59 +0x354
github.com/influxdata/telegraf/plugins/inputs/vsphere.TestFolders(0xc0002f4100)
/Users/prydin/go/src/github.com/influxdata/telegraf/plugins/inputs/vsphere/vsphere_test.go:454 +0x998
testing.tRunner(0xc0002f4100, 0x1be5808)
/usr/local/go/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:916 +0x35a
Additional info:
Note that this ONLY happens when recursive wildcards (**) are used AND the path contains a folder that matches the same pattern as the wanted object.
The text was updated successfully, but these errors were encountered:
Version
Telegraf 1.11.7
Expected behavior:
This inventory path query for a VM should work even if a folder matches "F*":
/F0/DC0/vm/**/F*
Actual behavior:
The folder is incorrectly added to the result set due to a missing type check. This subsequently causes the type coercion to the result type to fail with a panic as follows:
Additional info:
Note that this ONLY happens when recursive wildcards (**) are used AND the path contains a folder that matches the same pattern as the wanted object.
The text was updated successfully, but these errors were encountered: