Skip to contentSkip to conversation

build: use correct qemu path in systemd service file and init script

PATCH In review Ting-Wei Lan 6 participants 17 messages Jul 16, 2015 – Jul 31, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: use correct qemu path in systemd service file and init script

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

---
 tools/configure                                               | 11 +++++++++++
 tools/configure.ac                                            |  6 ++++++
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in            |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in                      |  2 +-
 .../Linux/systemd/xen-qemu-dom0-disk-backend.service.in       |  2 +-
 5 files changed, 20 insertions(+), 3 deletions(-)
tools/configure +11 -0
index 2fa7426..c7ac612 100755
@@ -695,6 +695,7 @@ PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
 ovmf_path
 seabios_path
+qemu_xen_path_service
 qemu_xen
 rombios
 qemu_traditional
@@ -4168,6 +4169,16 @@ _ACEOF
 
 
 fi
+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+
+else
+
+    qemu_xen_path_service="$withval"
+
+fi
+
 
 
 
tools/configure.ac +6 -0
index b7f1513..3bb2b8b 100644
@@ -199,7 +199,13 @@ AC_ARG_WITH([system-qemu],
 AS_IF([test "x$qemu_xen" = "xn"], [
     AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
 ])
+AS_IF([test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"], [
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+], [
+    qemu_xen_path_service="$withval"
+])
 AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path_service)
 
 AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +1 -1
index c12fc8a..770ba90 100644
@@ -39,4 +39,4 @@
 #XENBACKENDD_DEBUG=[yes|on|1]
 
 # qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path_service@
tools/hotplug/Linux/init.d/xencommons.in +1 -1
index a1095c2..b501aaf 100644
@@ -98,7 +98,7 @@ do_start () {
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
 	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
-	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+	test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path_service@"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
 		-monitor /dev/null -serial /dev/null -parallel /dev/null \
 		-pidfile $QEMU_PIDFILE
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1 -1
index 274cec0..a8e2ca0 100644
@@ -11,7 +11,7 @@ Type=simple
 PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_path_service@ -xen-domid 0 \
 	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
 	-monitor /dev/null -serial /dev/null -parallel /dev/null \
 	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
Signature · 1 line
2.4.3
#1 lore raw
Quoted 4 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.
---

Thanks for this patch - it looks to be a good fix.

However, you must sign off patches per
http://wiki.xen.org/wiki/Submitting_Xen_Project_Patches#Signing_off_a_patch,
and please CC the toolstack maintainers as identified in the MAINTAINERS file.

~Andrew

#2 lore raw

PATCH 1/1 build: use correct qemu path in systemd service file and init script

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

---
 tools/configure                                               | 11 +++++++++++
 tools/configure.ac                                            |  6 ++++++
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in            |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in                      |  2 +-
 .../Linux/systemd/xen-qemu-dom0-disk-backend.service.in       |  2 +-
 5 files changed, 20 insertions(+), 3 deletions(-)
tools/configure +11 -0
index 2fa7426..c7ac612 100755
@@ -695,6 +695,7 @@ PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
 ovmf_path
 seabios_path
+qemu_xen_path_service
 qemu_xen
 rombios
 qemu_traditional
@@ -4168,6 +4169,16 @@ _ACEOF
 
 
 fi
+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+
+else
+
+    qemu_xen_path_service="$withval"
+
+fi
+
 
 
 
tools/configure.ac +6 -0
index b7f1513..3bb2b8b 100644
@@ -199,7 +199,13 @@ AC_ARG_WITH([system-qemu],
 AS_IF([test "x$qemu_xen" = "xn"], [
     AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
 ])
+AS_IF([test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"], [
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+], [
+    qemu_xen_path_service="$withval"
+])
 AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path_service)
 
 AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +1 -1
index c12fc8a..770ba90 100644
@@ -39,4 +39,4 @@
 #XENBACKENDD_DEBUG=[yes|on|1]
 
 # qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path_service@
tools/hotplug/Linux/init.d/xencommons.in +1 -1
index a1095c2..b501aaf 100644
@@ -98,7 +98,7 @@ do_start () {
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
 	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
-	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+	test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path_service@"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
 		-monitor /dev/null -serial /dev/null -parallel /dev/null \
 		-pidfile $QEMU_PIDFILE
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1 -1
index 274cec0..a8e2ca0 100644
@@ -11,7 +11,7 @@ Type=simple
 PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_path_service@ -xen-domid 0 \
 	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
 	-monitor /dev/null -serial /dev/null -parallel /dev/null \
 	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
Signature · 1 line
2.4.3
#3 lore raw
In reply to Ting-Wei Lan

On Fri, 2015-07-17 at 00:15 +0800, Ting-Wei Lan wrote:

This all looks pretty good. One comment:

tools/configure _ACEOF · line 4174

Quoted 4 lines

+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :

tools/configure +2 -0
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"

It's a shame we have to repeat the "qemu-system-i386" here and in libxl_dm.c.

I think rather than adding a new qemu_xen_path_service we should just make the existing $qemu_xen_path default to the full $LIBEXEC_BIN/qemu -system-i386 and have it substituted everywhere much like you've done here.

Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

What do you think?

Ian.

#4 lore raw

Ian Campbell 於 西元2015年07月21日 23:10 寫道:

Quoted 12 lines · Ting-Wei Lan

This all looks pretty good. One comment:

tools/configure _ACEOF · line 4174

Quoted 4 lines

+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :

tools/configure +2 -0
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"

It's a shame we have to repeat the "qemu-system-i386" here and in libxl_dm.c.

Quoted 6 lines

I think rather than adding a new qemu_xen_path_service we should just make the existing $qemu_xen_path default to the full $LIBEXEC_BIN/qemu -system-i386 and have it substituted everywhere much like you've done here.

Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

The help strings says:
Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen device model

When $withval is yes, qemu_xen_path() returns "qemu" instead of a full path, so it cannot use QEMU_XEN_PATH because we are going to change it to a full path. Although qemu path in service file and init script is already broken if $withval is yes because we cannot know the full path of qemu when configuring, I think we still need to keep qemu_xen_path() working.

Quoted 5 lines

What do you think?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 28 lines · Ting-Wei Lan

Ian Campbell 於 西元2015年07月21日 23:10 寫道:

Quoted 21 lines · Ting-Wei Lan

This all looks pretty good. One comment:

tools/configure _ACEOF · line 4174

Quoted 5 lines

+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu";
then :

tools/configure +2 -0
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"

It's a shame we have to repeat the "qemu-system-i386" here and in libxl_dm.c.

I think rather than adding a new qemu_xen_path_service we should just
make the existing $qemu_xen_path default to the full $LIBEXEC_BIN/qemu
-system-i386 and have it substituted everywhere much like you've done
here.

Quoted 1 line

Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

The help strings says:
Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen device model

Quoted 5 lines

When $withval is yes, qemu_xen_path() returns "qemu" instead of a full
path, so it cannot use QEMU_XEN_PATH because we are going to change it
to a full path.

I think if $withval is yes and we are converting that to "qemu" then QEMU_XEN_PATH should just be "qemu" and we should substitute that in the initscript too. IOW the "taken from $PATH" applies just as much to the initscript usage as it does to the toolstack.

Ian.

Quoted 10 lines

Although qemu path in service file and init script is
already broken if $withval is yes because we cannot know the full path
of qemu when configuring, I think we still need to keep qemu_xen_path()
working.

Quoted 3 lines

What do you think?

Quoted 8 lines
Quoted 2 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw

Ian Campbell 於 西元2015年07月24日 16:57 寫道:

Quoted 35 lines · Ting-Wei Lan
Quoted 28 lines

Ian Campbell 於 西元2015年07月21日 23:10 寫道:

Quoted 21 lines · Ting-Wei Lan

This all looks pretty good. One comment:

tools/configure _ACEOF · line 4174

Quoted 5 lines

+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu";
then :

tools/configure +2 -0
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"

It's a shame we have to repeat the "qemu-system-i386" here and in libxl_dm.c.

I think rather than adding a new qemu_xen_path_service we should just
make the existing $qemu_xen_path default to the full $LIBEXEC_BIN/qemu
-system-i386 and have it substituted everywhere much like you've done
here.

Quoted 1 line

Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

The help strings says:
Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen device model

Quoted 5 lines

When $withval is yes, qemu_xen_path() returns "qemu" instead of a full
path, so it cannot use QEMU_XEN_PATH because we are going to change it
to a full path.

Quoted 4 lines

I think if $withval is yes and we are converting that to "qemu" then QEMU_XEN_PATH should just be "qemu" and we should substitute that in the initscript too. IOW the "taken from $PATH" applies just as much to the initscript usage as it does to the toolstack.

Yes, we can use "qemu" in init scripts, but systemd service files require absolute paths. We still have to do different things such as "/usr/bin/env qemu" for systemd.

Quoted 21 lines

Ian.

Quoted 18 lines

Although qemu path in service file and init script is
already broken if $withval is yes because we cannot know the full path
of qemu when configuring, I think we still need to keep qemu_xen_path()
working.

Quoted 5 lines

What do you think?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw
Quoted 10 lines · Ting-Wei Lan

Ian Campbell 於 西元2015年07月24日 16:57 寫道:

Quoted 4 lines

I think if $withval is yes and we are converting that to "qemu" then QEMU_XEN_PATH should just be "qemu" and we should substitute that in the initscript too. IOW the "taken from $PATH" applies just as much to the initscript usage as it does to the toolstack.

Yes, we can use "qemu" in init scripts, but systemd service files require absolute paths. We still have to do different things such as "/usr/bin/env qemu" for systemd.

That's fine, IMHO systemd induced oddness ought to be confined to systemd specific places.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw

PATCH v2 1/1 build: use correct qemu path in systemd service file and init script

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

---
Changed since v1:
* Don't repeat qemu-system-i386 everywhere
* Use $qemu_xen_path in both init scripts and libxl_dm.c
* systemd requires executable path to be absolute so it is handled differently

 tools/configure                                     | 21 ++++++++++++++++-----
 tools/configure.ac                                  | 19 ++++++++++++++-----
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in  |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in            |  2 +-
 .../systemd/xen-qemu-dom0-disk-backend.service.in   |  2 +-
 tools/libxl/libxl_dm.c                              |  4 ----
 6 files changed, 33 insertions(+), 17 deletions(-)
tools/configure +16 -5
index 2fa7426..c0b3827 100755
@@ -695,6 +695,8 @@ PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
 ovmf_path
 seabios_path
+qemu_xen_systemd
+qemu_xen_path
 qemu_xen
 rombios
 qemu_traditional
@@ -4142,9 +4144,14 @@ fi
 if test "${with_system_qemu+set}" = set; then :
   withval=$with_system_qemu;
     case $withval in
-    yes) qemu_xen=n ; qemu_xen_path=qemu ;;
-    no)  qemu_xen=y ; qemu_xen_path= ;;
-    *)   qemu_xen=n ; qemu_xen_path=$withval ;;
+        yes)
+            qemu_xen=n ; qemu_xen_path="qemu"
+            qemu_xen_systemd="/usr/bin/env $qemu_xen_path" ;;
+        no)
+            qemu_xen=y ;;
+        *)
+            qemu_xen=n ; qemu_xen_path="$withval" ;
+            qemu_xen_systemd="$qemu_xen_path" ;;
     esac
 
 else
@@ -4159,15 +4166,19 @@ else
 
 fi
 
-if test "x$qemu_xen" = "xn"; then :
+if test "x$qemu_xen" = "xy"; then :
+
+    qemu_xen_path="$LIBEXEC_BIN/qemu-system-i386"
+    qemu_xen_systemd="$qemu_xen_path"
 
+fi
 
 cat >>confdefs.h <<_ACEOF
 #define QEMU_XEN_PATH "$qemu_xen_path"
 _ACEOF
 
 
-fi
+
 
 
 
tools/configure.ac +14 -5
index b7f1513..0209c6b 100644
@@ -183,9 +183,14 @@ AC_ARG_WITH([system-qemu],
        [Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
         device model instead of building and installing our own version]),[
     case $withval in
-    yes) qemu_xen=n ; qemu_xen_path=qemu ;;
-    no)  qemu_xen=y ; qemu_xen_path= ;;
-    *)   qemu_xen=n ; qemu_xen_path=$withval ;;
+        yes)
+            qemu_xen=n ; qemu_xen_path="qemu"
+            qemu_xen_systemd="/usr/bin/env $qemu_xen_path" ;;
+        no)
+            qemu_xen=y ;;
+        *)
+            qemu_xen=n ; qemu_xen_path="$withval" ;
+            qemu_xen_systemd="$qemu_xen_path" ;;
     esac
 ],[
     case "$host_cpu" in
@@ -196,10 +201,14 @@ AC_ARG_WITH([system-qemu],
         *) qemu_xen=n;;
     esac
 ])
-AS_IF([test "x$qemu_xen" = "xn"], [
-    AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
+AS_IF([test "x$qemu_xen" = "xy"], [
+    qemu_xen_path="$LIBEXEC_BIN/qemu-system-i386"
+    qemu_xen_systemd="$qemu_xen_path"
 ])
+AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
 AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path)
+AC_SUBST(qemu_xen_systemd)
 
 AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +1 -1
index c12fc8a..78a2313 100644
@@ -39,4 +39,4 @@
 #XENBACKENDD_DEBUG=[yes|on|1]
 
 # qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path@
tools/hotplug/Linux/init.d/xencommons.in +1 -1
index a1095c2..18cbf1c 100644
@@ -98,7 +98,7 @@ do_start () {
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
 	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
-	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+	test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path@"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
 		-monitor /dev/null -serial /dev/null -parallel /dev/null \
 		-pidfile $QEMU_PIDFILE
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1 -1
index 274cec0..acf61a8 100644
@@ -11,7 +11,7 @@ Type=simple
 PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_systemd@ -xen-domid 0 \
 	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
 	-monitor /dev/null -serial /dev/null -parallel /dev/null \
 	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
tools/libxl/libxl_dm.c +0 -4
index 094a133..5ebbce0 100644
@@ -36,11 +36,7 @@ const char *libxl__device_model_savefile(libxl__gc *gc, uint32_t domid)
 
 static const char *qemu_xen_path(libxl__gc *gc)
 {
-#ifdef QEMU_XEN_PATH
     return QEMU_XEN_PATH;
-#else
-    return libxl__abs_path(gc, "qemu-system-i386", libxl__private_bindir_path());
-#endif
 }
 
 static int libxl__create_qemu_logfile(libxl__gc *gc, char *name)
Signature · 1 line
2.4.3
Acked-by on v2 1/1
#9 lore raw
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and @qemu_xen_systemd@ and just put the env invocation in the service file as "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding, so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where --with-system-qemu is used without an explicit path, which is supposed to search for "qemu" in $PATH but fails to do so for the initscripts and unit files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't the thing the user asked for).

The fix looks pretty straight forward to me.

Mostly unrelated, is "qemu" a sensible default here? No binary package on Debian actually provides a "qemu" binary, they are all qemu-system-foo or variants. I'm not sure if that's just a Debian packaging issue though. I've added the Qemu-xen maintainers for input...

Ian.

#10 lore raw
Quoted 14 lines · Ian Campbell
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and @qemu_xen_systemd@ and just put the env invocation in the service file as "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding, so:

Quoted 9 lines

Wei Lui, what do you think about this for 4.6? It fixes a real issue where --with-system-qemu is used without an explicit path, which is supposed to search for "qemu" in $PATH but fails to do so for the initscripts and unit files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't the thing the user asked for).

The fix looks pretty straight forward to me.

I agree with you. It should be applied for 4.6.

Quoted 6 lines

Mostly unrelated, is "qemu" a sensible default here? No binary package on Debian actually provides a "qemu" binary, they are all qemu-system-foo or variants. I'm not sure if that's just a Debian packaging issue though. I've added the Qemu-xen maintainers for input...

Ian.

#13 lore raw
In reply to Ian Campbell
Quoted 21 lines · Ian Campbell
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and @qemu_xen_systemd@ and just put the env invocation in the service file as "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding, so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where --with-system-qemu is used without an explicit path, which is supposed to search for "qemu" in $PATH but fails to do so for the initscripts and unit files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't the thing the user asked for).

Quoted 6 lines

The fix looks pretty straight forward to me.

Mostly unrelated, is "qemu" a sensible default here? No binary package on Debian actually provides a "qemu" binary, they are all qemu-system-foo or variants. I'm not sure if that's just a Debian packaging issue though. I've added the Qemu-xen maintainers for input...

QEMU does not build a binary called 'qemu', so this would be package specific. So I think a default should be either 'qemu-system-i386' or fail if no path is provided.

Signature · 1 line
Anthony PERARD
#14 lore raw
Quoted 39 lines · Anthony PERARD
Quoted 30 lines · Ian Campbell
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and
@qemu_xen_systemd@ and just put the env invocation in the service file as
"/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where
--with-system-qemu is used without an explicit path, which is supposed to
search for "qemu" in $PATH but fails to do so for the initscripts and unit
files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't
the thing the user asked for).

The fix looks pretty straight forward to me.

Quoted 7 lines

Mostly unrelated, is "qemu" a sensible default here? No binary package on
Debian actually provides a "qemu" binary, they are all qemu-system-foo or
variants. I'm not sure if that's just a Debian packaging issue though. I've
added the Qemu-xen maintainers for input...

Quoted 3 lines

QEMU does not build a binary called 'qemu', so this would be package specific. So I think a default should be either 'qemu-system-i386' or fail if no path is provided.

Thanks. I think we should take Ting-Wei's patch as is for 4.6 and fixup the default to be qemu-system-i386 in 4.7.

Ian.

Applied
#11 lore raw
In reply to Wei Liu
Quoted 29 lines · Wei Liu
Quoted 28 lines · Ian Campbell
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and
@qemu_xen_systemd@ and just put the env invocation in the service file as
"/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where
--with-system-qemu is used without an explicit path, which is supposed to
search for "qemu" in $PATH but fails to do so for the initscripts and unit
files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't
the thing the user asked for).

Quoted 4 lines
Quoted 2 lines

The fix looks pretty straight forward to me.

I agree with you. It should be applied for 4.6.

Thanks, applied.

Ting-Wei: I got a reject in xencommons.in because your tree apparently lacks 8e986e5a61ef from May. Please check I've resolved it correctly, and please use a more up to date baseline for future patches.

Thanks,
Ian.

#15 lore raw
In reply to Ian Campbell
Quoted 47 lines · Ian Campbell
Quoted 39 lines · Anthony PERARD
Quoted 30 lines · Ian Campbell
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and
@qemu_xen_systemd@ and just put the env invocation in the service file as
"/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where
--with-system-qemu is used without an explicit path, which is supposed to
search for "qemu" in $PATH but fails to do so for the initscripts and unit
files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't
the thing the user asked for).

The fix looks pretty straight forward to me.

Quoted 7 lines

Mostly unrelated, is "qemu" a sensible default here? No binary package on
Debian actually provides a "qemu" binary, they are all qemu-system-foo or
variants. I'm not sure if that's just a Debian packaging issue though. I've
added the Qemu-xen maintainers for input...

Quoted 3 lines

QEMU does not build a binary called 'qemu', so this would be package specific. So I think a default should be either 'qemu-system-i386' or fail if no path is provided.

Thanks. I think we should take Ting-Wei's patch as is for 4.6 and fixup the default to be qemu-system-i386 in 4.7.

Quoted 6 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Ian,

I would actually advise against using the name "qemu" because upstream explicitly asked distros not to use that since 1.0.

http://wiki.qemu.org/ChangeLog/1.0

You should always use "qemu-system-i386".

Signature · 1 line
Doug Goldstein
#12 lore raw
In reply to Ian Campbell

於 四,2015-07-30 於 16:01 +0100,Ian Campbell 提到:

Quoted 33 lines · Wei Liu
Quoted 32 lines · Ian Campbell
Quoted 30 lines · Ting-Wei Lan
Quoted 5 lines

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and
@qemu_xen_systemd@ and just put the env invocation in the service file as
"/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where
--with-system-qemu is used without an explicit path, which is supposed to
search for "qemu" in $PATH but fails to do so for the initscripts and unit
files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't
the thing the user asked for).

The fix looks pretty straight forward to me.

Quoted 7 lines
Quoted 1 line

I agree with you. It should be applied for 4.6.

Thanks, applied.

Ting-Wei: I got a reject in xencommons.in because your tree apparently lacks 8e986e5a61ef from May. Please check I've resolved it correctly, and please use a more up to date baseline for future patches.

Yes, the commit is correct. I forgot to test the patch on master branch before submitting it. My patch was made on stable-4.5 branch because this issue was found on Xen 4.5.1 release ...

Quoted 3 lines

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#16 lore raw
In reply to Doug Goldstein
Quoted 55 lines · Doug Goldstein
Quoted 47 lines · Ian Campbell
Quoted 39 lines · Anthony PERARD
Quoted 30 lines · Ian Campbell
Quoted 5 lines · Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service.

Personally I would have omitted the distinction between @qemu_xen_path@ and
@qemu_xen_systemd@ and just put the env invocation in the service file as
"/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
so:

Wei Lui, what do you think about this for 4.6? It fixes a real issue where
--with-system-qemu is used without an explicit path, which is supposed to
search for "qemu" in $PATH but fails to do so for the initscripts and unit
files, where it uses the old hardcoded default value instead, which probably doesn't exist if you are using this option (and if it did isn't
the thing the user asked for).

The fix looks pretty straight forward to me.

Quoted 7 lines

Mostly unrelated, is "qemu" a sensible default here? No binary package on
Debian actually provides a "qemu" binary, they are all qemu-system-foo or
variants. I'm not sure if that's just a Debian packaging issue though. I've
added the Qemu-xen maintainers for input...

Quoted 3 lines

QEMU does not build a binary called 'qemu', so this would be package specific. So I think a default should be either 'qemu-system-i386' or fail if no path is provided.

Thanks. I think we should take Ting-Wei's patch as is for 4.6 and fixup the default to be qemu-system-i386 in 4.7.

Quoted 6 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Quoted 9 lines

Ian,

I would actually advise against using the name "qemu" because upstream explicitly asked distros not to use that since 1.0.

http://wiki.qemu.org/ChangeLog/1.0

You should always use "qemu-system-i386".

Thanks for the information. I add this to my 4.7 TODO list.

Wei.

Quoted 2 lines
Signature · 1 line
Doug Goldstein