-
Notifications
You must be signed in to change notification settings - Fork 250
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
Conversation
@@ -50,6 +50,35 @@ helper.secrets.mockSuite(testing.suiteName(), [], function(mock, skipping) { | |||
monitor = await helper.load('monitor'); | |||
}); | |||
|
|||
const assertProvisioningState = async (expectations) => { |
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.
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() { |
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.
extracted this test in separate case, as its success depends on initial setup()
, worker pool needs to have proper workerConfig
to set skipPublicIP
properly
02e14b0
to
338f8a7
Compare
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'); |
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.
this just ensures that internal state for fake calls are not interfered by calling checkWorker
inside provision()
call
338f8a7
to
8e5dd17
Compare
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.
Awesome! Can't wait to see even more improvements from this 👍🏻 🎉
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 inREQUESTED
state, that was later picked byworkerScannerAzure
.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