azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

is extension supposed to only work once?

Open jackchenwork opened this issue 8 years ago • 2 comments

I see similar behavior with Windows and Linux customscript, looks like the first run result is cached and following run just show first run's result.

for example, I have a json file
cat script-centos.json { "fileUris": ["https://mystorageshare.blob.core.windows.net/publicshare/centos.sh"], "commandToExecute": "sh ./centos.sh" } When I run az vm extension set -g rg --vm-name centosvm1 --name CustomScriptForLinux --publisher Microsoft.OSTCExtensions --settings script-centos.json --protected-settings "{}"

the first time, I got error "The specified blob does not exist", cause I forgot to upload centos.sh to the storage account. then I uploaded it and rerun the command, still got the same error even when the file is there now.

To make it work, I need to delete the previous extension first: az vm extension delete -g rg --vm-name centosvm1 --name CustomScriptForLinux

then it will work.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

jackchenwork avatar Jul 31 '18 20:07 jackchenwork

CRP will not re-provision the extension if the configuration has not changed, to overturn this behavior , make sure you supply the argument of --force-update

yugangw-msft avatar Aug 01 '18 18:08 yugangw-msft

please activate the issue if the flag doesn't help

yugangw-msft avatar Aug 01 '18 18:08 yugangw-msft