microsoft / microsoft/sre-agent

[Issue] Azure SRE Agent Ignored User Constraint

Open
#177 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
160
Forks
97
Avg merge
2d 5h
Merged PRs (30d)
12

Description

Issue Description
User prompted the agent to drain and reboot a list of AVD session hosts that does not have any active users. The user explicitly instructed the agent to only reboot session hosts that have 0 active users. The SRE Agent rebooted all the session hosts in the list, including those that have active users.

Thread ID
Paste the thread ID from the SRE Agent portal
c833476d-f5b4-400e-94d6-919230369463

Steps to Reproduce
1. Prompt the agent to drain and reboot a list of AVD session hosts that does not have any active users.

Expected Behavior
It should gather information on the session hosts and determine whether it has active users. If the session host have active users, do nothing. If the session host has 0 active users, drain and reboot the session host.

Actual Behavior
The agent rebooted all the sessions hosts.
The agent's user-assigned managed identity issued Microsoft.Compute/virtualMachines/restart/action calls for all hosts in scope without performing per-host session validation against the user's explicit constraint ("only reboot hosts that have 0 active users"). The agent failed to check ActiveSessions via the AVD API or WVDAgentHealthStatus before issuing restart commands.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with thread c833476d-f5b4-400e-94d6-919230369463 and trace the AVD session-host workflow that issues Microsoft.Compute/virtualMachines/restart/action calls. Review how ActiveSessions and WVDAgentHealthStatus are obtained through the AVD API; done means hosts with active users are left untouched while hosts with zero active users are drained and rebooted.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.