History | View | Annotate | Download (39.5 kB)
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
Reviewed-by: imsnah
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.
Reviewed-by: ultrotter
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.