Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

simplify long-life proxy cleanup #904

Closed
wants to merge 3 commits into from

Conversation

bmc-msft
Copy link
Contributor

@bmc-msft bmc-msft commented May 20, 2021

After merging #839 , I hit a race condition where I created proxy session while the proxy was being shut down.

This PR addresses this race condition by

  1. unifies all of the proxy state actuation into timer_proxy rather than two distinct timer functions.
  2. sets outdated at the end of the timer_proxy function, and checks during the next iteration (30s later).

Additionally, this works addresses another issue I had not seen during the review of #839 but noticed upon handling the above issue. Currently, an up-to-date proxy is always maintained for any region a proxy has been created. If the worker VMs all move from eastus to eastus2, we don't need to continue to manage proxies in eastus.

This PR also includes EventProxyStateUpdated, which adds in debugging this aforementioned issue.

This PR also changes the VM names for proxies to be proxy-<base58(proxy_id)> to handle the automatic disk name generation limits. Otherwise, disk names are truncated from the VM names and never get deleted.

@bmc-msft
Copy link
Contributor Author

CC: @nharper285

@bmc-msft bmc-msft marked this pull request as draft May 20, 2021 19:32
@bmc-msft bmc-msft closed this May 21, 2021
ghost pushed a commit that referenced this pull request May 22, 2021
Refactored PR of #904 for easier review.  Once #908 is reviewed & merged, this will be easier to review.
@bmc-msft bmc-msft deleted the simplify-proxy-cleanup branch May 24, 2021 19:27
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants