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

gcloudrig-games disk does not create from shapshot #80

Open
oschwartz10612 opened this issue Mar 1, 2021 · 7 comments
Open

gcloudrig-games disk does not create from shapshot #80

oschwartz10612 opened this issue Mar 1, 2021 · 7 comments

Comments

@oschwartz10612
Copy link

This has happened twice now to me. I start the instance and it boots normally, but it never creates the games disk from the snapshot. I still am trying to figure out why this is happening, but I am still not sure.

@koderian
Copy link

koderian commented Mar 7, 2021

Same. Ocasionally the disk never gets attached

@oschwartz10612
Copy link
Author

Yeah this just happened to me again.

To clarify, under "Disks" the disk is never loading. It never tries to create it and I cant see any errors of it failing in the logs but I could be looking in the wrong places...

@putty182
Copy link
Member

putty182 commented Mar 8, 2021 via email

@josephrkramer
Copy link

josephrkramer commented Mar 8, 2021 via email

@oschwartz10612
Copy link
Author

I can't see anything in the log viewer.

Scaling it down in this state also frequently fails to delete the old image of the machine and it has to be manually deleted.

@putty182
Copy link
Member

putty182 commented Mar 8, 2021

I'm thinking storing the disk name as a project metadata "flag" might make this more resilient (and maybe even a tad faster).

scale-up:

  • Make the scale-up script restore/create the games disk snapshot, rather than the PowerShell boot script

  • Once created, store a flag in project metadata indicating the disk's name and zone. This can be done in parallel while scaling up the Instance Group to save a bit of time.

  • Modify the PowerShell boot script to poll project metadata for this flag (similar to Add watcher for maintainence metadata changes #32). Once found, attach the disk it mentions.

  • Send a desktop toast when starting to attach any disk (implementing add a desktop notification when games disk is attached #74)

  • Never stop polling; if the flag is removed, detach the disk from within the Instance (after running sync)

scale-down:

  • Remove the project metadata flag and poll until the disk is detached.

  • If a timeout is reached, scale down the Instance Group anyway and keep waiting for the disk to be detached

  • As soon as disk is detached, commence snapshot and disk deletion (can be in parallel with scaling down the Instance, if this hasn't already started)

@koderian
Copy link

Sounds good! The disk issue seems really random.

Some times, the games disk gets attached within minutes of the instance scaling up. Sometimes it never attaches and I need to ./scale-down and then ./scale-up for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants