« Previous | Next » 

Revision 84d9c84e

ID84d9c84ed28bc7bc6af3e2d376ea3f0953855e53
Parent 3087e906
Child 4b550009

Added by Jose A. Lopes almost 10 years ago

Override disk labels and introduce 'OS_SCRIPT'

  • The call to update the metadata is moved inside the
    'RunOsScriptsVirtualized' but before 'TemporaryDisks' because this
    call updates the instance configuration in the metadata daemon, and
    we want this configuration to be available when the helper VM
    starts, but we don't want it to contain information about the
    temporary disks.
  • The other call to update the metadata is extracted from the 'else'
    branch to the top-level of the function because we want to update
    metadata independently of whether the instance has an OS.
  • Disk paths must be overridden when running the instance inside a
    safe virtualized environment because, from the host perserspective,
    a disk path that looks like

    /srv/ganeti/file-storage/<instance>/e0105543-0979-4896-95c1-d2c477fafa9b.file.disk0

    should be presented to the instance as

    /dev/xvda (Xen)
    /dev/vda (KVM)

    Therefore, we must pass the correct '/dev/*' disk paths to the safe
    virtualized environment when creating the environment file. To
    achieve this, extend backend and RPC for export OS to allow disk
    paths to be overridden.

  • The environment variable 'OS_SCRIPT' is introduce to tell the init
    script that runs inside the virtualized environment which OS script
    to run. In this patch, the OS script to run is 'create_untrusted',
    but in the future it can be overridden for import, export, and
    rename.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences