Open tchrischan opened 2 years ago
could you provide your configuration (redact whatever you need to)? Ideally as a configuration-as-code plugin export.
No, I don't know why the bulitInImage for a Windows template is ubuntu 20.04 LTS (or why it's not correct for any of my templates). You can ignore the init script, we tried to extend the OS disk but I don't think that worked; the same VM behavior happened before that script was put in earlier this week.
[...]
jenkins:
[...]
clouds:
- azureVM:
azureCredentialsId: ***redacted***
cloudName: ***redacted***
configurationStatus: "pass"
deploymentTimeout: 1200
existingResourceGroupName: ***redacted***
maxVirtualMachinesLimit: 20
resourceGroupReferenceType: "existing"
vmTemplates:
[...]
- agentLaunchMethod: "SSH"
agentWorkspace: "c:\\jenkins"
builtInImage: "Ubuntu 20.04 LTS"
credentialsId: ***redacted***
diskType: "managed"
doNotUseMachineIfInitFails: false
executeInitScriptAsRoot: false
existingStorageAccountName: ***redacted***
imageReference:
galleryImageDefinition: ***redacted***
galleryImageVersion: ***redacted***
galleryName: ***redacted***
galleryResourceGroup: ***redacted***
gallerySubscriptionId: ***redacted***
imageTopLevelType: "advanced"
initScript: "Resize-Partition -DriveLetter C -Size ((Get-PartitionSupportedSize\
\ -DriveLetter C).SizeMax)"
javaPath: "java"
labels: "windows"
location: "East US"
maximumDeploymentSize: 3
newStorageAccountName: ***redacted***
noOfParallelJobs: 1
osDiskSize: 300
osDiskStorageAccountType: "StandardSSD_LRS"
osType: "Windows"
retentionStrategy:
azureVMCloudPool:
poolSize: 1
retentionInHours: 0
shutdownOnIdle: true
storageAccountNameReferenceType: "existing"
storageAccountType: "Standard_LRS"
subnetName: ***redacted***
templateDesc: "Windows 2019 Datacenter pre-loaded for ***redacted*** builds"
templateName: ***redacted***
usageMode: EXCLUSIVE
usePrivateIP: true
virtualMachineSize: "Standard_D4ds_v5"
virtualNetworkName: ***redacted***
virtualNetworkResourceGroupName: ***redacted***
[...]
If you’re managing it with jcasc you can remove built in image since https://github.com/jenkinsci/azure-vm-agents-plugin/releases/tag/795.vd5903dae1139
Doesn’t cause any harm though
Why don’t you disable shutdownOnIdle?
Because deleting the VM on idle instead means the local vcpkg cache is rebuilt on every run, so they will each take a very long time. That's what we're trying to avoid.
Version report
Jenkins and plugins versions report:
Reproduction steps
<===[JENKINS REMOTING CAPACITY]===>Remoting version: 4.11.2 This is a Windows agent Agent successfully connected and online ERROR: Connection terminated java.io.EOFException at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2872) at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3367) at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:936) at java.base/java.io.ObjectInputStream.<init>(ObjectInputStream.java:379) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49) at hudson.remoting.Command.readFrom(Command.java:142) at hudson.remoting.Command.readFrom(Command.java:128) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:61) Caused: java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:75)
Results
Expected result:
At least 1 Windows VM should be available for scheduling at all times (the template limit is 3)
Actual result:
Have to manually "un-suspend" the Windows VM several times a day. This is a problem because there is no notification the agent is suspended, and most of the team is several time zones away.