[libvirt] [PATCH 0/3] bhyve: bhyve:commandline followup fixes

Roman Bogorodskiy (3): bhyve: bhyveDomainDefNamespaceFormatXML cleanup bhyve: emit warning when using bhyve:commandline docs: bhyve: warn about bhyve:commandline risks docs/drvbhyve.html.in | 5 +++++ src/bhyve/bhyve_command.c | 4 ++++ src/bhyve/bhyve_domain.c | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) -- 2.20.1

- Remove ATTRIBUTE_UNUSED for the "buf" argument, it's not unused - Indent fix Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index e422fffb37..79cf103d28 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -232,8 +232,8 @@ bhyveDomainDefNamespaceParse(xmlDocPtr xml ATTRIBUTE_UNUSED, } static int -bhyveDomainDefNamespaceFormatXML(virBufferPtr buf ATTRIBUTE_UNUSED, - void *nsdata) +bhyveDomainDefNamespaceFormatXML(virBufferPtr buf, + void *nsdata) { bhyveDomainCmdlineDefPtr cmd = nsdata; size_t i; -- 2.20.1

When using custom command line arguments, warn that this configuration is not fully supported. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_command.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index a1ae2026a0..1f215dac08 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -630,6 +630,10 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, if (def->namespaceData) { bhyveDomainCmdlineDefPtr bhyvecmd; + VIR_WARN("Booting the guest using command line pass-through feature, " + "which could potentially cause inconsistent state and " + "upgrade issues"); + bhyvecmd = def->namespaceData; for (i = 0; i < bhyvecmd->num_args; i++) virCommandAddArg(cmd, bhyvecmd->args[i]); -- 2.20.1

Document that using bhyve:commandline is not fully supported and may cause issues. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- docs/drvbhyve.html.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in index fb73b4819b..2e9cf5551b 100644 --- a/docs/drvbhyve.html.in +++ b/docs/drvbhyve.html.in @@ -484,5 +484,10 @@ typically, the namespace is given the name of <code>bhyve</code>. </domain> </pre> +<p>Note that these extensions are for testing and development purposes only. +They are <b>unsupported</b>, using them may result in inconsistent state, +and upgrading either bhyve or libvirtd maybe break behavior of a domain that +was relying on a specific commands pass-through.</p> + </body> </html> -- 2.20.1

On Thu, Jan 31, 2019 at 04:41:23PM +0400, Roman Bogorodskiy wrote:
Roman Bogorodskiy (3): bhyve: bhyveDomainDefNamespaceFormatXML cleanup bhyve: emit warning when using bhyve:commandline docs: bhyve: warn about bhyve:commandline risks
docs/drvbhyve.html.in | 5 +++++ src/bhyve/bhyve_command.c | 4 ++++ src/bhyve/bhyve_domain.c | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-)
For all three patches Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Daniel P. Berrangé wrote:
On Thu, Jan 31, 2019 at 04:41:23PM +0400, Roman Bogorodskiy wrote:
Roman Bogorodskiy (3): bhyve: bhyveDomainDefNamespaceFormatXML cleanup bhyve: emit warning when using bhyve:commandline docs: bhyve: warn about bhyve:commandline risks
docs/drvbhyve.html.in | 5 +++++ src/bhyve/bhyve_command.c | 4 ++++ src/bhyve/bhyve_domain.c | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-)
For all three patches
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Pushed, thanks! Roman Bogorodskiy
participants (2)
-
Daniel P. Berrangé
-
Roman Bogorodskiy