LGTM, thanks

On Thu, Jul 30, 2015 at 9:56 PM, Dimitris Aragiorgis <
[email protected]> wrote:

> In case of access=userspace, the hypervisor can access the disk
> via its userspace URI.
>
> Also export this URI to OS scripts, so that the OS definition may use
> it to access the disk, if it so desires.
>
> Signed-off-by: Dimitris Aragiorgis <[email protected]>
> ---
>  lib/backend.py |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/backend.py b/lib/backend.py
> index d74d2e0..140c3cc 100644
> --- a/lib/backend.py
> +++ b/lib/backend.py
> @@ -4044,9 +4044,12 @@ def OSEnvironment(instance, inst_os, debug=0):
>    # Disks
>    for idx, disk in enumerate(instance.disks_info):
>      real_disk = _OpenRealBD(disk)
> +    uri = _CalculateDeviceURI(instance, disk, real_disk)
>      result["DISK_%d_PATH" % idx] = real_disk.dev_path
>      result["DISK_%d_ACCESS" % idx] = disk.mode
>      result["DISK_%d_UUID" % idx] = disk.uuid
> +    if uri:
> +      result["DISK_%d_URI" % idx] = uri
>      if disk.name:
>        result["DISK_%d_NAME" % idx] = disk.name
>      if constants.HV_DISK_TYPE in instance.hvparams:
> --
> 1.7.10.4
>
>
Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Reply via email to