Invoke zdb by guid to avoid import errors
commit0ce1b2ca19302df59a8c4fa8383f35cf549874de
authorPaul Dagnelie <pcd@delphix.com>
Fri, 22 Sep 2023 23:08:51 +0000 (22 16:08 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 28 Sep 2023 21:28:21 +0000 (28 14:28 -0700)
tree9f79f611c6399e7c1af10c2c5e501a3c08d0db13
parent0aabd6b48228845462090c9137a340ca062a3cb9
Invoke zdb by guid to avoid import errors

The problem that was occurring is basically that a device was removed
by ztest and replaced with another device. It was then reguided. The
import then failed because there were two possible imports with the
same name; one with the new guid, and one with the old. This can
happen because the label writes from the device removal/replacement
can be subject to ztest's error injection.

The other ways to fix this would be to change the error injection to
not trigger on removals (which may not be technically feasible), or
to change the import code to not report configurations that are so
short on devices (which would potentially have unpleasant end-user
effects when trying to recover from data losses/device configuration
issues).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #15298
cmd/ztest.c