Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omdb: Add sled state to blueprint displays and diffs #6545

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,9 @@ to: blueprint ......<REDACTED_BLUEPRINT_ID>.......

UNCHANGED SLEDS:

sled ..........<REDACTED_UUID>...........:
sled ..........<REDACTED_UUID>........... (active):

sled ..........<REDACTED_UUID>...........:
sled ..........<REDACTED_UUID>........... (active):

omicron zones at generation 2:
---------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from: collection 094d362b-7d79-49e7-a244-134276cca8fe
to: blueprint e4aeb3b3-272f-4967-be34-2d34daa46aa1
UNCHANGED SLEDS:

sled 08c7046b-c9c4-4368-881f-19a72df22143:
sled 08c7046b-c9c4-4368-881f-19a72df22143 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -39,7 +39,7 @@ to: blueprint e4aeb3b3-272f-4967-be34-2d34daa46aa1
nexus b2573120-9c91-4ed7-8b4f-a7bfe8dbc807 in service fd00:1122:3344:103::22


sled 84ac367e-9b03-4e9d-a846-df1a08deee6c:
sled 84ac367e-9b03-4e9d-a846-df1a08deee6c (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -76,7 +76,7 @@ to: blueprint e4aeb3b3-272f-4967-be34-2d34daa46aa1
nexus a9a6a974-8953-4783-b815-da46884f2c02 in service fd00:1122:3344:101::22


sled be7f4375-2a6b-457f-b1a4-3074a715e5fe:
sled be7f4375-2a6b-457f-b1a4-3074a715e5fe (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ to: blueprint 4171ad05-89dd-474b-846b-b007e4346366

UNCHANGED SLEDS:

sled 41f45d9f-766e-4ca6-a881-61ee45c80f57:
sled 41f45d9f-766e-4ca6-a881-61ee45c80f57 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -40,7 +40,7 @@ to: blueprint 4171ad05-89dd-474b-846b-b007e4346366
nexus cc816cfe-3869-4dde-b596-397d41198628 in service fd00:1122:3344:103::22


sled 43677374-8d2f-4deb-8a41-eeea506db8e0:
sled 43677374-8d2f-4deb-8a41-eeea506db8e0 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -77,7 +77,7 @@ to: blueprint 4171ad05-89dd-474b-846b-b007e4346366
nexus 3eda924f-22a9-4f3e-9a1b-91d1c47601ab in service fd00:1122:3344:101::22


sled 590e3034-d946-4166-b0e5-2d0034197a07:
sled 590e3034-d946-4166-b0e5-2d0034197a07 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -116,7 +116,7 @@ to: blueprint 4171ad05-89dd-474b-846b-b007e4346366

ADDED SLEDS:

sled b59ec570-2abb-4017-80ce-129d94e7a025:
sled b59ec570-2abb-4017-80ce-129d94e7a025 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ to: blueprint f432fcd5-1284-4058-8b4a-9286a3de6163

UNCHANGED SLEDS:

sled 41f45d9f-766e-4ca6-a881-61ee45c80f57:
sled 41f45d9f-766e-4ca6-a881-61ee45c80f57 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -40,7 +40,7 @@ to: blueprint f432fcd5-1284-4058-8b4a-9286a3de6163
nexus cc816cfe-3869-4dde-b596-397d41198628 in service fd00:1122:3344:103::22


sled 43677374-8d2f-4deb-8a41-eeea506db8e0:
sled 43677374-8d2f-4deb-8a41-eeea506db8e0 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -77,7 +77,7 @@ to: blueprint f432fcd5-1284-4058-8b4a-9286a3de6163
nexus 3eda924f-22a9-4f3e-9a1b-91d1c47601ab in service fd00:1122:3344:101::22


sled 590e3034-d946-4166-b0e5-2d0034197a07:
sled 590e3034-d946-4166-b0e5-2d0034197a07 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -116,7 +116,7 @@ to: blueprint f432fcd5-1284-4058-8b4a-9286a3de6163

MODIFIED SLEDS:

sled b59ec570-2abb-4017-80ce-129d94e7a025:
sled b59ec570-2abb-4017-80ce-129d94e7a025 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ to: blueprint 1ac2d88f-27dd-4506-8585-6b2be832528e

MODIFIED SLEDS:

sled a1b477db-b629-48eb-911d-1ccdafca75b9:
sled a1b477db-b629-48eb-911d-1ccdafca75b9 (active -> decommissioned):

physical disks from generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -53,7 +53,7 @@ to: blueprint 1ac2d88f-27dd-4506-8585-6b2be832528e
└─ + expunged


sled d67ce8f0-a691-4010-b414-420d82e80527:
sled d67ce8f0-a691-4010-b414-420d82e80527 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -91,7 +91,7 @@ to: blueprint 1ac2d88f-27dd-4506-8585-6b2be832528e
+ nexus ff9ce09c-afbf-425b-bbfa-3d8fb254f98e in service fd00:1122:3344:101::2d


sled fefcf4cf-f7e7-46b3-b629-058526ce440e:
sled fefcf4cf-f7e7-46b3-b629-058526ce440e (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blueprint 1ac2d88f-27dd-4506-8585-6b2be832528e
parent: 516e80a3-b362-4fac-bd3c-4559717120dd

sled: d67ce8f0-a691-4010-b414-420d82e80527
sled: d67ce8f0-a691-4010-b414-420d82e80527 (active)

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -40,7 +40,7 @@ parent: 516e80a3-b362-4fac-bd3c-4559717120dd



sled: fefcf4cf-f7e7-46b3-b629-058526ce440e
sled: fefcf4cf-f7e7-46b3-b629-058526ce440e (active)

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6

UNCHANGED SLEDS:

sled 2d1cb4f2-cf44-40fc-b118-85036eb732a9:
sled 2d1cb4f2-cf44-40fc-b118-85036eb732a9 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -42,7 +42,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6

MODIFIED SLEDS:

sled 48d95fef-bc9f-4f50-9a53-1e075836291d:
sled 48d95fef-bc9f-4f50-9a53-1e075836291d (active -> decommissioned):

physical disks from generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -92,7 +92,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
└─ + expunged


sled 68d24ac5-f341-49ea-a92a-0381b52ab387:
sled 68d24ac5-f341-49ea-a92a-0381b52ab387 (active):

physical disks from generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -129,7 +129,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
nexus 6464d025-4652-4948-919e-740bec5699b1 expunged fd00:1122:3344:102::22


sled 75bc286f-2b4b-482c-9431-59272af529da:
sled 75bc286f-2b4b-482c-9431-59272af529da (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -169,7 +169,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
+ nexus 59950bc8-1497-44dd-8cbf-b6502ba921b2 in service fd00:1122:3344:104::2f


sled affab35f-600a-4109-8ea0-34a067a4e0bc:
sled affab35f-600a-4109-8ea0-34a067a4e0bc (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6

UNCHANGED SLEDS:

sled 75bc286f-2b4b-482c-9431-59272af529da:
sled 75bc286f-2b4b-482c-9431-59272af529da (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -43,7 +43,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
nexus 59950bc8-1497-44dd-8cbf-b6502ba921b2 in service fd00:1122:3344:104::2f


sled affab35f-600a-4109-8ea0-34a067a4e0bc:
sled affab35f-600a-4109-8ea0-34a067a4e0bc (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -83,32 +83,9 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
nexus c26b3bda-5561-44a1-a69f-22103fe209a1 in service fd00:1122:3344:101::2f


REMOVED SLEDS:

sled 68d24ac5-f341-49ea-a92a-0381b52ab387:

omicron zones from generation 2:
------------------------------------------------------------------------------------------
zone type zone id disposition underlay IP
------------------------------------------------------------------------------------------
- crucible 3b3c14b6-a8e2-4054-a577-8d96cb576230 expunged fd00:1122:3344:102::29
- crucible 57b96d5c-b71e-43e4-8869-7d514003d00d expunged fd00:1122:3344:102::2a
- crucible 6939ce48-b17c-4616-b176-8a419a7697be expunged fd00:1122:3344:102::26
- crucible 8d4d2b28-82bb-4e36-80da-1408d8c35d82 expunged fd00:1122:3344:102::28
- crucible 9fd52961-426f-4e62-a644-b70871103fca expunged fd00:1122:3344:102::23
- crucible b44cdbc0-0ce0-46eb-8b21-a09e113aa1d0 expunged fd00:1122:3344:102::24
- crucible b4947d31-f70e-4ee0-8817-0ca6cea9b16b expunged fd00:1122:3344:102::2b
- crucible b6b759d0-f60d-42b7-bbbc-9d61c9e895a9 expunged fd00:1122:3344:102::25
- crucible c407795c-6c8b-428e-8ab8-b962913c447f expunged fd00:1122:3344:102::27
- crucible e4b3e159-3dbe-48cb-8497-e3da92a90e5a expunged fd00:1122:3344:102::2c
- internal_dns 878dfddd-3113-4197-a3ea-e0d4dbe9b476 expunged fd00:1122:3344:3::1
- internal_ntp 47a87c6e-ef45-4d52-9a3e-69cdd96737cc expunged fd00:1122:3344:102::21
- nexus 6464d025-4652-4948-919e-740bec5699b1 expunged fd00:1122:3344:102::22


MODIFIED SLEDS:

sled 2d1cb4f2-cf44-40fc-b118-85036eb732a9:
sled 2d1cb4f2-cf44-40fc-b118-85036eb732a9 (active):

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -144,7 +121,7 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
└─ + quiesced


sled 48d95fef-bc9f-4f50-9a53-1e075836291d:
sled 48d95fef-bc9f-4f50-9a53-1e075836291d (decommissioned):

omicron zones generation 3 -> 4:
------------------------------------------------------------------------------------------
Expand All @@ -165,6 +142,27 @@ to: blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
- nexus 67622d61-2df4-414d-aa0e-d1277265f405 expunged fd00:1122:3344:103::22


sled 68d24ac5-f341-49ea-a92a-0381b52ab387 (active):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this sled move from "REMOVED" to "MODIFIED"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test manually messes around with blueprint_zones:

let expunged_zones =
blueprint2a.blueprint_zones.get_mut(&expunged_sled_id).unwrap();
expunged_zones.zones.clear();
expunged_zones.generation = expunged_zones.generation.next();
blueprint2a.blueprint_zones.remove(&decommissioned_sled_id);

Prior to this PR, "sled missing from zones and disks" was enough for it to be REMOVED. After this PR, it also has to be missing from sled_state, which the test doesn't touch. I thought that was fine, but looking back at the test it explicitly wants to test diff output including a removed sled, so I changed the test to remove the decommissioned sled from sled_state and now it's back to REMOVED: fab82fc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for the details.


omicron zones from generation 2:
------------------------------------------------------------------------------------------
zone type zone id disposition underlay IP
------------------------------------------------------------------------------------------
- crucible 3b3c14b6-a8e2-4054-a577-8d96cb576230 expunged fd00:1122:3344:102::29
- crucible 57b96d5c-b71e-43e4-8869-7d514003d00d expunged fd00:1122:3344:102::2a
- crucible 6939ce48-b17c-4616-b176-8a419a7697be expunged fd00:1122:3344:102::26
- crucible 8d4d2b28-82bb-4e36-80da-1408d8c35d82 expunged fd00:1122:3344:102::28
- crucible 9fd52961-426f-4e62-a644-b70871103fca expunged fd00:1122:3344:102::23
- crucible b44cdbc0-0ce0-46eb-8b21-a09e113aa1d0 expunged fd00:1122:3344:102::24
- crucible b4947d31-f70e-4ee0-8817-0ca6cea9b16b expunged fd00:1122:3344:102::2b
- crucible b6b759d0-f60d-42b7-bbbc-9d61c9e895a9 expunged fd00:1122:3344:102::25
- crucible c407795c-6c8b-428e-8ab8-b962913c447f expunged fd00:1122:3344:102::27
- crucible e4b3e159-3dbe-48cb-8497-e3da92a90e5a expunged fd00:1122:3344:102::2c
- internal_dns 878dfddd-3113-4197-a3ea-e0d4dbe9b476 expunged fd00:1122:3344:3::1
- internal_ntp 47a87c6e-ef45-4d52-9a3e-69cdd96737cc expunged fd00:1122:3344:102::21
- nexus 6464d025-4652-4948-919e-740bec5699b1 expunged fd00:1122:3344:102::22


ERRORS:

sled 2d1cb4f2-cf44-40fc-b118-85036eb732a9
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blueprint 9f71f5d3-a272-4382-9154-6ea2e171a6c6
parent: 4d4e6c38-cd95-4c4e-8f45-6af4d686964b

sled: 2d1cb4f2-cf44-40fc-b118-85036eb732a9
sled: 2d1cb4f2-cf44-40fc-b118-85036eb732a9 (active)

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -39,7 +39,7 @@ parent: 4d4e6c38-cd95-4c4e-8f45-6af4d686964b



sled: 75bc286f-2b4b-482c-9431-59272af529da
sled: 75bc286f-2b4b-482c-9431-59272af529da (active)

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down Expand Up @@ -80,7 +80,7 @@ parent: 4d4e6c38-cd95-4c4e-8f45-6af4d686964b



sled: affab35f-600a-4109-8ea0-34a067a4e0bc
sled: affab35f-600a-4109-8ea0-34a067a4e0bc (active)

physical disks at generation 1:
----------------------------------------------------------------------
Expand Down
Loading
Loading