X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/cc7d6f1a330d8f7866f2eae9df4f433612e6915e..18ffc0fe13aa3c58fdd6926551ebe4569fc0125f:/lib/constants.py diff --git a/lib/constants.py b/lib/constants.py index 51a3559..1c91e15 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -141,6 +141,7 @@ RAPI_USERS_FILE = DATA_DIR + "/rapi/users" QUEUE_DIR = DATA_DIR + "/queue" DAEMON_UTIL = _autoconf.PKGLIBDIR + "/daemon-util" SETUP_SSH = _autoconf.TOOLSDIR + "/setup-ssh" +KVM_IFUP = _autoconf.PKGLIBDIR + "/kvm-ifup" ETC_HOSTS = "/etc/hosts" DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR ENABLE_FILE_STORAGE = _autoconf.ENABLE_FILE_STORAGE @@ -436,8 +437,15 @@ RIE_HANDSHAKE = "Hi, I'm Ganeti" # Remote import/export certificate validity in seconds RIE_CERT_VALIDITY = 24 * 60 * 60 -# Remote import/export connect timeout for socat -RIE_CONNECT_TIMEOUT = 60 +# Overall timeout for establishing connection +RIE_CONNECT_TIMEOUT = 180 + +# Export only: how long to wait per connection attempt (seconds) +RIE_CONNECT_ATTEMPT_TIMEOUT = 20 + +# Export only: number of attempts to connect +RIE_CONNECT_RETRIES = 10 + #: Give child process up to 5 seconds to exit after sending a signal CHILD_LINGER_TIMEOUT = 5.0 @@ -768,7 +776,8 @@ HT_NIC_E1000 = "e1000" HT_NIC_PARAVIRTUAL = HT_DISK_PARAVIRTUAL = "paravirtual" HT_HVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI, - HT_NIC_NE2K_ISA, HT_NIC_PARAVIRTUAL]) + HT_NIC_E1000, HT_NIC_NE2K_ISA, + HT_NIC_PARAVIRTUAL]) HT_KVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI, HT_NIC_NE2K_ISA, HT_NIC_I82551, HT_NIC_I85557B, HT_NIC_I8259ER, @@ -837,6 +846,7 @@ NV_DRBDLIST = "drbd-list" NV_FILELIST = "filelist" NV_HVINFO = "hvinfo" NV_HYPERVISOR = "hypervisor" +NV_HVPARAMS = "hvparms" NV_INSTANCELIST = "instancelist" NV_LVLIST = "lvlist" NV_MASTERIP = "master-ip" @@ -999,22 +1009,24 @@ QFT_ALL = frozenset([ # Query result field status (don't change or reuse values as they're used by # clients) #: Normal field status -QRFS_NORMAL = 0 +RS_NORMAL = 0 #: Unknown field -QRFS_UNKNOWN = 1 -#: No data (e.g. RPC error), can be used instead of L{QRFS_OFFLINE} -QRFS_NODATA = 2 -#: Value unavailable for item -QRFS_UNAVAIL = 3 +RS_UNKNOWN = 1 +#: No data (e.g. RPC error), can be used instead of L{RS_OFFLINE} +RS_NODATA = 2 +#: Value unavailable/unsupported for item; if this field is supported +#: but we cannot get the data for the moment, RS_NODATA or +#: RS_OFFLINE should be used +RS_UNAVAIL = 3 #: Resource marked offline -QRFS_OFFLINE = 4 - -QRFS_ALL = frozenset([ - QRFS_NORMAL, - QRFS_UNKNOWN, - QRFS_NODATA, - QRFS_UNAVAIL, - QRFS_OFFLINE, +RS_OFFLINE = 4 + +RS_ALL = frozenset([ + RS_NORMAL, + RS_UNKNOWN, + RS_NODATA, + RS_UNAVAIL, + RS_OFFLINE, ]) # max dynamic devices