Statistics
| Branch: | Tag: | Revision:

root / tools / cfgupgrade @ 1fe10404

History | View | Annotate | Download (19.2 kB)

# Date Author Comment
1fe10404 07/16/2013 12:47 pm Klaus Aehlig

Reset cfgupgrade --downgrade to be a no-op

In version 2.10 cfgupgrade --downgrade is supposed to downgrade
the configuration to version 2.9 which, at the moment, is still
the same as 2.10.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Michele Tartara <>

4d33e134 06/20/2013 05:04 pm Thomas Thrainer

Convert instance indices to UUIDs in configuration

cfgupgrade replaces the occurences of instance names (where they are
used as index) with the instance UUID.

It also supports the inverse replacement, so downgrades are
supported too.

Signed-off-by: Thomas Thrainer <>...

ea2ee4b0 06/19/2013 12:36 pm Michele Tartara

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 the
version number set to 2.7 in order to prevent tests failing while the current...

f5c4553b 06/18/2013 06:24 pm Michele Tartara

Merge branch 'stable-2.8' into 'master'

  • stable-2.8
    Version bump to 2.8.0~alpha1
    Make cfgupgrade idempotent
    Update config version number when downgrading
    Add test for shrink heuristics over different resources
    Improve hspace shrinking strategy...
33bff17b 06/18/2013 01:45 pm Michele Tartara

Version bump to 2.8.0~alpha1

Now that alpha versions are supported, we can bump the version number
for 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 upgraded
during the alpha lifetime, before switching to beta (that will enable...

f2e4363c 06/18/2013 11:12 am Michele Tartara

Make cfgupgrade idempotent

One of the unit tests checks whether cfgupgrade's downgrade option is
idempotent. It is, but a version number check made it impossible to
actually downgrade multiple times.

With this change, both the current-version version number and the...

77018a43 06/18/2013 11:11 am Michele Tartara

Update config version number when downgrading

The downgrade option of the cfgupgrade tool was not changing the version
number in the configuration file of the cluster while performing the
downgrade.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

b555101c 06/13/2013 12:32 pm Thomas Thrainer

Convert node indices to UUIDs in configuration

cfgupgrade replaces the occurences of node names (where they are used as
index) with the node UUID.
It also supports the inverse replacement, so downgrades are supported
too.

Tests for cfgupgrade are adapted as well....

a8e07057 05/28/2013 04:05 pm Thomas Thrainer

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 <>
Reviewed-by: Helga Velroyen <>

c69b147d 05/28/2013 12:46 pm Bernardo Dal Seno

Report missing spindles in the configuration

cfgupgrade and cluster-verify run a check for missing spindles in disk
configuration when exclusive storage is enabled. The check in cfgupgrade
may give false positives due to the complexity of getting the correct value...

30448dc7 05/23/2013 02:04 pm Bernardo Dal Seno

cfgupgrade: Remove spindles on downgrade

Spindles didn't exist in 2.8 and should be removed to downgrade.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

c294f84e 05/23/2013 02:03 pm Bernardo Dal Seno

cfgupgrade: Downgrade is a NO-OP

The configuration is still the same as in 2.8 (the reference stable version
for this branch), so downgrade shouldn't do anything.

Unit tests are also updated, with a new 2.8 configuration file. The
configuration file used for the upgrade+downgrade test was tailored to the...

41044e04 04/29/2013 06:53 pm Bernardo Dal Seno

Add multiple min/max specs in instance policy

Now instance policies can contain more than one min/max specs. This is the
main 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...

2827d1ac 04/24/2013 06:19 pm Bernardo Dal Seno

cfgupgrade: Remove enabled_disk_templates on downgrade

Remove enabled_disk_templates instead of the deprecated
enabled_storage_types.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

e94fc80c 04/24/2013 01:05 pm Bernardo Dal Seno

cfgupgrade: Limit specs in ipolicy are always complete

Partial specs are filled with cluster defaults.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

0b94cda8 03/27/2013 12:46 pm Bernardo Dal Seno

cfgupgrade: Add support for newly refactored ipolicies

Instance policies in the configuration are upgraded and downgraded. Both
operations are idempotent.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

1709435e 03/27/2013 12:46 pm Bernardo Dal Seno

cfgupgrade: Add --downgrade option

It's now possible to go back to the previous stable version. Unit tests
provided.

This is mostly useful during development, when going from master to
stable/devel.

Signed-off-by: Bernardo Dal Seno <>...

bb553e5a 03/27/2013 12:46 pm Bernardo Dal Seno

cfgupgrade: Refactor code

All the upgrading code is now in one function. No functionality has been
changed.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

fdb85e3d 03/20/2013 06:48 pm Bernardo Dal Seno

cfgupgrade: Fix error messages

Messages were inconsistent. You could get both an error and a message
saying that everything was fine.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

f032d55c 02/18/2013 12:16 pm Dimitris Aragiorgis

Add cfgupgrade for changing nic.network to uuid

This gets all network info from config_data and parses
all instances and their NICs and makes the substitution.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

b830193c 02/06/2013 12:44 pm Guido Trotter

Version bump for 2.7.0~beta1

Also update the documentation target versions and the cfgupgrade tool to
recognize 2.6 and upgrade to 2.7

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

6e8091f9 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass unittests (make check)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

58bf877f 11/20/2012 07:51 pm Dimitris Aragiorgis

cfgupgrade for networks

Add networks slot in config data.
Add networks slot in nodegroups.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

7939f60c 10/26/2012 05:35 pm Michael Hanselmann

cfgupgrade: Write file for file storage paths

When file storage is used this file is now mandatory.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

09bf5d24 09/18/2012 06:11 pm Michael Hanselmann

Migrate tools/* from constants to pathutils

File system paths moved from constants to pathutils.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

5ae4945a 08/23/2012 02:41 pm Iustin Pop

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...

904910c4 06/15/2012 02:11 pm Iustin Pop

Upgrade wrong iv_names at cfgupgrade time

Since Ganeti 2.6 does warn about disks with wrong iv_names, it would
be better to fix them when upgrading to 2.6.

Not sure if this is too brittle and whether we want to add more
safeguards on the contents of the config/instance/disks before...

93fd9bb1 05/23/2012 01:20 pm Iustin Pop

Adjust cfgupgrade for new minor version

Also does some abstracting of the versions.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

3ccb3a64 02/21/2012 05:23 pm Michael Hanselmann

Replace single- with double-quotes

In at least two cases "%s" is replaced with str(), too.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

b6267745 09/20/2011 05:04 pm Andrea Spadaccini

Implementation of TLS-protected SPICE connections

Added support for TLS-protected SPICE connections:

client/gnt_cluster.py, cli.py:
  • added three new parameters to renew-crypto (--new-spice-certificate,
    --spice-certificate, --spice-ca-certificate) and their validation....
b459a848 08/30/2011 11:24 am Andrea Spadaccini

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 of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

66a66fa7 08/17/2011 05:57 pm Michael Hanselmann

cfgupgrade: Add confirmation message

A message will be given instead of just dropping the user back to the
prompt in case of a successful upgrade.

[…]
documentation formats). Continue with upgrading configuration?
y/[n]/?: y
Configuration successfully upgraded for version 2.5.0~beta1....

9f604ab8 08/05/2011 02:11 pm Michael Hanselmann

Bump version to 2.5.0~beta1

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a292020f 08/04/2011 01:28 pm Michael Hanselmann

cfgupgrade: Remove old watcher state file

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

af7b6689 04/07/2011 01:24 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    LUInstanceQueryData: Don't acquire locks unless requested
    Increase the lock timeouts before we block-acquire
    daemon.py: move startup log message before prep_fn
    Display the actual memory values in N+1 failures...
959b6fe5 03/18/2011 04:42 pm Apollon Oikonomopoulos

cfgupgrade: really ignore hostname when told so

cfgupgrade provides a --ignore-hostname option, however consequently it
spawns config.ConfigWriter, which refuses to handle a foreign
configuration file by default.

config.ConfigWriter provides a relative keyword argument,...

87c80992 03/08/2011 07:26 pm Michael Hanselmann

cfgupgrade: Fix critical bug overwriting RAPI users file

The cfgupgrade tool was designed to be idempotent, that means it could
be run several times and still give produce the correct result. Ganeti
2.4 moved the file containing the RAPI users to a separate directory...

a91f69c4 01/14/2011 02:42 pm Michael Hanselmann

Bump version for Ganeti 2.4.0~beta1

Update the version in all necessary places. Update NEWS with release
date.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

362c5845 01/06/2011 12:29 pm Michael Hanselmann

Merge branch 'devel-2.3'

  • devel-2.3:
    cfgupgrade: Remove unused “program” variable
    cfgupgrade: Check master name, clarify question
    Makefile: Merge build-time reST copying
    Move doc/upgrade.rst to UPGRADE, copy at build-time
    Import upgrade notes into documentation...
9d199a65 01/06/2011 12:27 pm Michael Hanselmann

cfgupgrade: Remove unused “program” variable

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

011974df 01/06/2011 12:06 pm Michael Hanselmann

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....

88b02ee9 11/30/2010 03:57 pm Michael Hanselmann

Remove editor-specific settings from cfgupgrade*

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

fdd9ac5b 11/29/2010 05:14 pm Michael Hanselmann

Move “rapi_users” file into separate directory

This reduces the number of notifications in “ganeti-rapi”. Until now it
was notified for every change in …/lib/ganeti and had to check whether
the users file was affected. A symlink is always created in cfgupgrade...

a8ee6e94 11/02/2010 01:00 pm Michael Hanselmann

Bump version for Ganeti 2.3

Also update cfgupgrade and NEWS.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

24f6a6e6 09/06/2010 05:55 pm Guido Trotter

Revert "Add 2.2->2.3 cluster upgrade function"

This reverts commit 2c9cf6bb05e14ea606638fce9680994cf92e8e24.
The change is better done in objects.py

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

2c9cf6bb 08/27/2010 04:28 pm Manuel Franceschini

Add 2.2->2.3 cluster upgrade function

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Michael Hanselmann <>

02e1292d 06/29/2010 01:47 pm Michael Hanselmann

cfgupgrade: Add option to override config verification

This is needed in a new test script for cfgupgrade where it's better
to only use the minimum parts necessary for testing cfgupgrade.
Including full configuration data to ensure verification doesn't fail...

30acff6c 06/29/2010 01:47 pm Michael Hanselmann

cfgupgrade: Fix bug when checking configuration directory

In the condition for checking the configuration directory, one “or” should have
been an “and”. This bug was in cfgupgrade since commit 95e4a8142 (June 2008).
Found thanks to a test script.

Signed-off-by: Michael Hanselmann <>...

a9221f09 06/29/2010 01:47 pm Michael Hanselmann

cfgupgrade: Add support for Ganeti 2.2

Since configuration changes are now usually done in the configuration
writer 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 to
2.2.
...

5d25b928 06/29/2010 01:45 pm Michael Hanselmann

Remove dead code from cfgupgrade

Three constants were no longer user after commit 11c31f5cb5, which
removed support for upgrading from Ganeti 1.2.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

fc0726b9 06/09/2010 12:40 pm Michael Hanselmann

cfgupgrade: Local variable for cluster-domain-secret filename

This is necessary to allow cfgupgrade to work on a non-standard directory.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

c1e7897d 05/04/2010 03:37 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    cfgupgrade: allow working with relative paths
    Cleanup /etc/hosts during node removal
    verify cluster: check /etc/hosts consistency
    Change the migration message
    qa: enable early release during parallel burnin...
0cddd44d 05/03/2010 06:27 pm Iustin Pop

cfgupgrade: allow working with relative paths

Since utils.WriteFile requires an absolute path, cfgupgrade needs to
normalize the directory it is given.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

af2ae1c0 04/16/2010 03:06 pm Iustin Pop

Merge branch 'devel-2.1'

  • devel-2.1:
    utils: Add class to split string stream into lines
    Fix cluster behaviour with disabled file storage
    Update docstrings in tools/ and enable epydoc
    Forward-port the ganeti 2.0 cfgupgrade
    Add a new tool: sanitize-config...
aeefe835 04/15/2010 05:36 pm Iustin Pop

Fix cfgupgrade with non-default DATA_DIR

Commit 43575108 added bootstrap.GenerateclusterCrypto and commit
7506a7f1 changed cfgupgrade to use it. However, this lost the
functionality of upgrading in non-default DATA_DIR.

To fix this, we enhance bootstrap.GenerateclusterCrypto to accept custom...

3db3eb2a 03/17/2010 05:18 pm Michael Hanselmann

Add cluster domain secret

Information exchanged between different clusters via untrusted
third parties (e.g. for remote instance import/export) must be
signed with a secret shared between all involved clusters to
ensure the third party doesn't modify the information....

6b7d5878 03/15/2010 06:40 pm Michael Hanselmann

Rightname confd's HMAC key

Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or
simply “HMAC key” everywhere. With the implementation of inter-cluster
instance moves, another HMAC key will be introduced for signing critical
data. They can not be the same, so this patch clarifies the purpose of the...

7506a7f1 03/12/2010 05:45 pm Michael Hanselmann

cfgupgrade: Use new bootstrap function for certs and keys

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

30e4e741 01/04/2010 11:20 am Iustin Pop

Fix unused imports or add silences where needed

In some cases pylint doesn't parse the import correctly, so we add
silences; but there are also many cases of unused imports, which we
simply remove.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

07b8a2b5 01/04/2010 10:42 am Iustin Pop

Fix use of the logging functions

The logging functions expand the arguments themselves, thus it's safer
to let them do it rather than manual string formatting.

Also re-wraps one comment.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

aeb0c953 10/16/2009 05:51 pm Michael Hanselmann

cfgupgrade: Implement upgrade to 2.1.0

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

cd34faf2 10/16/2009 05:51 pm Michael Hanselmann

Make bootstrap._GenerateSelfSignedSslCert public

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

11c31f5c 10/16/2009 05:51 pm Michael Hanselmann

cfgupgrade: Remove Ganeti 1.2 support

This also fixes a few typos.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

9cdb9578 09/17/2009 05:12 pm Iustin Pop

Unify the multiple 'verbose' options

Currently multiple files define a 'verbose' option. This patch moves all
these definitions to a single VERBOSE_OPT option which is exported from
cli.py.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

4ef7f423 06/08/2009 07:58 pm Guido Trotter

Change BEGR_DEFAULT to PP_DEFAULT

This way the same constant can represent the default profile also for
nic, disk and OS parameters.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

6f285030 03/06/2009 04:49 pm Iustin Pop

Fix serial_no field on instances

The instance objects did not get a serial_no field. This patch adds a
new constants for the field name and uses it for all three cases
(cluster, nodes, instances).

Reviewed-by: imsnah

ac4d25b6 03/04/2009 04:22 pm Iustin Pop

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

a421fdeb 03/04/2009 04:20 pm Iustin Pop

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.

Reviewed-by: ultrotter

95e4a814 06/23/2008 04:39 pm Michael Hanselmann

cfgupgrade: Implement upgrading to Ganeti 2.0 configuration

Reviewed-by: iustinp

6d691282 06/23/2008 03:53 pm Michael Hanselmann

cfgupgrade: Add main() function

Reviewed-by: iustinp

eda37a5a 06/23/2008 03:53 pm Michael Hanselmann

cfgupgrade: Add logging module

Reviewed-by: iustinp

e0732b36 04/08/2008 03:54 pm Michael Hanselmann

Remove support for Pickle configuration files

Reviewed-by: iustinp

1c2d87fc 04/08/2008 03:54 pm Michael Hanselmann

Add more explicit help for command line

Reviewed-by: iustinp

f97c7901 04/08/2008 03:53 pm Michael Hanselmann

Update copyright year, imports of cfgupgrade

Reviewed-by: iustinp

f4bc1f2c 12/03/2007 04:03 pm Michael Hanselmann

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

319856a9 10/04/2007 02:33 pm Michael Hanselmann

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...

3ecf6786 08/14/2007 06:17 pm Iustin Pop

Style changes for pep-8 and python-3000 compliance.

This changes the raising of exceptions from:
raise Exception, value
to
raise Exception(value)

as the first form will be removed in python-3000 and the second form is
preferred now.

The changes also involve a few cases of changing from raising standard...

60edf71e 08/02/2007 07:40 pm Michael Hanselmann

Implement --dry-run for cfgupgrade.

Reviewed-by: iustinp

0006af7d 08/02/2007 04:45 pm Michael Hanselmann

Add configuration upgrade utility.

Reviewed-by: iustinp