Move compilation of some regexes to init time
I have found a few regexes which are static and thus can be moved toload time, rather than run time, creation.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix breakage from previous commit e695efb
Wrong file name in Makefile.am and wrong naming (.unittest vs_unittest).
Add missing paramter and unittests for this case
While git-am'ing the blockdev_prefix patch, I modified the hv_xen.pyfile but forgot to amend the patch :(, so here it is.
Furthermore, to detect such inconsistencies in the future, a unittest isadded that cross-checks the default parameters in constants.py and the...
Adding blockdev_prefix to hypervisor options
Allows to install Red Hat based systems, for example Oracle Linux.Tested with OEL.
The hypervisor by default offers a device named 'sda'. If the SCSImodule is already loaded, the disk device can't be created due to naming...
RPC call_node_info: change protocol
Currently, the call_node_info RPC does always check both the VG freespace and the hypervisor information. However, in ⅔ of the uses, we onlycare about one or the other. Therefore, we change it so that if any ofthe passed parameters is None, we don't perform the respective check. We...
asyncnotifier tests: simplify the setup code
First change is to replace "range(len(self.NOTIFIERS)))" withself.NOTIFIERS, as range(len(range(N))) ≡ range(N).
Sencond change is switch from an explicit indexing to use of zip.Unittests still pass :)
Signed-off-by: Iustin Pop <iustin@google.com>...
Cluster rename: skip offline nodes
This only tries to upload the ssh_known_hosts_file to the online nodes,eliminating a timeout and warning for offline nodes.
The default value for ndparams should be None not {}
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix missed CheckArguments on ndparams for SetNodeParams
In the previous patch where I modified LUSetNodeParams to take ndparamsinto account I missed this additional check of parameters in the LogicalUnit. This patch adds ndparams to the recognized parameter lists which...
Fix per-vg checks in instance disk conversion
Since we now have just two possibilities (plaint to drbd or drbd toplain), we can assume (+an assert) that we come from LVM and accessdirectly logical_id0 for the VG on which it is stored.
Removed _CheckNodesFreeDisk function
Was substituted by _CheckNodesFreeDiskPerVG.
Signed-off-by: Dmitry Chernyak <dmi.chernyak@gmail.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Make instance creation VG-aware
Also should work disk growing, instance moving and prerequisite checks.
Signed-off-by: Dmitry Chernyak <dmi.chernyak@gmail.com>[iustin@google.com: small style fixes]Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Introduced VG-aware disk space checks
Implemented _CheckNodesFreeDiskPerVG and _ComputeDiskSizePerVG functionsfor VG-aware iterations.
Signed-off-by: Dmitry Chernyak <dmi.chernyak@gmail.com>[iustin@google.com: some style fixes (long lines, etc.)]Signed-off-by: Iustin Pop <iustin@google.com>...
Added "vg" argument to the --disk syntax
Added "vg" argument to the "gnt-instance ... --disk" syntax specification.Now is ok to write:
gnt-instance add ... --disk N:size=NNg,vg=VG_NAME ...
But not all internal structures are ready to handle this yet....
Merge branch 'devel-2.3'
Merge branch 'devel-2.2' into devel-2.3
Fix coverage reports
Currently, the coverage reports include the unittests themselves, andthis skewes unfairly the reports, as the coverage for the tests is veryhigh (since they all run).
To fix this, we export the ganeti temp dir from run-in-temp-dir, and we...
Adding --node-parameters command line flag
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Adding ndparams to their OpCodes and LU calls
Add consistency test for mcpu dispatch table
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
cmdlib: Use _POutputFields where possible
Update query2 design document
While starting to implement this, I found a number of deficiencies:
- Drop regular expressions. As it turned out, only very few fields for instances used them, all of which can easily be turned into static field names.- Use two separate calls with a request and response description each....
Basic stuff to allocate disks on different VGs
Extend allocation functions to be aware of different vg names. Suppose,vg_name is helded in disk.physical_id0 (already was) LUCreateInstanceis modified to be aware of new "vg" argument of the disk specification....
Adding convenience getter for ndparams
RAPI: implement no_install during instance creation
Signed-off-by: Lance Albertson <ramereth@gmail.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
utils._RunCmdPipe: simplify the timeout logic
There are two issues: first, it's simpler to assign directly to ptinstead of via another local variable. Second, this code doesn't makesense: if lt < 0: break pt = max(0, lt)
If lt is indeed < 0, then the code will break. Otherwise, lt ≥ 0, and...
utils._RunCmdPipe: fix poller timeout usage
This patch makes a simple timeout test (e.g. testTimeoutKill) go from13K poll syscalls to just 6. The code didn't take into account thatRunningTimeout talks in seconds while the poller object expectsmilliseconds....
Fix utils unittest TestRunCmd.testTimeoutKill
Currently the test executes "/bin/sh -c 'trap "" TERM …" via the shell,which means we have two shells involved (the parent one and the childone, which does the trap). For some weird reason, this works for older...
RAPI: export the node group UUID in the node query
Adding oob_program in the same style as beparams
Temporarily remove the interactive tests
make check < /dev/null breaks these tests. Until we have change RunCmdto override stdin, we need to remove them.
Support timeouts in RunCmd
Further investigations have to be done for merging some of these bitstogether with import-export daemon which uses similiar logic.
Updates NEWS and configure.ac for 2.3.0~rc1
Conflicts: NEWS (integrated 2.2 changes) configure.ac (kept our version)
Update NEWS & configure.ac for the 2.2.2 release
This imports the 2.1.8 NEWS entry and adds the 2.2.2 one, then updates theconfigure.ac version.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Fix documentation regarding conversion to drbd
Reinstall instance: disallow offline secondaries
Currently, reinstallation of a DRBD instance with the secondary node offline does:
node1# gnt-instance reinstall -f instance1Waiting for job 139053 for instance1...Thu Nov 18 01:36:09 2010 - WARNING: Could not prepare block device disk/0 on node node3 (is_primary=False, pass=1): Node is marked offline...
QA: check that doubly modifying an OS state is OK
This would have prevented the bug fixed in the previous patch :(
Fix breakage in OS state modify
I was using the feedback_fn function incorrectly (it doesn'tautomatically expand the arguments).
Conflicts: lib/cmdlib.py (reverted & applied manually the change)
QA: add tests for gnt-cluster modify -B
LUSetClusterParms: fix validation of beparams
Since the contents of the dict is validated via the ForceDictType, we cansimply require that it is a dict here. The previous check was wrong, as it wascopied from the HV checks (which also doesn't verify the leaf dict type)....
Adding unittests for RunningTimeout
Move locking.RunningTimeout to utils
As we need this functionality in other places than just locking it makessense to move it to utils rather than keeping it in locking
Some further man tweaks
This fixes one non-defined CUSTOM_ entry, and replaces two hardcodedpaths with further configure-time variables.
CUSTOM_
Remove last vestiges of docbook
This patch removes the last traces of docbook.
Remove the SGML man sources
… finally!
Switch man pages from SGML to RST
This patch changes the Makefile rules to build the man pages from theRST sources instead of the SGML ones.
Note: pandoc quotes by default the ‘@’ character in manpage output, sowe explicitely undo this before writing the .in file....
Add RST version of ganeti man page
Add RST version of ganeti-os-interface man page
Add RST version of ganeti-cleaner man page
Add RST version of ganeti-confd man page
Add RST version of ganeti-rapi man page
Add RST version of ganeti-noded man page
Add RST version of ganeti-watcher man page
Add RST version of ganeti-masterd man page
Add RST version of gnt-os man page
Add RST version of gnt-job man page
Add RST version of gnt-debug man page
Add RST version of gnt-backup man page
Add RST version of gnt-node man page
Add RST version of gnt-cluster man page
Add RST version of gnt-instance man page
Add a footer.rst
This is the conversion from footer.sgml. Will be used later for therst-to-man conversion.
Add pandoc to configure.ac
Design document for new query infrastructure
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Add group, group.uuid fields in node list
This is needed to at least see the current group configuration.
Add unittests for TemporaryReservationManager
And fix an error message.
TempReservationManager: Reserved() doesn't work
Note: It appears this has been around since the initial checkin ofTemporaryReservationManager. I have no idea what this could break, sosomeone else may want to test this more thoroughly.
Signed-off-by: David Knowles <dknowles@google.com>...
impexpd: Disable OpenSSL compression in socat if possible
This uses an option only available in patched socat versions. Moreinformation is available from the INSTALL update included in thispatch.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Conflicts: Makefile.am: Trivial
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
devel/release: Use release-specific Makefile targets
Makefile: Add new dist target for releases
A new script, autotools/check-tar, is used to check the resulting.tar.gz file for unwanted contents like wrong file owners orpermissions.
Update ganeti-os-interface documentation
man/ganeti-os-interace.sgml lacked complete information for the NIC-relatedenvironment variables. Added a reference to NIC_%N_LINK and NIC_%N_MODE andclarified the reference to NIC_%N_BRIDGE.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>...
Makefile: Check for empty files and dirs on distcheck
Including empty files can cause unnecessary warnings for packagers.
Revert commit e7e23e73, work around Automake bug
After commit e7e23e73 the build would fail in distcheck on systems withAutomake 1.10. An investigation identified Automake bug #5331 as thecause. Applying the changes in Automake commit 3a12ed5e2 to the...
Design Doc: Ganeti Node OOB Management Framework
Fix disk checks in “gnt-cluster verify”
Tests have shown that the changes in commit b8d26c6e5 don't work aswanted. If any disk wasn't found on the node, all disks located on thesame node would show as faulty. The cause was incorrect exceptionhandling on the node....
QA: Run “gnt-cluster verify” while DRBD instance exists
This tests some parts of the disk information collection.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Remove empty file from doc/html in distribution
It's not needed and some packaging systems complain about emptyfiles.
Remove shebang line from ganeti.server.*
Some of then were forgotten.
Fix typos in NEWS
Bump version for Ganeti 2.3
Also update cfgupgrade and NEWS.
Drop the -g shortcut for --vg-name
Changing the volume group is a lot less frequent than acting on a nodegroup. As such we drop the "-g" shortcut and require the long option tobe passed. In 2.3 the commands which used to accept the volume group as"-g" won't have any node group option, so no confusion will arise. Later...
Merge the common options between import and add
The "I always wanted to do this" commit.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Improve LookupNodeGroup's docstring
Add ConfigWriter.GetNodeGroup
Remove private ip mention in error message
There is no "private" ip in Ganeti, we only have primary and secondaryones. Whether they are public or private is a per-installation detail.
luxi: disable two lint errors
This is already disabled for the same type of request a couple of linesabove. The new code was introduced in e986f20c but didn't have thedisables.
Add -s option to gnt-node modify
We can now change a nodes' secondary ip.
Update NEWS for Ganeti 2.3
QA: Test ssconf_instance_list file on rename and creation
This test would've caught the bug fixed in the previous patch.
config: Write ssconf after renaming instance
This fixes a bug where the ssconf_instance_list file wasnot updated after an instance rename.
Change qa_utils.ResolveInstanceName to take name
… instead of an object. Allows it to be used in places whereonly the name is available.
Makefile: Add PYTHON_BOOTSTRAP to linted code
Make *.in non-executable