Rename the node storage commands
To reduce confusion, the following gnt-node commands are renamed:
- physical-volumes → list-storage- modify-volume → modify-storage- repair-volume → repair-storage
The NEWS file is update accordingly and it also gets emacs local...
Fix an error handling case in TLReplaceDisks
pylint is your friend, since the compiler doesn't exist.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Provide feedback from redistributing configuration
This is particularily useful for “gnt-cluster redist-conf”, butalso for all other cases where the configuration files arerewritten on other nodes.
$ gnt-cluster redist-conf… Copy of file /var/lib/ganeti/config.data to node … failed: Error while...
Include NEWS in documentation again
This was implemented in 350ecfecca and reverted in 700bb84367after it broke “make distcheck”. With other changes in thispatch series this will work now.
Contributing to the original problem was that the news.rst file...
Makefile.am: Wrap long lines
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
bash_completion: Move common code into function
This reduces the size of the script by about 9 kB.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Makefile.am: Use noinst_DATA instead of all-local target
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Makefile.am: Don't include MAINTAINERCLEANFILES in EXTRA_DIST
Makefile.am: Make HTML doc building depend on stamp file
This patch also adds an explicit list of all files written bysphinx (“docoutput”).
By using an explicit list the build process is more predictableand will allow us to include the NEWS file again....
Makefile.am: Use dependencies to create symlinks only if necessary
Makefile.am: Move stamp-directories to BUILT_SOURCES
Fix gnt-debug breakage due to options move
Commits d3ed23f and 4eb6265 broke gnt-debug due to renamed optiontargets. Sorry again!
Fix gnt-node evacuate w. iallocator
Commit 2bb5c911 moved around and changed the _RunAllocator function inthe DiskReplace → TaskLet conversion, but in the process it changed therelocate_from argument from a list of nodes to just the secondary node.This breaks the protocol and current iallocator scripts....
InstanceIpToNodePrimaryIpQuery: use a query dict
In 95b487b we changed InstanceIpToNodePrimaryIpQuery to be able to querymultiple instances at once. We also need to be able to query ipsbelonging to a specific nic link, so what we do is:
1) Move the "query" argument to a dict, containing different fields...
SimpleConfigReader: ips are partitioned by link
We were already half-doing it, but this completes the process.
1) We don't maintain a list of ips or an ip->instance map2) We add a new link,ip->instance map (link->ips list we had)3) We add the link parameter to GetInstanceByIp (making it...
SimpleConfigReader: queries for default nicparams
GetDefaultNicParams returns the default nic parameters.GetDefaultNicLink returns the default nic link.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Import errors in confd init
It's used by some functions defined there.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Use RUN_IN_TEMPDIR in Makefile.am
Since we have this variable and use it in other places, remove the onlyleftover hardcoded place.
Allow '@' in tag values
This allows using an email address (as is) as part of a tag. The mainproblem that could arise is when parsing tags from a shell script, but(AFAIK) '@' is not a special character when used in values (happy to becorrected if not true)....
Fix gnt-node modify-volume
This was broken by me in 064c21f, sorry!
gnt-node: add short option -t for --storage-type
init script: allow singling out confd as well
Currently we can start/stop the various subdaemons, but not confd.
cmdlib._AssembleInstanceDisks: Fix case where variable wouldn't be set
The “result” variable may not be set and/or come from the previous loop.
Makefile: Use path from configure script for sphinx-build
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Ken Wehr <ksw@google.com>
KVM netscript: add static routes, with no suffix
The /32 suffix is useless, since the kernel already assumes single-host,if no suffix is specified. Moreover we prefer these routes to be"static" so that routing daemons, if present, won't mess with them....
gnt-job manpage: Remove detailed description for lock_status
The format changed in the meantime and should be self-explanatory.
Adding '--no-ssh-init' option to 'gnt-cluster init'.
Allows the initialization of a cluster without the creation or distributionof SSH key pairs. Includes changes for LeaveCluster and RPC.
Signed-off-by: Ken Wehr <ksw@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>...
Man page for ganeti-confd
KVMHypervisor: implement instance policy routing
Until now we relied on traffic from instances being policy routed via arule based on the instance network. With this change we can enforce iton the instance interfaces. Since the ip rules survive interface...
KVMHypervisor: configure v6 parameters on nic
In routing mode we are tweaking a few parameters on the interface. Withthis patch we'll tweak both the v4 and v6 ones.
confd: query the pnode of multiple instances at once
Signed-off-by: Flavio Silvestrow <flaviops@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Try to reduce wrong errors in InstanceShutdown
In backend.InstanceShutdown(), there is a race condition betweenchecking that the instance exists and trying to shut it down whichtranslates sometime in error messages like:
Tue Oct 20 20:08:30 2009 - WARNING: Could not shutdown instance: Failed...
Revert breakage introduced in e4e9b80
Commit e4e9b8064787df01a79846a40f49c8ae06a8eb0e introduced two problemsin backend.InstanceShutdown():
- first, it reduced the check interval significantly (especially for the first few checks); there are very few production VMs that shutdown in...
Xen: Ignore the retry argument in stop instance
Commit 4ad4511 changed the KVM hypervisor to send multiple shutdownrequests to the monitor, but it didn't change this for the Xenhypervisor. We simply remove the return on retry model, since we do wantto send multiple shutdown signals for both Xen and KVM (even if the...
Ensure RpcResult has “payload” attribute
Also add assertions to avoid missing attributes in the future.They won't be included in optimized bytecode.
Fix typo in install.rst
install.rst: mention xen config for live migration
This addresses issue 75.
Bump version to 2.1.0~beta2
I forgot to bump the configure.ac version before tagging the 2.1.0~beta1release. Since we cannot remove old tags (see “On Re-tagging” in git-tag(1)),we have to call this release 2.1.0~beta2.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Introduce checks for /sys and /proc
This patch adds checks for /proc and /sys in cluster verify, sinceGaneti relies on these special filesystems to be mounted.
Fix serializer unittests
Commit d22b29997cd broke the serializer unittests with certainversions of simplejson. This patch removes sort_keys againand implements a slightly more efficient way of detectingsimplejson functionality. The serializer unittests no longer...
cfgupgrade: Implement upgrade to 2.1.0
bootstrap: Factorize HMAC key generation
Make bootstrap._GenerateSelfSignedSslCert public
cfgupgrade: Remove Ganeti 1.2 support
This also fixes a few typos.
serializer: Sort keys in JSON
Bump version to 2.1.0~beta0
mcpu: Use new timeout class for timeout
locking: Convert pipe condition to new timeout class
locking.LockSet: Move timeout calculation to separate class
This class can also be used by mcpu.
locking, mcpu: Ensure timeout is always >= 0.0
locking.LockSet: Improve assertions
locking: Factorize LockSet.acquire
By moving the main code of LockSet.acquire to its own functionwe reduce the code complexity a bit and clarify the exceptionhandling.
This also fixes a case where a lock acquire timeout wasn'thandled correctly, leading to obscure error messages....
mcpu: Make sure added locks are released on errors
Test LockSet.acquire return value for timeout
opcodes: Add missing shutdown_timeout to OpRemoveInstance
luxi: Pass socket path directly to exception, not in tuple
Update NEWS for instance shutdown timeout
gnt-* use the correct opcode slot to build opcodes
gnt-* scripts were building wrong opcodes for commands which had theshutdown_timeout slot (due to missing testing after renaming). Fixing.
Also change SHUTDOWN_TIMEOUT_OPT dest field name to "shutdown_timeout":...
Update documentation for recreate-disks
This also clarifies the UUIDs NEWS entry.
rapi: fix tag operations
This patch fixes the tag PUT/DELETE operations, and additionally changesthe Tags* functions to take only positional and not keyword arguments(the defaults do not make any sense at all, and they are always calledwith all arguments)....
Update NEWS for Ganeti 2.1
Convert NEWS to ASCII
cli: add SHUTDOWN_TIMEOUT_OPT
Add timeout options to other LUs
All the LUs that shut down the instance need to be able too pass thetimeout parameter as well.
Update manpages for --shutdown-timeout
mcpu: Change lock attempt timeout calculation
With this patch all timeouts are pre-calculated. The interface ofthe _LockTimeoutStrategy class is also changed a bit; NextAttemptnow returns a new instance.
Code and docstring style fixes
Found using pylint and epydoc.
mcpu: Improve lock reporting with timeouts
mcpu: Implement lock timeouts
The timeout is always between ~0.1 and ~10.0 seconds. A smallvariation of ±5% is added to prevent different jobs fromfighting each other. After 10 attempts to acquire the locks witha timeout, a blocking acquire is made.
Lock status reporting will be improved in a separate patch....
mcpu: Remove unused exclusive_BGL attribute
locking.LockSet: Implement acquire timeouts
The timeout passed to LockSet.acquire() is measured over all lock acquires. IfLockSet.acquire fails to acquire all requested locks within the specifiedamount of time, all locks are released again and the acquire fails....
Update gnt-instance(8) for shutdown --timeout
Accept shutdown timeout from the user
Using the new --timeout option:
- gnt-instance shutdown is changed to accept a timeout- the opcode is changed to hold one- the LU is changed to optionally get one- the rpc is changed to carry one- the backend is changed to take it as a parameter rather than...
ChrootManager: clean StopInstance
Currently it has lots for duplicated code, and internal retries.Clean it up with the following assumptions:
We'll probably be called more than once.It is ok to fail to stop, unless we're called with force=True.If we're called only once, and with force=True it's ok not to run the...
cli: add a timeout option
KVMHypervisor: use the StopInstance retry feature
Since we know StopInstance is going to be called more than once (atleast twice, once with force and once without, but normally quite a lotmore) we don't need our own sleep/loop, and we can just send one monitor...
backend.InstanceShutdown: small cleanup
1) unhardcode the timeout, abstracting it in a constant2) Use time.time() rather than hiding the timeout in a range()3) call hyper.StopInstance multiple times -- currently all hypervisors just ignore all calls but once...
Add default instance shutdown timeout constant
It reflects the "current" two minutes we give to the instance.
Hypervisors: Add retry= to StopInstance
Currently some hypervisors need the stop operations to be retried morethan once, while other ones only do it in one pass. With this changewe'll handle retries outside the hypervisor code, but telling whetherthis is the first try or not....
Get rid of utils.CommaJoin
- We never remember to use it (5 uses vs 21 " ,".join())- It's longer to write than " ,".join()- The added value of the apostrophe in the string is not very much
ethers hook: allow more than one daemon pidfile
burnin: skip instance moves on single node
If we have only one node, instance moves fail, because it tries to movethe instance to itself. Skipping the operation, because in that case itdoesn't make sense.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Match instance and node names case insensitively
Since DNS cannot contain two names with different cases anyway, thisshould be ok.
Add case_sensitive keyword to MatchNameComponent
Now featuring unit testing, and more deterministic results on somecorner cases.
VNC password: move to hv param and use in kvm
Implement strict mode for devel/review
This should prevent typos in aliases from going unnoticed.
Check the OS name for variants
If an OS supports variants, unless --force-variant is specified a validvariant must be passed.
Update ganeti-os-interface(7) for API 15
Add force_variant slot to Create/ReinstallInstance
These two opcode need to know whether an unknown variant must be forcedthrough or not.
Allow --force-variant for instance add/reinstall
Passing this option makes an undeclared variant be passed to the os "asis", hoping it'll be able to figure it out (as per the design doc).
Update client os lists to name+variant format
List of OSes are displayed by gnt-os list, rapi, and gnt-instancereinstall --select-os, and checked by burnin. In all of these show thelist with name+variant, if the os has variants.
Add slot and constant for supported OS variants
The slot will contain a list of variants, and the variants file constantcontains the file in the os dir which is supposed to hold the list.
Populate OS variants if an api >= 15 is present
Adding the file name to the os_files dict will fill in the full path andget it checked, if present we also read it and split into lines, one perdeclared variant.
OSEnvironment: populate OS_VARIANT
According to the design on api_version >= 15 the OS variant is the partof the OS name after the "+" sign. If none is found, we just pass in thefirst variant an OS declares (which is bound to exist, as we check forit in _TryOSFromDisk)....
OSFromDisk: handle variants when loading os
When we load an OS from disk, we need _TryOSFromDisk to get the realname, without any variant. This allows any functionality that uses theinstance OS to handle a name with a variant.
Add per-node variants list to OS diagnose output
Add "variants" field to LUDiagnoseOS
If selected this field will contain a list of os variants supported onall nodes.
cli.CalculateOSNames
Given an os and its variants, return a list of "full" os names.
gnt-os diagnose: show os variants
We already show the per-node os variants, also show the global ones.
TryOSFromDisk: only check actual os scripts for +x
Currently all checked files in the loop are os scripts, so nothing willchange, but in the future we only want the +x bit on actual os scripts,not necessarily all files.