Skip to content

Conversation

@AnatoliB
Copy link
Contributor

When the ManagedDependencies folder contains leftovers from the previous PowerShell worker version, the new PowerShell worker may not be able to detect the correct snapshot to use. As a result, it installs a new snapshot on every PowerShell worker start, causing unnecessary "cold start" delays.

The problem is that the installed snapshot folders are expected to follow the *r pattern, and some Az.* module names also match this pattern coincidentally (e.g. Az.TrafficManager). As a result, PowerShell worker mistakenly considers ManagedDependencies/Az.TrafficManager the latest installed snapshot folder, tries to find the ManagedDependencies/Az.TrafficManager/Az/2.5.0, assumes this snapshot is not good enough, and starts installing a new one.

This change replaces the *r pattern with *.r, which will filter out all the existing Az.* module folders, so that they don't interfere with looking for the latest snapshot anymore. These folders will be eventually purged from the storage.

Until this change is deployed, the workaround for the issue is to stop the app, manually remove the content of the D:\home\data\ManagedDependencies folder, and start the app again.

@AnatoliB AnatoliB merged commit e37e853 into Azure:master Aug 19, 2019
@AnatoliB AnatoliB deleted the fix-installed-snapshot-names branch September 12, 2019 01:20
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

Successfully merging this pull request may close these issues.

2 participants