Skip to content

omdb db zpool and crucible-dataset subcommands should ignore deleted zpools #7963

Closed
@askfongjojo

Description

@askfongjojo

I was trying to work around #7962 temporarily by manually setting the time_deleted field to non-NULL for a zpool in an expunged disk.

root@[fd00:1122:3344:105::3]:32221/omicron> update zpool set time_deleted = time_modified where id = '3af01cc4-1f16-47d9-a489-abafcb91c2db';
UPDATE 1


Time: 3ms total (execution 3ms / network 0ms)

root@[fd00:1122:3344:105::3]:32221/omicron> select * from zpool where id = '3af01cc4-1f16-47d9-a489-abafcb91c2db';
                   id                  |         time_created          |         time_modified         |         time_deleted          | rcgen |               sled_id                |           physical_disk_id           | control_plane_storage_buffer
---------------------------------------+-------------------------------+-------------------------------+-------------------------------+-------+--------------------------------------+--------------------------------------+-------------------------------
  3af01cc4-1f16-47d9-a489-abafcb91c2db | 2023-08-30 18:57:52.826594+00 | 2024-03-27 21:18:20.842573+00 | 2024-03-27 21:18:20.842573+00 |     4 | 0c7011f7-a4bf-4daf-90cc-1c2410103300 | 0bffef3c-56b1-4b01-b897-161bbf766bea |                 268435456000
(1 row)

But that still doesn't allow the omdb db zpool and omdb db crucible-dataset commands to work. They still complain about the zpool on an expunged disk:

root@oxz_switch0:~# omdb db zpool list
Error: zpool 7ab10d7d-2b90-4080-ad3c-9b4187d4e122 not found in inventory!
root@oxz_switch0:~# omdb db crucible-dataset list
Error: zpool 3af01cc4-1f16-47d9-a489-abafcb91c2db not found!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions