History | View | Annotate | Download (19.8 kB)
Adopt cfgupgrade to support vlan parameter
This patch updates cfgupgrade to support vlans.Downgrade will remove the vlan information and give a warning.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Reset cfgupgrade --downgrade to be a no-op
In version 2.10 cfgupgrade --downgrade is supposed to downgradethe configuration to version 2.9 which, at the moment, is stillthe same as 2.10.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Convert instance indices to UUIDs in configuration
cfgupgrade replaces the occurences of instance names (where they areused as index) with the instance UUID.
It also supports the inverse replacement, so downgrades aresupported too.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Version bump to 2.9.0~alpha1
Bump the version number to 2.9.0~alpha1.
This also requires updating version numbers in cfgupgrade tool.
Furthermore, a data file for test representing a 2.8 configuration had theversion number set to 2.7 in order to prevent tests failing while the current...
Merge branch 'stable-2.8' into 'master'
Version bump to 2.8.0~alpha1
Now that alpha versions are supported, we can bump the version numberfor branch stable-2.8 to 2.8.
This also requires updating the cfgupgrade tool.
Thanks to the previous patches, all the other documents can be upgradedduring the alpha lifetime, before switching to beta (that will enable...
Make cfgupgrade idempotent
One of the unit tests checks whether cfgupgrade's downgrade option isidempotent. It is, but a version number check made it impossible toactually downgrade multiple times.
With this change, both the current-version version number and the...
Update config version number when downgrading
The downgrade option of the cfgupgrade tool was not changing the versionnumber in the configuration file of the cluster while performing thedowngrade.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Convert node indices to UUIDs in configuration
cfgupgrade replaces the occurences of node names (where they are used asindex) with the node UUID.It also supports the inverse replacement, so downgrades are supportedtoo.
Tests for cfgupgrade are adapted as well....
Consider disks_active in UpgradeConfig
The disks_active flag is updated when masterd reads the configuration.Also, cfgupgrade now removes the disks_active flag during downgrades.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Report missing spindles in the configuration
cfgupgrade and cluster-verify run a check for missing spindles in diskconfiguration when exclusive storage is enabled. The check in cfgupgrademay give false positives due to the complexity of getting the correct value...
cfgupgrade: Remove spindles on downgrade
Spindles didn't exist in 2.8 and should be removed to downgrade.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
cfgupgrade: Downgrade is a NO-OP
The configuration is still the same as in 2.8 (the reference stable versionfor this branch), so downgrade shouldn't do anything.
Unit tests are also updated, with a new 2.8 configuration file. Theconfiguration file used for the upgrade+downgrade test was tailored to the...
Add multiple min/max specs in instance policy
Now instance policies can contain more than one min/max specs. This is themain element of the "Constrained instance sizes" section in the"Partitioned Ganeti" design doc.
This is a big patch, but changing the type of a configuration item requires...
cfgupgrade: Remove enabled_disk_templates on downgrade
Remove enabled_disk_templates instead of the deprecatedenabled_storage_types.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
cfgupgrade: Limit specs in ipolicy are always complete
Partial specs are filled with cluster defaults.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
cfgupgrade: Add support for newly refactored ipolicies
Instance policies in the configuration are upgraded and downgraded. Bothoperations are idempotent.
cfgupgrade: Add --downgrade option
It's now possible to go back to the previous stable version. Unit testsprovided.
This is mostly useful during development, when going from master tostable/devel.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
cfgupgrade: Refactor code
All the upgrading code is now in one function. No functionality has beenchanged.
cfgupgrade: Fix error messages
Messages were inconsistent. You could get both an error and a messagesaying that everything was fine.
Add cfgupgrade for changing nic.network to uuid
This gets all network info from config_data and parsesall instances and their NICs and makes the substitution.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Helga Velroyen <helgav@google.com>
Version bump for 2.7.0~beta1
Also update the documentation target versions and the cfgupgrade tool torecognize 2.6 and upgrade to 2.7
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fixes to pass pep8 (make lint)
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Iustin Pop <iustin@google.com>
Fixes to pass unittests (make check)
cfgupgrade for networks
Add networks slot in config data.Add networks slot in nodegroups.
cfgupgrade: Write file for file storage paths
When file storage is used this file is now mandatory.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Migrate tools/* from constants to pathutils
File system paths moved from constants to pathutils.
Bump pep8 version to 1.2
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:
- bump version in the docs- silence some new checks that are wrong due to our indent=2 instead of 4- fix lots of errors in the code where the indentation was wrong by 1...
Upgrade wrong iv_names at cfgupgrade time
Since Ganeti 2.6 does warn about disks with wrong iv_names, it wouldbe better to fix them when upgrading to 2.6.
Not sure if this is too brittle and whether we want to add moresafeguards on the contents of the config/instance/disks before...
Adjust cfgupgrade for new minor version
Also does some abstracting of the versions.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Replace single- with double-quotes
In at least two cases "%s" is replaced with str(), too.
Implementation of TLS-protected SPICE connections
Added support for TLS-protected SPICE connections:
DeprecationWarning fixes for pylint
In version 0.21, pylint unified all the disable-* (and enable-*)directives to disable (resp. enable). This leads to a lot ofDeprecationWarning being emitted even if one uses the recommendedversion of pylint (0.21.1, as stated in devnotes.rst)....
cfgupgrade: Add confirmation message
A message will be given instead of just dropping the user back to theprompt in case of a successful upgrade.
[…]documentation formats). Continue with upgrading configuration?y/[n]/?: yConfiguration successfully upgraded for version 2.5.0~beta1....
Bump version to 2.5.0~beta1
cfgupgrade: Remove old watcher state file
Merge branch 'devel-2.4'
cfgupgrade: really ignore hostname when told so
cfgupgrade provides a --ignore-hostname option, however consequently itspawns config.ConfigWriter, which refuses to handle a foreignconfiguration file by default.
config.ConfigWriter provides a relative keyword argument,...
cfgupgrade: Fix critical bug overwriting RAPI users file
The cfgupgrade tool was designed to be idempotent, that means it couldbe run several times and still give produce the correct result. Ganeti2.4 moved the file containing the RAPI users to a separate directory...
Bump version for Ganeti 2.4.0~beta1
Update the version in all necessary places. Update NEWS with releasedate.
Merge branch 'devel-2.3'
cfgupgrade: Remove unused “program” variable
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
cfgupgrade: Check master name, clarify question
- Check hostname and abort if it doesn't match contents of “ssconf_master_node”, can be overridden using “--ignore-hostname” parameter.- Clarify confirmation question and don't mention instances anymore....
Remove editor-specific settings from cfgupgrade*
Move “rapi_users” file into separate directory
This reduces the number of notifications in “ganeti-rapi”. Until now itwas notified for every change in …/lib/ganeti and had to check whetherthe users file was affected. A symlink is always created in cfgupgrade...
Bump version for Ganeti 2.3
Also update cfgupgrade and NEWS.
Revert "Add 2.2->2.3 cluster upgrade function"
This reverts commit 2c9cf6bb05e14ea606638fce9680994cf92e8e24.The change is better done in objects.py
Add 2.2->2.3 cluster upgrade function
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
cfgupgrade: Add option to override config verification
This is needed in a new test script for cfgupgrade where it's betterto only use the minimum parts necessary for testing cfgupgrade.Including full configuration data to ensure verification doesn't fail...
cfgupgrade: Fix bug when checking configuration directory
In the condition for checking the configuration directory, one “or” should havebeen an “and”. This bug was in cfgupgrade since commit 95e4a8142 (June 2008).Found thanks to a test script.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
cfgupgrade: Add support for Ganeti 2.2
Since configuration changes are now usually done in the configurationwriter class, cfgupgrade's only task is to change the config version.This means we can easily support upgrading from Ganeti 2.0 and 2.1 to2.2....
Remove dead code from cfgupgrade
Three constants were no longer user after commit 11c31f5cb5, whichremoved support for upgrading from Ganeti 1.2.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
cfgupgrade: Local variable for cluster-domain-secret filename
This is necessary to allow cfgupgrade to work on a non-standard directory.
Merge branch 'devel-2.1'
cfgupgrade: allow working with relative paths
Since utils.WriteFile requires an absolute path, cfgupgrade needs tonormalize the directory it is given.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix cfgupgrade with non-default DATA_DIR
Commit 43575108 added bootstrap.GenerateclusterCrypto and commit7506a7f1 changed cfgupgrade to use it. However, this lost thefunctionality of upgrading in non-default DATA_DIR.
To fix this, we enhance bootstrap.GenerateclusterCrypto to accept custom...
Add cluster domain secret
Information exchanged between different clusters via untrustedthird parties (e.g. for remote instance import/export) must besigned with a secret shared between all involved clusters toensure the third party doesn't modify the information....
Rightname confd's HMAC key
Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” orsimply “HMAC key” everywhere. With the implementation of inter-clusterinstance moves, another HMAC key will be introduced for signing criticaldata. They can not be the same, so this patch clarifies the purpose of the...
cfgupgrade: Use new bootstrap function for certs and keys
Fix unused imports or add silences where needed
In some cases pylint doesn't parse the import correctly, so we addsilences; but there are also many cases of unused imports, which wesimply remove.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
Fix use of the logging functions
The logging functions expand the arguments themselves, thus it's saferto let them do it rather than manual string formatting.
Also re-wraps one comment.
cfgupgrade: Implement upgrade to 2.1.0
Make bootstrap._GenerateSelfSignedSslCert public
cfgupgrade: Remove Ganeti 1.2 support
This also fixes a few typos.
Unify the multiple 'verbose' options
Currently multiple files define a 'verbose' option. This patch moves allthese definitions to a single VERBOSE_OPT option which is exported fromcli.py.
Change BEGR_DEFAULT to PP_DEFAULT
This way the same constant can represent the default profile also fornic, disk and OS parameters.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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).
Reviewed-by: imsnah
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
Reviewed-by: ultrotter
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.
cfgupgrade: Implement upgrading to Ganeti 2.0 configuration
Reviewed-by: iustinp
cfgupgrade: Add main() function
cfgupgrade: Add logging module
Remove support for Pickle configuration files
Add more explicit help for command line
Update copyright year, imports of cfgupgrade
Various code style fixes for strings.
- When line wrapping is needed, move spaces to the next line.- Remove embedded line breaks from error messages.
Reviewed-by: schreiberal
Change configuration storage format from Pickle to JSON.
- Add NEWS file with major changes between versions.- Bump RPC version number- No longer serialize in RPC, but just convert to dict
Old Pickle based configuration files can be converted using the cfgupgrade...
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...
Implement --dry-run for cfgupgrade.
Add configuration upgrade utility.