Closed eszych closed 5 years ago
Thanks - this is fixed in the next version (which is not ready for testing) however i've backported it to master, so you should be good to run it again. The issue isn't with sudo, as the extension runs elevated anyway - it was with the waagent not supporting being upgraded (apt-get upgrade) by the extension itself.
Thanks!
Hello Matt,
thanks for the quick fix - but I guess that does not make sense:
echo Running apt-get update -y... sudo apt-get update -y sudo apt-mark hold walinuxagent --> # apt-get upgrade -y <-- marked as comment, line will not run? sudo apt-mark unhold walinuxagent
I changed the localy cached file and ran it manually using this instead:
echo Running apt-get update -y... sudo apt-get update -y sudo apt-mark hold walinuxagent sudo apt-get upgrade -y sudo apt-mark unhold walinuxagent
and the script ran just fine...
Best Regards Elmar
The master version was commented purely because for the MySQL script to run, there is no actual need for apt-get upgrade. You’ll notice the MSSQL script doesn’t use apt-get upgrade either, hence the comment. I’ve seen random issues with upgrade in the past hence the comment.
Glad it worked for you.
For reference, the hold and unhold lines prevent a particular package updating, in this case, the waagent, which as mentioned, can’t be upgraded by the extension running.
Describe the issue MySQLVM deployment fails at stage customscriptextensions: Deployment failed. 5:02:42 PM - Resource Microsoft.Compute/virtualMachines/extensions 'mysqlhost/CustomScriptExtension' failed with message '{ "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "VMExtensionProvisioningError", "message": "Failed to provision VM extensions for VM 'mysqlhost'" } ] } }'.Exception.Message
Error might be in the install_MySQL8.sh. In line #34 (apt-get upgrade -y) there seems to be the "sudo" is missing. Even after changing that line to "sudo apt-get upgrade -y" the script throws an error when running it manually. The error is related to the "waagent" - recommended action is to run "dpkg --configure -a" manually. After running that command, the install_MySQL8.sh script runs fine...