Fix Linux extension exits 0 without writing status file on enable#372
Open
srikrishnaveturi wants to merge 2 commits into
Open
Fix Linux extension exits 0 without writing status file on enable#372srikrishnaveturi wants to merge 2 commits into
srikrishnaveturi wants to merge 2 commits into
Conversation
216a2b4 to
7d919d7
Compare
ZhidongPeng
reviewed
Jul 7, 2026
ZhidongPeng
requested changes
Jul 7, 2026
7d919d7 to
f95c83c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three related defects caused the Linux GPA extension to exit 0 without writing a status file on enable, making waagent read back its own pre-created placeholder (" \n"), fail to parse it as JSON, and report VMExtensionProvisioningError to CRP.
Fix 1 -- proxy_agent_shared/src/service.rs:
query_service_executable_path now returns Result instead of silently swallowing Err and returning an empty PathBuf. All callers are updated.
Fix 2 -- proxy_agent_extension/src/handler_main.rs:
enable_handler on Linux now always writes a Transitioning status for the current seq_no before exiting, regardless of whether the seq_no changed. Previously the write was guarded by should_report_status, so on VM restart with the same seq_no no status was written and waagent read back its own placeholder.
Fix 3 -- proxy_agent_extension/src/common.rs:
On Linux, get_proxy_agent_service_path() now returns the well-known fixed path (/usr/sbin/azure-proxy-agent) directly instead of querying systemctl show --property=ExecStart. The systemd unit-file cache is not hot right after install, causing ExecStart to return empty, which previously triggered a false VersionMismatch and a spurious re-install on every enable invocation.