Re: [PATCH v4 1/5] Introduce virDomainRename API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 13, 2015 at 10:22:25 +0200, Tomas Meszaros wrote:
> Also, among with this new API new ACL that restricts rename capability
> is invented too.
> 
> Signed-off-by: Tomas Meszaros <exo@xxxxxx>
> ---
>  include/libvirt/libvirt-domain.h |  4 ++++
>  src/driver-hypervisor.h          |  6 ++++++
>  src/libvirt-domain.c             | 35 +++++++++++++++++++++++++++++++++++
>  src/libvirt_public.syms          |  5 +++++
>  src/remote/remote_driver.c       |  1 +
>  src/remote/remote_protocol.x     | 18 +++++++++++++++++-
>  src/remote_protocol-structs      |  9 +++++++++
>  7 files changed, 77 insertions(+), 1 deletion(-)
> 

...

> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> index dc89bab..9065dab 100644
> --- a/src/libvirt-domain.c
> +++ b/src/libvirt-domain.c
> @@ -8774,6 +8774,41 @@ virDomainIsPersistent(virDomainPtr dom)
>      return -1;
>  }
> 
> +/**
> + * virDomainRename:
> + * @dom: pointer to the domain object
> + * @new_name: new domain name
> + * @flags: extra flags; not used yet, so callers should always pass 0
> + *
> + * Rename a domain. New domain name is specified in the second
> + * argument. Depending on each driver implementation it may be
> + * required that domain is in a specific state.

Additionally the comment should state that certain attributes of the
domain's config are not modified even if they contain the domain name.

One example is the auto-generated socket path for guest agent
connections. Neglecting to change it after a rename and defining a new
domain with the same name as the previously renamed one will then result
in problems in guest agent use. Ideally the code would rename that but
IIRC the idea was rejected previously.

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]