0
votes

According to the Microsoft Documentation, in Azure Batch without the version specified the default version of an application will be deployed.

In my Azure Batch Account I have uploaded an application "MyApp" and set the default version, lets say version "1.0".

When I create a new Pool (in .NET) if I set the ApplicationPackageReferences omitting the version, i.e:

 myCloudPool.ApplicationPackageReferences = new List<ApplicationPackageReference>
 {
     new ApplicationPackageReference 
     {
        ApplicationId = "MyApp"
     }
 };

The nodes will get the status "Unusable".

If I do the same, but at task level, then the default application is deployed successfully to the node.

Why is that?

1
Hiya, Cool, so what you mentioned above seems like this is happening at the pool level, this can only happen if there is a node error, can you check the error summary and see what is the error details appearing. I might be able to help you out. :) - Tats_innit
I am taking a look and might build a small case around this and dig deeper, in the mean time, I would recommend using the version at the pool level OR if the task level with default version supports the scenario. - Tats_innit

1 Answers

2
votes

Thank you Olandese, I came across this specific case only in the case for default version at pool level and the fix is under its way, I will keep you posted when it will get released.

In the mean time there are few options or at pool level you can do so by using the version parameter.

  • Task level packages with default, which you are already mentioned above.
  • Use of the version parameter to pass the default version.

` Sample:

 new List< ApplicationPackageReference >

{
     new ApplicationPackageReference(appID, version: appVersion),
},

`

Thanks for your patience, apologies for the inconvenience, will update you once the release is out.

Further addition: If you have faster changing default version

I would do it this way: (With appId as constant and the version as the dynamic version)

  • By doing this your code pretty much guarantees that node will go and grab the specified version mentioned if its there. Hope this helps.

`

new List<ApplicationPackageReference> 
    {
         new ApplicationPackageReference(appID, version: appVersion),
    },