X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/3d5ebbf06fc4f71a3bbc7d11d4c6a47aa5ce0a16..c260fa25a3aa5817417aab8adff96b714cb5f234:/lib/constants.py diff --git a/lib/constants.py b/lib/constants.py index 8047726..b8810d3 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -416,10 +416,18 @@ EXPORT_MODES = frozenset([ EXPORT_MODE_REMOTE, ]) -# lock recalculate mode +# Lock recalculate mode LOCKS_REPLACE = 'replace' LOCKS_APPEND = 'append' +# Lock timeout (sum) before we should go into blocking acquire (still +# can be reset by priority change); computed as max time (10 hours) +# before we should actually go into blocking acquire given that we +# start from default priority level; in seconds +LOCK_ATTEMPTS_TIMEOUT = 10 * 3600 / 20.0 +LOCK_ATTEMPTS_MAXWAIT = 15.0 +LOCK_ATTEMPTS_MINWAIT = 1.0 + # instance creation modes INSTANCE_CREATE = "create" INSTANCE_IMPORT = "import"