Hello community, here is the log from the commit of package vhostmd for openSUSE:Factory checked in at 2018-12-06 12:18:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vhostmd (Old) and /work/SRC/openSUSE:Factory/.vhostmd.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vhostmd" Thu Dec 6 12:18:46 2018 rev:27 rq:655415 version:1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/vhostmd/vhostmd.changes 2018-07-06 10:43:36.159139985 +0200 +++ /work/SRC/openSUSE:Factory/.vhostmd.new.19453/vhostmd.changes 2018-12-06 12:18:52.613419345 +0100 @@ -1,0 +2,16 @@ +Mon Dec 3 22:53:13 UTC 2018 - James Fehlig <jfeh...@suse.com> + +- Update to vhostmd 1.0 + - Add virtio as transport mechanism + - Update to work with modern Xen + - Add SIGPIPE handler and reconnect + - Add systemd service file + - Modernize build files + - Misc bug fixes and improvements + - Dropped patches: + modernize-build-files.patch, + add-systemd-service.patch, + c7646e32-handle-sigpipe-reconnect.patch, + 03dc9982-fix-deallocation.patch + +------------------------------------------------------------------- Old: ---- 03dc9982-fix-deallocation.patch add-systemd-service.patch c7646e32-handle-sigpipe-reconnect.patch modernize-build-files.patch vhostmd-0.4.tar.bz2 New: ---- vhostmd-1.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vhostmd.spec ++++++ --- /var/tmp/diff_new_pack.XG3fMA/_old 2018-12-06 12:18:54.453417370 +0100 +++ /var/tmp/diff_new_pack.XG3fMA/_new 2018-12-06 12:18:54.457417366 +0100 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,7 +24,7 @@ %endif Name: vhostmd -Version: 0.4 +Version: 1.0 Release: 0 Summary: Virtual Host Metrics Daemon (vhostmd) License: LGPL-2.1-or-later @@ -36,10 +36,6 @@ Patch1: manpage.patch Patch2: value-newline.patch Patch3: libmetrics-link.patch -Patch4: modernize-build-files.patch -Patch5: add-systemd-service.patch -Patch6: c7646e32-handle-sigpipe-reconnect.patch -Patch7: 03dc9982-fix-deallocation.patch BuildRequires: libtool BuildRequires: libvirt-devel BuildRequires: libxml2 @@ -91,10 +87,6 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 %build %if ! %{with_xen} @@ -156,10 +148,12 @@ %files -n libmetrics0 %defattr(-,root,root) %{_libdir}/libmetrics.so.* +%{_libdir}/libserialclient.so.* %files -n libmetrics-devel %defattr(-,root,root) %{_libdir}/libmetrics.so +%{_libdir}/libserialclient.so %dir %{_includedir}/vhostmd %{_includedir}/vhostmd/libmetrics.h ++++++ libmetrics-link.patch ++++++ --- /var/tmp/diff_new_pack.XG3fMA/_old 2018-12-06 12:18:54.469417353 +0100 +++ /var/tmp/diff_new_pack.XG3fMA/_new 2018-12-06 12:18:54.469417353 +0100 @@ -2,12 +2,12 @@ libmetrics uses libxml, so link with it. -Index: vhostmd-0.4/libmetrics/Makefile.am +Index: vhostmd-1.0/libmetrics/Makefile.am =================================================================== ---- vhostmd-0.4.orig/libmetrics/Makefile.am -+++ vhostmd-0.4/libmetrics/Makefile.am -@@ -20,3 +20,4 @@ libmetrics_la_SOURCES = \ - libmetrics_la_DEPENDENCIES = \ - libmetrics.h +--- vhostmd-1.0.orig/libmetrics/Makefile.am ++++ vhostmd-1.0/libmetrics/Makefile.am +@@ -33,3 +33,4 @@ libserialclient_la_SOURCES = \ + libserialclient_la_DEPENDENCIES = \ + libserialclient.h +libmetrics_la_LIBADD = $(LIBXML_LIBS) ++++++ manpage.patch ++++++ --- /var/tmp/diff_new_pack.XG3fMA/_old 2018-12-06 12:18:54.473417349 +0100 +++ /var/tmp/diff_new_pack.XG3fMA/_new 2018-12-06 12:18:54.473417349 +0100 @@ -1,7 +1,7 @@ -Index: vhostmd-0.4/docs/man/vm-dump-metrics.1 +Index: vhostmd-1.0/docs/man/vm-dump-metrics.1 =================================================================== ---- vhostmd-0.4.orig/docs/man/vm-dump-metrics.1 -+++ vhostmd-0.4/docs/man/vm-dump-metrics.1 +--- vhostmd-1.0.orig/docs/man/vm-dump-metrics.1 ++++ vhostmd-1.0/docs/man/vm-dump-metrics.1 @@ -10,8 +10,12 @@ vm-dump-metrics \- Dump VM metrics. .BR vm-dump-metrics reads virtualization hosts provided metrics decription and dumps output ++++++ value-newline.patch ++++++ --- /var/tmp/diff_new_pack.XG3fMA/_old 2018-12-06 12:18:54.481417340 +0100 +++ /var/tmp/diff_new_pack.XG3fMA/_new 2018-12-06 12:18:54.481417340 +0100 @@ -1,7 +1,7 @@ -Index: vhostmd-0.4/vhostmd/metric.c +Index: vhostmd-1.0/vhostmd/metric.c =================================================================== ---- vhostmd-0.4.orig/vhostmd/metric.c -+++ vhostmd-0.4/vhostmd/metric.c +--- vhostmd-1.0.orig/vhostmd/metric.c ++++ vhostmd-1.0/vhostmd/metric.c @@ -280,6 +280,12 @@ int metric_value_get(metric *m) goto out; ++++++ vhostmd-0.4.tar.bz2 -> vhostmd-1.0.tar.bz2 ++++++ ++++ 44588 lines of diff (skipped) ++++++ vhostmd-conf.patch ++++++ --- /var/tmp/diff_new_pack.XG3fMA/_old 2018-12-06 12:18:54.601417212 +0100 +++ /var/tmp/diff_new_pack.XG3fMA/_new 2018-12-06 12:18:54.601417212 +0100 @@ -1,168 +1,20 @@ -Index: vhostmd-0.4/vhostmd.xml +Disable virtio transport in SUSE-provided config file + +In SUSE distros, the default vhostmd config file has only enabled +one transport - vbd. Comment the recently added virtio transport. +Users can uncomment it and restart vhostmd if virtio transport is +desired, similar to the xenstore transport. + +Index: vhostmd-1.0/vhostmd.xml =================================================================== ---- vhostmd-0.4.orig/vhostmd.xml -+++ vhostmd-0.4/vhostmd.xml -@@ -3,7 +3,7 @@ - - <!-- - --Copyright (C) 2008 Novell, Inc. -+Copyright (C) 2014 SUSE, Inc. - - Configuration file for virtual host metrics daemon (vhostmd). - -@@ -18,6 +18,12 @@ A metric's value is set to the output pr - the vm currently under inspection is substituted for NAME. Only useful - within the vm element. - -+NOTE - 'action' must be a valid shell builtin, script or external -+command found in the path specified by the global <path> element. -+When chaining commands, '&', '<' and '>' are reserved characters, -+therefore '&', '<' and '>' must be used instead. For example, -+the logical && operator must be replaced with "&&". -+ - --> - - <vhostmd> -@@ -28,52 +34,74 @@ within the vm element. - <size unit="k">256</size> - </disk> +--- vhostmd-1.0.orig/vhostmd.xml ++++ vhostmd-1.0/vhostmd.xml +@@ -40,7 +40,7 @@ the logical && operator must be replaced <update_period>5</update_period> -- <path>/usr/bin:/usr/sbin:/usr/share/vhostmd/scripts</path> -+ <path>/usr/sbin:/sbin:/usr/bin:/bin:/usr/share/vhostmd/scripts</path> + <path>/usr/sbin:/sbin:/usr/bin:/bin:/usr/share/vhostmd/scripts</path> <transport>vbd</transport> -- <!-- <transport>xenstore</transport> --> +- <transport>virtio</transport> ++ <!-- <transport>virtio</transport> --> + <!-- <transport>xenstore</transport> --> </globals> <metrics> - <metric type="string" context="host"> - <name>HostName</name> -- <action>virsh CONNECT hostname | tr -d '[:space:]'</action> -+ <action> -+ virsh CONNECT hostname | tr -d '[:space:]' -+ </action> - </metric> - <metric type="string" context="host"> - <name>VirtualizationVendor</name> -- <action>/bin/rpm -q --info xen | grep Vendor: | \ -- awk '{print substr($0, index($0,$5)) }'</action> -+ <action> -+ [ -f /proc/xen/privcmd ] && RPM="xen" || RPM="libvirt"; \ -+ rpm -q --queryformat "%{VENDOR}\n" $RPM | sort -u | sed -e 's/<.*//' -e 's/ *$//' -+ </action> - </metric> - <metric type="string" context="host"> - <name>VirtualizationProductInfo</name> -- <action>xm info | gawk '/^xen_(major|minor|extra)/ {print $3}' | \ -- tr -d . | tr '[:space:]' .</action> -+ <action> -+ [ -f /proc/xen/privcmd ] && xl info | \ -+ awk '/^xen_(major|minor|extra)/ {print $3}' | sed -e 'N;s/\n/./' -e 'N;s/\n//' || \ -+ rpm -q --queryformat "%{VERSION}-%{RELEASE}\n" libvirt | sort -u -+ </action> - </metric> - <metric type="uint32" context="host"> - <name>TotalPhyCPUs</name> -- <action>xm info | gawk '/^nr_cpus/ {print $3}'</action> -+ <action> -+ virsh nodeinfo | awk '/^CPU\(s\)/ {print $2}' -+ </action> - </metric> - <metric type="uint32" context="host"> - <name>NumCPUs</name> -- <action>xm info | gawk '/^nr_cpus/ {print $3}'</action> -+ <action> -+ virsh nodeinfo | awk '/^CPU\(s\)/ {print $2}' -+ </action> - </metric> - <metric type="uint64" context="host"> - <name>TotalPhyMem</name> -- <action>xm info | gawk '/^total_memory/ {print $3}'</action> -+ <action> -+ echo $((`virsh nodeinfo | awk '/^Memory/ {print $3}'` / 1024)) -+ </action> - </metric> - <metric type="uint64" context="host"> - <name>UsedMem</name> -- <action>echo "$((`xentop -b -i 1 | gawk '/Domain-0/ {print $5}'` / 1024))"</action> -+ <action> -+ [ -f /proc/xen/privcmd ] && echo "$((`xentop -b -i 1 | awk '/Domain-0/ {print $5}'` / 1024))" || \ -+ free | egrep -i '^[[:space:]]*(.*buffers/cache:)' | awk '{ printf "%d\n", $3/1024; }' -+ </action> - </metric> - <metric type="uint64" context="host"> - <name>FreeMem</name> -- <action>xm info | gawk '/^max_free_memory/ {print $3}'</action> -+ <action> -+ [ -f /proc/xen/privcmd ] && xl info | awk '/^free_memory/ {print $3}' || \ -+ free | egrep -i '^[[:space:]]*(.*buffers/cache:)' | awk '{ printf "%d\n", $4/1024; }' -+ </action> - </metric> - <metric type="uint64" context="host"> - <name>PagedInMemory</name> -- <action>echo "$((`vmstat -s | gawk '/pages paged in/ {print $1}'` / 1024))"</action> -+ <action> -+ vmstat -s | awk '/pages paged in/ {printf "%d\n", $1 / 1024 * $(getconf PAGESIZE) / 1024;}' -+ </action> - </metric> - <metric type="uint64" context="host"> - <name>PagedOutMemory</name> -- <action>echo "$((`vmstat -s | gawk '/pages paged out/ {print $1}'` / 1024))"</action> -+ <action> -+ vmstat -s | awk '/pages paged out/ {printf "%d\n", $1 / 1024 * $(getconf PAGESIZE) / 1024;}' -+ </action> - </metric> - <metric type="group" context="host"> - <name>PageRates</name> -@@ -83,13 +111,48 @@ within the vm element. - </metric> - <metric type="real64" context="host"> - <name>TotalCPUTime</name> -- <action>virsh CONNECT dominfo 0 | sed 's/: */:/' | \ -- gawk -F: '/CPU time/ {print $2;}'</action> -+ <action> -+ [ -f /proc/xen/privcmd ] && xl list | awk '/^Domain-0/ {print $6}' || \ -+ awk ' -+ function user_hz( hz) -+ { -+ cmd = "getconf CLK_TCK"; -+ cmd | getline; -+ hz = $1; -+ close(cmd); -+ -+ return hz; -+ } -+ -+ BEGIN { -+ USER_HZ = user_hz(); -+ TotalCPUTime = 0; -+ -+ while ( 0 < ( getline < "/proc/stat" ) ) -+ { -+ if ( "cpu" == $1 ) -+ { -+ TotalCPUTime = $2 + $3 + $4; -+ -+ break; -+ } -+ } -+ close("/proc/stat"); -+ -+ #printf "USER_HZ = %d\n", USER_HZ | "cat 1>&2"; -+ TotalCPUTime /= USER_HZ; -+ printf "%f\n", TotalCPUTime; -+ -+ #close("cat 1>&2"); -+ }' -+ </action> - </metric> - <metric type="real64" context="vm"> - <name>TotalCPUTime</name> -- <action>virsh CONNECT dominfo NAME | sed 's/: */:/' | \ -- gawk -F: '/CPU time/ {print $2;}'</action> -+ <action> -+ virsh CONNECT dominfo NAME | sed 's/: */:/' | \ -+ awk -F: '/CPU time/ {print $2;}' | sed 's/s//' -+ </action> - </metric> - </metrics> - </vhostmd>