Skip to content

Instantly share code, notes, and snippets.

@lossyrob
lossyrob / azure-batch-force-pull.md
Last active August 20, 2021 16:40
Forcing an Azure Batch node to pull from ACR without restarting the node

Forcing an Azure Batch node to pull from ACR

Sometimes you want to keep a node in an Azure Batch pool up and running as you're debugging tasks so that you don't have to pay the waiting time to spin up and down a node. You may want to push a new image to ACR with the same tag to run the job based on fixes based on the last run. However, Azure Batch nodes don't pull an updated image by default, and will run with the same image if a task is run again even if ACR has been updated.

The best solution I've found to speed things up is:

  • In Batch Explorer, go to the pool view, right click on the node, and "connect"
  • This will ssh into the node. Inside of the shell, run:
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb: