storage: Check that mapper is either used or None
This is a followup patch to the one moving GetAllocatable out tomodule level.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix bug in “gnt-node list-storage”
LVM PV storage units would always show as allocatable, even when theyweren't. For some reason I have not been able to determine, the functionparsing the attributes (“_GetAllocatable”) was not even called and thelist opcode simply returned the attribute string as the value (e.g....
Improve import/export timeout settings
With this patch, the exporting node will retry to connect a few times.The receiving node will make use of the master's increased timeout (seeprevious patch).
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Increase remote import/export timeout
It's been shown that 60 seconds may not be enough to establish aconnection.
Allow burnin with hidden OSes
burnin is a cluster/testing feature, so it makes sense that a hidden OScan be used for it.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
last_resort groups prioritized by iallocator plugin
Also change language slightly for preferred groups to look better nowthat it's repeated.
Signed-off-by: Stephen Shirley <diamond@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
gnt-instance info: Show disk template
The data was already there, but not shown.
Remove unused import from client.gnt_instance
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Adeodato Simo <dato@google.com>
gnt-instance console: Improve error reporting
If the SSH command fails, this will give a more detailed errormessage than before.
Increase timeout for connection on remote import
The source cluster has to shut down an instance before it can beexported. Doing so can take a while, but the default connection timeoutis only 60 seconds. Adding the shutdown timeout on the receiving cluster...
import-export: Improve timeout error reporting
When the source cluster takes too long to create a snapshot, thedestination would time out. Unfortunately no good error message waswritten unless debug logging was enabled, not even to the log file. Thiswill be improved with this patch....
cfgupgrade: Remove unused “program” variable
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
cfgupgrade: Check master name, clarify question
- Check hostname and abort if it doesn't match contents of “ssconf_master_node”, can be overridden using “--ignore-hostname” parameter.- Clarify confirmation question and don't mention instances anymore....
Makefile: Merge build-time reST copying
No need to copy this snippet around, “make” can work harder for us.
Move doc/upgrade.rst to UPGRADE, copy at build-time
This will allow distributions to install the file as text documentation.
Import upgrade notes into documentation
This patch formats the upgrade notes currently in the wiki1 as reSTand adds them to the documentation.
[1] http://code.google.com/p/ganeti/wiki/UpgradeNotes
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Fix typo in gnt-instance manpage
s/os-name/os-type/. This was reported in issue 133.
jqueue: Fix cancelling while in waitlock in queue
Since the recent change to leave jobs in the “waitlock” status (commit5fd6b6947), cancelling a job while it's back in the queue would break.This patch handles these cases and adds a unittest.
cli: Extend message for LUXI timeouts
Point out that jobs already submitted continue to run.
Fix timeout handling in LUXI client
If the socket can't be read in time, it raises “socket.timeout”, forwhich there is special handling code. Unfortunately the exception blockwas in the wrong order and “socket.error” caught it before.
Merge branch 'stable-2.3' into devel-2.3
Prepare 2.3.1 release
QA: Run cluster-verify as part of all instance tests
“gnt-cluster verify” looks at some per-instance information as well, soit should be run for each instance type QA tests.
QA: Fix typo and add “not”
ensure-dirs: Speed up when using big queues
The “ensure-dirs” script as included in Ganeti 2.3 is very slow whenworking with big queues requiring a change of permissions on many or allfiles.
$ find /var/lib/ganeti/queue/ | wc -l52354
Before this change:...
Fix gnt-cluster verify with diskless instances
`gnt-cluster verify` was failing with KeyError if there was anydiskless instance in the cluster. This was because _CollectDiskInfo()was not including these instances in the returned dictionary, but theywere expected to be present in LUVerifyCluster.Exec()....
jqueue: Keep jobs in “waitlock” while returning to queue
Iustin Pop reported that a job's file is updated many times while itwaits for locks held by other thread(s). After an investigation it wasconcluded that the reason was a design decision for job priorities to...
Improve jqueue unittests
- Verify job file updates- Ensure queue lock is released while executing opcode
Update manpages to display version 2.3
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix disk status verification in LUClusterVerify
Commit b8d26c6 added disk status verification, but it has two(different) bugs for not healthy nodes.
For offline nodes, we don't add at all the disk status to theinstance/node dict, with the result that the instance is not present in...
Merge branch 'devel-2.2' into devel-2.3
Merge branch 'stable-2.2' into devel-2.2
Merge branch 'stable-2.2' into stable-2.3
Fix rename for file-backed instances
Currently the code wrongly changes the disk logical/physical idcomponent representing the path from "$storage_dir/$iname/disk$seq" to"$storage_dir/$iname/disk/$seq" (note the additional slash) breaking therename.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
locking: Clarify message for removed locks
Just being told that a lock doesn't exist can be confusing. One casewere this happens is when a job (e.g. instance modify) waits for a jobremoving the instance (e.g. export with remove).
Bump version for 2.3.1~rc1 release
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>...
Bump version for 2.3.0
Correct version check for release candidates
The tilde needs to be escaped and I forgot the space which should beused instead.
config.py: need explicit %-formatting in errors.OpPrereqError.
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix version check
Don't ask … all I say is distcheck.
Add script to check version format
Only versions of the format “x.y.z” and “x.y.z~(rc|beta)N” (for N>0) areallowed.
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...
Updates NEWS and configure.ac for 2.3.0~rc1
Conflicts: NEWS (integrated 2.2 changes) configure.ac (kept our version)
Signed-off-by: Iustin Pop <iustin@google.com>...
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)....
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>...
Conflicts: Makefile.am: Trivial
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...
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
Move ganeti-noded to ganeti.server.noded
Move ganeti-rapi to ganeti.server.rapi
Make *.in non-executable
Prepare move of daemons to ganeti.server
Move ganeti-masterd to ganeti.server.masterd
Move ganeti-confd to ganeti.server.confd
Makefile: Stricter checks for release distchecks
This should avoid cases like commit f64de30f where the releasedate was forgotten from NEWS.
Makefile: Generalize bootstrap script generator
Move ganeti-watcher to ganeti.watcher
setup-ssh: Better error reporting
Together with Michael we refactored the code to make it better andeasier error reporting. Without printing backtraces for authenticationand verification issues.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Makefile: Streamline directory creation
Some directories don't exist in the repository, but are required at build time(e.g. doc/html). Until now some were created explicitly, some through thetarget “stamp-directories” and other target simply relied on a previous target...
Add support and checks for version in LUXI
A new constant, LUXI_VERSION, is used to verify the peer's version. Theversion is optional, so old(er) clients and servers talking to peers notsupporting it won't break. Example with mismatching library:
$ gnt-instance list...
luxi.ProtocolError: Derive from errors.LuxiError
This allows LUXI errors to be encoded and serialized.
LUExportInstance: Accept instance already shut down
To remove the instance after an export it needs to be stopped. This canbe achived using the parameter “shutdown”, or by explicitly shuttingdown the instance before exporting. The latter would still require the...
QA: Allow job queue test to be disabled
On my machine it takes over 30 seconds, disabling it canspeed up the QA.
ConfigWriter.GetNodeGroupList