Skip to content

Commit

Permalink
zed: Fix zed ASSERT on slot power cycle
Browse files Browse the repository at this point in the history
We would see zed assert on one of our systems if we powered off a
slot.  Further examination showed it returning a zfs_retire_recv()
with a GUID of 0, which in turn would return a NULL nvlist.  Add
in a check for a NULL nvlist go get around this.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
tonyhutter committed Jul 20, 2023
1 parent 2d8a2b5 commit eddef4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/zed/agents/zfs_retire.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
&vdev)) == NULL)
return;

if (vdev == NULL) {
fmd_hdl_debug(hdl, "No vdev nvlist for guid %llu\n", vdev_guid);

Check failure on line 434 in cmd/zed/agents/zfs_retire.c

View workflow job for this annotation

GitHub Actions / checkstyle

line > 80 characters
return;
}

devname = zpool_vdev_name(NULL, zhp, vdev, B_FALSE);

nvlist_lookup_uint64_array(vdev, ZPOOL_CONFIG_VDEV_STATS,
Expand Down

0 comments on commit eddef4d

Please sign in to comment.