History | View | Annotate | Download (14.4 kB)
Implement the KERNEL_PATH parameter for xen-hvm
For the xen-hvm hypervisor, the KERNEL_PATH parameter is needed buttoday is hardcoded to a constants in the xen hypervisor library (argh!).
This patch moves this to a hypervisor constant with the default value...
Move HVM's device_model to a hypervisor parameter
This moves yet another hardcoded value to a hypervisor parameter. Iremoved the 64/32 difference as it doesn't seem valid to me - it's moreof a local site config rather than arch config.
Signed-off-by: Iustin Pop <iustin@google.com>...
Get rid of constants.RAPI_ENABLE
This constant is unused, except in qa. Removing it since it's always True.
This patch also removes the unused qa_rapi.PrintRemoteAPIWarningfunction, and removes a comment about temporary constants "until we havecluster parameters"....
noded: Abstract hard-coded sys.exit value
On machines without the ssl file noded exists '5'.Changing this to constants.EXIT_NOTCLUSTER.
Also utils.GetNodeDaemonPort hasn't risen errors.ConfigurationError fora while, so removing that try/except block....
job queue: fix loss of finalized opcode result
Currently, unclean master daemon shutdown overwrites all of a job'sopcode status and result with error/None. This is incorrect, since theany already finished opcode(s) should have their status and resultpreserved, and only not-yet-processed opcodes should be marked as...
Add a lvm stripecount configure parameter
This patch adds a configure-time customizable parameter that will beused to enable stripped LVs. The default of the parameter is 3.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
watcher: write the instance status to a file
This patch modifies the watcher to keep on-disk a file with the instancestatus; this can be used from outside of ganeti to react to instancesbeing down (when the watcher cannot restart them).
Move more hypervisor strings into constants
This patch adds constants for the mouse and boot order strings; whilethere are still some issues remaining, we're trying to cleanup hardcodedstrings from the hypervisors.
Since the formatting of frozensets is currently wrong, we also add an...
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.
Reviewed-by: imsnah
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.
Reviewed-by: ultrotter
Update some version-related constants
Since we are quite close to final RPC and hooks APIs, we update the hooks andprotocol_version constants.
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 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.
Reviewed-by: iustinp
HTS_USE_VNC, rename and remove KVM
Currently we use the HTS_USE_VNC constant only to copy the vnc passwordfile. While KVM uses vnc it currently has no password support, nor we'llbe on time making one for 2.0, so renaming the constant toHTS_COPY_VNC_PASSWORD and only putting Xen HVM in it. In the future...
Instance parameters: force typing
We want all the hv/be parameters to have a known type, rather than arandom mix of empty string, boolean values, and None, so we declare thetype of each variable and we enforce/convert it.
- Add some new constants for enforceable value types...
KVM: Add usb mouse type parameter
In some cases 'mouse' may work better than 'tablet', so we'll handleboth by allowing the user to specify a parameter. By default no mouse isused.
KVM: parameters for different disk and nic types
- Add a bunch of NICs and DISKs types- Specify which one are valid disks and nics for KVM (the new ones toghether with some of the old ones)- Add the default values (paravirtual)- Allow the disk and nic types as parameters and check their validity...
Rename the device type constants
These are not HVM specific, so have been given an HT generic name.
s/HT_HVM_VNC_BASE_PORT/VNC_BASE_PORT/g
The VNC base port has nothing to do with HVM itself, and is general toVNC itself, so we're removing the HT_HVM prefix to the constant.
Support cdrom image and boot order for KVM
The cdrom image has the same meaning than in Xen HVM, and so doesboot_order, even though it has a slightly different syntax, and uses thevalue 'disk' too boot from disk and 'cdrom' to boot from cdrom.
Get rid of constants.HT_HVM_DEFAULT_BOOT_ORDER
Confusingly, as a leftober from 1.2, there was aconstants.HT_HVM_DEFAULT_BOOT_ORDER constant, with a value opposite tothe default HV_BOOT_ORDER hv param that got enabled only ifHV_BOOT_ORDER was set to None. Since setting it to None is very...
KVM: add VNC TLS and X509 parameters
With this parameters VNC for KVM is able to be protected by tls,optionally with an x509 certificate, and optionally verifying theclient as well. Additionally in this patch we limit the bind address tobeing a directory, rather than a file or a directory, for simplicity, as...
ssconf: add some more keys and some fixes
This patch adds the online node list and instance list to the ssconfkeys. In order to do distribute correctly the instance list, we need toupdate the cluster serial number on instance additions and removals.
The patch also changes the permissions on the ssconf files to be 0444:...
Whitespace change: bad indentation in constants.py
This patch only changes some indentation in constants.py.
KVM: Allow the HV_VNC_BIND_ADDRESS parameter
LUAddNode: copy the vnc password file also for KVM
Before we used to copy the file if xen-hvm was enabled on the cluster,no we'll do that if any enabled hypervisor is in the new HTS_USE_VNCgroup.
Add HT_KVM to HTS_REQ_PORT
HT_KVM doesn't technically require a port, but if it has one it can givevnc displays to instances.
KVM: add the HV_SERIAL_CONSOLE parameter
Up until now a KVM instance was forced to have a serial port.With this change this is no longer mandatory, by default we'll use one,but if the HV_SERIAL_CONSOLE parameter is set to False we'll do without.
KVM and Xen: add the HV_ROOT_PATH parameter
This parameter allows a different path to be passed to the instancekernel. The new parameter is mandatory, and by default has the value ofthe old hardcoded value for both kvm and xen.
Beta1 clusters will need to have this parameter added for their...
KVM: instance migration
The tcp port used for migrating KVM instances is selectable at./configure time. We use a single port as nodes are locked anyway duringa migration, so no two migrations can happen at the same time to thesame node.
Make cluster-verify check the drbd minors space
This patch adds support for verification of drbd minors space in clusterverify: minors which belong to running instances and should be onlinebut are not, and minors which do not belong to any instace but are in...
Move the default MAC prefix to the constants file
Instead of having the default live in the gnt-cluster script, we move itto the constants file. The patch also fixes a typo on constants.py.
Increase resync speed to 60MB/s
This is a forward-port of commit 2219 on the 1.2 branch.
Add a new ssconf file with the ganeti version
The patch adds a new ssconf file containing the ganeti version.
burnin: use the new replace_disks constants
This patch updates burnin to the latest replace disks constant, andchanges the constants' values to be more accurate.
Cleanup replace-disks modes and options
In 1.2, due to the md+drbd7 legacy, we had a complex choice of replacemodes, and the new drbd8 modes where forced into this syntax, with somecomplicated rules of transition from one mode to another (if REPLACE_ALL...
ganeti.bootstrap: Generate SSL certificate for remote API
Reviewed-by: amishchenko
ganeti-rapi: Implement HTTP authentication
Passwords are stored in "$localstatedir/lib/ganeti/rapi_users". Useroptions specify the access permissions of a user (see docstring forganeti.http.ReadPasswordFile), for which only "write" is supportedto grant write access. Every other user has read-only access....
Add job queue size limit
A job queue with too many jobs can increase memory usage and/or makethe master daemon slow. The current limit is just an arbitrary number.A "soft" limit for automatic job archival is prepared.
KVM: improve socat interface
Call socat with a full path specified at configure time, rather thanjust by its name, and check for the binary to exist at hypervisorverify.
KVM: use a different default kernel path
It makes sense for the default kvm kernel not to be called "xenU".
RPC: Compress file upload data
Adding compression to larger amounts of data is more efficient thantransferring it (len(nodes) - 1) times over the network withoutcompression. We were able to compress a 800KB config file to about30 KB, which is about 40 KB with Base64 encoding (required due to...
Add the offline node list to ssconf
The patch also changes the various node list generation to be moreconsistent.
Add the MASTER_POOL_SIZE_DEFAULT constant
This constant will be used at cluster init time.
Fix gnt-cluster verify w.r.t. rpc changes
This partially reorganizes the cluster verify LU: - introduce constants for the node verify rpc call - move from additional rpc calls to a single rpc call, the call_node_info, which gaters all data needed...
burnin: add instance reinstall and reboot
These two operations were missing from burnin. The reboot is done withall valid modes (a new constant is added), and the reinstall is doneboth with and without specifying the OS (to account for the two codepaths in the LU)....
Add constants.VALUE_TRUE and VALUE_FALSE
Add the list of master candidates to ssconf
Revert "Get rid of ssconf"
This partially reverts the "Get rid of ssconf" patch.
It adds back a simpler version of the SimpleStore class, and drops theWritableSimpleStore class. The new version of the class also hasnode_list as a new key, and increases the size of the keys so that big...
jqueue: Allow jobs waiting for locks to be canceled
- Add new "canceling" status- Notify clients when job is canceled- Give a return value from CancelJob- Handle it in the client library
convert run dir mode to constant
ganeti-noded used to create all directories under /var/run with anhard-coded mode. convert it to a constant.
Move the MASTER_SOCKET to SOCKET_DIR
Before it was in the abstract linux namespace, where unfortunately wecouldn't easily check from python the credentials of the connectingclients. Now we also have to remove the file on exit and when starting.
Add SOCKET_DIR_MODE constant
We want the socket dir to have a restricted permission.
Add SOCKET_DIR constant
This new directory under /var/run will be used for file based unixsockets.
Implement support for multi devices changes
This big patch adds support for: - changing NIC/disks in the multi-device model - adding/removing NICs - adding/removing disks
The patch is big and not very nice; the error checking paths are notvery clear....
Get rid of node daemon password
With the new SSL client certificate stuff it's no longer needed.
ganeti.ssconf: Add function to write ssconf files
This function will be used to write ssconf files from the node daemon.By creating a lock file, we synchronize different child processes ofganeti-noded to not overwrite each other's changes. Also, external...
Initial multi-disk/multi-nic support
This patch adds support for mult-disk/multi-nic in: - instance add - burnin
The start/stop/failover/cluster verify work as expected. Replace diskand grow disk are TODO.
There's also a change gnt-job to allow dictionaries to be listed in...
Fix whitespace-at-EOL
Please configure your editors to strip it, or enable your git hooks...
Add VALUE_AUTO and VALUE_GENERATE constants
'auto' is used in multiple place in the code with a meaning similar to'default', 'generate' will be used to force generation of mac addresseswhen the default would be to reuse an old one.
Forward-port-of: r1884, Reviewed-by: iustinp...
Add constants for cluster defaults
Bump up the OS API version
Add LDS_BLOCK for block device backed dev types
Create constants to replace os scripts names
rapi: Convert to new HTTP server class
Requests are no longer logged to a separate file.
Implement the job queue drain flag
We add a (per-node) queue drain flag that blocks new job submission.There is not yet an interface to add/remove the flag (will come in nextpatches).
Some fixes related to auto_balance
Change the constant name to match the value (autobalance ->auto_balance).
Also add the auto_balance header so that gnt-instance can list it.
Modify the beparams constants
Memory is renamed for easier use.
Change gnt-instance list to the hvparams model
This is just a change of the various hvm_ and pvm parameters to the hvmodel. Parameters are queried via hv/$name or via the whole dict asreturned by hvparams.
Reviewed-by: ultrotter,imsnah
Add constants for the HV/BE parameter names
Since we don't want the string values of the parameters (e.g.“kernel_path”) spread over the code, we introduce constants for these.
Reviewed-by: ultrotter,schreiberal
Sanitize the hypervisor names
Since in 2.0 the user will possibly have more interaction with thehypervisor names, we sanitize them by removing the version numbers(the version can be a prerequisite for the ganeti installation, weshouldn't document it in variable names)....
Implement job 'waiting' status
Background: when we have multiple jobs in the queue (more than just afew), many of the jobs (up to the number of threads) will be in state'running', although many of them could be actually blocked, waiting forsome locks. This is not good, as one cannot easily see what is...
Move functions from ssconf.py elsewhere
These functions will be used to access config values instead of usingssconf.
Move a hardcoded constant to constants.py
For now we only use the ‘C’ protocol so we can put it in constants.pyinstead of hardcoding it.
Enable the use of shared secrets
This patch enables the use of the shared secrets for DRBD8 disks, using(hardcoded in constants.py) the md5 digest algorithm.
For making this more flexible, either we implement a cluster parameter(once the new model is in place), or we can make it ./configure-time...
_LockInstancesNodes: support append mode
This will be used to lock the instance's nodes in addition to some more.
Use constants.LOCKS_REPLACE instead of hardcoding
This constant replaces what we used to write in recalculate_locks, andrepresents the lock recalculation mode. It lives in constants.py becauseit's used only in cmdlib, and thus doesn't deal with the locking library...
Merge r1536 from branches/ganeti/ganeti-1.2
Add HVM device type flags 2/3
merge r1535 from branches/ganeti/ganeti-1.2
Add HVM device type flags 1/4
Make WaitForJobChanges deal with long jobs
This patch alters the WaitForJobChanges luxi-RPC call to have aconfigurable timeout, so that the call behaves nicely with long jobsthat have no update.
We do this by adding a timeout parameter in the RPC call, and returning...
Fix a small typo in a constant
Seems noone ran a burnin lately :)
Reviwed-by: amischenko,ultrotter
Use Linux-specific way to name master socket
By using this Linux-specific way we don't have to care about removing thesocket file when quitting or starting (after an unclean shutdown). For amore detailed description, see the comment in the patch.
Reviewed-by: schreiberal
constants: add HT_KVM
Add a new hypervisor type, HT_KVM, to constants, and register it in theHYPER_TYPES set.
Add --with-kvm-path configure option
This allows to configure a different path to the kvm binary. By default/usr/bin/kvm is used, which is the one found in debian and ubuntu.
Unify SetupDaemon/SetupLogging
The 'old-style' info, error, debug logs do not make much sense. Thispatch unifies the SetupLogging and SetupDaemon functions. As a result,all the commands logs to a 'commands.log' file.
The patch also changes the log setup to keep going if there's an error...
Simplify the log constants and add another one
The patch changes the log constants by moving the slash to the end ofthe log dir instead of at the beginning of each log file name.
It also adds a new LOG_COMMANDS constant (to be used in a next patch)....
Fix constants typo
Use constants for the pid file stems
Add “canceled” status for opcodes
Add directory for archived jobs
Move BDEV_CACHE_DIR to RUN_GANETI_DIR/bdev-cache
This was a TODO for 2.0
Implement jobs resource in RAPI
Further fixes to enable RAPI startup
Note that since RAPI itself doesn't use luxi.Client yet, nothing works,but at least it can startup now.
Add forgotten RAPI constant
This was forgot on the forward-porting of RAPI.
First version of user feedback fixes
This patch contains a raw version for fixing feedback_fn.
The new mechanism works as follows: - instead of a per-Processor feedback_fn, there's one for each ExecOpCode, so that feedback for different opcodes go via possibly...
Add experimental persistency to job queue
It's not perfect and it's not finished, but it's a start.
- Serial number is read only once, but written on each update- Jobs are kept only on disk (caching will be implemented)
Move the master socket in the ganeti run dir
... as it was intended from the beggining, but by mistake left in thetop run dir.
constants: Add job and opcode status strings
Add a top level RUN_GANETI_DIR constant
This patch creates a base RUN_GANETI_DIR and then moves the other rundir constants to use that (even if just setting BDEV_CACHE_DIR as equalto it, rather than putting it deeper, for now).
Also we create a constant list of all the subdirs we need in RUN_DIR to...
symlinks: Add DISK_LINKS_DIR constant
The DISK_LINKS_DIR points to the RUN_DIR/ganeti/instance-disksdirectory, which will contain symlinks to the instances' disks. Theseprovide a stable name accross all nodes for them, and permitlive-migration to happen....