-
Notifications
You must be signed in to change notification settings - Fork 241
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
Add paasta status for vitesscluster and mount /nail/etc/srv-configs to VTTablets #3902
Add paasta status for vitesscluster and mount /nail/etc/srv-configs to VTTablets #3902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As most changes look like they'll only impact vitess, seems safe from my perspective. 👍
class EtcdLockServerStatus(TypedDict, total=False): | ||
observedGeneration: int | ||
available: str | ||
clientServiceName: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side question about this -- on EKS we don't actually have direct access to the etcd cluster, is this still used? How is the etcd lock implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using only zk implementation of lock server, but the status returns this field and hence created to accommodate it. This is expected to be unused and return an empty value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the typeddicts are non-total so we could always leave them out :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry - was busy yesterday :)
class EtcdLockServerStatus(TypedDict, total=False): | ||
observedGeneration: int | ||
available: str | ||
clientServiceName: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the typeddicts are non-total so we could always leave them out :)
status: VitessClusterStatus = vitess_status.get("status") | ||
if status is None: | ||
output.append( | ||
PaastaColors.red("indent * tab + Vitess cluster is not available yet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be something like: PaastaColors.red(indent * tab + "Vitess cluster is not available yet")
?
+ str(status.get("observedGeneration", 0)) | ||
) | ||
output.append( | ||
indent * tab + "Gateway Service Name: " + status.get("gatewayServiceName", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this can happen, but might be nice to have a default like UNKNOWN
or something to make it clearer that something is missing :)
output.append( | ||
indent * tab + "Cells: " + PaastaColors.red("No cell status available") | ||
) | ||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to confirm: for each of these sections, we can't proceed with the subsequent sections if the current one is unavailable?
orphanedKeyspaces: Dict[str, OrphanStatus] | ||
|
||
|
||
def print_vitess_status( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be a useful refactor in the future to break each of the sections into their own function so that print_vitess_status()
isn't so long
Testing setup:
Testing output:
VitessClusterStatus (https://github.com/planetscale/vitess-operator/blob/main/docs/api.md#vitessclusterstatus) and its fields used as a reference for TypedDicts added