MLOS
MLOS copied to clipboard
Clean up the traces and other temp files after running remote commands on Azure VMs
Each time MLOS runs a remote command on Azure VM (using AzureVMService and https://docs.microsoft.com/en-us/rest/api/compute/virtual-machines/run-command), the remote system stores run logs with complete stdout/stderr dumps at /var/lib/waagent/run-command/download/<ID>/. Eventually these logs can consume all storage on the remote VM and the new remote commands will fail to run. We need to introduce a mechanism of cleaning up these logs from MLOS and think of the strategies of minimizing the footprint of the remote commands (e.g., by minimizing our stdout output and using log files that are easier to clean)