Helga Velroyen [Fri, 11 Oct 2013 14:07:33 +0000 (16:07 +0200)]
Fix typos and indentation for cluster.py
This patches fixes a typo and some indentation errors
that were accidentally introduced by premature pushing
of the patch series "Improvements on disk templates, in
particular file storage".
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Helga Velroyen [Wed, 9 Oct 2013 13:45:53 +0000 (15:45 +0200)]
QA: remove subsumed QA test wrt disk templates
This patch removes a QA test that was supposed to test
that unused disk templates can be disabled safely. The
test is now subsumed by unit tests and thus we remove it
here. Besides that, it was actually testing the wrong
thing, as it tested that a _used_ disk template could
be disabled.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 13:16:29 +0000 (15:16 +0200)]
NEWS: mention restrictions wrt disabling disk templates
Mention the newly introduced feature, that disk templates
can no longer be disabled when there are instances still
using those.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 11:50:28 +0000 (13:50 +0200)]
Move unit tests for --file-storage-dir to cmdlib/*
There were some unit tests for the '--file-storage-dir'
option of 'gnt-cluster modify' still left in the unit
test file ganeti.cmdlib.cluster_unittest.py.
With the introducion of the unit test framework for
cmdlib, they now get converted into
cmdlib/cluster_unittest.py.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 12:16:40 +0000 (14:16 +0200)]
Correct properties of the cluster's file storage dir
This patch does:
- Rename the haskell opcode parameter
'pGlobalFileStorageDir' and 'pGlobalSharedfileStorageDir'
to 'pClusterFileStorageDir' and
'pClusterSharedfileStorageDir', respectively, because
the old name was misleading.
- The two parameters are made optional strings instead of
non-empty strings. This actually used to be like this
before, but was accidentally overriden by the switch to
opcode generation from haskell to python.
- The ClusterFileStorageDir parameter had to be renamed in
Haskell to not clash with the FileStorageDir parameter
of the OpInstanceCreate code.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 11:34:26 +0000 (13:34 +0200)]
Move disk template unit tests to test/py/cmdlib/
This patch moves some unit tests related to dis/enabling
disk templates from ganeti.cmdlib.cluster_unittest.py
to cmdlib/cluster_unittest.py to utilized the new cmdlib
unit test framework.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 10:48:23 +0000 (12:48 +0200)]
Make GetDiskTemplateSets output disabled disk templates
This patch extends the 'GetDiskTemplateSets' function to
also output the list of disk templates that were enabled
before this operation, but will be disabled afterwards.
This patch also includes code to check for instances using
disk templates that are about to be disabled.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 09:39:48 +0000 (11:39 +0200)]
Rename GetEnabledDiskTemplates to include disabled ones
This patch solely renames the functions
_GetEnabledDiskTemplates* to _GetDiskTemplateSets, because
in later patches, we will refactor it to not only output
disk templates that are or get enabled, but also the ones
that get disabled. The list of disabled disk templates
will be used for further sanity checks of operations.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 09:24:03 +0000 (11:24 +0200)]
Check for running instances when disabling templates
This patch introduces a function to be used in
'gnt-cluster modify' when disabling a couple of disk
templates. It checks whether there are still instances
running that use these templates.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 9 Oct 2013 14:05:20 +0000 (16:05 +0200)]
Merge branch 'stable-2.9' into master
* stable-2.9
Version bump for 2.9.0 rc2
Update NEWS for 2.9.0 rc2
Downgrade 'vif_script'
Downgrade 'xen_cmd'
Add test cluster config for version 2.9
Remove superfluous import of 'errors'
Start NEWS entry for 2.9.0 rc2
Fix lint errors
Fix upgrade and downgrade regarding disk.dev_type
Rename LDS_DRBD to DTS_DRBD
* stable-2.8
Fix typo in walkthrough documentation
Don't attemp ipv6 ssh in case of ipv4 cluster
Fix outdated documentation for users-setup
Conflicts:
NEWS: trivial
configure.ac: ignore suffix bump on stable-2.9
lib/constants.py: manually replay 66a37e on master
lib/objects.py: manually apply the LDS -> DTS change on master
test/data/cluster_config_2.9.json: take version of stable-2.9
tools/cfgupgrade: union of all Upgrade tasks, remove all downgrade paths from stable-2.9
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Klaus Aehlig [Wed, 9 Oct 2013 11:27:19 +0000 (13:27 +0200)]
Suggest running 'gnt-cluster upgrade --resume' at reboots
In the example crontab, add an entry to run 'gnt-cluster upgrade --resume'
upon reboot of the node, as suggested in the design document.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 9 Oct 2013 11:13:23 +0000 (13:13 +0200)]
Mention 'gnt-cluster upgrade' in NEWS
We added a new command, so mention it as news.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 9 Oct 2013 11:03:44 +0000 (13:03 +0200)]
Update man page for 'gnt-cluster upgrade --resume'
This option is now implemented, and this change should be
mentioned in the man page. Also, document that it is safe
call on all nodes, and if no update was going on.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 9 Oct 2013 08:16:41 +0000 (10:16 +0200)]
NEWS: mention improvements on instance allocation
This patch mentions the improvements of the iallocator
with respect to instance allocation of non-LVM disk
templates.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 15:12:35 +0000 (17:12 +0200)]
Use 'DTS_LVM' when possible
This patch replaces all usages of the utility function
'GetLvmDiskTemplate' by the new 'DTS_LVM' constant
to make it consistant with the usage of other DTS_*
constants.
Additionally, it provides a unit tests to ensure
consistancy between DTS_LVM and the mapping of disk
templates and storage types.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 12:20:43 +0000 (14:20 +0200)]
iallocator: use lookup by disk template
So far, the iallocator requested storage information
about all enabled disk templates but discarded all but
the LVM information, even if it was allocating space
for a non-LVM instance. With this patch, it now only
asks for the one that is relevant for
the allocation request.
This has the following advantages:
- less load in the RPC call
- meaningful storage information is used for non-LVM
instance and thus better allocation
Note that this so far works only for instance allocation.
The code introduces some FIXMEs which will be resolved
when utilizing the improvements in other iallocator
requests as well.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 12:47:44 +0000 (14:47 +0200)]
utils/storage.py: storage info lookup by disk template
This patch improves the handling of storage information
before and after a call to the RPC 'node_info'. It
adds a function to not only call for all storage
information on the cluster (as it is used right now),
but to ask only for storage information for a particular
disk template. This way, in many cases, for example
by the iallocator, less information is requested and thus
performance is increased. Unit tests are provided.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 12:26:47 +0000 (14:26 +0200)]
Replace GetLvmDiskTemplates by 'DTS_LVM'
To reach consistency by how we manage different
categorizations of disk templates, this patch
introduces the set of disk templates which are lvm-based:
'DTS_LVM'.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Tue, 8 Oct 2013 16:09:26 +0000 (18:09 +0200)]
If possible, replace symbolic links in place
Naive 'ln -s -f a b' will put the link inside 'b', if
'b' is (a symlink to) a directory; so, during upgrades,
the links in $(sysconfdir) cannot be updated this way.
Removing and readding works, however leaves the risk
of the upgrade process dying in that very moment, thus
leaving 'gnt-cluster' a dangling link, so that the --resume
option is of no help. On GNU systems, avoid this problem
by using the -T option of GNU ln.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Tue, 8 Oct 2013 15:10:09 +0000 (17:10 +0200)]
Make information about GNU ln available to programs
Propagate the information on whether we have the GNU version of ln
to all programs by making it available as a constant.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Tue, 8 Oct 2013 14:53:27 +0000 (16:53 +0200)]
Add simple test whether ln is the GNU version
If the GNU version is present, we can use certain GNU-extensions,
like the -T option, rendering some parts more robust.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Tue, 8 Oct 2013 12:57:54 +0000 (14:57 +0200)]
Version bump for 2.9.0 rc2
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Tue, 8 Oct 2013 12:56:24 +0000 (14:56 +0200)]
Update NEWS for 2.9.0 rc2
Document that we have also taken care of the bug in 'cfgupgrade --downgrade'
and schedule release date.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:51:40 +0000 (19:51 +0200)]
Fix 'AutoConf' import
Fix 'AutoConf' import to be qualified.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 11:37:16 +0000 (13:37 +0200)]
Fix import order
Fix import order to be alphabetically sorted.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:45:43 +0000 (19:45 +0200)]
Hs2Py constants: improve auto repair
Fix auto repair related constants to use the Haskell type 'AutoRepairResult' instead of simple 'String' values.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:44:39 +0000 (19:44 +0200)]
Hs2Py constants: opcodes
Add opcode related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:43:51 +0000 (19:43 +0200)]
Hs2Py constants: node daemon setup
Add node daemon setup related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:43:11 +0000 (19:43 +0200)]
Hs2Py constants: hail, opcode, and SSH
Add hail, opcode, and SSH related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:42:07 +0000 (19:42 +0200)]
Hs2Py constants: assorted constants
Add assorted constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:40:57 +0000 (19:40 +0200)]
Hs2Py constants: UID pool
Add UID pool related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:40:01 +0000 (19:40 +0200)]
Hs2Py constants: 'maxUdpDataSize'
Add 'maxUdpDataSize' constant to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:39:09 +0000 (19:39 +0200)]
Hs2Py constants: remove comments
Remove several comment from 'lib/constants.py' because these have been moved to Haskell.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:36:28 +0000 (19:36 +0200)]
Hs2Py constants: assorted constants
Add some assorted constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:35:40 +0000 (19:35 +0200)]
Hs2Py constants: 'ispecsMinmaxDefaults'
Add 'ispecsMinmaxDefaults' to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:34:16 +0000 (19:34 +0200)]
Hs2Py constants: 'hvcGlobals' and 'ndcGlobals'
Add 'hvcGlobals' and 'ndcGlobals' to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:32:44 +0000 (19:32 +0200)]
Hs2Py constants: 'defaultEnabledHypervisor'
Add 'defaultEnabledHypervisor' to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:32:01 +0000 (19:32 +0200)]
Hs2Py constants: SSCONF
Add SSCONF related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:30:51 +0000 (19:30 +0200)]
Hs2Py constants: dynamic devices
Add dynamic devices related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:29:56 +0000 (19:29 +0200)]
Hs2Py constants: HT related constants
Add HT related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:27:12 +0000 (19:27 +0200)]
Hs2py constants: query resources
Add query resources related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:24:55 +0000 (19:24 +0200)]
Hs2Py constants: '/etc/hosts' and job queue
Add '/etc/hosts' and job queue related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:23:01 +0000 (19:23 +0200)]
Hs2Py constants: VNC
Add VNC related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 17:21:17 +0000 (19:21 +0200)]
Hs2Py constants: SSL, job queue, and locks
Add SSL, job queue, and locks related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:35:33 +0000 (18:35 +0200)]
Hs2Py constants: node verify
Add node verify constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 08:49:39 +0000 (10:49 +0200)]
Hs2Py constants: assorted, idisk, and inic
Add assorted, idisk, and inic related constants to the Haskell to
Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:28:12 +0000 (18:28 +0200)]
Hs2Py constants: nics
Add nics related constants to the Haskell to Python constant
generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 08:03:23 +0000 (10:03 +0200)]
Hs2Py constant: DRBD and dynamic disk
Add DRBD and dynamic disk parameter constants to the Haskell to Python
constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 08:18:07 +0000 (10:18 +0200)]
Hs2Py constants: backend and logical disks
Add backend and logical disks related constants to the Haskell to
Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 08:12:23 +0000 (10:12 +0200)]
Hs2Py constants: HVST and disk state
Add HVST and disk state related constants to the Haskell to Python
constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 08:11:45 +0000 (10:11 +0200)]
Hs2Py constants: assorted and HVS
Add asserted and HVS related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:12:01 +0000 (18:12 +0200)]
Hs2Py constants: move reboot types
Move constants 'instanceReboot*' to correct place according to
'lib/constants.py'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:11:46 +0000 (18:11 +0200)]
Hs2Py constants: reboot behaviour
Add reboot behaviour constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 08:38:11 +0000 (10:38 +0200)]
Hs2Py constants: scripts and actions
Add script and action related constants to the Haskell to Python
constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:08:52 +0000 (18:08 +0200)]
Hs2Py constants: move 'ipCommandPath'
Move constant 'ipCommandPath' to the appropriate place according to
'lib/constants.py'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:08:36 +0000 (18:08 +0200)]
Hs2Py constants: 'jobIdsKey', 'runparts' and 'rpc'
Add several groups of constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:07:15 +0000 (18:07 +0200)]
Hs2Py constants: 'diskTransferConnectTimeout'
Add 'diskTransferConnectTimeout' constant to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:06:14 +0000 (18:06 +0200)]
Hs2Py constants: remove comments
Remove useless comments from 'lib/constants.py'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:03:36 +0000 (18:03 +0200)]
Hs2Py constants: network related
Add network related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:02:04 +0000 (18:02 +0200)]
Hs2Py constants: add import/export config
Add import/export config constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 16:01:12 +0000 (18:01 +0200)]
Hs2Py constants: add 'RIE' related
Add remote import/export related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:57:04 +0000 (17:57 +0200)]
Hs2Py constants: add DRBD and RBD
Add DRBD and RBD related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:54:40 +0000 (17:54 +0200)]
Hs2Py constants: storage related groups
Add several groups of storage related constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:42:51 +0000 (17:42 +0200)]
Hs2Py constants: add several groups of constants
Add several groups of constants, namely, console types, security, I/O
compression, import/export, hooks, and hkr related, to the Haskell to
Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:29:55 +0000 (17:29 +0200)]
Hs2Py constants: add 2 more constants
Add 2 more constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:25:18 +0000 (17:25 +0200)]
Hs2Py constants: add CPU pinning
Add CPU pinning constants to the Haskell to Python constant
generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:23:09 +0000 (17:23 +0200)]
Hs2Py constants: add export versions
Add export version constants to the Haskell to Python constant
generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:16:28 +0000 (17:16 +0200)]
Move VTypes to the appropriate place
Move 'VType' related constants to the appropriate place to match
Python's constants module.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 15:10:00 +0000 (17:10 +0200)]
Hs2Py constants: add SSH key files
Add SSH key file constants to the Haskell to Python constant
generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 14:16:48 +0000 (16:16 +0200)]
Hs2Py constants: add network mirrored disk templates
Add network mirrored disk template constants to the Haskell to Python
constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 12:12:58 +0000 (14:12 +0200)]
Fix documentation comment
Fix documentation comment in 'Ganeti.ConstantUtils'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 18:25:32 +0000 (20:25 +0200)]
Hs2Py constants: update forgotten 'SOCAT_ESCAPE_CODE'
Update constant 'SOCAT_ESCAPE_CODE' to retrieve its value from the
generated 'lib/_constants.py'. The Haskell counterpart of this
constant, namely, 'socatEscapeCode', has already been added.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 12:11:47 +0000 (14:11 +0200)]
Hs2Py constants: add Luxi constants
Add Luxi related constants to the Haskell to Python constant
generation. A new Haskell type is added 'Ganeti.Types.PythonChar' to
wrap the Python character type.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 7 Oct 2013 07:51:57 +0000 (09:51 +0200)]
Hs2Py constants: add 'fileDriver'
Add constant 'fileDriver' to the Haskell to Python constant
generation. The constant 'FILE_DRIVER' is also moved to the
appropriate place in 'lib/constants.py'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 12:08:23 +0000 (14:08 +0200)]
Hs2Py constants: add local disk status
Add constants related to local disk status to the Haskell to Python
constant generation. A new Haskell type 'LocalDiskStatus' is added
similarly to the constants that have been added previously in other
Hs2Py patches.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 4 Oct 2013 11:55:32 +0000 (13:55 +0200)]
Hs2Py constants: constants related to 'Ganeti.Htools.Types'
Add constants related to the Haskell types defined in
'Ganeti.Htools.Types' to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 15:27:30 +0000 (17:27 +0200)]
Hs2Py constants: add node parameter related constants
Add node parameter related constants to the Haskell to Python constant
generation. This patch also fixes a type inconsistency between
Haskell and Python, namely, 'ndsParameterTypes' and
'ndsParameterTitles' become 'Map's instead of 'Tuple's, which allows
us to simplify the module 'Ganeti.Query.Common'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 15:18:14 +0000 (17:18 +0200)]
Hs2Py constants: add RPC timeout constants
Add RPC timeout related constants to the Haskell to Python constant
generation. The Haskell data type 'RpcTimeout' is moved from
'Ganeti.Rpc' to 'Ganeti.Types' so it can be used by
'Ganeti.HsConstants' without causing circularity problems with
'Ganeti.Rpc'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 14:49:59 +0000 (16:49 +0200)]
Hs2Py constants: add 'ReplaceDisksMode' related constants
Add constants related to the Haskell type 'ReplaceDisksMode'. The
data type declaration for 'ReplaceDisksMode' is also moved from
'Ganeti.OpParams' to 'Ganeti.Types' because it used to be used only by
the opcodes and now it is also needed for the constants.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 13:25:04 +0000 (15:25 +0200)]
Hs2Py constants: add 'osApiVersions'
Add constant 'osApiVersions' to the Haskell to Python constant
generation. This patch fixes the type of this constant, by changing
from 'List' to 'Set', therefore, 'Ganeti.Query.Server' is updated
accordingly.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 13:24:32 +0000 (15:24 +0200)]
Fix indentation
Fix indentation in 'Ganeti.OpCodes'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 13:18:07 +0000 (15:18 +0200)]
Fix typo in documentation
Fix typo in documentation in 'Ganeti.JSON'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 2 Oct 2013 13:16:06 +0000 (15:16 +0200)]
Disregard comments in 'src/Ganeti/ListContants.hs' target
Update target 'src/Ganeti/ListContants.hs' to disregard comments in
'src.Ganeti.HsContants' when extracting the names of the constants
that need to be generated from Haskell to Python.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 30 Sep 2013 09:03:38 +0000 (11:03 +0200)]
Hs2Py constants: add more constants
Add more constants to the Haskell to Python constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 30 Sep 2013 09:03:15 +0000 (11:03 +0200)]
Hs2Py constants: add 'Ganeti.Confd' types
Hs2Py constants: add 'Ganeti.Confd' types.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 30 Sep 2013 09:00:57 +0000 (11:00 +0200)]
Add 'declareILADT' to declare integer literal datatypes
Add 'declareILADT' to declare integer literal datatypes.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 30 Sep 2013 09:00:20 +0000 (11:00 +0200)]
Update reference to proper module
Update reference to constant 'confdMagicFourcc' to fetch its value
from 'Ganeti.Constants' instead of the re-export from module
'Ganeti.Confd.Types'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Thu, 26 Sep 2013 15:19:34 +0000 (17:19 +0200)]
Hs2Py constants: add confd requests
Add confd request related constants to the Haskell to Python constant
generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Thu, 26 Sep 2013 15:15:29 +0000 (17:15 +0200)]
Move confd request constants to 'Ganeti.ConstantUtils'
* move confd request related constants to 'Ganeti.ConstantUtils' so
they can be used in both 'Ganeti.HsConstants' and
'Ganeti.Confd.Types' without circularity problems and GHC stage
restrictions.
* fix some comments
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Tue, 8 Oct 2013 11:45:00 +0000 (13:45 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix typo in walkthrough documentation
Don't attemp ipv6 ssh in case of ipv4 cluster
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Tue, 8 Oct 2013 11:26:47 +0000 (13:26 +0200)]
Fix typo in walkthrough documentation
Fix typo in walkthrough documentation, where 'instance3' should read
'instance1' in order to be consistent with the output below in the
example.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 09:35:30 +0000 (11:35 +0200)]
Downgrade 'vif_script'
This patch adds removing the 'vif_script' attribute
from the cluster's config when downgrading from 2.9
to 2.8. Adaption of the unit test is included.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 09:00:42 +0000 (11:00 +0200)]
Downgrade 'xen_cmd'
This downgrades the cluster's hypervisor parameters for the
xen hypervisors with respect to the 'xen_cmd' attribute.
A unit tests is provided.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 09:09:35 +0000 (11:09 +0200)]
Add test cluster config for version 2.9
This adds a cluster config example for version 2.9 to
the test data collection. It will be used in subsequent
tests.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Tue, 8 Oct 2013 09:03:06 +0000 (11:03 +0200)]
Remove superfluous import of 'errors'
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Mon, 7 Oct 2013 10:46:26 +0000 (12:46 +0200)]
Add --resume option to 'gnt-cluster upgrade'
This option will resume an upgrade of the Ganeti version of
a cluster that got interrupted by a reboot of the master node,
or similar event.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 7 Oct 2013 13:20:54 +0000 (15:20 +0200)]
Add function to determine current configuration version
The 'gnt-cluster upgrade --resume' command needs to determine whether the
configuration has already been updated or not, in order to decide at which
phase to resume. So provide a function to determine the version of the
configuration on file.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 7 Oct 2013 12:40:08 +0000 (14:40 +0200)]
Add method to read and parse the intent-to-upgrade file
During upgrades, a file is written to disk on master that documents
the fact that an upgrade is currently in progress. Add a function
to parse it.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 7 Oct 2013 14:40:22 +0000 (16:40 +0200)]
Provide utility function to check a configuration version
In order for 'gnt-cluster upgrade --resume' to determine whether the configuration
is already upgraded, it needs to compare whether a configuration version is compatible
with a Ganeti target version. Provide a utility function for this.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 7 Oct 2013 14:40:45 +0000 (16:40 +0200)]
Fix typo in doc string
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>