History | View | Annotate | Download (44.4 kB)
Use new functions to modify /etc/hosts.
Reviewed-by: schreiberal
Enhance secondary node replace for drbd8
This (big) patch does two things: - add "local disk status" to the block device checks (BlockDevice.GetSyncStatus and the rpc calls that call this function, and therefore cmdlib._CheckDiskConsistency) - improve the drbd8 secondary replace operation using the above...
Allow DRBD8 operation without backing storage
This patch adds the following functionality: - DRBD8 devices can assemble without local storage (done by allowing None in the list of children, and making DRBD8 to ignore all children if any is None)...
Change the way remove children is called in bdev
For some cases, we don't have to have access to the children of a devicein order to remove them (e.g. md over lvs, or drbd over lvs). In orderto ease the removal process, skip over finding the child if it provides...
Fix a unhandled error case in device creation
The block device creation process is the following: - device create - device assembly (on primary or depending on dev_type, on secondary too) - set sync speed - return
The problem is that device assembly after creation was not checked for...
Miscellaneous style fixes
This patch fixes some minor pylint warnings (unused variables, wrongindentation, etc.) and a real bug in the recovery for drbd8 renameprocedure.
Reviewed-by: imsnah
Make DiagnoseOS use the modified OS objects
Modify backend.py so that DiagnoseOS only returns OS objects rather thanInvalidOS errors, and make sure gnt-os understands the new objects. Also deletethe deprecated helper functions from gnt-os.
Reviewed-By: iustinp
Fix two typos in a doc string
Remove a wrong "i" and add a missing ")" to the DiagnoseOS function doc string.
Implement device to instance mapping cache
Currently, troubleshooting DRBD problems involves a manual process of goingbackwards from the DRBD device to the instance that owns it.
This patch adds a weak (i.e. not guaranteed to be correct or up-to-date)cache of device to instance. The cache should be, in normal operation,...
Whitespace fixes
Reviewed-by: ultrotter
Fix a non-clear error message
Implement replace-disks for drbd8 devices
This patch adds three modes of disk replacement for drbd8: - replace the disk on the primary node - replace the disk on the secondary node - replace the secondary node
It also adds some debugging code to backend.py and increments the...
Implement block device renaming
This patch add code for renaming a device; more precisely, for changingthe unique_id of the device. This means: - logical volumes, rename the volume - drbd8, change the remote peer
This is needed for the being able to replace disks for drbd8....
Modify two mirror-device related rpc calls
The two calls mirror_addchild and mirror_removechild take only one childfor addition/removal. While this is enough for our md usage, for localdisk replacement in drbd8, we need to be able to specify both the data...
Abstract more strings values into constants
Currently, the disk types are defined using constants in the code.Convert those into constants so that we can easily find them and checktheir usage.
Note that we don't rename the values of the constants as they are used...
Patch series for reboot feature, part 1
This patch series implements the reboot command for gnt-instance. Itsupports three types of reboot: soft (hypervisor reboot), hard (instanceconfig rebuild and reboot) and full (full instance shutdown and startupagain)....
Replace more ssh paths with proper constants
The node's ssh keys filenames are now provided as constants; this shouldallow easier customization.
Also, the user's ssh key computing has been abstracted into ssh.py
Trivial typing fixups.
Reviewed-by: iustinp
Remove some hardcoded names/paths from backend.py
This patch does the following: - add constants.GANETI_RUNAS = "root", which is used to compute the homedir (and thus the .ssh directory) instead of hardcoding "/root/.ssh" in backend.AddNode and backend.LeaveCluster...
Do not walk the whole DATA_DIR on node leave
Since we remove only files from DATA_DIR and not from subdirectories,let's not walk the entire tree, a simple listdir suffices. Also switchto utils.RemoveFile from simple os.unlink.
Remove the shebang from modules
Since modules are not directly executables, remove the shebang fromthem. This helps with lintian warnings.
Also make the autogenerated _autoconf.py contain two comment lines atthe beginning, like the other modules.
Add boot id to “gnt-node list”.
Add function to list files in a directory, excluding those beginning with adot.
Remove redundant check.
This isdir() check leads to a broken error message. Even fixing it creates somecases in which the error message is nebulous and unclear while removing itmakes this situation be dealt with a lot better by the _OSOndiskVersion checks....
Ship (and display) path for InvalidOS errors too.
- Document the expected change to errors.InvalidOS- Always pass the additional argument- Modify DiagnoseOS output to show the path
Reviewed-by: iustinp, imsnah
Second part of the OS search path cleanup
Abstract the _OSSearch function, to look for an OS in the search pathMake OSFromDisk accept an optional base_dir, rather than the os_dir itself
Make parameter os_dir mandatory for _OSOndiskversion.
First part of the OS search path cleanup. _OSOndiskversion is only ever calledonce, and with that argument set, so let's make it mandatory.
Change constants.OS_DIR with constants.OS_SEARCH_PATH which includes all thedirectories which can contain OS scripts.
The list defaults to the current one but can be changed at configure time.
Rename constants for SSH init script by Iustin's request.
Add configure option for init.d/ssh script. This is useful for distributionswith the script named differently than Debian.
A few minor fixes in backend.py
This uses the recently-added Instance.FindDisk() method instead ofhard coded find-disk code.
It also renames one parameter to AddNode from ssh to sshkey in order notto shadow the ganeti.ssh module.
Implement instance rename operation
This patch adds support for instance rename operation at all remaininglayers: RPC, OpCode/LU and CLI.
Add support for rename operation in the OS API
This patch adds support for renaming at OS level. Because of this, weneed to bump up the version of the OS api from 4 to 5.
The patch also documents the new script interface in theganeti-os-interface(7) man page and adds a section on upgrading the OS...
Fix the ssh change which breaks remote ssh commands
Explanation: since we use lists and not a string, every argument we giveis passed unchanged to the remote shell. So, for example, passing'/etc/init.d/ganeti restart' to the remote shell, it will try to run the...
Make import/export use the auxiliary ssh library to build the remote commands.
This avoids forgetting some parameters, as it's happening right now(the correct known host file is not being passed)
In order to do so we split SSHCall into an auxiliary BuildSSHCmd which builds...
Add a safety check to the backend.AddOSToInstance
This changes a ';' to '&&' to make sure we run the create script fromthe correct directory.
Rework ssh known-hosts handling.
This changes: - cluster setup, we no longer edit /etc/ssh/ssh_known_hosts but our own file - node add, we no longer remove root's known_hosts (twice) - gnt-instance console, both the LU and the script: since now the ssh...
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
Add instance name to LVM volume as a tag.
Put synchronization speed into constant.
Comment formatting updates.
Since the watcher can run on all nodes, let's get rid of the cron filehandling, as it can be static and outside of ganeti.
This also means we can get rid of a lot of infrastructure too: - the master/node config files checkers - one rpc function
- Implement “gnt-node volumes”- Create all --output options using a constant- Put node checking code from opcodes into a single function- Do the same for output fields
Big change/cleanup in relation to the master startup: - move the master node name from the ConfigWriter to SimpleStore (all nodes need this, and it was the only thing pulled in from the ConfigWriter on nodes) - fix mcpu.py and the testing w.r.t. this change; for testing, rename...
Initial commit.