Skip to content

libxl, xl: fix domain name uniqueness check

Ian Jackson xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xl: Revert "xl: avoid creating domains with duplicate names"tools/libxl/xl_cmdimpl.c+0 -100 replies
2/6libxl: fix error handling (xenstore transaction leak) in libxl__domain_maketools/libxl/libxl_create.c+29 -200 replies
3/6libxl, xl: fixes to domain creation cleanup logic (domid values)tools/libxl/libxl_create.c tools/libxl/libxl_dm.c tools/libxl/xl_cmdimpl.c+8 -210 replies
4/6libxl: internals: document the error behaviour of various libxl__xs_* functionstools/libxl/libxl_internal.h+10 -20 replies
5/6libxl: during domain destruction, do not complain if no devices dir to destroytools/libxl/libxl_device.c+6 -20 replies
6/6libxl: prevent creation of domains with duplicate namestools/libxl/libxl.c tools/libxl/libxl_create.c+23 -00 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchStefano Stabellini
1/6
2/6
3/6A-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] libxl, xl: fix domain name uniqueness check

We knew that checking for the domain name uniqueness in parse_config_data in xl was wrong. Sadly not only is it wrong, but it doesn't work properly because it prevents the parsing of domain config files in various other contextx.

Instead, in this series, we put this check in libxl_domain_rename, which is the right place for it to be. This function is indeed called during domain creation to set the domain's name at the start. As a sop to those who think domain names are not important, we allow any number of domains with the name "". This is not recommended.

However, after moving this check down into the bowels of libxl domain creation, it became obvious during testing that the error paths with are taken when the check fails didn't work properly and generated a lot of noisy output.

So in this series:
patch 1: revert the original broken check
patches 2-5: error path fixes
patch 6: add the check to libxl_domain_rename