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

feat(worker-manager): Immediate worker provisioning for Azure #5382

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

lotas
Copy link
Contributor

@lotas lotas commented Apr 26, 2022

Further improve worker manager Azure provisioning.

Till now, Azure was the only provider that was not actually doing any cloud api calls in the provisioner loop, and only created worker record in REQUESTED state, that was later picked by workerScannerAzure.
This sometimes can take 10-20 minutes, and, considering overall provisioning slowness, it often ends with worker being terminated, as they fail to start within given time (terminateAfter) (Leading to errors seen in #4999)

Related to #4999

@lotas lotas requested a review from a team as a code owner April 26, 2022 11:56
@lotas lotas requested review from petemoore and matt-boris and removed request for a team April 26, 2022 11:56
@@ -50,6 +50,35 @@ helper.secrets.mockSuite(testing.suiteName(), [], function(mock, skipping) {
monitor = await helper.load('monitor');
});

const assertProvisioningState = async (expectations) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is moved out of one suit, because it is needed in two different


test('successful provisioning of VM without public ip', async function() {
await assertProvisioningState({ ip: 'none', nic: 'none', vm: 'none' });
suite('provisionResources without public IP', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted this test in separate case, as its success depends on initial setup(), worker pool needs to have proper workerConfig to set skipPublicIP properly

setup('create un-provisioned worker', async function() {
const workerPool = await makeWorkerPool();
const workerInfo = {
existingCapacity: 0,
requestedCapacity: 0,
};

// prevent the worker from being immediately provisioned
sandbox.stub(provider, 'checkWorker').returns('ok');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just ensures that internal state for fake calls are not interfered by calling checkWorker inside provision() call

Copy link
Contributor

@matt-boris matt-boris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Can't wait to see even more improvements from this 👍🏻 🎉

@matt-boris matt-boris merged commit 6b10d28 into main Apr 26, 2022
@matt-boris matt-boris deleted the feature/scanner-stats branch April 26, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants