{"action":"created","issue":{"url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/issues/73","repository_url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent","labels_url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/issues/73/comments","events_url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/issues/73/events","html_url":"https://github.com/JetBrains/teamcity-azure-agent/issues/73","id":271815124,"node_id":"MDU6SXNzdWUyNzE4MTUxMjQ=","number":73,"title":"Diagnose build agents problems","user":{"login":"tom-dudley","id":21339406,"node_id":"MDQ6VXNlcjIxMzM5NDA2","avatar_url":"https://avatars1.githubusercontent.com/u/21339406?v=4","gravatar_id":"","url":"https://api.github.com/users/tom-dudley","html_url":"https://github.com/tom-dudley","followers_url":"https://api.github.com/users/tom-dudley/followers","following_url":"https://api.github.com/users/tom-dudley/following{/other_user}","gists_url":"https://api.github.com/users/tom-dudley/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-dudley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-dudley/subscriptions","organizations_url":"https://api.github.com/users/tom-dudley/orgs","repos_url":"https://api.github.com/users/tom-dudley/repos","events_url":"https://api.github.com/users/tom-dudley/events{/privacy}","received_events_url":"https://api.github.com/users/tom-dudley/received_events","type":"User","site_admin":false},"labels":[{"id":464628704,"node_id":"MDU6TGFiZWw0NjQ2Mjg3MDQ=","url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/labels/arm","name":"arm","color":"fef2c0","default":false},{"id":118432098,"node_id":"MDU6TGFiZWwxMTg0MzIwOTg=","url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/labels/enhancement","name":"enhancement","color":"0e8a16","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-11-07T12:31:37Z","updated_at":"2018-06-04T11:36:35Z","closed_at":null,"author_association":"NONE","body":"I'd like to able to diagnose an issue I'm having on one of my agents so have started it manually from the Azure portal. Unfortunately it immediately shuts down with the logs showing:\r\n```\r\nTerminating instance AzureCloudInstance{myName='foo'}, profile 'bar'{id=arm-1} with idle time 1,112 minutes (idle time is 30 minutes)\r\n```\r\n\r\nI'm assuming the plugin only resets the idle time when it itself starts a VM. I have a few proposals for this:\r\n\r\n1. Notice when the VM is started externally, reset the idle time to zero as soon at the plugin notices. (Or possibly work out how long the machine has been idle based on when it started)\r\n2. Notice when the VM is started externally, and don't apply the timeout to this machine.\r\n3. Notice when the VM is started externally, and apply some _other_ (user-configurable) timeout.\r\n\r\nThis second scenario would be very useful in the case where you have a build which only fails on a build agent, and requires investigation - which might be a lengthy process. This scenario puts the deallocation of the machine entirely in the hands of whoever manually started it.\r\n\r\nThe third scenario would be a guard against starting a machine manually for some reason, and then forgetting to deallocate it. As an example, the idle timeout might be 30 minutes whereas the 'other' timeout might be 4 hours (since it's not expected someone would not need to be on an agent for more than 4 hours).\r\n\r\nSince in my case we have both cloud and local agents, and do investigations on agents which take longer than the timeout, I'd be in favour of the second or third suggestion."},"comment":{"url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/issues/comments/394324137","html_url":"https://github.com/JetBrains/teamcity-azure-agent/issues/73#issuecomment-394324137","issue_url":"https://api.github.com/repos/JetBrains/teamcity-azure-agent/issues/73","id":394324137,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDMyNDEzNw==","user":{"login":"dtretyakov","id":1025927,"node_id":"MDQ6VXNlcjEwMjU5Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1025927?v=4","gravatar_id":"","url":"https://api.github.com/users/dtretyakov","html_url":"https://github.com/dtretyakov","followers_url":"https://api.github.com/users/dtretyakov/followers","following_url":"https://api.github.com/users/dtretyakov/following{/other_user}","gists_url":"https://api.github.com/users/dtretyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/dtretyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtretyakov/subscriptions","organizations_url":"https://api.github.com/users/dtretyakov/orgs","repos_url":"https://api.github.com/users/dtretyakov/repos","events_url":"https://api.github.com/users/dtretyakov/events{/privacy}","received_events_url":"https://api.github.com/users/dtretyakov/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T11:36:35Z","updated_at":"2018-06-04T11:36:35Z","author_association":"CONTRIBUTOR","body":"Sorry for delay, I'll investigate the problem, but it from the description it behaves not as expected."}}
{"actor":{"display_login":"dtretyakov"}}