The first 6 patches are general fixes. The rest of the patch series is: * Add '--install-image' to 'gnt-cluster' to specify the image of the helper VM used to run the OS scripts safely. * Add '--helper-startup-timeout' and '--helper-shutdown-timeout' which control the time needed by the helper VM for startup and shutdown. This is similar to the zeroing timeouts. * Distinguish between trusted and untrusted OS scripts. In this patch series, only the create script is needed. * Move and generalize some code to reuse later for safe OS installs. * Add 'os_export' RPC which exports an OS definition to a tarball, which can later be served by the metadata daemon. * Extract code that runs OS scripts. * Add OS install package which packages an OS definition into an archive. * Add method that runs the helper VM for OS installs by creating temporary disks, similarly to zeroing. * When an instance is created, determine whether the OS scripts are trusted/untrusted and decide whether to run the helper VM or not. * Extend the metadata daemon to serve the OS install package. * Fix and extend tests and QA.
Jose A. Lopes (20): Fix typo in documentation Fix exception message to be consistent with others Fix sorting in CLI options Fix dashes in environment names for OS params Fix var reference from 'instance' instead of 'lu.instance' Fix 'IsInstanceRunning' to handle empty 'instance_info' Add 'install_image' param to 'Cluster' Add 'install_image' to bootstrap, CLI, opcodes, and queries Add timeouts for OS install helper VM Add trusted/untrusted create scripts Move 'DetermineImageSize' to 'ganeti.cmdlib.common' Generalize 'TemporaryDisk' to handle any number of disks RPC 'os_export' Extract code that runs OS scripts to a separate method Helper method to handle the OS install package Helper method to run OS scripts in a virtualized environment Refactor instance create to accommodate unsafe OS scripts Serve OS install package through metadata daemon Fix unit tests QA for 'gnt-cluster modify --install-image=...' lib/backend.py | 66 ++++++- lib/bootstrap.py | 3 +- lib/cli.py | 42 ++++- lib/client/gnt_backup.py | 2 + lib/client/gnt_cluster.py | 29 +-- lib/client/gnt_instance.py | 2 + lib/client/gnt_os.py | 14 +- lib/cmdlib/backup.py | 64 ++----- lib/cmdlib/cluster.py | 25 ++- lib/cmdlib/common.py | 75 ++++++-- lib/cmdlib/instance.py | 348 ++++++++++++++++++++++++------------ lib/cmdlib/instance_storage.py | 49 +++-- lib/cmdlib/operating_system.py | 17 +- lib/config.py | 20 +++ lib/objects.py | 14 ++ lib/query.py | 6 +- lib/rpc_defs.py | 3 + lib/server/noded.py | 8 + qa/ganeti-qa.py | 1 + qa/qa_cluster.py | 11 ++ src/Ganeti/Constants.hs | 18 +- src/Ganeti/Metad/Config.hs | 3 +- src/Ganeti/Metad/WebServer.hs | 41 +++-- src/Ganeti/Objects.hs | 1 + src/Ganeti/OpCodes.hs | 3 + src/Ganeti/OpParams.hs | 22 ++- src/Ganeti/Query/Server.hs | 1 + test/hs/Test/Ganeti/OpCodes.hs | 3 + test/py/cfgupgrade_unittest.py | 1 + test/py/cmdlib/cluster_unittest.py | 30 ++-- test/py/cmdlib/instance_unittest.py | 30 +++- tools/cfgupgrade | 5 + 32 files changed, 672 insertions(+), 285 deletions(-) -- 1.9.1.423.g4596e3a
