Skip to content

errors returned by instance serial console Nexus API should include the *effective* state #6457

@hawkw

Description

@hawkw

The instance serial console endpoint will return an error when the instance is in a state where it doesn't have a serial console. Currently, though, that error message includes the instance's database (internal) instance state, rather than its external API state (which is determined based on both the instance and VMM records). This results in leaking internal instance states to the user, in the form of "instance is no VMM and has no active serial console server".

Incidentally, that error message should probably be improved; it's using the instance's internal state, when it should really be using the instance's effective state determined from the instance and VMM records. Then, it would actually tell us what the VMM's state was, rather than saying "instance is no VMM", which is both unhelpful and grammatically incorrect :)

Originally posted by @hawkw in #6453 (comment)

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