Making admin commands work for serial console when the VM has a custom storage account attached#9479
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
|
@microsoft-github-policy-service agree company="Microsoft" |
…m storage account attached.
b78af08 to
3f508f9
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9479 in repo Azure/azure-cli-extensions |
|
@necusjz I think the builds should pass now if you retrigger them. I updated the test recordings that were making the builds fail. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ serial-console-1.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=147046356&view=results |
|
@necusjz Thank you for approving the PR! I had two questions about the whole devops process if that's alright.
Thanks a lot for your answers in advance! |
The bug initially came as a customer complaining that sending NMIs (non-maskable interrupts) to their VMs through the CLI did not work. After further investigation, it was found that having the VM switch from a custom to a managed storage account made the NMI sendable through the CLI. After more investigation, it was found that both custom and managed storage accounts worked when sending the NMI through the Azure Portal, and so after digging through the code, it was found that the reason for that was because the bearer token is not being sent by the cli to the connector container which means that the logic to make the host connect by storing the blob does not get executed. However, since the Azure Portal does send the token, then the code behaved as expected.
When looking at the container logs, the error showing up is that the host has not connected and so there is no one to handle the admin command that is being set and that is why the loading icon loads for a few minutes after sending the cli command (before abruptly ending).
The fix is to ensure that for custom accounts, the bearer token is being sent by the cli.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az cli serial-console ...
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.