{"action":"created","issue":{"url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/469","repository_url":"https://api.github.com/repos/avocado-framework/avocado-vt","labels_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/469/comments","events_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/469/events","html_url":"https://github.com/avocado-framework/avocado-vt/pull/469","id":150084838,"number":469,"title":"Job lock: plugin that prevents multiple runs of VT jobs","user":{"login":"clebergnu","id":447178,"avatar_url":"https://avatars.githubusercontent.com/u/447178?v=3","gravatar_id":"","url":"https://api.github.com/users/clebergnu","html_url":"https://github.com/clebergnu","followers_url":"https://api.github.com/users/clebergnu/followers","following_url":"https://api.github.com/users/clebergnu/following{/other_user}","gists_url":"https://api.github.com/users/clebergnu/gists{/gist_id}","starred_url":"https://api.github.com/users/clebergnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebergnu/subscriptions","organizations_url":"https://api.github.com/users/clebergnu/orgs","repos_url":"https://api.github.com/users/clebergnu/repos","events_url":"https://api.github.com/users/clebergnu/events{/privacy}","received_events_url":"https://api.github.com/users/clebergnu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-21T14:06:04Z","updated_at":"2016-05-02T19:26:58Z","closed_at":"2016-05-02T19:26:58Z","pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/469","html_url":"https://github.com/avocado-framework/avocado-vt/pull/469","diff_url":"https://github.com/avocado-framework/avocado-vt/pull/469.diff","patch_url":"https://github.com/avocado-framework/avocado-vt/pull/469.patch"},"body":"This introduces a Pre/Post Job type of plugin, that attempts to create\r\na lock file in a common location before the job is started, and remove\r\nthe lock file after the job has finished.  The goal is to prevent\r\nmultiple runs of avocado (with VT tests) to corrupt files such as\r\nguest OS images.\r\n\r\nIt's still possible to have multiple parallel jobs running on the same\r\nmachine, as long as their configuration point to different lock\r\ndirectories, which should follow different data directories, to\r\nprevent the original problem of data file corruption.\r\n\r\nThe mechanism used for locking is a simplistic one, similar to daemon\r\nPID files.  It should be possible to either rewrite or improve the\r\nlock mechanism completely without bringing changes to the user\r\nexpected behavior of, by default, not having multiple Avocado-VT jobs\r\nrun at once.\r\n\r\nOne other issue worth noticing is that, due to Avocado's Job internals,\r\nwhich currently lacks a proper interface for querying a Job's suite\r\nof tests, the use of this plugin imposes extra overhead because it\r\ncalls `_make_test_suite()` itself.  When Avocado gets a proper interface,\r\nthis extra call can be dropped.\r\n\r\nNote: this depends on https://github.com/avocado-framework/avocado/pull/1139\r\n\r\nSigned-off-by: Cleber Rosa <crosa@redhat.com>"},"comment":{"url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/comments/216336294","html_url":"https://github.com/avocado-framework/avocado-vt/pull/469#issuecomment-216336294","issue_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/469","id":216336294,"user":{"login":"clebergnu","id":447178,"avatar_url":"https://avatars.githubusercontent.com/u/447178?v=3","gravatar_id":"","url":"https://api.github.com/users/clebergnu","html_url":"https://github.com/clebergnu","followers_url":"https://api.github.com/users/clebergnu/followers","following_url":"https://api.github.com/users/clebergnu/following{/other_user}","gists_url":"https://api.github.com/users/clebergnu/gists{/gist_id}","starred_url":"https://api.github.com/users/clebergnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebergnu/subscriptions","organizations_url":"https://api.github.com/users/clebergnu/orgs","repos_url":"https://api.github.com/users/clebergnu/repos","events_url":"https://api.github.com/users/clebergnu/events{/privacy}","received_events_url":"https://api.github.com/users/clebergnu/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T19:26:58Z","updated_at":"2016-05-02T19:26:58Z","body":"Closing in favor of #484 "}}