Skip to content

Fix Linux extension exits 0 without writing status file on enable#372

Open
srikrishnaveturi wants to merge 2 commits into
Azure:devfrom
srikrishnaveturi:fix-extension-no-status-file-on-enable
Open

Fix Linux extension exits 0 without writing status file on enable#372
srikrishnaveturi wants to merge 2 commits into
Azure:devfrom
srikrishnaveturi:fix-extension-no-status-file-on-enable

Conversation

@srikrishnaveturi

@srikrishnaveturi srikrishnaveturi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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.

@srikrishnaveturi srikrishnaveturi force-pushed the fix-extension-no-status-file-on-enable branch from 216a2b4 to 7d919d7 Compare July 7, 2026 19:53
Comment thread proxy_agent_extension/src/handler_main.rs Outdated
@srikrishnaveturi srikrishnaveturi force-pushed the fix-extension-no-status-file-on-enable branch from 7d919d7 to f95c83c Compare July 8, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants