Add -H/-B startup parameters to gnt-instance
This patch modifies the start instance script, opcode and logical unitto support temporary startup parameters.
Different from 1.2, where only the kernel arguments were supportingchanges (and thus xen-pvm specific), this version supports changing all...
call_instance_start: add optional hv/be parameters
This patch modifies the rpc.call_instance_start - the master side - totake optional hv/be parameters. The noded side is unchanged andoblivious to the change.
This will allow implementation of single-user capability and such on...
Fix gnt-job list argument handling
Currently QueryJob returns "None" when a wrong job ID is passed.Handle this in gnt-job list, by printing an error for each wrong job,and still giving output for all the jobs which actually do exist.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Instance reinstall: don't mix up errors
If the remote info rpc call fails we can't assume that the instance isup.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Don't check memory at startup if instance is up
gnt-cluster modify: fix --no-lvm-storage
Currently doing a gnt-cluster-modify --no-lvm-storage is silentlyignored, as it passes a None value in vg_name, which is the same as notmodifying that parameter. Explicitely set the passed value to '', so thenon-true not-None value can be evaluate to actually remove a volume...
LUSetClusterParams: improve volume group removal
Currently LUSetClusterParams will remove the volume group if the vg_namefield passed in is not true, but not None. Setting the target volumegroup to False or the empty string, though, is a bad idea because it's...
gnt-cluster info: show more cluster parameters
Even if we cannot modify all of them, they are useful information aboutthe current cluster.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
LUQueryClusterInfo: return a few more fields
Some fields can be set at cluster init, and perhaps even modifed withSetClusterParams but there's no way to know them. With this patch weexport them in the cluster info query.
Add the new DRBD test files to the Makefile
These were forgotten in commit 01e2ce3a6e4ca68983f50dedaddd0d0fc7b77026,and caused “make distcheck” to fail.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Remove some superfluous imports
This is for Python 2.6 compatibility.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Make Python interpreter selectable for test scripts
The Python interpreter used to run the test cases is hard-coded to be/usr/bin/python. If we use the first one from $PATH instead, it ismuch easier to test ganeti with other Python versions.
Signed-off-by: Iustin Pop <iustin@google.com>...
Pass optional arguments to the daemons
These can be set in the defaults file, default to no arguments beingpassed, and make it easy for local installation to customize the way theganeti daemons are called.
ganeti.initd: include defaults file, if present
In the example init script we'll execute an optional defaults file tomake it easier to add local customizations to the ganeti startup.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin <iustin@google.com>
Fix ;; indentation in the main initd loop
Currently two of the ;; ending the case bodies are not indented withanything. Reindent all of them to the body of the loop, as it's donesomewhere else in the init script.
Avoid DeprecationWarning on Python >= 2.6
Python 2.6 complains about module 'sha' being deprecated. It makesexecution of Ganeti commands a bit annoying, and when you run'ganeti-watcher' in cron jobs, you get a mail message after everyexecution.
Tests pass under under Python 2.6 and Python 2.4....
ganeti-noded: add bind address option
This allows ganeti-noded to bind only on one interface rather than allthe ones on the machine. The default behaviour doesn't change.
Fix compatibility with DRBD 8.2
This patch adds (and suppresses) the extra ipv4/ipv6 words before theactual address that newer DRBD versions add.
[iustin@google.com: slightly changed the patch to conform to styleguide, and changed the commit message]Signed-off-by: Iustin Pop <iustin@google.com>...
Fix compatibility with DRBD 8.3
DRBD 8.3 changes two more things compared to 8.2: - /proc/drbd format changed in multiple ways; the part we're interested is the ‘st:’ to ‘ro:‘ change (in the changelog named as “Renamed 'state' to 'role'” - “drbdsetup /dev/drbdN show” changed the ‘device’ stanza from:...
RunCmd: log command line for missing cmd case
In case of missing programs, currently utils.RunCmd doesn't show anyinformation to help debugging, only 'No such file or directory'. Thispatch adds error handling for the ENOENT case such that at least we have...
Abstract Linux node information in hv_base
Currently both hv_fake and hv_kvm implement practically identical codeto get the node information. Since future container-like hypervisorswill also need this functionality, this patch moves it into the baseclass (as a separate function) which can then be called from classes...
Small optimisation in utils.WriteFile
Currently we always try to remove the new file, even if the renamesucceeded. This patch tracks the existence of the new file and doesn'ttry to remove it if we managed to rename it.
Fix luxi serialization in ganeti-masterd
Currently, lib/luxi.py used lib/serializer.py for encoding/decodingmessages, but the master daemon uses directly the simplejson module.This is wrong as any non-trivial change to serializer.py will break themaster daemon....
Allow gnt-debug submit-job to take multiple args
Currently “gnt-debug submit-job” takes a single argument and hasnon-trivial startup-costs; in order to exercise the job system, it isbetter to be able to submit multiple jobs with a single invocation ofthe script....
Include node name in hypervisor validation errors
The current validation routine just says "failed", without specifyingthe node name. This is very confusing, and we should log the node nametoo.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Alexander Schreiber <als@google.com>
Fix gnt-cluster getmaster on non-master nodes
The current implementation of “gnt-cluster getmaster” doesn't work onnon-master nodes, which is a regression from 1.2. This patch implementsit (again) via ssconf.
Release 2.0rc4
Reviewed-by: ultrotter
Update gnt-instance(8) for info
Add the --all argument, and reword a bit the basic information.
Reviewed-by: iustinp
gnt-instance info --all
Don't show all instances info by default, but require --all to be passedfor this time consuming operation.
LUDiagnoseOS: change locking and error handling
Since the “list OSes” call is exported via RAPI, this can be used prettyeasily to DOS the master daemon during long jobs.
The implementation of LUDiagnoseOS makes an RPC call to all nodes; welock nodes here in order to prevent node removal....
Fix verify-disks with broken volume groups
When a remote node returns invalid LVM data, we check it, but we don'tstop and continue with the rest of the checks (which require a validvolume group). This raises an internal error and breaks verify disks.
This seems unchanged for a long while, I don't know why it surfaced just...
Prevent errors when xenvg is broken cluster verify
When vg_name is not returned at all, we currently abort with an internalerror. This is because we don't catch KeyError.
This patch adds a custom message for this case, and also adds KeyErrorto the list of catched exceptions, just for safety....
A bunch of doc and other small fixes
This patch adds a couple of both externally and internally reportedissues: - missing SGML tags (Issue 54), report and patch by superdupont - wrong variable used in the init.d script, report and patch by Karsten Keil <karsten-keil@t-online.de>...
Trivial typo fix in error message
Release 2.0rc3
Burnin tests were successful, release rc3.
Reviewed-by: imsnah
Distribute built documentation
This patch changes the way documentation is built in order to distributethe generated output in the 'dist' archive, and thus no longerrequiring the presence of the docbook/rst toolchains during build time.This will lower the requirements for installation and also makes the...
Disable synchronous (locking) queries
This patch raises an error in the master daemon in case the userrequests a locking query; accordingly, all clients were modified to sendonly lockless queries. This is short-term fix, for proper fix theclients should be modified to submit a job when the user request a...
Fix the output of watcher on non-master nodes
Currently the watcher spews errors message on non-master nodes. Thiscleans it up.
Change the watcher to use jobs instead of queries
As per the mailing list discussion, this patch changes the watcher touse a single job (two opcodes) for getting the cluster state (node listand instance list); it will then compute the needed actions based on...
Fix Xen soft reboot via polling
This patch fixes the Xen soft reboot ("xm reboot") via polling for a specifictime for either changed domain ID or decreased CPU run-time.
This sould prevent the race-conditions discussed on the mailing list forreboots....
Add a new ssconf file with the cluster tags
Since the cluster tags are/should be more-or-less static, add them as anssconf key, so that querying them is possible without creating ajob/requiring the masterd to be running.
Add some more debugging info to masterd
This patch will log data about queries, which are today completelyinvisible (at the default log level) in the master log file.
Release 2.0rc2
This updates the NEWS file and bumps up the version number.
Fix _NOQUOTE regexp
Allow expressions longer than one character to match.
Mainloop: avoid calculating timeout every time
set timeout_needs_update to False after calculating the timeout.
Raise on invalid gnt-cluster queue commands
kvm: use the correct vnc bind address
There is a bug in kvm, when binding vnc to a specific address theconstant 'vnc_bind_address' is passed in, instead of the actualrequested address. This patch fixes it.
Add the 2.0-specific node flags to the design doc
This patch adds the newly-introduced node flags to the design document,as they currently are missing from there.
The patch also reduces the TOC depth to 3, as it was too big.
Fix the --net option to gnt-instance add
Similar to the --disk fixes a while ago, --net is broken too. This patchfixes it.
Xen: Remove one hardcoded constant
s/"vnc_bind_address"/constants.HV_VNC_BIND_ADDRESS/
watcher: fix startup sequence locking the master
Currently, the watcher startup sequence does: - open a luxi client - get the instance list - get the node boot ids - open and lock the status file, and: - archive jobs - restart the down instances...
Handle ghost instances in temp DRBD map
Currently cluster-verify doesn't handle the (admitedly invalid) case where wehave reservation for instances that were removed in the meantime.
This patch adds a check for this and prevents code errors in cluster-verify in...
Fix error handling in replace-disks with new node
Currently the _CreateSingleBlockDev function only raises OpExecError and notBlockDeviceError. This means that we don't release the instance's temporaryminors properly, and this creates problems later if the instance is removed...
Fix serial_no field on instances
The instance objects did not get a serial_no field. This patch adds anew constants for the field name and uses it for all three cases(cluster, nodes, instances).
Update gnt-cluster(8) for be/hyp parameter syntax
Now it displays:
--hypervisor-parameters hypervisor:hv-param=value [ ,hv-param=value ... ]--backend-parameters be-param=value [ ,be-param=value ... ]
Sorry for the super-long lines :( Is there a better way to insert spaces...
Complete the cfgupgrade script for 2.0 migrations
This patch makes the cfgupgrade script to handle: - instance changes - disk changes - further cluster fixes - adds configuration checks at the end, in non-dry-run mode
First run at cfgupgrade for 2.0 upgrades
This patch makes cfgupgrade work on empty cluster (i.e. no instances),up to a point that the config file can be converted from 1.2 to 2.0.This is not yet complete, though.
Fix bash completion for cluster copyfile/command
“copyfile” takes a file argument, so we enable file-completion for it.“gnt-cluster command” takes a command, so we enable command completion.
Release 2.0rc1
This patch updates the NEWS file and increases the version to 2.0 rc1.
Export tags to cluster verify hooks
This patch export the cluster and node tags to the cluster verify hookscripts. The tags are exported as a space-separated list, which allowseasy parsing from the shell (e.g. “for tag in $GANETI_CLUSTER_TAGS; do...”) and therefore requires the previous “Don't allow spaces in tag...
Don't allow spaces in tag names
This patch restricts the use of spaces in tags, as this does not allownice exporting of tags to environment in hooks. One can use underscoresor dashes instead of spaces.
Reviewed-by: schreiberal
Update the iallocator documentation
This updates the iallocator documentation to 2.0, bumps up theiallocator version (and moves a constants to lib/constants.py), andfixes a style on install.rst.
Fix a bug in utils.EnsureDirs
This fixes a bug introduced in rev 2562 and also fixes the indentation.
A doc update and a small indentation fix
This adds a small paragraph about the “master” role of a node, and fixesa wrong indentation in the bash completion file.
Use EnsureDirs in KVM as well.
The KVM hypervisor has also code to ensure a list of directories exist.Substitute it with our new utils function.
Create runtime dir in bootstrap
Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster inittime. This patch creates it in InitCluster just before hv parameterchecking. Since the code to make list of directories is already repeatedtwice in the code, and this would be the third time, we abstract it into...
LUVerifyCluster: Handle the "no volume group" case
If we're only file based and out volume group is set to "None" there'sno point in asking nodes for their volume groups, logical volumes, anddrbd devices, and checking those.
Convert the RAPI document to restructured text
This patch changes the RAPI document, and the RAPI resourcesautogenerated-documentation to restructured text. This meant changingthe autogen tool.
The new fragment can be included via RST directives, and doesn't need...
Fix some epydoc style issues
99% of the epydoc return tags are "@return:", but each of the modified fileshad one "@returns:" line. We fix this for consistency.
Convert the install document to restructured text.
This switches back to the hardcoding of the version number, as we don'tyet have a wrapper for rst files that passes them throughreplace-sed-vars.
Fix the Makefile after the bash_completion patch
I've somehow left these two out. Sorry!
Add bash-completion rules
This is a not-complete bash completion file for ganeti commands (gnt-*)and the burnin tool. It is based on previous work by Minghua Ye<yeminghua@google.com> for Ganeti 1.1, which wasn't used because thelack of ssconf keys (which allow easy inspection by the shell of the...
Fix typos in utils.WriteFile's docstring
Fix mixed pvm/hvm clusters and instance listing
The current implementation of the combining of the instance lists willonly do this for instances whose all four-fields match in bothhypervisors; however, this is broken for the dynamic fields (state,times) which can change between the invocations of the two different...
Fix xen-hvm and KERNEL_ARGS
xen-hvm doesn't have KERNEL_ARGS, and I just changed blindly all oldextra_args to HV_KERNEL_ARGS. This makes xen-hvm work again.
Update some version-related constants
Since we are quite close to final RPC and hooks APIs, we update the hooks andprotocol_version constants.
Convert the hooks document to restructured text
This also updates the hooks document to 2.0.
Update some hooks settings
While reviewing the hooks document, I realised we are not correctlyexporting the instance properties.
This patch fixes: - export the disk and disk template in all LUs, not only (hardcoded) in the instance create - removes the instance create INSTANCE_ prefix on some non-instance...
Remove the extra_args parameter in instance start
This patch removes the extra_args parameter and instead switches theinstance to the HV_KERNEL_ARGS hypervisor option.
This is a big change, but it's a needed cleanup, this extra parameter onall RPC calls is not generic and we also need to have a persistent value...
Simplify a little the hypervisor routines
Instead of “instance.hvparams”, we use a shorter “hvp” name to make readabilitybetter.
Add definitions for the root_args hypervisor param
This patch adds a new hypervisor parameter for the hypervisors that canactually start and instance with external kernels.
Convert iallocator.sgml to restructured text
This is a no-contents change, this doc will need update to conform to2.0 message contents (and also the code will need increase to version 2of the iallocator protocol).
Convert the admin guide to restructured text
The RST format holds a little bit less information, as all the <fileclass="directory"> and <userinput> tags are gone, however we're notreally losing important context here. And it's way easier to read andupdate....
gnt-instance info: remove hvattr descriptions
Having hvattr descriptions is only confusing for the user, because evenif they explain better what an attribute is about, they don't help indeciding what keyword should be used to actually set it. If in the...
Make gnt-instance info work with offline nodes
This simply makes LUQueryInstanceData return the same information as fora static query when one or both of the nodes are down.
dumb-allocator: avoid allocating on drained nodes
This was forgotten when drained nodes were added.
Also generate HTML format for the man pages
This would help in generating online-viewable docs, which could link tothe man pages.
Update version numbers to beta2
Note that the RAPI change is in a docstring (i.e. example), not in code.
Show more details for failed xen commands
This patch also logs the output of the xm commands in case of failures;some corner cases were forgotten in the last redo.
Update the install and admin documents
This is not a real update, just a quick pass changing the obvious parts.
QA: add support for burnin rename
This patch adds support for optionally doing the rename burnin test, andadds an example to the sample QA file. To disable, either remove orspecify an empty rename target.
Fix some bugs in reboot
There are two issues fixed in this patch: - first, the recent RPC changes caused loss of data in hard reboot type; we weren't reporting any results from the stop/start instance calls; - second, in soft or hard reboots, we didn't initialized the disk...
Burnin: fix rename
In rename, we must stop different names in the first and second phases,so we create two different opcodes for this purpose (instead of usingthe same one twice, which doesn't work).
Update NEWS for beta 2
Convert IOErrors for /proc/drbd into our errors
If /proc/drbd can't be opened, this raises an IOError, but all theerror-handling behaviour in backend treats only BlockDeviceErrors. Thiscreates a plain failure in cluster verify and in other RPC calls.
This patch simply converts EnvironmentErrors into BlockDeviceErrors, and...
DEVNOTES: we have no --enable-rapi anymore
Remove it from the suggested development ./configure line
Convert default root partition to msdos style
As discussed with 2.0 msdos partition style should be the default in theinstance OS, so we're changing the default instance params accordingly.A followup patch will update the debootstrap os.
watcher: fix checking of boot IDs
The recent change (commit 2151) to the watcher to make it handle offlinenodes also saves the offline attribute to the state file, but this isnot needed and also breaks the checking of the boot ID. This patchsimply removes it, restoring the correct behaviour....
watcher: autoarchive old jobs
This patch adds auto-archiving of jobs older than 6 hours to thewatcher.
RAPI: documentation updates
This patch fixes the version and does some update to the RAPI resourcesdocs.