NPS VM sizes fail with BatchAgentInstallationFailure if ContainerConfiguration is specified
Problem Description
Nodes in NPs VM size pool fail to start with BatchAgentInstallationFailure if ContainerConfiguration is specified. All other VM sizes work with the same configuration. This was observed in West US 2, didn't test other regions. The nodes fail even if ContainerConfiguration has ACR registry referenced.
Steps to Reproduce
// Reference Microsoft.Azure.Batch NuGet package
using Microsoft.Azure.Batch;
using Microsoft.Azure.Batch.Auth;
using System.Threading.Tasks;
async Task Main()
{
var batchAccountUrl = "BATCH ACCOUNT ENDPOINT URL";
var batchAccountName = "BATCH ACCOUNT NAME";
var batchAccountKey = "BATCH ACCOUNT KEY";
var batchCredentials = new BatchSharedKeyCredentials(batchAccountUrl, batchAccountName, batchAccountKey);
var imageReference = new ImageReference("centos-container", "microsoft-azure-batch", "7-8", "latest");
var nodeAgentSku = "batch.node.centos 7";
var vmConfigWithoutContainerConfig = new VirtualMachineConfiguration(imageReference, nodeAgentSku);
var vmConfigWithContainerConfig = new VirtualMachineConfiguration(imageReference, nodeAgentSku) { ContainerConfiguration = new ContainerConfiguration() };
using (var batchClient = BatchClient.Open(batchCredentials))
{
await batchClient.PoolOperations
.CreatePool("NPBUG_NP10sVmSize_WithoutContainerConfig_Works", "Standard_NP10s", vmConfigWithoutContainerConfig, targetLowPriorityComputeNodes: 1)
.CommitAsync();
await batchClient.PoolOperations
.CreatePool("NPBUG_OtherVmSize_WithContainerConfig_Works", "Standard_A2_v2", vmConfigWithContainerConfig, targetLowPriorityComputeNodes: 1)
.CommitAsync();
await batchClient.PoolOperations
.CreatePool("NPBUG_NP10sVmSize_WithContainerConfig_Fails", "Standard_NP10s", vmConfigWithContainerConfig, targetLowPriorityComputeNodes: 1)
.CommitAsync();
}
}
Expected Results
Node transitions to Idle.
Actual Results
Node stays in Starting for long time, about 15 min, then gets BatchAgentInstallationFailure every ~12 min. Eventually the node transitions to Unusable.
Additional Logs
Additonal Comments
This looks like it is a bug in the agent bootstrapping code since the NP series does not have a GPU and the bootstrap looks to be attempting to install the Nvidia GPU drivers (and failing to do so).
@staer Looks like Line 83 in /opt/batch/bootstrap/azbatch_image_script.sh needs to be something like this, to avoid installing NVIDIA drivers for the FPGA machines:
if [[ $SIZE == STANDARD_N* && $SIZE != STANDARD_NP* ]]; then
I am curious why are the NVIDIA drivers installed only if the pool has ContainerConfiguration specified. Aren't they needed for pools without ContainerConfiguration?
The above is indeed the problem (and a potential solution). We'll make a change and publish new images and I'll update the thread when they become available.
@staer Any updates?
Sorry for the delay, this change is going to be added in the next image release which will hopefully be this week or next. Will update the thread when the release occurs.
The ubuntu-server-container and ubuntu-server-container-rdma images have been updated with a fix for this. The CentOS 7.8 images will not get this fix as 7.8 is now end-of-life. That being said, a new CentOS 7.9 image is produced and will be made public soon which does have the above fix. Be on the lookout for the 7.9 variants of the image. I will close the issue once the CentOS images are available, sorry for the delay.
@staer can this image be pushed to Azure China (mooncake)? It's currently not available there.
@staer can this image be pushed to Azure China (mooncake)? It's currently not available there.
We can, but do not plan to publish the image to Azure China. Instead, can you try using the ubuntu-hpc images there, they have the same software stack and work with batch.
@staer ETA on the CentOS 7.9 images?
Should be available end of next week. Our release pipeline is currently on hold due to holidays.
@staer has this been merged in already?
This should now be fixed on both the centos and Ubuntu container images batch produces.