-
Notifications
You must be signed in to change notification settings - Fork 2
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 support for the Oxide Rack Factory #52
base: main
Are you sure you want to change the base?
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.
fwiw this seems basically reasonable to me, though a few notes between then and now. happy to push a commit or two here too and nudge it the rest of the way if you want
} | ||
} | ||
|
||
context.client()?.disk_delete().disk(disk_id).send().await?; |
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.
probably should iterate disks.items
and delete all of them so we don't accidentally leak disks
loop { | ||
match context.client()?.instance_delete().instance(id).send().await { |
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.
it looks like the loop is because stop just starts the async stop operation, so delete in a loop 'til it succeeds. seems better to poll the instance state after requesting the stop and then only deleting once the instance is Stopped
or Failed
. then we can be appropriately concerned in logs if the instance doesn't stop any time soon, or deletion fails
(as-is this stands out to me 'cause we'll sit in a loop if something mistakenly restarts this instance right as we get to trying to delete it)
|
||
let img = match context | ||
.client()? | ||
.image_view() |
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.
no surprise: the SDK has changed in the last year, now Client
just has fn images()
. i'm not really sure how you list global images now..
/* | ||
* We have seen a recent spate of AWS instances that | ||
* hang in early boot. They get destroyed eventually, | ||
* but we should terminate them more promptly than that | ||
* to avoid being billed for AWS bullshit. | ||
*/ |
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.
i uh really hope this clause doesn't apply to us too, but i agree keeping the case is worth detecting and reporting. the comment on the other hand... :)
* either this software is not correctly tracking instances, or the | ||
* operator is creating instances in the AWS account that was set | ||
* aside for unprivileged build VMs. |
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.
s/AWS account/Oxide project/
?
FWIW, I think this is essentially on hold waiting for a proper service authentication story on the Omicron end. |
No description provided.