Batch icon indicating copy to clipboard operation
Batch copied to clipboard

NPS VM sizes fail with BatchAgentInstallationFailure if ContainerConfiguration is specified

Open tonybendis opened this issue 4 years ago • 12 comments

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

tonybendis avatar Jun 14 '22 05:06 tonybendis

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 avatar Jun 14 '22 15:06 staer

@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?

tonybendis avatar Jun 14 '22 23:06 tonybendis

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 avatar Jun 15 '22 02:06 staer

@staer Any updates?

BMurri avatar Aug 09 '22 16:08 BMurri

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.

staer avatar Oct 26 '22 18:10 staer

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 avatar Nov 15 '22 16:11 staer

@staer can this image be pushed to Azure China (mooncake)? It's currently not available there.

MattMcL4475 avatar Dec 14 '22 00:12 MattMcL4475

@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 avatar Dec 14 '22 16:12 staer

@staer ETA on the CentOS 7.9 images?

BMurri avatar Jan 05 '23 22:01 BMurri

Should be available end of next week. Our release pipeline is currently on hold due to holidays.

staer avatar Jan 06 '23 02:01 staer

@staer has this been merged in already?

vsmalladi avatar Feb 15 '23 18:02 vsmalladi

This should now be fixed on both the centos and Ubuntu container images batch produces.

staer avatar Feb 15 '23 18:02 staer