简体   繁体   English

Azure ARM模板正在缓存自定义脚本文件

[英]Azure ARM Template is caching the Custom script file

We are working on an Azure ARM Template which is creating an VM and running a Bashscript on startup using Custom script extension. 我们正在研究Azure ARM模板,该模板将创建VM并在启动时使用自定义脚本扩展名运行Bashscript。 It was working well for sometime but then suddenly it started caching the SH file. 一段时间以来,它运行良好,但随后突然开始缓存SH文件。 I added few commands which ended in some error, so I removed them but still I am getting same error.I tried deleting SH file from URI but still the error persisted. 我添加了一些以某些错误结尾的命令,因此我删除了它们,但仍然出现相同的错误。我尝试从URI删除SH文件,但错误仍然存​​在。

Command which I added to my custom script was for creating a directory(mkdir) only. 我添加到自定义脚本中的命令仅用于创建目录(mkdir)。

Has anyone seen anything like this on Azure ?? 有人在Azure上看到过类似的东西吗?

Yes, its not the template that's caching it, its the extensión that does that. 是的,它不是缓存它的模板,而是这样做的扩展。 You need to either delete the extensión from the VM before retrying or use the ForceUpdateTag` in the template. 您需要在重试之前从VM中删除扩展名,或使用模板中的ForceUpdateTag`。

Docs here . 文档在这里

ForceUpdateTag: ForceUpdateTag:
Specifies that the extension should be run again with the same public or protected settings. 指定应使用相同的公共或受保护的设置再次运行扩展。 The value can be any string different from the current value. 该值可以是与当前值不同的任何字符串。 If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. 如果未更改forceUpdateTag,则处理程序仍将应用对公共或受保护设置的更新。

ps. ps。 Azure Powershell DSC extensión has the same behavior. Azure Powershell DSC扩展具有相同的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM