From 04c065737441678e197c539606d4e2e6c688d815 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Fri, 2 Dec 2011 08:43:16 -0500 Subject: [PATCH 001/126] Initial import (#745510) --- .gitignore | 1 + sources | 1 + vdsm.spec | 724 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 726 insertions(+) create mode 100644 vdsm.spec diff --git a/.gitignore b/.gitignore index e69de29..80cde78 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/vdsm-4.9.1-931a43e.tar.gz diff --git a/sources b/sources index e69de29..524d095 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4ca6f706b3e9bd8d15cc4769748e64a2 vdsm-4.9.1-931a43e.tar.gz diff --git a/vdsm.spec b/vdsm.spec new file mode 100644 index 0000000..90e27ff --- /dev/null +++ b/vdsm.spec @@ -0,0 +1,724 @@ +# Packages names +%global vdsm_name vdsm +%global vdsm_bootstrap vdsm-bootstrap +%global vdsm_reg vdsm-reg + +# Upstream release +%global vdsm_release 931a43e + +# Required users and groups +%global vdsm_user vdsm +%global vdsm_group kvm +%global qemu_group qemu + +# Required paths +%global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d + +Name: %{vdsm_name} +Version: 4.9.1 +Release: 2.git%{vdsm_release}%{?dist}%{?extra_release} +Summary: Virtual Desktop Server Manager + +Group: Applications/System +License: GPLv2+ +Url: http://www.ovirt.org/project/subprojects +# The source for this package was pulled from upstream's vcs. +# Use the following commands to generate the tarball: +# git clone http://gerrit.ovirt.org/p/vdsm +# cd vdsm +# git reset --hard {vdsm_release} +# ./autogen.sh --system +# make VERSION=4.9.1-{vdsm_release} dist +Source0: %{vdsm_name}-%{version}-%{vdsm_release}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: python +BuildRequires: redhat-rpm-config +BuildRequires: pyflakes + +%if !0%{?rhel} +BuildRequires: systemd-units +%endif + +Requires: python which +Requires: sudo >= 1.7.3 +Requires: logrotate +Requires: xz +Requires: python-ethtool +Requires: nfs-utils dmidecode +Requires: lvm2 >= 2.02.72-8 + +%if 0%{?rhel} +Requires: qemu-kvm >= 2:0.12.1.2-2.189 +Requires: qemu-img >= 2:0.12.1.2-2.189 +Requires: libvirt >= 0.9.4-13 +Requires: libvirt-python >= 0.9.4-13 +Requires: iscsi-initiator-utils >= 6.2.0.872-15 +Requires: device-mapper-multipath >= 0.4.9-31 +Requires: e2fsprogs >= 1.41.12-11 +%else +Requires: qemu-kvm >= 2:0.15.0-4 +Requires: qemu-img >= 2:0.15.0-4 +Requires: libvirt >= 0.9.6-2 +Requires: libvirt-python >= 0.9.6-2 +Requires: iscsi-initiator-utils >= 6.2.0.872-14 +Requires: device-mapper-multipath >= 0.4.9-18 +Requires: e2fsprogs >= 1.41.14 +%endif + +Requires: psmisc >= 22.6-15 +Requires: fence-agents +Requires: bridge-utils +Requires: sos +Requires: dosfstools +Requires: policycoreutils-python +Requires: libselinux-python +Requires: kernel >= 2.6.32-198 +Requires: selinux-policy-targeted >= 3.7.19-80.el6 +Requires(post): /usr/sbin/saslpasswd2 + +%description +The VDSM service is required by a Virtualization Manager to manage the +Linux hosts. VDSM manages and monitors the host's storage, memory and +networks as well as virtual machine creation, other host administration +tasks, statistics gathering, and log collection. + +%package hook-vhostmd +Summary: VDSM hook set for interaction with vhostmd +Requires: vhostmd +BuildArch: noarch + +%description hook-vhostmd +VDSM hook to use vhostmd per VM according to Virtualization Manager requests. + +%package hook-faqemu +Summary: Fake qemu process for VDSM quality assurance +BuildArch: noarch + +%description hook-faqemu +VDSM hook used for testing VDSM with multiple fake virtual machines without +running real guests. + +%package hook-directlun +Summary: Direct LUN support for VDSM +BuildArch: noarch + +%description hook-directlun +VDSM hook enable user to add storage LUN for VDSM +without the sharing and storage handling of VDSM. + +%package hook-fileinject +Summary: Allow uploading file to VMs disk +BuildArch: noarch + +%description hook-fileinject +Hook is getting target file name and its content and +create that file in target machine. + +%package hook-floppy +Summary: Allow adding floppy to VM +BuildArch: noarch + +%description hook-floppy +Allow adding floppy to VM + +%package hook-hostusb +Summary: Allow attaching USB device from host +BuildArch: noarch + +%description hook-hostusb +Hook is getting vendor and product id of USB device +disconnect it from host and attach it to VM + +%package hook-hugepages +Summary: Huge pages enable user to handle VM with 2048KB page files. +BuildArch: noarch + +%description hook-hugepages +Hook is getting number of huge pages reserve them for the VM, +and enable user to handle VM with 2048KB page files. + +%package hook-isolatedprivatevlan +Summary: Isolated network environment for VMs +BuildArch: noarch + +%description hook-isolatedprivatevlan +limit VM traffic to a specific gateway by its mac address, +hook prevent VM from spoofing its mac or ip address +by using libvirt filter +and by adding custom filter: isolatedprivatevlan-vdsm.xml + +%package hook-numa +Summary: numa sopport for VDSM +BuildArch: noarch + +%description hook-numa +Hooks is getting number/rage of numa nodes and numa mode, +and update the VM xml. + +%package hook-pincpu +Summary: Hook pin VM so specific CPUs +BuildArch: noarch + +%description hook-pincpu +pincpu is hook for VDSM. +pincpu enable to pin virtual machine to a specific CPUs. + +%package hook-promisc +Summary: Network interface promiscuous mode support for VDSM +BuildArch: noarch + +%description hook-promisc +VDSM promiscuous mode let user define a VM interface that will capture +all network traffic. + +%package hook-qos +Summary: QoS network in/out traffic support for VDSM +BuildArch: noarch + +%description hook-qos +Hook adds QoS in/out traffic to VMs interfaces + +%package hook-scratchpad +Summary: One time disk creation for VDSM +BuildArch: noarch + +%description hook-scratchpad +scratchpad hook for VDSM +Hook creates a disk for a VM onetime usage, +the disk will be erased when the VM destroyed. +VM cannot be migrated when using scratchpad hook + +%package hook-smartcard +Summary: Smartcard support for Spice protocol in VDSM +BuildArch: noarch + +%description hook-smartcard +Smartcard hook add support for spice in VDSM. +Smartcard hook enable user to use its smartcard inside virtual machines. + +%package hook-smbios +Summary: Adding custom smbios entries to libvirt domain via VDSM +BuildArch: noarch + +%description hook-smbios +Adding custom smbios entries to libvirt domain via VDSM +such as: vendor, version, date and release + +%package hook-sriov +Summary: sr-iov support for VDSM +BuildArch: noarch + +%description hook-sriov +sr-iov hook enable to add virtual functions exposed by the device +directly to a virtual machine. + +%package hook-vmdisk +Summary: External disk support for VDSM +BuildArch: noarch + +%description hook-vmdisk +Hook adds additional disk image for a VM (raw or qcow2) + +%package debug-plugin +Summary: VDSM Debug Plugin +Requires: vdsm +BuildArch: noarch + +%description debug-plugin +Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. + +%package cli +Summary: VDSM command line interface +BuildArch: noarch + +%description cli +Call VDSM commands from the command line. Used for testing and debugging. + +%package bootstrap +Summary: VDSM bootstrapping package +BuildArch: noarch + +%description bootstrap +VDSM bootstrapping package. Used for delivering the bootstrap code onto the +Virtualization Manager. + +%package reg +Summary: VDSM registration package +BuildArch: noarch + +Requires: %{name} = %{version}-%{release} +Requires: traceroute + +%description reg +VDSM registration package. Used to register a Linux host to a Virtualization +Manager. + +%prep +%setup -q -n %{vdsm_name}-%{version}-%{vdsm_release} + +%build +%configure %{?with_hooks:--enable-hooks} +make + +%install +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install + +# Install the respawn utility +install -Dm 0755 vdsm/respawn \ + %{buildroot}%{_datadir}/%{vdsm_name}/respawn + +# Install the lvm rules +install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ + %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules + +%if 0%{?rhel} +# Install the SysV init scripts +install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd +install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg + +# This is not commonplace, but we want /var/log/core to be a world-writable +# dropbox for core dumps +install -dDm 1777 %{buildroot}%{_localstatedir}/log/core +%else +# Install the configuration sample +install -Dm 0644 vdsm/vdsm.conf.sample \ + %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf + +# Install the systemd scripts +install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd +install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +install -Dm 0755 vdsm_reg/vdsm-reg.init \ + %{buildroot}/lib/systemd/systemd-vdsm-reg +install -Dm 0644 vdsm_reg/vdsm-reg.service \ + %{buildroot}%{_unitdir}/vdsm-reg.service +# Install the polkit for libvirt +install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ + %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla +%endif + +%check +make check + +%clean +rm -rf %{buildroot} + +%pre +/usr/bin/getent passwd %{vdsm_user} >/dev/null || \ + /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ + -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} +/usr/sbin/usermod -a -G %{qemu_group} %{vdsm_user} + +%post +# update the vdsm "secret" password for libvirt +/usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ + /etc/pki/vdsm/keys/libvirt_password +%if 0%{?rhel} +if [ "$1" -eq 1 ] ; then + /sbin/chkconfig --add vdsmd +fi +%else +if [ "$1" -eq 1 ] ; then + /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi +exit 0 +%endif + +%preun +%if 0%{?rhel} +if [ "$1" -eq 0 ] +then + /sbin/service vdsmd stop > /dev/null 2>&1 || : + /sbin/chkconfig --del vdsmd + + /bin/sed -i '/# by vdsm$/d' \ + /etc/libvirt/libvirtd.conf \ + /etc/libvirt/qemu.conf \ + /etc/sysconfig/libvirtd \ + /etc/sysctl.conf + + /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ + /etc/sysctl.conf + + /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF +virt_use_nfs=0 +_EOF + + if selinuxenabled; then + /usr/sbin/setsebool virt_use_nfs off + fi + + /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh + + if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then + /sbin/initctl stop libvirtd >/dev/null 2>/dev/null + rm -f /etc/init/libvirtd.conf + + /sbin/chkconfig libvirtd on + /sbin/service libvirtd start >/dev/null + fi +fi +%else +if [ "$1" -eq 0 ]; then + /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : + /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : +fi +exit 0 +%endif + +%postun +%if 0%{?rhel} +if [ "$1" -ge 1 ]; then + /sbin/service vdsmd condrestart > /dev/null 2>&1 +fi +exit 0 +%else +if [ "$1" -ge 1 ] ; then + /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : +fi +exit 0 +%endif + +%if 0%{?rhel} +%triggerun -- libvirt +if [ "$2" -eq "0" ]; then + /sbin/initctl stop libvirtd > /dev/null 2>&1 || : +fi + +%triggerpostun -- libvirt +if [ "$2" -ge "1" ]; then + /sbin/initctl restart libvirtd > /dev/null 2>&1 || : +fi +%endif + +%post reg +%if 0%{?rhel} +if [ "$1" -eq 1 ] ; then + /sbin/chkconfig --add vdsm-reg +fi +%else +if [ "$1" -eq 1 ] ; then + /bin/systemctl enable vdsmd-reg.service >/dev/null 2>&1 || : + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi +exit 0 +%endif + +%preun reg +%if 0%{?rhel} +if [ "$1" -eq 0 ] +then + /sbin/service vdsm-reg stop > /dev/null 2>&1 || : + /sbin/chkconfig --del vdsm-reg +fi +%else +if [ "$1" -eq 0 ]; then + /bin/systemctl --no-reload disable vdsmd-reg.service > /dev/null 2>&1 || : + /bin/systemctl stop vdsmd-reg.service > /dev/null 2>&1 || : +fi +exit 0 +%endif + +%files +%defattr(-, root, root, -) +%doc COPYING README vdsm/vdsm.conf.sample +%if 0%{?rhel} +%{_initrddir}/vdsmd +%else +/lib/systemd/systemd-vdsmd +%{_unitdir}/vdsmd.service +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf +%endif +%dir %{_libexecdir}/%{vdsm_name} +%dir %{_datadir}/%{vdsm_name} +%dir %{_datadir}/%{vdsm_name}/storage +%{_datadir}/%{vdsm_name}/define.py* +%{_datadir}/%{vdsm_name}/clientIF.py* +%{_datadir}/%{vdsm_name}/caps.py* +%{_datadir}/%{vdsm_name}/utils.py* +%{_datadir}/%{vdsm_name}/constants.py* +%{_datadir}/%{vdsm_name}/vm.py* +%{_datadir}/%{vdsm_name}/vdscli.py* +%{_datadir}/%{vdsm_name}/supervdsm.py* +%{_datadir}/%{vdsm_name}/supervdsmServer.py* +%{_datadir}/%{vdsm_name}/libvirtvm.py* +%{_datadir}/%{vdsm_name}/libvirtconnection.py* +%{_datadir}/%{vdsm_name}/hooks.py* +%{_datadir}/%{vdsm_name}/hooking.py* +%{_datadir}/%{vdsm_name}/libvirtev.py* +%{_datadir}/%{vdsm_name}/vdsm +%{_datadir}/%{vdsm_name}/vdsm-restore-net-config +%{_datadir}/%{vdsm_name}/vdsm-store-net-config +%{_datadir}/%{vdsm_name}/write-net-config +%{_datadir}/%{vdsm_name}/mk_sysprep_floppy +%{_datadir}/%{vdsm_name}/get-vm-pid +%{_datadir}/%{vdsm_name}/prepare-vmchannel +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm +%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm +%{_sysconfdir}/sudoers.d/50_vdsm +%{_sysconfdir}/cron.hourly/vdsm-logrotate +%{_sysconfdir}/cron.d/vdsm-libvirt-logrotate +%{_datadir}/%{vdsm_name}/guestIF.py* +%{_datadir}/%{vdsm_name}/logUtils.py* +%{_datadir}/%{vdsm_name}/dsaversion.py* +%{_datadir}/%{vdsm_name}/pthread.py* +%{_datadir}/%{vdsm_name}/betterThreading.py* +%{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks +%{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook +%{_datadir}/%{vdsm_name}/storage/__init__.py* +%{_datadir}/%{vdsm_name}/storage/dispatcher.py* +%{_datadir}/%{vdsm_name}/storage/storage_exception.py* +%{_datadir}/%{vdsm_name}/storage/sp.py* +%{_datadir}/%{vdsm_name}/storage/sd.py* +%{_datadir}/%{vdsm_name}/storage/hsm.py* +%{_datadir}/%{vdsm_name}/storage/hba.py* +%{_datadir}/%{vdsm_name}/storage/safelease.py* +%{_datadir}/%{vdsm_name}/storage/image.py* +%{_datadir}/%{vdsm_name}/storage/fileSD.py* +%{_datadir}/%{vdsm_name}/storage/nfsSD.py* +%{_datadir}/%{vdsm_name}/storage/localFsSD.py* +%{_datadir}/%{vdsm_name}/storage/blockSD.py* +%{_datadir}/%{vdsm_name}/storage/volume.py* +%{_datadir}/%{vdsm_name}/storage/fileVolume.py* +%{_datadir}/%{vdsm_name}/storage/blockVolume.py* +%{_datadir}/%{vdsm_name}/storage/taskManager.py* +%{_datadir}/%{vdsm_name}/storage/threadPool.py* +%{_datadir}/%{vdsm_name}/storage/task.py* +%{_datadir}/%{vdsm_name}/storage/threadLocal.py* +%{_datadir}/%{vdsm_name}/storage/resourceManager.py* +%{_datadir}/%{vdsm_name}/storage/storage_connection.py* +%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* +%{_datadir}/%{vdsm_name}/storage/storageConstants.py* +%{_datadir}/%{vdsm_name}/storage/fileUtils.py* +%{_datadir}/%{vdsm_name}/storage/misc.py* +%{_datadir}/%{vdsm_name}/storage/lvm.py* +%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* +%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* +%{_datadir}/%{vdsm_name}/storage/processPool.py* +%{_datadir}/%{vdsm_name}/storage/iscsi.py* +%{_datadir}/%{vdsm_name}/storage/devicemapper.py* +%{_datadir}/%{vdsm_name}/storage/securable.py* +%{_datadir}/%{vdsm_name}/storage/multipath.py* +%{_datadir}/%{vdsm_name}/storage/sdc.py* +%{_datadir}/%{vdsm_name}/storage/persistentDict.py* +%{_libexecdir}/%{vdsm_name}/safelease +%{_libexecdir}/%{vdsm_name}/spmprotect.sh +%{_libexecdir}/%{vdsm_name}/spmstop.sh +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_cont +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_pause +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_pause +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_hibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_hibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_dehibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop +%{_datadir}/%{vdsm_name}/configNetwork.py* +%{_datadir}/%{vdsm_name}/addNetwork +%{_datadir}/%{vdsm_name}/delNetwork +%{_datadir}/%{vdsm_name}/respawn +%{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* +%{_datadir}/%{vdsm_name}/get-conf-item +%{_datadir}/%{vdsm_name}/set-conf-item +%{_datadir}/%{vdsm_name}/kaxmlrpclib.py* +%{_datadir}/%{vdsm_name}/config.py* +%{_datadir}/%{vdsm_name}/ksm.py* +%{_datadir}/%{vdsm_name}/netinfo.py* +%{_datadir}/%{vdsm_name}/neterrors.py* +/lib/udev/rules.d/12-vdsm-lvm.rules +%{python_sitelib}/sos/plugins/vdsm.py* +%{_mandir}/man8/vdsmd.8* +%if 0%{?rhel} +%dir %{_localstatedir}/log/core +%else +%{_polkitdir}/10-vdsm-libvirt-access.pkla +%endif + +%defattr(-, %{vdsm_user}, %{qemu_group}, -) +%dir %{_localstatedir}/lib/libvirt/qemu/channels + +%defattr(-, %{vdsm_user}, %{vdsm_group}, -) +%dir %{_sysconfdir}/pki/%{vdsm_name} +%dir %{_sysconfdir}/pki/%{vdsm_name}/keys +%dir %{_sysconfdir}/pki/%{vdsm_name}/certs +%config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password +%dir %{_localstatedir}/lib/%{vdsm_name} +%dir %{_localstatedir}/lib/%{vdsm_name}/netconfback +%ghost %dir %{_localstatedir}/run/%{vdsm_name} +%ghost %dir %{_localstatedir}/run/%{vdsm_name}/pools +%dir %{_localstatedir}/log/%{vdsm_name} +%dir %{_localstatedir}/log/%{vdsm_name}/backup + +%files hook-vhostmd +%defattr(-, root, root, -) +%doc COPYING +%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd + +%if 0%{?with_hooks} +%files hook-directlun +%defattr(-, vdsm, kvm, -) +%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_directlun +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun + +%files hook-fileinject +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject + +%files hook-floppy +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy + +%files hook-hostusb +%defattr(-, vdsm, kvm, -) +%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb + +%files hook-hugepages +%defattr(-, vdsm, kvm, -) +%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages + +%files hook-isolatedprivatevlan +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan +%config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml + +%files hook-numa +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa + +%files hook-pincpu +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu + +%files hook-promisc +%defattr(-, vdsm, kvm, -) +%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_promisc + +%files hook-qos +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos + +%files hook-scratchpad +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad + +%files hook-smartcard +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard + +%files hook-smbios +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios + +%files hook-sriov +%defattr(-, vdsm, kvm, -) +%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_sriov +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_sriov +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_sriov +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_sriov + +%files hook-vmdisk +%defattr(-, vdsm, kvm, -) +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk +%endif + +%files debug-plugin +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/vdsmDebugPlugin.py* + +%files cli +%defattr(-, root, root, -) +%doc COPYING +%{_bindir}/vdsClient +%{_datadir}/%{vdsm_name}/vdsClient.py* +%{_sysconfdir}/bash_completion.d/vdsClient +%{_datadir}/%{vdsm_name}/vdscli.py* +%{_datadir}/%{vdsm_name}/dumpStorageTable.py* +%{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* +%{_mandir}/man1/vdsClient.1* + +%files bootstrap +%defattr(-, root, root, -) +%doc COPYING +%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* +%{_datadir}/%{vdsm_bootstrap}/deployUtil.py* +%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* + +%files reg +%defattr(-, root, root, -) +%doc COPYING +%dir %{_sysconfdir}/%{vdsm_reg} +%dir %{_datadir}/%{vdsm_reg} +%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm-reg +%config(noreplace) %{_sysconfdir}/%{vdsm_reg}/vdsm-reg.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf +%if 0%{?rhel} +%{_initrddir}/vdsm-reg +%else +/lib/systemd/systemd-vdsm-reg +%{_unitdir}/vdsm-reg.service +%endif +%{_datadir}/%{vdsm_reg}/vdsm-reg-setup +%{_datadir}/%{vdsm_reg}/define.py* +%{_datadir}/%{vdsm_reg}/vdsm-complete +%{_datadir}/%{vdsm_reg}/vdsm-gen-cert +%{_datadir}/%{vdsm_reg}/vdsm-upgrade +%{_datadir}/%{vdsm_reg}/config.py* +%{_datadir}/%{vdsm_reg}/deployUtil.py* +%{_datadir}/%{vdsm_reg}/createDaemon.py* +%{python_sitelib}/ovirt_config_setup/rhevm.py* +%{_datadir}/%{vdsm_reg}/save-config +%{_sysconfdir}/ovirt-config-boot.d/vdsm-config +%{_sysconfdir}/ovirt-commandline.d/vdsm-reg +%{_sysconfdir}/cron.hourly/vdsm-reg-logrotate +%{_mandir}/man8/vdsm-reg.8* + +%defattr(-, %{vdsm_user}, %{vdsm_group},-) +%dir %{_var}/log/%{vdsm_reg} + +%files hook-faqemu +%defattr(-, root, root, -) +%doc COPYING +%{_libexecdir}/%{vdsm_name}/vdsm-faqemu +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu + +%changelog +* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e.fc16 +- add the revision control comments to the specfile + +* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c.fc16 +- require iscsi-initiator-utils >= 6.2.0.872-14 bz442980 +- fix the rpmlint errors + +* Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 +- Initial upstream release + +* Thu Nov 02 2006 Simon Grinberg - 0.0-1 +- Initial build From 6239658b8d08401e92ee80e6e69593a86e42f862 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 10 Jan 2012 14:10:26 -0500 Subject: [PATCH 002/126] update to vdsm-4.9.2-951b41d --- vdsm.spec | 88 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 90e27ff..cadbf9b 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,7 +4,7 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release 931a43e +%global vdsm_release 951b41d # Required users and groups %global vdsm_user vdsm @@ -15,25 +15,24 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.1 -Release: 2.git%{vdsm_release}%{?dist}%{?extra_release} +Version: 4.9.2 +Release: 0.git%{vdsm_release}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System License: GPLv2+ -Url: http://www.ovirt.org/project/subprojects +Url: http://www.ovirt.org/wiki/Vdsm # The source for this package was pulled from upstream's vcs. # Use the following commands to generate the tarball: # git clone http://gerrit.ovirt.org/p/vdsm # cd vdsm # git reset --hard {vdsm_release} # ./autogen.sh --system -# make VERSION=4.9.1-{vdsm_release} dist +# make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}-%{vdsm_release}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python -BuildRequires: redhat-rpm-config BuildRequires: pyflakes %if !0%{?rhel} @@ -42,7 +41,7 @@ BuildRequires: systemd-units Requires: python which Requires: sudo >= 1.7.3 -Requires: logrotate +Requires: logrotate >= 3.8.0 Requires: xz Requires: python-ethtool Requires: nfs-utils dmidecode @@ -70,6 +69,7 @@ Requires: psmisc >= 22.6-15 Requires: fence-agents Requires: bridge-utils Requires: sos +Requires: tree Requires: dosfstools Requires: policycoreutils-python Requires: libselinux-python @@ -431,6 +431,7 @@ exit 0 %{_unitdir}/vdsmd.service %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %endif +%dir %attr(0775, root, root) /rhev/data-center %dir %{_libexecdir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/storage @@ -468,42 +469,46 @@ exit 0 %{_datadir}/%{vdsm_name}/betterThreading.py* %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook +%{_libexecdir}/%{vdsm_name}/ovirt_functions.sh %{_datadir}/%{vdsm_name}/storage/__init__.py* -%{_datadir}/%{vdsm_name}/storage/dispatcher.py* -%{_datadir}/%{vdsm_name}/storage/storage_exception.py* -%{_datadir}/%{vdsm_name}/storage/sp.py* -%{_datadir}/%{vdsm_name}/storage/sd.py* -%{_datadir}/%{vdsm_name}/storage/hsm.py* -%{_datadir}/%{vdsm_name}/storage/hba.py* -%{_datadir}/%{vdsm_name}/storage/safelease.py* -%{_datadir}/%{vdsm_name}/storage/image.py* -%{_datadir}/%{vdsm_name}/storage/fileSD.py* -%{_datadir}/%{vdsm_name}/storage/nfsSD.py* -%{_datadir}/%{vdsm_name}/storage/localFsSD.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* -%{_datadir}/%{vdsm_name}/storage/volume.py* -%{_datadir}/%{vdsm_name}/storage/fileVolume.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* +%{_datadir}/%{vdsm_name}/storage/devicemapper.py* +%{_datadir}/%{vdsm_name}/storage/dispatcher.py* +%{_datadir}/%{vdsm_name}/storage/domainMonitor.py* +%{_datadir}/%{vdsm_name}/storage/fileSD.py* +%{_datadir}/%{vdsm_name}/storage/fileUtils.py* +%{_datadir}/%{vdsm_name}/storage/fileVolume.py* +%{_datadir}/%{vdsm_name}/storage/fuser.py* +%{_datadir}/%{vdsm_name}/storage/hba.py* +%{_datadir}/%{vdsm_name}/storage/hsm.py* +%{_datadir}/%{vdsm_name}/storage/image.py* +%{_datadir}/%{vdsm_name}/storage/iscsi.py* +%{_datadir}/%{vdsm_name}/storage/localFsSD.py* +%{_datadir}/%{vdsm_name}/storage/lvm.py* +%{_datadir}/%{vdsm_name}/storage/misc.py* +%{_datadir}/%{vdsm_name}/storage/mount.py* +%{_datadir}/%{vdsm_name}/storage/multipath.py* +%{_datadir}/%{vdsm_name}/storage/nfsSD.py* +%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* +%{_datadir}/%{vdsm_name}/storage/persistentDict.py* +%{_datadir}/%{vdsm_name}/storage/processPool.py* +%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* +%{_datadir}/%{vdsm_name}/storage/resourceManager.py* +%{_datadir}/%{vdsm_name}/storage/safelease.py* +%{_datadir}/%{vdsm_name}/storage/sdc.py* +%{_datadir}/%{vdsm_name}/storage/sd.py* +%{_datadir}/%{vdsm_name}/storage/securable.py* +%{_datadir}/%{vdsm_name}/storage/sp.py* +%{_datadir}/%{vdsm_name}/storage/storage_connection.py* +%{_datadir}/%{vdsm_name}/storage/storageConstants.py* +%{_datadir}/%{vdsm_name}/storage/storage_exception.py* +%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* %{_datadir}/%{vdsm_name}/storage/taskManager.py* -%{_datadir}/%{vdsm_name}/storage/threadPool.py* %{_datadir}/%{vdsm_name}/storage/task.py* %{_datadir}/%{vdsm_name}/storage/threadLocal.py* -%{_datadir}/%{vdsm_name}/storage/resourceManager.py* -%{_datadir}/%{vdsm_name}/storage/storage_connection.py* -%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* -%{_datadir}/%{vdsm_name}/storage/storageConstants.py* -%{_datadir}/%{vdsm_name}/storage/fileUtils.py* -%{_datadir}/%{vdsm_name}/storage/misc.py* -%{_datadir}/%{vdsm_name}/storage/lvm.py* -%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* -%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* -%{_datadir}/%{vdsm_name}/storage/processPool.py* -%{_datadir}/%{vdsm_name}/storage/iscsi.py* -%{_datadir}/%{vdsm_name}/storage/devicemapper.py* -%{_datadir}/%{vdsm_name}/storage/securable.py* -%{_datadir}/%{vdsm_name}/storage/multipath.py* -%{_datadir}/%{vdsm_name}/storage/sdc.py* -%{_datadir}/%{vdsm_name}/storage/persistentDict.py* +%{_datadir}/%{vdsm_name}/storage/threadPool.py* +%{_datadir}/%{vdsm_name}/storage/volume.py* %{_libexecdir}/%{vdsm_name}/safelease %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh @@ -667,9 +672,9 @@ exit 0 %files bootstrap %defattr(-, root, root, -) %doc COPYING -%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* +%attr (755, root, root) %{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* %{_datadir}/%{vdsm_bootstrap}/deployUtil.py* -%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* +%attr (755, root, root) %{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* %files reg %defattr(-, root, root, -) @@ -693,7 +698,7 @@ exit 0 %{_datadir}/%{vdsm_reg}/config.py* %{_datadir}/%{vdsm_reg}/deployUtil.py* %{_datadir}/%{vdsm_reg}/createDaemon.py* -%{python_sitelib}/ovirt_config_setup/rhevm.py* +%{python_sitelib}/ovirt_config_setup/engine.py* %{_datadir}/%{vdsm_reg}/save-config %{_sysconfdir}/ovirt-config-boot.d/vdsm-config %{_sysconfdir}/ovirt-commandline.d/vdsm-reg @@ -710,6 +715,9 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %changelog +* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d.fc16 +- vdsm-4.9.2-g951b41d + * Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e.fc16 - add the revision control comments to the specfile From 49fd37aaaf0cde06dbccbffc3a5cf0986502efb2 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 10 Jan 2012 14:37:18 -0500 Subject: [PATCH 003/126] add vdsm-4.9.2-951b41d source file --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 80cde78..8d87213 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /vdsm-4.9.1-931a43e.tar.gz +/vdsm-4.9.2-951b41d.tar.gz diff --git a/sources b/sources index 524d095..3cd74a2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4ca6f706b3e9bd8d15cc4769748e64a2 vdsm-4.9.1-931a43e.tar.gz +fe4feeb0d11206c3a9b79f32581610cc vdsm-4.9.2-951b41d.tar.gz From ef89a248f84eaa39ac742c58f3e180021d7aed11 Mon Sep 17 00:00:00 2001 From: Dan Kenigsberg Date: Fri, 13 Jan 2012 23:13:11 +0200 Subject: [PATCH 004/126] update to vdsm-4.9.2-1d7b929 --- .gitignore | 1 + sources | 2 +- vdsm.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8d87213..f8f5389 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vdsm-4.9.1-931a43e.tar.gz /vdsm-4.9.2-951b41d.tar.gz +/vdsm-4.9.2-1d7b929.tar.gz diff --git a/sources b/sources index 3cd74a2..67721da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fe4feeb0d11206c3a9b79f32581610cc vdsm-4.9.2-951b41d.tar.gz +0015262c0d8b08efed75fcc1ad3cf889 vdsm-4.9.2-1d7b929.tar.gz diff --git a/vdsm.spec b/vdsm.spec index cadbf9b..7b3d485 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,7 +4,7 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release 951b41d +%global vdsm_release 1d7b929 # Required users and groups %global vdsm_user vdsm @@ -16,7 +16,7 @@ Name: %{vdsm_name} Version: 4.9.2 -Release: 0.git%{vdsm_release}%{?dist}%{?extra_release} +Release: 1.git%{vdsm_release}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -715,6 +715,9 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %changelog +* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929.fc16 +- vdsm-4.9.2-g1d7b929 + * Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d.fc16 - vdsm-4.9.2-g951b41d From 1134cd7e080c81b3162059479b2f97303c47b39f Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 16 Jan 2012 12:07:16 -0500 Subject: [PATCH 005/126] update to vdsm-4.9.3.1 --- .gitignore | 1 + sources | 2 +- vdsm.spec | 41 +++++++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index f8f5389..48bba80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /vdsm-4.9.1-931a43e.tar.gz /vdsm-4.9.2-951b41d.tar.gz /vdsm-4.9.2-1d7b929.tar.gz +/vdsm-4.9.3.1.tar.gz diff --git a/sources b/sources index 67721da..78e50f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0015262c0d8b08efed75fcc1ad3cf889 vdsm-4.9.2-1d7b929.tar.gz +20501d2573da80b55a73a87669a19b66 vdsm-4.9.3.1.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 7b3d485..fda0b8e 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,7 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release 1d7b929 +#% global vdsm_release 1d7b929 +#% global vdsm_relvtag .git%{vdsm_release} +#% global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -15,8 +17,8 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.2 -Release: 1.git%{vdsm_release}%{?dist}%{?extra_release} +Version: 4.9.3.1 +Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -29,7 +31,7 @@ Url: http://www.ovirt.org/wiki/Vdsm # git reset --hard {vdsm_release} # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist -Source0: %{vdsm_name}-%{version}-%{vdsm_release}.tar.gz +Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -255,7 +257,7 @@ VDSM registration package. Used to register a Linux host to a Virtualization Manager. %prep -%setup -q -n %{vdsm_name}-%{version}-%{vdsm_release} +%setup -q -n %{vdsm_name}-%{version}%{?vdsm_relttag} %build %configure %{?with_hooks:--enable-hooks} @@ -435,27 +437,27 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/storage -%{_datadir}/%{vdsm_name}/define.py* -%{_datadir}/%{vdsm_name}/clientIF.py* %{_datadir}/%{vdsm_name}/caps.py* -%{_datadir}/%{vdsm_name}/utils.py* +%{_datadir}/%{vdsm_name}/clientIF.py* %{_datadir}/%{vdsm_name}/constants.py* -%{_datadir}/%{vdsm_name}/vm.py* -%{_datadir}/%{vdsm_name}/vdscli.py* +%{_datadir}/%{vdsm_name}/define.py* +%{_datadir}/%{vdsm_name}/get-vm-pid +%{_datadir}/%{vdsm_name}/hooking.py* +%{_datadir}/%{vdsm_name}/hooks.py* +%{_datadir}/%{vdsm_name}/libvirtconnection.py* +%{_datadir}/%{vdsm_name}/libvirtev.py* +%{_datadir}/%{vdsm_name}/libvirtvm.py* +%{_datadir}/%{vdsm_name}/mk_sysprep_floppy +%{_datadir}/%{vdsm_name}/prepare-vmchannel %{_datadir}/%{vdsm_name}/supervdsm.py* %{_datadir}/%{vdsm_name}/supervdsmServer.py* -%{_datadir}/%{vdsm_name}/libvirtvm.py* -%{_datadir}/%{vdsm_name}/libvirtconnection.py* -%{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/hooking.py* -%{_datadir}/%{vdsm_name}/libvirtev.py* +%{_datadir}/%{vdsm_name}/utils.py* +%{_datadir}/%{vdsm_name}/vdscli.py* %{_datadir}/%{vdsm_name}/vdsm %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config +%{_datadir}/%{vdsm_name}/vm.py* %{_datadir}/%{vdsm_name}/write-net-config -%{_datadir}/%{vdsm_name}/mk_sysprep_floppy -%{_datadir}/%{vdsm_name}/get-vm-pid -%{_datadir}/%{vdsm_name}/prepare-vmchannel %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm @@ -715,6 +717,9 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %changelog +* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0.fc16 +- vdsm-4.9.3.1 + * Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929.fc16 - vdsm-4.9.2-g1d7b929 From c9230ef54b20534aba826097074e295e6c2fa944 Mon Sep 17 00:00:00 2001 From: Dan Kenigsberg Date: Wed, 25 Jan 2012 21:13:19 +0200 Subject: [PATCH 006/126] vdsm-4.9.3.2 Revert "BZ#773666 - Fix HSM flows should not change rw permissions." --- .gitignore | 1 + sources | 2 +- vdsm.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 48bba80..9adc15e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /vdsm-4.9.2-951b41d.tar.gz /vdsm-4.9.2-1d7b929.tar.gz /vdsm-4.9.3.1.tar.gz +/vdsm-4.9.3.2.tar.gz diff --git a/sources b/sources index 78e50f3..4784c23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -20501d2573da80b55a73a87669a19b66 vdsm-4.9.3.1.tar.gz +373a6fa6756a43094b1226c55a965b28 vdsm-4.9.3.2.tar.gz diff --git a/vdsm.spec b/vdsm.spec index fda0b8e..e78dadd 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -17,7 +17,7 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.3.1 +Version: 4.9.3.2 Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -717,6 +717,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %changelog +* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0.fc16 +- vdsm-4.9.3.2 +- Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." + * Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0.fc16 - vdsm-4.9.3.1 From 1fdb6bc5bac967441ff3ec0bb42c127c3a489c87 Mon Sep 17 00:00:00 2001 From: Dan Kenigsberg Date: Tue, 28 Feb 2012 11:40:31 +0200 Subject: [PATCH 007/126] vdsm-4.9.4-0.gb3642e5 --- .gitignore | 2 ++ sources | 2 +- vdsm.spec | 48 ++++++++++++++++++++++++++++++++++++------------ 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 9adc15e..04d80b5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /vdsm-4.9.2-1d7b929.tar.gz /vdsm-4.9.3.1.tar.gz /vdsm-4.9.3.2.tar.gz +/vdsm-4.9.3.3.tar.gz +/vdsm-4.9.4.tar.gz diff --git a/sources b/sources index 4784c23..175728f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -373a6fa6756a43094b1226c55a965b28 vdsm-4.9.3.2.tar.gz +50ee04a9207c5fb7eb30ea46130c8707 vdsm-4.9.4.tar.gz diff --git a/vdsm.spec b/vdsm.spec index e78dadd..427d5f9 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,20 +4,22 @@ %global vdsm_reg vdsm-reg # Upstream release -#% global vdsm_release 1d7b929 -#% global vdsm_relvtag .git%{vdsm_release} +%global vdsm_release b3642e5 +%global vdsm_relvtag .git%{vdsm_release} #% global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm %global vdsm_group kvm %global qemu_group qemu +%global snlk_group sanlock +%global snlk_user sanlock # Required paths %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.3.2 +Version: 4.9.4 Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -36,6 +38,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python BuildRequires: pyflakes +BuildRequires: qemu-kvm %if !0%{?rhel} BuildRequires: systemd-units @@ -45,13 +48,15 @@ Requires: python which Requires: sudo >= 1.7.3 Requires: logrotate >= 3.8.0 Requires: xz +Requires: ntp Requires: python-ethtool Requires: nfs-utils dmidecode Requires: lvm2 >= 2.02.72-8 +Requires: sanlock >= 1.8, sanlock-python %if 0%{?rhel} -Requires: qemu-kvm >= 2:0.12.1.2-2.189 -Requires: qemu-img >= 2:0.12.1.2-2.189 +Requires: qemu-kvm >= 2:0.12.1.2-2.227 +Requires: qemu-img >= 2:0.12.1.2-2.227 Requires: libvirt >= 0.9.4-13 Requires: libvirt-python >= 0.9.4-13 Requires: iscsi-initiator-utils >= 6.2.0.872-15 @@ -275,6 +280,9 @@ install -Dm 0755 vdsm/respawn \ install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules +install -Dm 0644 vdsm/limits.conf \ + %{buildroot}/etc/security/limits.d/99-vdsm.conf + %if 0%{?rhel} # Install the SysV init scripts install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd @@ -310,12 +318,19 @@ rm -rf %{buildroot} /usr/bin/getent passwd %{vdsm_user} >/dev/null || \ /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} -/usr/sbin/usermod -a -G %{qemu_group} %{vdsm_user} +/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} +/usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} %post # update the vdsm "secret" password for libvirt -/usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ - /etc/pki/vdsm/keys/libvirt_password +if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then + /usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ + /etc/pki/vdsm/keys/libvirt_password +fi + +# generate the vdsm certificates (if missing) +%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh + %if 0%{?rhel} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd @@ -439,6 +454,8 @@ exit 0 %dir %{_datadir}/%{vdsm_name}/storage %{_datadir}/%{vdsm_name}/caps.py* %{_datadir}/%{vdsm_name}/clientIF.py* +%{_datadir}/%{vdsm_name}/BindingXMLRPC.py* +%{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/constants.py* %{_datadir}/%{vdsm_name}/define.py* %{_datadir}/%{vdsm_name}/get-vm-pid @@ -460,6 +477,7 @@ exit 0 %{_datadir}/%{vdsm_name}/write-net-config %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm +%config(noreplace) %{_sysconfdir}/modprobe.d/vdsm.conf %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate @@ -472,6 +490,7 @@ exit 0 %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh +%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* @@ -528,6 +547,7 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop @@ -540,10 +560,12 @@ exit 0 %{_datadir}/%{vdsm_name}/set-conf-item %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* %{_datadir}/%{vdsm_name}/config.py* +%{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/ksm.py* %{_datadir}/%{vdsm_name}/netinfo.py* %{_datadir}/%{vdsm_name}/neterrors.py* /lib/udev/rules.d/12-vdsm-lvm.rules +/etc/security/limits.d/99-vdsm.conf %{python_sitelib}/sos/plugins/vdsm.py* %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} @@ -624,7 +646,7 @@ exit 0 %defattr(-, vdsm, kvm, -) %attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc %attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_promisc +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc %files hook-qos %defattr(-, vdsm, kvm, -) @@ -667,16 +689,15 @@ exit 0 %{_datadir}/%{vdsm_name}/vdsClient.py* %{_sysconfdir}/bash_completion.d/vdsClient %{_datadir}/%{vdsm_name}/vdscli.py* -%{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* %{_mandir}/man1/vdsClient.1* %files bootstrap %defattr(-, root, root, -) %doc COPYING -%attr (755, root, root) %{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* +%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* %{_datadir}/%{vdsm_bootstrap}/deployUtil.py* -%attr (755, root, root) %{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* +%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* %files reg %defattr(-, root, root, -) @@ -717,6 +738,9 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %changelog +* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5.fc17 +- vdsm-4.9.4-0.gb3642e5 + * Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0.fc16 - vdsm-4.9.3.2 - Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." From d308462a31f9857a457b1a527992fdaaaca45993 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 28 May 2012 12:03:46 +0200 Subject: [PATCH 008/126] update to vdsm-4.9.6-1b07249 --- .gitignore | 1 + sources | 2 +- vdsm.spec | 277 ++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 213 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index 9adc15e..a0a8fad 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /vdsm-4.9.2-1d7b929.tar.gz /vdsm-4.9.3.1.tar.gz /vdsm-4.9.3.2.tar.gz +/vdsm-4.9.6-1b07249.tar.gz diff --git a/sources b/sources index 4784c23..25ced1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -373a6fa6756a43094b1226c55a965b28 vdsm-4.9.3.2.tar.gz +f249c80605dc4b7bb883d7f2a6084f8e vdsm-4.9.6-1b07249.tar.gz diff --git a/vdsm.spec b/vdsm.spec index e78dadd..6a03c2f 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,20 +4,22 @@ %global vdsm_reg vdsm-reg # Upstream release -#% global vdsm_release 1d7b929 -#% global vdsm_relvtag .git%{vdsm_release} -#% global vdsm_relttag -%{vdsm_release} +%global vdsm_release 1b07249 +%global vdsm_relvtag .git%{vdsm_release} +%global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm %global vdsm_group kvm %global qemu_group qemu +%global snlk_group sanlock +%global snlk_user sanlock # Required paths %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.3.2 +Version: 4.9.6 Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -35,33 +37,46 @@ Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python +BuildRequires: python-devel BuildRequires: pyflakes +BuildRequires: python-nose +BuildRequires: python-pep8 + +# BuildRequires needed by the tests during the build +BuildRequires: python-ethtool +BuildRequires: libvirt-python %if !0%{?rhel} BuildRequires: systemd-units %endif -Requires: python which +Requires: which Requires: sudo >= 1.7.3 Requires: logrotate >= 3.8.0 Requires: xz +Requires: ntp Requires: python-ethtool Requires: nfs-utils dmidecode -Requires: lvm2 >= 2.02.72-8 +Requires: lvm2 >= 2.02.95 +Requires: sanlock >= 2.1, sanlock-python %if 0%{?rhel} -Requires: qemu-kvm >= 2:0.12.1.2-2.189 -Requires: qemu-img >= 2:0.12.1.2-2.189 -Requires: libvirt >= 0.9.4-13 -Requires: libvirt-python >= 0.9.4-13 +Requires: python +# Update the qemu-kvm requires when block_stream will be included +Requires: qemu-kvm >= 2:0.12.1.2-2.227 +Requires: qemu-img >= 2:0.12.1.2-2.227 +Requires: libvirt >= 0.9.10-20 +Requires: libvirt-python, libvirt-lock-sanlock Requires: iscsi-initiator-utils >= 6.2.0.872-15 -Requires: device-mapper-multipath >= 0.4.9-31 +Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 %else +# Subprocess and thread bug was found on python 2.7.2 +Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 -Requires: libvirt >= 0.9.6-2 -Requires: libvirt-python >= 0.9.6-2 +Requires: libvirt >= 0.9.10 +Requires: libvirt-python, libvirt-lock-sanlock Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 @@ -76,7 +91,9 @@ Requires: dosfstools Requires: policycoreutils-python Requires: libselinux-python Requires: kernel >= 2.6.32-198 +Requires: %{name}-python = %{version}-%{release} Requires: selinux-policy-targeted >= 3.7.19-80.el6 +Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 %description @@ -85,6 +102,78 @@ Linux hosts. VDSM manages and monitors the host's storage, memory and networks as well as virtual machine creation, other host administration tasks, statistics gathering, and log collection. +%package cli +Summary: VDSM command line interface +BuildArch: noarch + +Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-xmlrpc = %{version}-%{release} + +%description cli +Call VDSM commands from the command line. Used for testing and debugging. + +%package xmlrpc +Summary: VDSM xmlrpc API +BuildArch: noarch + +Requires: %{name}-python = %{version}-%{release} + +%description xmlrpc +An XMLRPC interface for interacting with vdsmd. Primary control interface for +ovirt-engine and vdsClient. + +%package rest +Summary: VDSM REST API +BuildArch: noarch + +Requires: %{name}-python = %{version}-%{release} +Requires: python-cherrypy python-cheetah + +%description rest +A REST interface for interacting with vdsmd. + +%package bootstrap +Summary: VDSM bootstrapping package +BuildArch: noarch + +%description bootstrap +VDSM bootstrapping package. Used for delivering the bootstrap code onto the +Virtualization Manager. + +%package reg +Summary: VDSM registration package +BuildArch: noarch + +Requires: %{name} = %{version}-%{release} +Requires: traceroute + +%description reg +VDSM registration package. Used to register a Linux host to a Virtualization +Manager. + +%package python +Summary: VDSM python libraries + +%description python +Shared libraries beween the various VDSM packages. + +%package debug-plugin +Summary: VDSM Debug Plugin +Requires: vdsm +Requires: %{name}-xmlrpc = %{version}-%{release} +BuildArch: noarch + +%description debug-plugin +Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. + +%package tests +Summary: VDSM Test Suite +Requires: vdsm = %{version}-%{release} +BuildArch: noarch + +%description tests +A test suite for verifying the functionality of a running vdsm instance + %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd Requires: vhostmd @@ -222,39 +311,15 @@ BuildArch: noarch %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) -%package debug-plugin -Summary: VDSM Debug Plugin -Requires: vdsm -BuildArch: noarch - -%description debug-plugin -Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. - -%package cli -Summary: VDSM command line interface -BuildArch: noarch - -%description cli -Call VDSM commands from the command line. Used for testing and debugging. - -%package bootstrap -Summary: VDSM bootstrapping package -BuildArch: noarch - -%description bootstrap -VDSM bootstrapping package. Used for delivering the bootstrap code onto the -Virtualization Manager. - -%package reg -Summary: VDSM registration package +%package gluster +Summary: Gluster Plugin for VDSM BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: traceroute +Requires: glusterfs glusterfs-server glusterfs-fuse -%description reg -VDSM registration package. Used to register a Linux host to a Virtualization -Manager. +%description gluster +Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -n %{vdsm_name}-%{version}%{?vdsm_relttag} @@ -275,6 +340,9 @@ install -Dm 0755 vdsm/respawn \ install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules +install -Dm 0644 vdsm/limits.conf \ + %{buildroot}/etc/security/limits.d/99-vdsm.conf + %if 0%{?rhel} # Install the SysV init scripts install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd @@ -301,7 +369,8 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %endif %check -make check +# Disabling the nose tests until they'll all succeed in koji. +make check NOSE_EXCLUDE=".*" %clean rm -rf %{buildroot} @@ -310,12 +379,19 @@ rm -rf %{buildroot} /usr/bin/getent passwd %{vdsm_user} >/dev/null || \ /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} -/usr/sbin/usermod -a -G %{qemu_group} %{vdsm_user} +/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} +/usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} %post # update the vdsm "secret" password for libvirt -/usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ - /etc/pki/vdsm/keys/libvirt_password +if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then + /usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ + /etc/pki/vdsm/keys/libvirt_password +fi + +# generate the vdsm certificates (if missing) +%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh + %if 0%{?rhel} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd @@ -431,28 +507,31 @@ exit 0 %else /lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %endif -%dir %attr(0775, root, root) /rhev/data-center +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/storage +%{_datadir}/%{vdsm_name}/alignmentScan.py* +%{_datadir}/%{vdsm_name}/blkid.py* %{_datadir}/%{vdsm_name}/caps.py* %{_datadir}/%{vdsm_name}/clientIF.py* -%{_datadir}/%{vdsm_name}/constants.py* -%{_datadir}/%{vdsm_name}/define.py* -%{_datadir}/%{vdsm_name}/get-vm-pid +%{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/hooking.py* %{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/libvirtconnection.py* %{_datadir}/%{vdsm_name}/libvirtev.py* %{_datadir}/%{vdsm_name}/libvirtvm.py* +%{_datadir}/%{vdsm_name}/lsblk.py* +%{_datadir}/%{vdsm_name}/md_utils.py* %{_datadir}/%{vdsm_name}/mk_sysprep_floppy -%{_datadir}/%{vdsm_name}/prepare-vmchannel +%{_datadir}/%{vdsm_name}/parted_utils.py* +%{_datadir}/%{vdsm_name}/mkimage.py* %{_datadir}/%{vdsm_name}/supervdsm.py* %{_datadir}/%{vdsm_name}/supervdsmServer.py* -%{_datadir}/%{vdsm_name}/utils.py* -%{_datadir}/%{vdsm_name}/vdscli.py* +%{_datadir}/%{vdsm_name}/vmChannels.py* +%{_datadir}/%{vdsm_name}/tc.py* %{_datadir}/%{vdsm_name}/vdsm %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config @@ -460,6 +539,7 @@ exit 0 %{_datadir}/%{vdsm_name}/write-net-config %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm +%config(noreplace) %{_sysconfdir}/modprobe.d/vdsm.conf %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate @@ -472,6 +552,7 @@ exit 0 %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh +%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* @@ -485,6 +566,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/hba.py* %{_datadir}/%{vdsm_name}/storage/hsm.py* %{_datadir}/%{vdsm_name}/storage/image.py* +%{_datadir}/%{vdsm_name}/storage/iscsiadm.py* %{_datadir}/%{vdsm_name}/storage/iscsi.py* %{_datadir}/%{vdsm_name}/storage/localFsSD.py* %{_datadir}/%{vdsm_name}/storage/lvm.py* @@ -502,10 +584,11 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/sd.py* %{_datadir}/%{vdsm_name}/storage/securable.py* %{_datadir}/%{vdsm_name}/storage/sp.py* -%{_datadir}/%{vdsm_name}/storage/storage_connection.py* %{_datadir}/%{vdsm_name}/storage/storageConstants.py* %{_datadir}/%{vdsm_name}/storage/storage_exception.py* %{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* +%{_datadir}/%{vdsm_name}/storage/storageServer.py* +%{_datadir}/%{vdsm_name}/storage/sync.py* %{_datadir}/%{vdsm_name}/storage/taskManager.py* %{_datadir}/%{vdsm_name}/storage/task.py* %{_datadir}/%{vdsm_name}/storage/threadLocal.py* @@ -528,23 +611,25 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop %{_datadir}/%{vdsm_name}/configNetwork.py* %{_datadir}/%{vdsm_name}/addNetwork %{_datadir}/%{vdsm_name}/delNetwork %{_datadir}/%{vdsm_name}/respawn -%{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* %{_datadir}/%{vdsm_name}/get-conf-item %{_datadir}/%{vdsm_name}/set-conf-item %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* -%{_datadir}/%{vdsm_name}/config.py* +%{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/ksm.py* -%{_datadir}/%{vdsm_name}/netinfo.py* %{_datadir}/%{vdsm_name}/neterrors.py* -/lib/udev/rules.d/12-vdsm-lvm.rules %{python_sitelib}/sos/plugins/vdsm.py* +/lib/udev/rules.d/12-vdsm-lvm.rules +/etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} %dir %{_localstatedir}/log/core @@ -564,9 +649,40 @@ exit 0 %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback %ghost %dir %{_localstatedir}/run/%{vdsm_name} %ghost %dir %{_localstatedir}/run/%{vdsm_name}/pools +%ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload %dir %{_localstatedir}/log/%{vdsm_name} %dir %{_localstatedir}/log/%{vdsm_name}/backup +%files python +%defattr(-, root, root, -) +%{_bindir}/vdsm-tool +%if !0%{?rhel} +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf +%endif +%{python_sitelib}/%{vdsm_name}/__init__.py* +%{python_sitelib}/%{vdsm_name}/config.py* +%{python_sitelib}/%{vdsm_name}/constants.py* +%{python_sitelib}/%{vdsm_name}/define.py* +%{python_sitelib}/%{vdsm_name}/exception.py* +%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* +%{python_sitelib}/%{vdsm_name}/netinfo.py* +%{python_sitelib}/%{vdsm_name}/qemuImg.py* +%{python_sitelib}/%{vdsm_name}/SecureXMLRPCServer.py* +%{python_sitelib}/%{vdsm_name}/utils.py* +%{python_sitelib}/%{vdsm_name}/vdscli.py* +%{python_sitelib}/%{vdsm_name}/betterPopen/__init__.py* +%{python_sitelib}/%{vdsm_name}/betterPopen/createprocess.so +%{python_sitelib}/%{vdsm_name}/tool/__init__.py* + +%files tests +%doc %{_datadir}/%{vdsm_name}/tests/README +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/tests/*.py* +%{_datadir}/%{vdsm_name}/tests/run_tests.sh +%{_datadir}/%{vdsm_name}/tests/cpu_info.out +%{_datadir}/%{vdsm_name}/tests/netmaskconversions +%{_datadir}/%{vdsm_name}/tests/functional/*.py* + %files hook-vhostmd %defattr(-, root, root, -) %doc COPYING @@ -624,7 +740,7 @@ exit 0 %defattr(-, vdsm, kvm, -) %attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc %attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_promisc +%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc %files hook-qos %defattr(-, vdsm, kvm, -) @@ -659,24 +775,37 @@ exit 0 %files debug-plugin %defattr(-, root, root, -) %{_datadir}/%{vdsm_name}/vdsmDebugPlugin.py* +%{_datadir}/%{vdsm_name}/debugPluginClient.py* %files cli %defattr(-, root, root, -) %doc COPYING %{_bindir}/vdsClient %{_datadir}/%{vdsm_name}/vdsClient.py* +%{_datadir}/%{vdsm_name}/vdsClientGluster.py* %{_sysconfdir}/bash_completion.d/vdsClient -%{_datadir}/%{vdsm_name}/vdscli.py* -%{_datadir}/%{vdsm_name}/dumpStorageTable.py* -%{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* %{_mandir}/man1/vdsClient.1* +%files xmlrpc +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/BindingXMLRPC.py* + +%files rest +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/rest/__init__.py* +%{_datadir}/%{vdsm_name}/rest/BindingREST.py* +%{_datadir}/%{vdsm_name}/rest/Dispatcher.py* +%{_datadir}/%{vdsm_name}/rest/Controller.py* +%{_datadir}/%{vdsm_name}/rest/templates/*.x +%{_datadir}/%{vdsm_name}/rest/templates/api.xsd +%{_datadir}/%{vdsm_name}/rest/templates/rsdl.xml + %files bootstrap %defattr(-, root, root, -) %doc COPYING -%attr (755, root, root) %{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* +%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* %{_datadir}/%{vdsm_bootstrap}/deployUtil.py* -%attr (755, root, root) %{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* +%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* %files reg %defattr(-, root, root, -) @@ -686,6 +815,8 @@ exit 0 %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm-reg %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/vdsm-reg.conf %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf +%ghost %dir /data +%ghost %dir %attr(0775, root, root) /data/updates %if 0%{?rhel} %{_initrddir}/vdsm-reg %else @@ -699,6 +830,7 @@ exit 0 %{_datadir}/%{vdsm_reg}/vdsm-upgrade %{_datadir}/%{vdsm_reg}/config.py* %{_datadir}/%{vdsm_reg}/deployUtil.py* +%attr(0755, -, -) %{_datadir}/%{vdsm_reg}/register-to-engine.py* %{_datadir}/%{vdsm_reg}/createDaemon.py* %{python_sitelib}/ovirt_config_setup/engine.py* %{_datadir}/%{vdsm_reg}/save-config @@ -716,7 +848,20 @@ exit 0 %{_libexecdir}/%{vdsm_name}/vdsm-faqemu %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu +%files gluster +%defattr(-, root, root, -) +%dir %{_datadir}/%{vdsm_name}/gluster +%doc COPYING +%{_datadir}/%{vdsm_name}/gluster/__init__.py* +%{_datadir}/%{vdsm_name}/gluster/api.py* +%{_datadir}/%{vdsm_name}/gluster/cli.py* +%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{_datadir}/%{vdsm_name}/gluster/hostname.py* + %changelog +* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249.fc16 +- vdsm-4.9.6-g1b07249 + * Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0.fc16 - vdsm-4.9.3.2 - Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." From 921fd34e9408f50b79ba5ad5c4c6520fede27cf7 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 28 May 2012 12:03:46 +0200 Subject: [PATCH 009/126] update to vdsm-4.9.6-1b07249 --- .gitignore | 1 + sources | 2 +- vdsm.spec | 242 ++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 185 insertions(+), 60 deletions(-) diff --git a/.gitignore b/.gitignore index 04d80b5..4748a9d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /vdsm-4.9.3.2.tar.gz /vdsm-4.9.3.3.tar.gz /vdsm-4.9.4.tar.gz +/vdsm-4.9.6-1b07249.tar.gz diff --git a/sources b/sources index 175728f..25ced1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -50ee04a9207c5fb7eb30ea46130c8707 vdsm-4.9.4.tar.gz +f249c80605dc4b7bb883d7f2a6084f8e vdsm-4.9.6-1b07249.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 427d5f9..d7c41d3 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,9 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release b3642e5 +%global vdsm_release 1b07249 %global vdsm_relvtag .git%{vdsm_release} -#% global vdsm_relttag -%{vdsm_release} +%global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -19,7 +19,7 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.4 +Version: 4.9.6 Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -37,36 +37,46 @@ Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python +BuildRequires: python-devel BuildRequires: pyflakes -BuildRequires: qemu-kvm +BuildRequires: python-nose +BuildRequires: python-pep8 + +# BuildRequires needed by the tests during the build +BuildRequires: python-ethtool +BuildRequires: libvirt-python %if !0%{?rhel} BuildRequires: systemd-units %endif -Requires: python which +Requires: which Requires: sudo >= 1.7.3 Requires: logrotate >= 3.8.0 Requires: xz Requires: ntp Requires: python-ethtool Requires: nfs-utils dmidecode -Requires: lvm2 >= 2.02.72-8 -Requires: sanlock >= 1.8, sanlock-python +Requires: lvm2 >= 2.02.95 +Requires: sanlock >= 2.1, sanlock-python %if 0%{?rhel} +Requires: python +# Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.227 Requires: qemu-img >= 2:0.12.1.2-2.227 -Requires: libvirt >= 0.9.4-13 -Requires: libvirt-python >= 0.9.4-13 +Requires: libvirt >= 0.9.10-20 +Requires: libvirt-python, libvirt-lock-sanlock Requires: iscsi-initiator-utils >= 6.2.0.872-15 -Requires: device-mapper-multipath >= 0.4.9-31 +Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 %else +# Subprocess and thread bug was found on python 2.7.2 +Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 -Requires: libvirt >= 0.9.6-2 -Requires: libvirt-python >= 0.9.6-2 +Requires: libvirt >= 0.9.10 +Requires: libvirt-python, libvirt-lock-sanlock Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 @@ -81,7 +91,9 @@ Requires: dosfstools Requires: policycoreutils-python Requires: libselinux-python Requires: kernel >= 2.6.32-198 +Requires: %{name}-python = %{version}-%{release} Requires: selinux-policy-targeted >= 3.7.19-80.el6 +Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 %description @@ -90,6 +102,78 @@ Linux hosts. VDSM manages and monitors the host's storage, memory and networks as well as virtual machine creation, other host administration tasks, statistics gathering, and log collection. +%package cli +Summary: VDSM command line interface +BuildArch: noarch + +Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-xmlrpc = %{version}-%{release} + +%description cli +Call VDSM commands from the command line. Used for testing and debugging. + +%package xmlrpc +Summary: VDSM xmlrpc API +BuildArch: noarch + +Requires: %{name}-python = %{version}-%{release} + +%description xmlrpc +An XMLRPC interface for interacting with vdsmd. Primary control interface for +ovirt-engine and vdsClient. + +%package rest +Summary: VDSM REST API +BuildArch: noarch + +Requires: %{name}-python = %{version}-%{release} +Requires: python-cherrypy python-cheetah + +%description rest +A REST interface for interacting with vdsmd. + +%package bootstrap +Summary: VDSM bootstrapping package +BuildArch: noarch + +%description bootstrap +VDSM bootstrapping package. Used for delivering the bootstrap code onto the +Virtualization Manager. + +%package reg +Summary: VDSM registration package +BuildArch: noarch + +Requires: %{name} = %{version}-%{release} +Requires: traceroute + +%description reg +VDSM registration package. Used to register a Linux host to a Virtualization +Manager. + +%package python +Summary: VDSM python libraries + +%description python +Shared libraries beween the various VDSM packages. + +%package debug-plugin +Summary: VDSM Debug Plugin +Requires: vdsm +Requires: %{name}-xmlrpc = %{version}-%{release} +BuildArch: noarch + +%description debug-plugin +Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. + +%package tests +Summary: VDSM Test Suite +Requires: vdsm = %{version}-%{release} +BuildArch: noarch + +%description tests +A test suite for verifying the functionality of a running vdsm instance + %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd Requires: vhostmd @@ -227,39 +311,15 @@ BuildArch: noarch %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) -%package debug-plugin -Summary: VDSM Debug Plugin -Requires: vdsm -BuildArch: noarch - -%description debug-plugin -Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. - -%package cli -Summary: VDSM command line interface -BuildArch: noarch - -%description cli -Call VDSM commands from the command line. Used for testing and debugging. - -%package bootstrap -Summary: VDSM bootstrapping package -BuildArch: noarch - -%description bootstrap -VDSM bootstrapping package. Used for delivering the bootstrap code onto the -Virtualization Manager. - -%package reg -Summary: VDSM registration package +%package gluster +Summary: Gluster Plugin for VDSM BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: traceroute +Requires: glusterfs glusterfs-server glusterfs-fuse -%description reg -VDSM registration package. Used to register a Linux host to a Virtualization -Manager. +%description gluster +Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -n %{vdsm_name}-%{version}%{?vdsm_relttag} @@ -309,7 +369,8 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %endif %check -make check +# Disabling the nose tests until they'll all succeed in koji. +make check NOSE_EXCLUDE=".*" %clean rm -rf %{buildroot} @@ -446,30 +507,31 @@ exit 0 %else /lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %endif -%dir %attr(0775, root, root) /rhev/data-center +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/storage +%{_datadir}/%{vdsm_name}/alignmentScan.py* +%{_datadir}/%{vdsm_name}/blkid.py* %{_datadir}/%{vdsm_name}/caps.py* %{_datadir}/%{vdsm_name}/clientIF.py* -%{_datadir}/%{vdsm_name}/BindingXMLRPC.py* %{_datadir}/%{vdsm_name}/API.py* -%{_datadir}/%{vdsm_name}/constants.py* -%{_datadir}/%{vdsm_name}/define.py* -%{_datadir}/%{vdsm_name}/get-vm-pid %{_datadir}/%{vdsm_name}/hooking.py* %{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/libvirtconnection.py* %{_datadir}/%{vdsm_name}/libvirtev.py* %{_datadir}/%{vdsm_name}/libvirtvm.py* +%{_datadir}/%{vdsm_name}/lsblk.py* +%{_datadir}/%{vdsm_name}/md_utils.py* %{_datadir}/%{vdsm_name}/mk_sysprep_floppy -%{_datadir}/%{vdsm_name}/prepare-vmchannel +%{_datadir}/%{vdsm_name}/parted_utils.py* +%{_datadir}/%{vdsm_name}/mkimage.py* %{_datadir}/%{vdsm_name}/supervdsm.py* %{_datadir}/%{vdsm_name}/supervdsmServer.py* -%{_datadir}/%{vdsm_name}/utils.py* -%{_datadir}/%{vdsm_name}/vdscli.py* +%{_datadir}/%{vdsm_name}/vmChannels.py* +%{_datadir}/%{vdsm_name}/tc.py* %{_datadir}/%{vdsm_name}/vdsm %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config @@ -504,6 +566,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/hba.py* %{_datadir}/%{vdsm_name}/storage/hsm.py* %{_datadir}/%{vdsm_name}/storage/image.py* +%{_datadir}/%{vdsm_name}/storage/iscsiadm.py* %{_datadir}/%{vdsm_name}/storage/iscsi.py* %{_datadir}/%{vdsm_name}/storage/localFsSD.py* %{_datadir}/%{vdsm_name}/storage/lvm.py* @@ -521,10 +584,11 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/sd.py* %{_datadir}/%{vdsm_name}/storage/securable.py* %{_datadir}/%{vdsm_name}/storage/sp.py* -%{_datadir}/%{vdsm_name}/storage/storage_connection.py* %{_datadir}/%{vdsm_name}/storage/storageConstants.py* %{_datadir}/%{vdsm_name}/storage/storage_exception.py* %{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* +%{_datadir}/%{vdsm_name}/storage/storageServer.py* +%{_datadir}/%{vdsm_name}/storage/sync.py* %{_datadir}/%{vdsm_name}/storage/taskManager.py* %{_datadir}/%{vdsm_name}/storage/task.py* %{_datadir}/%{vdsm_name}/storage/threadLocal.py* @@ -549,24 +613,23 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop %{_datadir}/%{vdsm_name}/configNetwork.py* %{_datadir}/%{vdsm_name}/addNetwork %{_datadir}/%{vdsm_name}/delNetwork %{_datadir}/%{vdsm_name}/respawn -%{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* %{_datadir}/%{vdsm_name}/get-conf-item %{_datadir}/%{vdsm_name}/set-conf-item %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* -%{_datadir}/%{vdsm_name}/config.py* %{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/ksm.py* -%{_datadir}/%{vdsm_name}/netinfo.py* %{_datadir}/%{vdsm_name}/neterrors.py* +%{python_sitelib}/sos/plugins/vdsm.py* /lib/udev/rules.d/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf -%{python_sitelib}/sos/plugins/vdsm.py* %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} %dir %{_localstatedir}/log/core @@ -586,9 +649,40 @@ exit 0 %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback %ghost %dir %{_localstatedir}/run/%{vdsm_name} %ghost %dir %{_localstatedir}/run/%{vdsm_name}/pools +%ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload %dir %{_localstatedir}/log/%{vdsm_name} %dir %{_localstatedir}/log/%{vdsm_name}/backup +%files python +%defattr(-, root, root, -) +%{_bindir}/vdsm-tool +%if !0%{?rhel} +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf +%endif +%{python_sitelib}/%{vdsm_name}/__init__.py* +%{python_sitelib}/%{vdsm_name}/config.py* +%{python_sitelib}/%{vdsm_name}/constants.py* +%{python_sitelib}/%{vdsm_name}/define.py* +%{python_sitelib}/%{vdsm_name}/exception.py* +%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* +%{python_sitelib}/%{vdsm_name}/netinfo.py* +%{python_sitelib}/%{vdsm_name}/qemuImg.py* +%{python_sitelib}/%{vdsm_name}/SecureXMLRPCServer.py* +%{python_sitelib}/%{vdsm_name}/utils.py* +%{python_sitelib}/%{vdsm_name}/vdscli.py* +%{python_sitelib}/%{vdsm_name}/betterPopen/__init__.py* +%{python_sitelib}/%{vdsm_name}/betterPopen/createprocess.so +%{python_sitelib}/%{vdsm_name}/tool/__init__.py* + +%files tests +%doc %{_datadir}/%{vdsm_name}/tests/README +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/tests/*.py* +%{_datadir}/%{vdsm_name}/tests/run_tests.sh +%{_datadir}/%{vdsm_name}/tests/cpu_info.out +%{_datadir}/%{vdsm_name}/tests/netmaskconversions +%{_datadir}/%{vdsm_name}/tests/functional/*.py* + %files hook-vhostmd %defattr(-, root, root, -) %doc COPYING @@ -681,17 +775,31 @@ exit 0 %files debug-plugin %defattr(-, root, root, -) %{_datadir}/%{vdsm_name}/vdsmDebugPlugin.py* +%{_datadir}/%{vdsm_name}/debugPluginClient.py* %files cli %defattr(-, root, root, -) %doc COPYING %{_bindir}/vdsClient %{_datadir}/%{vdsm_name}/vdsClient.py* +%{_datadir}/%{vdsm_name}/vdsClientGluster.py* %{_sysconfdir}/bash_completion.d/vdsClient -%{_datadir}/%{vdsm_name}/vdscli.py* -%{_datadir}/%{vdsm_name}/SecureXMLRPCServer.py* %{_mandir}/man1/vdsClient.1* +%files xmlrpc +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/BindingXMLRPC.py* + +%files rest +%defattr(-, root, root, -) +%{_datadir}/%{vdsm_name}/rest/__init__.py* +%{_datadir}/%{vdsm_name}/rest/BindingREST.py* +%{_datadir}/%{vdsm_name}/rest/Dispatcher.py* +%{_datadir}/%{vdsm_name}/rest/Controller.py* +%{_datadir}/%{vdsm_name}/rest/templates/*.x +%{_datadir}/%{vdsm_name}/rest/templates/api.xsd +%{_datadir}/%{vdsm_name}/rest/templates/rsdl.xml + %files bootstrap %defattr(-, root, root, -) %doc COPYING @@ -707,6 +815,8 @@ exit 0 %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm-reg %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/vdsm-reg.conf %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf +%ghost %dir /data +%ghost %dir %attr(0775, root, root) /data/updates %if 0%{?rhel} %{_initrddir}/vdsm-reg %else @@ -720,6 +830,7 @@ exit 0 %{_datadir}/%{vdsm_reg}/vdsm-upgrade %{_datadir}/%{vdsm_reg}/config.py* %{_datadir}/%{vdsm_reg}/deployUtil.py* +%attr(0755, -, -) %{_datadir}/%{vdsm_reg}/register-to-engine.py* %{_datadir}/%{vdsm_reg}/createDaemon.py* %{python_sitelib}/ovirt_config_setup/engine.py* %{_datadir}/%{vdsm_reg}/save-config @@ -737,7 +848,20 @@ exit 0 %{_libexecdir}/%{vdsm_name}/vdsm-faqemu %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu +%files gluster +%defattr(-, root, root, -) +%dir %{_datadir}/%{vdsm_name}/gluster +%doc COPYING +%{_datadir}/%{vdsm_name}/gluster/__init__.py* +%{_datadir}/%{vdsm_name}/gluster/api.py* +%{_datadir}/%{vdsm_name}/gluster/cli.py* +%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{_datadir}/%{vdsm_name}/gluster/hostname.py* + %changelog +* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249.fc16 +- vdsm-4.9.6-g1b07249 + * Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5.fc17 - vdsm-4.9.4-0.gb3642e5 From 6f40b18fbef142115dbbfdca00c06faa9a397d06 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 4 Jun 2012 13:56:18 +0200 Subject: [PATCH 010/126] update to vdsm-4.9.6-e952471 --- .gitignore | 1 + sources | 2 +- vdsm.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a0a8fad..ff5d651 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /vdsm-4.9.3.1.tar.gz /vdsm-4.9.3.2.tar.gz /vdsm-4.9.6-1b07249.tar.gz +/vdsm-4.9.6-e952471.tar.gz diff --git a/sources b/sources index 25ced1b..af08b48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f249c80605dc4b7bb883d7f2a6084f8e vdsm-4.9.6-1b07249.tar.gz +458cf1fab4cb1a42e7d3829e88d7031e vdsm-4.9.6-e952471.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 6a03c2f..57c6de1 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,7 +4,7 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release 1b07249 +%global vdsm_release e952471 %global vdsm_relvtag .git%{vdsm_release} %global vdsm_relttag -%{vdsm_release} @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.9.6 -Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -859,6 +859,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471.fc17 +- vdsm-4.9.6-ge952471 + * Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249.fc16 - vdsm-4.9.6-g1b07249 From edbc2295f7490e17b88206f35556bf5b99ea818c Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 4 Jun 2012 13:56:18 +0200 Subject: [PATCH 011/126] update to vdsm-4.9.6-e952471 --- .gitignore | 1 + sources | 2 +- vdsm.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4748a9d..b79685c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /vdsm-4.9.3.3.tar.gz /vdsm-4.9.4.tar.gz /vdsm-4.9.6-1b07249.tar.gz +/vdsm-4.9.6-e952471.tar.gz diff --git a/sources b/sources index 25ced1b..af08b48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f249c80605dc4b7bb883d7f2a6084f8e vdsm-4.9.6-1b07249.tar.gz +458cf1fab4cb1a42e7d3829e88d7031e vdsm-4.9.6-e952471.tar.gz diff --git a/vdsm.spec b/vdsm.spec index d7c41d3..0734cde 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,7 +4,7 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release 1b07249 +%global vdsm_release e952471 %global vdsm_relvtag .git%{vdsm_release} %global vdsm_relttag -%{vdsm_release} @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.9.6 -Release: 0%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -859,6 +859,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471.fc17 +- vdsm-4.9.6-ge952471 + * Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249.fc16 - vdsm-4.9.6-g1b07249 From 2f813505d238dc0f31474d3cc450f9f53a5bf2f3 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 4 Jun 2012 14:37:41 +0200 Subject: [PATCH 012/126] bz822158 report version-release in a short format --- vdsm.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 57c6de1..7f81dfa 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.9.6 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -327,6 +327,11 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %build %configure %{?with_hooks:--enable-hooks} make +# Setting software_version and software_revision in dsaversion.py +baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ + -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py %install rm -rf %{buildroot} @@ -859,6 +864,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471.fc17 +- BZ#822158 Report version-release in a short format + * Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471.fc17 - vdsm-4.9.6-ge952471 From b7c41bfa77ffb84730f4c1c9f129746a5ee5e92d Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 4 Jun 2012 14:37:41 +0200 Subject: [PATCH 013/126] bz822158 report version-release in a short format --- vdsm.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 0734cde..8ab82b2 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.9.6 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -327,6 +327,11 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %build %configure %{?with_hooks:--enable-hooks} make +# Setting software_version and software_revision in dsaversion.py +baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ + -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py %install rm -rf %{buildroot} @@ -859,6 +864,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471.fc17 +- BZ#822158 Report version-release in a short format + * Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471.fc17 - vdsm-4.9.6-ge952471 From f91fe8cd57a1b8cd489737d6aeffe5ee6e42bc05 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 11 Jun 2012 11:16:35 +0200 Subject: [PATCH 014/126] update to vdsm-4.10.0 Signed-off-by: Federico Simoncelli --- .gitignore | 1 + sources | 2 +- vdsm.spec | 13 ++++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ff5d651..d483057 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /vdsm-4.9.3.2.tar.gz /vdsm-4.9.6-1b07249.tar.gz /vdsm-4.9.6-e952471.tar.gz +/vdsm-4.10.0.tar.gz diff --git a/sources b/sources index af08b48..87c07ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -458cf1fab4cb1a42e7d3829e88d7031e vdsm-4.9.6-e952471.tar.gz +e8ab5eccdea0b4a4da2e812174971393 vdsm-4.10.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 7f81dfa..db67e97 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,9 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release e952471 -%global vdsm_relvtag .git%{vdsm_release} -%global vdsm_relttag -%{vdsm_release} +#% global vdsm_release e952471 +#% global vdsm_relvtag .git%{vdsm_release} +#% global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -19,8 +19,8 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.6 -Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} +Version: 4.10.0 +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -864,6 +864,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1.fc18 +- vdsm-4.10.0 + * Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471.fc17 - BZ#822158 Report version-release in a short format From 57f8d2ad8bead738c66419b61378c0e8452d8769 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 11 Jun 2012 11:16:35 +0200 Subject: [PATCH 015/126] update to vdsm-4.10.0 Signed-off-by: Federico Simoncelli --- .gitignore | 1 + sources | 2 +- vdsm.spec | 13 ++++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b79685c..2ea9961 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /vdsm-4.9.4.tar.gz /vdsm-4.9.6-1b07249.tar.gz /vdsm-4.9.6-e952471.tar.gz +/vdsm-4.10.0.tar.gz diff --git a/sources b/sources index af08b48..87c07ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -458cf1fab4cb1a42e7d3829e88d7031e vdsm-4.9.6-e952471.tar.gz +e8ab5eccdea0b4a4da2e812174971393 vdsm-4.10.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 8ab82b2..a741ef1 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,9 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream release -%global vdsm_release e952471 -%global vdsm_relvtag .git%{vdsm_release} -%global vdsm_relttag -%{vdsm_release} +#% global vdsm_release e952471 +#% global vdsm_relvtag .git%{vdsm_release} +#% global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -19,8 +19,8 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} -Version: 4.9.6 -Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} +Version: 4.10.0 +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -864,6 +864,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1.fc17 +- vdsm-4.10.0 + * Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471.fc17 - BZ#822158 Report version-release in a short format From 2901aaab60a7a9eea2d5eb2dbc223ef9c13ad1de Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Fri, 22 Jun 2012 12:46:16 +0200 Subject: [PATCH 016/126] update to vdsm-4.10.0-2 - deployUtil.yumFind: rename and simplify semantics - drop deployUtil.yumSearch - deployUtil.yumSearchVersion: compare versions sanely - Iterates over delete candidates networks only once - 'options' translation in setupNetworks is not relevant - Minor optimization for delNetwork - Don't ignore bridgeless networks in ifaceUsers - Minor optimization for addNetwork - Use already known iface in addNetwork - Use proper MTU on bonding when add network - Add bridge on top of VLAN if exists - BZ#830485 - Add netConfigDirty bit to getVdsCaps report - remove flag skipLibvirt - BZ#826873 - Allow to change bond without network attached to it - BZ#830486 - Allow to change network according the diffs from previous state - BZ#826467 - Allow to remove bond and attach network to NIC - Related to BZ#826873 - Allow to create bond without network Signed-off-by: Federico Simoncelli --- .gitignore | 17 ++++++++++++++++ sources | 17 ++++++++++++++++ vdsm.spec | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 91 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2ea9961..47ebc5c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,20 @@ /vdsm-4.9.6-1b07249.tar.gz /vdsm-4.9.6-e952471.tar.gz /vdsm-4.10.0.tar.gz +/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch +/0002-drop-deployUtil.yumSearch.patch +/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch +/0004-Iterates-over-delete-candidates-networks-only-once.patch +/0005-options-translation-in-setupNetworks-is-not-relevant.patch +/0006-Minor-optimization-for-delNetwork.patch +/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch +/0008-Minor-optimization-for-addNetwork.patch +/0009-Use-already-known-iface-in-addNetwork.patch +/0010-Use-proper-MTU-on-bonding-when-add-network.patch +/0011-Add-bridge-on-top-of-VLAN-if-exists.patch +/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch +/0013-remove-flag-skipLibvirt.patch +/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch +/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch +/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch +/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch diff --git a/sources b/sources index 87c07ec..45fc83a 100644 --- a/sources +++ b/sources @@ -1 +1,18 @@ e8ab5eccdea0b4a4da2e812174971393 vdsm-4.10.0.tar.gz +271a4bf061238b0485f588e5da989c6a 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch +1f82b6892731e7be936db6ec695caeef 0002-drop-deployUtil.yumSearch.patch +6e51c8e0bd728f180bccf78ad7e4b761 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch +3eb5b34836f09e3bea17605665ddd238 0004-Iterates-over-delete-candidates-networks-only-once.patch +a34b83250137d392cc88f3cf8bb044ec 0005-options-translation-in-setupNetworks-is-not-relevant.patch +ae0b01009e5cd7bc0bbf168e61948406 0006-Minor-optimization-for-delNetwork.patch +e3d365f2fdae5b48e0bbb7bc9d4792b7 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch +7f7465f7dcd480890195e7dc550e7901 0008-Minor-optimization-for-addNetwork.patch +8f0c154cbaef660dad9c55a1cffa03b9 0009-Use-already-known-iface-in-addNetwork.patch +a02ec209a8763ca8f862f8787786b822 0010-Use-proper-MTU-on-bonding-when-add-network.patch +443f8204853b13663b96adfe8970046c 0011-Add-bridge-on-top-of-VLAN-if-exists.patch +71deacdfda0e338e043614274c5f55e4 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch +36d6ef004846bab4730dfd34a0d50de2 0013-remove-flag-skipLibvirt.patch +3a06c6d62ca1f5bc142c8241e2aa3eb3 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch +1926fd68e471424d3130a894c6bea6f1 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch +87f4dc171371ee591c45838479661355 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch +5221fe91ae85f29d763746b36126393b 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch diff --git a/vdsm.spec b/vdsm.spec index a741ef1..0f928ac 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -34,6 +34,25 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz + +Patch0: 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch +Patch1: 0002-drop-deployUtil.yumSearch.patch +Patch2: 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch +Patch3: 0004-Iterates-over-delete-candidates-networks-only-once.patch +Patch4: 0005-options-translation-in-setupNetworks-is-not-relevant.patch +Patch5: 0006-Minor-optimization-for-delNetwork.patch +Patch6: 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch +Patch7: 0008-Minor-optimization-for-addNetwork.patch +Patch8: 0009-Use-already-known-iface-in-addNetwork.patch +Patch9: 0010-Use-proper-MTU-on-bonding-when-add-network.patch +Patch10: 0011-Add-bridge-on-top-of-VLAN-if-exists.patch +Patch11: 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch +Patch12: 0013-remove-flag-skipLibvirt.patch +Patch13: 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch +Patch14: 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch +Patch15: 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch +Patch16: 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -324,6 +343,24 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -n %{vdsm_name}-%{version}%{?vdsm_relttag} +%patch0 -p1 -b .patch0 +%patch1 -p1 -b .patch1 +%patch2 -p1 -b .patch2 +%patch3 -p1 -b .patch3 +%patch4 -p1 -b .patch4 +%patch5 -p1 -b .patch5 +%patch6 -p1 -b .patch6 +%patch7 -p1 -b .patch7 +%patch8 -p1 -b .patch8 +%patch9 -p1 -b .patch9 +%patch10 -p1 -b .patch10 +%patch11 -p1 -b .patch11 +%patch12 -p1 -b .patch12 +%patch13 -p1 -b .patch13 +%patch14 -p1 -b .patch14 +%patch15 -p1 -b .patch15 +%patch16 -p1 -b .patch16 + %build %configure %{?with_hooks:--enable-hooks} make @@ -864,6 +901,25 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2.fc17 +- deployUtil.yumFind: rename and simplify semantics +- drop deployUtil.yumSearch +- deployUtil.yumSearchVersion: compare versions sanely +- Iterates over delete candidates networks only once +- 'options' translation in setupNetworks is not relevant +- Minor optimization for delNetwork +- Don't ignore bridgeless networks in ifaceUsers +- Minor optimization for addNetwork +- Use already known iface in addNetwork +- Use proper MTU on bonding when add network +- Add bridge on top of VLAN if exists +- BZ#830485 - Add netConfigDirty bit to getVdsCaps report +- remove flag skipLibvirt +- BZ#826873 - Allow to change bond without network attached to it +- BZ#830486 - Allow to change network according the diffs from previous state +- BZ#826467 - Allow to remove bond and attach network to NIC +- Related to BZ#826873 - Allow to create bond without network + * Mon Jun 11 2012 Federico Simoncelli 4.10.0-1.fc17 - vdsm-4.10.0 From 83b9f8f9bf02399226fb2801cd3803a39331b5f3 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 26 Jun 2012 21:07:08 +0200 Subject: [PATCH 017/126] update to vdsm-4.10.0-3 - BZ#832577: node can't be approved - BZ#824298 fix typo in keyword argument exc_info Signed-off-by: Federico Simoncelli --- .gitignore | 17 --- ...umFind-rename-and-simplify-semantics.patch | 70 +++++++++ 0002-drop-deployUtil.yumSearch.patch | 63 ++++++++ ...earchVersion-compare-versions-sanely.patch | 95 ++++++++++++ ...delete-candidates-networks-only-once.patch | 77 ++++++++++ ...ion-in-setupNetworks-is-not-relevant.patch | 33 +++++ 0006-Minor-optimization-for-delNetwork.patch | 97 ++++++++++++ ...re-bridgeless-networks-in-ifaceUsers.patch | 38 +++++ 0008-Minor-optimization-for-addNetwork.patch | 65 ++++++++ ...se-already-known-iface-in-addNetwork.patch | 37 +++++ ...oper-MTU-on-bonding-when-add-network.patch | 39 +++++ ...-Add-bridge-on-top-of-VLAN-if-exists.patch | 50 +++++++ ...tConfigDirty-bit-to-getVdsCaps-repor.patch | 30 ++++ 0013-remove-flag-skipLibvirt.patch | 132 +++++++++++++++++ ...to-change-bond-without-network-attac.patch | 140 ++++++++++++++++++ ...to-change-network-according-the-diff.patch | 47 ++++++ ...to-remove-bond-and-attach-network-to.patch | 49 ++++++ ...6873-Allow-to-create-bond-without-ne.patch | 31 ++++ 0018-BZ-832577-node-can-t-be-approved.patch | 38 +++++ ...ix-typo-in-keyword-argument-exc_info.patch | 57 +++++++ sources | 17 --- vdsm.spec | 12 +- 22 files changed, 1198 insertions(+), 36 deletions(-) create mode 100644 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch create mode 100644 0002-drop-deployUtil.yumSearch.patch create mode 100644 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch create mode 100644 0004-Iterates-over-delete-candidates-networks-only-once.patch create mode 100644 0005-options-translation-in-setupNetworks-is-not-relevant.patch create mode 100644 0006-Minor-optimization-for-delNetwork.patch create mode 100644 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch create mode 100644 0008-Minor-optimization-for-addNetwork.patch create mode 100644 0009-Use-already-known-iface-in-addNetwork.patch create mode 100644 0010-Use-proper-MTU-on-bonding-when-add-network.patch create mode 100644 0011-Add-bridge-on-top-of-VLAN-if-exists.patch create mode 100644 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch create mode 100644 0013-remove-flag-skipLibvirt.patch create mode 100644 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch create mode 100644 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch create mode 100644 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch create mode 100644 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch create mode 100644 0018-BZ-832577-node-can-t-be-approved.patch create mode 100644 0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch diff --git a/.gitignore b/.gitignore index 47ebc5c..2ea9961 100644 --- a/.gitignore +++ b/.gitignore @@ -8,20 +8,3 @@ /vdsm-4.9.6-1b07249.tar.gz /vdsm-4.9.6-e952471.tar.gz /vdsm-4.10.0.tar.gz -/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch -/0002-drop-deployUtil.yumSearch.patch -/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch -/0004-Iterates-over-delete-candidates-networks-only-once.patch -/0005-options-translation-in-setupNetworks-is-not-relevant.patch -/0006-Minor-optimization-for-delNetwork.patch -/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch -/0008-Minor-optimization-for-addNetwork.patch -/0009-Use-already-known-iface-in-addNetwork.patch -/0010-Use-proper-MTU-on-bonding-when-add-network.patch -/0011-Add-bridge-on-top-of-VLAN-if-exists.patch -/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch -/0013-remove-flag-skipLibvirt.patch -/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch -/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch -/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch -/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch diff --git a/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch b/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch new file mode 100644 index 0000000..46041c1 --- /dev/null +++ b/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch @@ -0,0 +1,70 @@ +From 8cf22884c2134353981bca1cb0600451391dd0de Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 19 Jun 2012 00:17:13 +0300 +Subject: [PATCH 01/17] deployUtil.yumFind: rename and simplify semantics + +deployUtil.yumListPackages is a convenience wrapper around +yum.YumBase.pkgSack.searchNevra() + +Change-Id: I5ad5405ae0f8548c0116ac5a8066325455aef13a +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5467 +Reviewed-by: Douglas Schilling Landgraf +Tested-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5542 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm_reg/deployUtil.py.in | 14 ++++++-------- + 1 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 976295f..c80b487 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -1029,18 +1029,16 @@ def installAndVerify(pckgType, pckgName, action, args=None): + + return fReturn, msg + +-def yumFind(pkgName): ++def yumListPackages(pkgName): + """ + Returns a list of available packages exists in yum's db. + """ + import yum +- lReturn = None + + my = yum.YumBase() + my.preconf.debuglevel = 0 # Remove yum noise +- lReturn = my.pkgSack.searchNevra(name=pkgName) ++ return my.pkgSack.searchNevra(name=pkgName) + +- return lReturn + + def yumSearch(pkgName): + """ +@@ -1048,8 +1046,8 @@ def yumSearch(pkgName): + """ + fReturn = False + +- pkgs = yumFind(pkgName) +- if pkgs and len(pkgs)>0: ++ pkgs = yumListPackages(pkgName) ++ if pkgs: + fReturn = True + logging.debug("yumSearch: found " + str(pkgName) + " entries: " + str(pkgs)) + else: +@@ -1064,8 +1062,8 @@ def yumSearchVersion(pkgName, ver, startWith=True): + """ + fReturn = False + +- pkgs = yumFind(pkgName) +- if pkgs and len(pkgs)>0: ++ pkgs = yumListPackages(pkgName) ++ if pkgs: + for item in pkgs: + if startWith: + if str(item).startswith(ver): +-- +1.7.1 + diff --git a/0002-drop-deployUtil.yumSearch.patch b/0002-drop-deployUtil.yumSearch.patch new file mode 100644 index 0000000..4980e65 --- /dev/null +++ b/0002-drop-deployUtil.yumSearch.patch @@ -0,0 +1,63 @@ +From 5edbed09c4091959e569e8cccc888bb72958082b Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 19 Jun 2012 00:21:55 +0300 +Subject: [PATCH 02/17] drop deployUtil.yumSearch + +It was just a complex way of calculating bool(yumFind()). + +Change-Id: Iafc9d67fef5cb348255b06a9e6b404a70ec35693 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5468 +Reviewed-by: Douglas Schilling Landgraf +Tested-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5543 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vds_bootstrap/vds_bootstrap.py | 2 +- + vdsm_reg/deployUtil.py.in | 16 ---------------- + 2 files changed, 1 insertions(+), 17 deletions(-) + +diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py +index 0df5023..12e127e 100755 +--- a/vds_bootstrap/vds_bootstrap.py ++++ b/vds_bootstrap/vds_bootstrap.py +@@ -225,7 +225,7 @@ class Deploy: + rc = True + + try: +- rc = deployUtil.yumSearch(VDSM_NAME) ++ rc = bool(deployUtil.yumListPackages(VDSM_NAME)) + except: + rc = False + logging.error("checkRegistration: Error searching for VDSM package!", +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index c80b487..1adf1a5 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -1039,22 +1039,6 @@ def yumListPackages(pkgName): + my.preconf.debuglevel = 0 # Remove yum noise + return my.pkgSack.searchNevra(name=pkgName) + +- +-def yumSearch(pkgName): +- """ +- Returns True is package exists in yum's db. +- """ +- fReturn = False +- +- pkgs = yumListPackages(pkgName) +- if pkgs: +- fReturn = True +- logging.debug("yumSearch: found " + str(pkgName) + " entries: " + str(pkgs)) +- else: +- logging.debug("yumSearch: package " + str(pkgName) + " not found!") +- +- return fReturn +- + def yumSearchVersion(pkgName, ver, startWith=True): + """ + Returns True is package exists in yum's db with the given version. +-- +1.7.1 + diff --git a/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch b/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch new file mode 100644 index 0000000..d9b45d7 --- /dev/null +++ b/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch @@ -0,0 +1,95 @@ +From 67309fc8a7a4edd4996490b64f51ce37f0ed2327 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 19 Jun 2012 00:33:22 +0300 +Subject: [PATCH 03/17] deployUtil.yumSearchVersion: compare versions sanely + +Change-Id: I0aa40c3395ca012a21f148f20125b54e3ba16d8a +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5469 +Reviewed-by: Mark Wu +Tested-by: Douglas Schilling Landgraf +Reviewed-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5544 +Tested-by: Federico Simoncelli +Reviewed-by: Federico Simoncelli +--- + vds_bootstrap/vds_bootstrap.py | 6 +++--- + vdsm_reg/deployUtil.py.in | 31 +++++++------------------------ + 2 files changed, 10 insertions(+), 27 deletions(-) + +diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py +index 12e127e..9801459 100755 +--- a/vds_bootstrap/vds_bootstrap.py ++++ b/vds_bootstrap/vds_bootstrap.py +@@ -80,13 +80,13 @@ fedorabased = deployUtil.versionCompare(deployUtil.getOSVersion(), "16") >= 0 + + if rhel6based: + VDSM_NAME = "vdsm" +- VDSM_MIN_VER = VDSM_NAME + "-4.9" ++ VDSM_MIN_VER = "4.9" + KERNEL_VER = "2.6.32-.*.el6" + KERNEL_MIN_VER = 150 + MINIMAL_SUPPORTED_PLATFORM = "6.0" + else: + VDSM_NAME = "vdsm22" +- VDSM_MIN_VER = VDSM_NAME + "-4.5" ++ VDSM_MIN_VER = "4.5" + KERNEL_VER = "2.6.18-.*.el5" + KERNEL_MIN_VER = 159 + MINIMAL_SUPPORTED_PLATFORM = "5.5" +@@ -250,7 +250,7 @@ class Deploy: + rc = True + + try: +- rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER, True) ++ rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER) + except: + rc = False + logging.error("checkMajorVersion: Error searching for VDSM version!", +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 1adf1a5..1474196 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -1039,32 +1039,15 @@ def yumListPackages(pkgName): + my.preconf.debuglevel = 0 # Remove yum noise + return my.pkgSack.searchNevra(name=pkgName) + +-def yumSearchVersion(pkgName, ver, startWith=True): +- """ +- Returns True is package exists in yum's db with the given version. +- Note: yum internal code has verEQ and verGT. We should use it ASAP. +- """ +- fReturn = False ++def yumSearchVersion(pkgName, ver): ++ "Return True if package exists in yum's db with the given version or higer" ++ import rpmUtils.miscutils + +- pkgs = yumListPackages(pkgName) +- if pkgs: +- for item in pkgs: +- if startWith: +- if str(item).startswith(ver): +- fReturn = True +- logging.debug("yumSearchVersion: pkg " + str(item) + " starts with: " + ver) +- else: +- logging.debug("yumSearchVersion: pkg " + str(item) + " does not start with: " + ver) +- else: +- if str(item) == ver: +- fReturn = True +- logging.debug("yumSearchVersion: pkg " + str(item) + " matches: " + ver) +- else: +- logging.debug("yumSearchVersion: pkg " + str(item) + " does not match: " + ver) ++ for pkg in yumListPackages(pkgName): ++ if rpmUtils.miscutils.compareVerOnly(pkg.ver, ver) >= 0: ++ return True + else: +- logging.debug("yumSearchVersion: package " + str(pkgName) + " not found!") +- +- return fReturn ++ return False + + ############################################################################################################# + # Host PKI functions. +-- +1.7.1 + diff --git a/0004-Iterates-over-delete-candidates-networks-only-once.patch b/0004-Iterates-over-delete-candidates-networks-only-once.patch new file mode 100644 index 0000000..3cb42b4 --- /dev/null +++ b/0004-Iterates-over-delete-candidates-networks-only-once.patch @@ -0,0 +1,77 @@ +From 165284de4e03fb72fb9e4ca811fbcc77618ff02d Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 4 Jun 2012 11:02:56 +0300 +Subject: [PATCH 04/17] Iterates over delete candidates networks only once + +Change-Id: Iec45c1cb3d76a70555e256f96c983e13a0518cbe +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5204 +Reviewed-by: Livnat Peer +Reviewed-by: Shu Ming +Tested-by: Dan Kenigsberg +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5546 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 26 ++++++++++++-------------- + 1 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index b37ff0f..3f2e5fe 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1010,26 +1010,23 @@ def setupNetworks(networks={}, bondings={}, **options): + networksAdded = [] + #bondingNetworks = {} # Reminder TODO + +- logger.info("Setting up network") +- logger.debug("Setting up network according to configuration: networks:%r, bondings:%r, options:%r" % (networks, bondings, options)) ++ logger.debug("Setting up network according to configuration: " ++ "networks:%r, bondings:%r, options:%r" % (networks, ++ bondings, options)) + + force = options.get('force', False) + if not utils.tobool(force): + logging.debug("Validating configuration") +- _validateNetworkSetup(dict(networks), dict(bondings), explicitBonding=options.get('explicitBonding', False)) ++ _validateNetworkSetup(dict(networks), dict(bondings), ++ explicitBonding=options.get('explicitBonding', ++ False)) + + logger.debug("Applying...") + try: +- delnetworks = {} +- for network, networkAttrs in networks.iteritems(): ++ # Remove networks with 'remove' attribute ++ for network, networkAttrs in networks.items(): + if 'remove' in networkAttrs: +- delnetworks[network] = networkAttrs +- +- for network, networkAttrs in delnetworks.iteritems(): +- if networkAttrs.pop('remove', False): +- assert not networkAttrs +- +- logger.debug('Removing network %r'%network) ++ logger.debug("Removing network %r" % network) + delNetwork(network, configWriter=configWriter, force=force) + del networks[network] + +@@ -1041,12 +1038,13 @@ def setupNetworks(networks={}, bondings={}, **options): + d = dict(networkAttrs) + if 'bonding' in d: + d['nics'] = bondings[d['bonding']]['nics'] +- d['bondingOptions'] = bondings[d['bonding']].get('options', None) ++ d['bondingOptions'] = bondings[d['bonding']].get('options', ++ None) + else: + d['nics'] = [d.pop('nic')] + d['force'] = force + +- logger.debug('Adding network %r'%network) ++ logger.debug("Adding network %r" % network) + addNetwork(network, configWriter=configWriter, **d) + + if utils.tobool(options.get('connectivityCheck', True)): +-- +1.7.1 + diff --git a/0005-options-translation-in-setupNetworks-is-not-relevant.patch b/0005-options-translation-in-setupNetworks-is-not-relevant.patch new file mode 100644 index 0000000..a70cfca --- /dev/null +++ b/0005-options-translation-in-setupNetworks-is-not-relevant.patch @@ -0,0 +1,33 @@ +From 752dd81155caf00895d14fadc4aa1cbbc3e88364 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 4 Jun 2012 15:08:09 +0300 +Subject: [PATCH 05/17] 'options' translation in setupNetworks is not relevant + +Change-Id: I68871fe1a4112fd7223e794a1b67bf98e26c104c +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5205 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Lei Li +Tested-by: Lei Li +Reviewed-by: Livnat Peer +Reviewed-on: http://gerrit.ovirt.org/5547 +Tested-by: Federico Simoncelli +--- + vdsm/API.py | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/vdsm/API.py b/vdsm/API.py +index c098b4b..70034aa 100644 +--- a/vdsm/API.py ++++ b/vdsm/API.py +@@ -1145,7 +1145,6 @@ class Global(object): + def setupNetworks(self, networks={}, bondings={}, options={}): + """Add a new network to this vds, replacing an old one.""" + +- self._translateOptionsToNew(options) + if not self._cif._networkSemaphore.acquire(blocking=False): + self.log.warn('concurrent network verb already executing') + return errCode['unavail'] +-- +1.7.1 + diff --git a/0006-Minor-optimization-for-delNetwork.patch b/0006-Minor-optimization-for-delNetwork.patch new file mode 100644 index 0000000..d142f96 --- /dev/null +++ b/0006-Minor-optimization-for-delNetwork.patch @@ -0,0 +1,97 @@ +From 4accdc21e59f573ec0135ceb0faeda1b452acb22 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 4 Jun 2012 20:23:28 +0300 +Subject: [PATCH 06/17] Minor optimization for delNetwork + +Change-Id: I66a37cb1100411af13197642bdb13ae745bc6e53 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5207 +Reviewed-by: Lei Li +Tested-by: Lei Li +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5548 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 31 +++++++++++++++++++------------ + 1 files changed, 19 insertions(+), 12 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 3f2e5fe..8d71375 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -736,22 +736,25 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + + if not utils.tobool(options.get('skipLibvirt', False)): + if network not in _netinfo.networks: +- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, "Cannot delete network %r: It doesn't exist" % network) ++ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, ++ "Cannot delete network %r: It doesn't exist" % network) + + nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) + bridged = _netinfo.networks[network]['bridged'] + else: + bridged = True + +- logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s. options=%s"%(network, vlan, bonding, nics, options)) ++ logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s," ++ "options=%s" % (network, vlan, bonding, nics, options)) + + if not utils.tobool(force): + if bonding: + validateBondingName(bonding) + if set(nics) != set(_netinfo.bondings[bonding]["slaves"]): +- raise ConfigNetworkError(ne.ERR_BAD_NIC, 'delNetwork: %s are not all nics enslaved to %s' % (nics, bonding)) ++ raise ConfigNetworkError(ne.ERR_BAD_NIC, ++ "delNetwork: %s are not all nics enslaved to %s" % \ ++ (nics, bonding)) + if vlan: +- #assertVlan(vlan) + validateVlanId(vlan) + if bridged: + assertBridgeClean(network, vlan, bonding, nics) +@@ -763,30 +766,34 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + configWriter.setNewMtu(network) + + removeLibvirtNetwork(network, log=False) +- # the deleted bridge should never be up at this stage. ++ # We need to gather NetInfo again to refresh networks info from libvirt. ++ # The deleted bridge should never be up at this stage. + if network in NetInfo().networks: +- raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'delNetwork: bridge %s still exists' % network) ++ raise ConfigNetworkError(ne.ERR_USED_BRIDGE, ++ "delNetwork: bridge %s still exists" % network) + + if network and bridged: + ifdown(network) + subprocess.call([constants.EXT_BRCTL, 'delbr', network]) + configWriter.removeBridge(network) ++ + if vlan: + vlandev = (bonding or nics[0]) + '.' + vlan + ifdown(vlandev) +- subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], stderr=subprocess.PIPE) ++ subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], ++ stderr=subprocess.PIPE) + configWriter.removeVlan(vlan, bonding or nics[0]) ++ + if bonding: + if not bridged or not bondingOtherUsers(network, vlan, bonding): + ifdown(bonding) +- if not bridged or not bondingOtherUsers(network, vlan, bonding): + configWriter.removeBonding(bonding) ++ + for nic in nics: +- if not bridged or not nicOtherUsers(network, vlan, bonding, nic): ++ nicUsers = nicOtherUsers(network, vlan, bonding, nic) ++ if not nicUsers: + ifdown(nic) +- if bridged and nicOtherUsers(network, vlan, bonding, nic): +- continue +- configWriter.removeNic(nic) ++ configWriter.removeNic(nic) + + def clientSeen(timeout): + start = time.time() +-- +1.7.1 + diff --git a/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch b/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch new file mode 100644 index 0000000..93fd5ae --- /dev/null +++ b/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch @@ -0,0 +1,38 @@ +From b66fdcfbfe9022aa6ec33df274a5a81a73d1af5f Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 4 Jun 2012 19:24:12 +0300 +Subject: [PATCH 07/17] Don't ignore bridgeless networks in ifaceUsers + +Change-Id: Id45b37683d52feebd1b31421c2a717695394147a +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5206 +Tested-by: Dan Kenigsberg +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5549 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 8d71375..fc43d67 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -86,9 +86,11 @@ def ifaceUsers(iface): + "Returns a list of entities using the interface" + _netinfo = NetInfo() + users = set() +- for b, bdict in _netinfo.networks.iteritems(): +- if bdict['bridged'] and iface in bdict['ports']: +- users.add(b) ++ for n, ndict in _netinfo.networks.iteritems(): ++ if ndict['bridged'] and iface in ndict['ports']: ++ users.add(n) ++ elif not ndict['bridged'] and iface == ndict['interface']: ++ users.add(n) + for b, bdict in _netinfo.bondings.iteritems(): + if iface in bdict['slaves']: + users.add(b) +-- +1.7.1 + diff --git a/0008-Minor-optimization-for-addNetwork.patch b/0008-Minor-optimization-for-addNetwork.patch new file mode 100644 index 0000000..4d711f4 --- /dev/null +++ b/0008-Minor-optimization-for-addNetwork.patch @@ -0,0 +1,65 @@ +From 5bdaa7c0a1cc696ed4e1d492d9af576fd8c8e4eb Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Wed, 6 Jun 2012 09:25:03 +0300 +Subject: [PATCH 08/17] Minor optimization for addNetwork + +Change-Id: I5506140ccd065d76a77414593635598f26289829 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5208 +Reviewed-by: Lei Li +Tested-by: Lei Li +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5550 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 21 ++++++++------------- + 1 files changed, 8 insertions(+), 13 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index fc43d67..89b3047 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -613,32 +613,27 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + ifdown(nic) + + if bridged: +- configWriter.addBridge(network, ipaddr=ipaddr, netmask=netmask, mtu=mtu, +- gateway=gateway, **options) ++ configWriter.addBridge(network, ipaddr=ipaddr, netmask=netmask, ++ mtu=mtu, gateway=gateway, **options) + ifdown(network) + +- # since we have vlan device, it is connected to the bridge. other +- # interfaces should be connected to the bridge through vlan, and not directly. +- brName = network if bridged and not vlan else None ++ brName = network if bridged else None + + # nics must be activated in the same order of boot time to expose the correct + # MAC address. + for nic in nicSort(nics): +- if not bonding and bridged: +- configWriter.addNic(nic, bridge=brName, mtu=max(prevmtu, mtu)) ++ configWriter.addNic(nic, bonding=bonding, bridge=brName, mtu=max(prevmtu, mtu)) + ifup(nic) + if bonding: + configWriter.addBonding(bonding, bridge=brName, bondingOptions=bondingOptions, mtu=mtu) +- for nic in nics: +- configWriter.addNic(nic, bonding=bonding, mtu=max(prevmtu, mtu)) + ifup(bonding) ++ + if vlan: + iface += '.' + vlan +- configWriter.addVlan(vlan, bonding or nics[0], network=network if bridged else None, mtu=mtu, bridged=bridged) +- # since we have vlan device, it is connected to the network. other +- # interfaces should be connected to the network through vlan, and not +- # directly. ++ configWriter.addVlan(vlan, bonding or nics[0], network=brName, ++ mtu=mtu, bridged=bridged) + ifup((bonding or nics[0]) + '.' + vlan) ++ + if bridged: + if options.get('bootproto') == 'dhcp' and not utils.tobool(options.get('blockingdhcp')): + # wait for dhcp in another thread, so vdsm won't get stuck (BZ#498940) +-- +1.7.1 + diff --git a/0009-Use-already-known-iface-in-addNetwork.patch b/0009-Use-already-known-iface-in-addNetwork.patch new file mode 100644 index 0000000..09ea6db --- /dev/null +++ b/0009-Use-already-known-iface-in-addNetwork.patch @@ -0,0 +1,37 @@ +From 16e43715e9731db46b4ea519eb4c0c1294bf18a4 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Tue, 12 Jun 2012 15:38:27 +0300 +Subject: [PATCH 09/17] Use already known iface in addNetwork + +Change-Id: I085792401a04d7695855e81b16b442e4c31ab706 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5283 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5551 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 89b3047..87b32ed 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -629,10 +629,10 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + ifup(bonding) + + if vlan: +- iface += '.' + vlan +- configWriter.addVlan(vlan, bonding or nics[0], network=brName, ++ configWriter.addVlan(vlan, iface, network=brName, + mtu=mtu, bridged=bridged) +- ifup((bonding or nics[0]) + '.' + vlan) ++ iface += '.' + vlan ++ ifup(iface) + + if bridged: + if options.get('bootproto') == 'dhcp' and not utils.tobool(options.get('blockingdhcp')): +-- +1.7.1 + diff --git a/0010-Use-proper-MTU-on-bonding-when-add-network.patch b/0010-Use-proper-MTU-on-bonding-when-add-network.patch new file mode 100644 index 0000000..7a24e2d --- /dev/null +++ b/0010-Use-proper-MTU-on-bonding-when-add-network.patch @@ -0,0 +1,39 @@ +From 34a348e500b2c0f50f3de3095db8aa7d61f2953a Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Wed, 6 Jun 2012 14:16:37 +0300 +Subject: [PATCH 10/17] Use proper MTU on bonding when add network + +Change-Id: Id34f2462ddfc2c9f4a323235c79f919c0cce12a7 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5209 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5552 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 87b32ed..5353d0e 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -622,10 +622,13 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + # nics must be activated in the same order of boot time to expose the correct + # MAC address. + for nic in nicSort(nics): +- configWriter.addNic(nic, bonding=bonding, bridge=brName, mtu=max(prevmtu, mtu)) ++ configWriter.addNic(nic, bonding=bonding, bridge=brName, ++ mtu=max(prevmtu, mtu)) + ifup(nic) + if bonding: +- configWriter.addBonding(bonding, bridge=brName, bondingOptions=bondingOptions, mtu=mtu) ++ configWriter.addBonding(bonding, bridge=brName, ++ bondingOptions=bondingOptions, ++ mtu=max(prevmtu, mtu)) + ifup(bonding) + + if vlan: +-- +1.7.1 + diff --git a/0011-Add-bridge-on-top-of-VLAN-if-exists.patch b/0011-Add-bridge-on-top-of-VLAN-if-exists.patch new file mode 100644 index 0000000..a566e93 --- /dev/null +++ b/0011-Add-bridge-on-top-of-VLAN-if-exists.patch @@ -0,0 +1,50 @@ +From 69af2fcbdedfe6eab77c4c748a911caa78366590 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Tue, 12 Jun 2012 16:03:04 +0300 +Subject: [PATCH 11/17] Add bridge on top of VLAN if exists + +In VLAN case we should attach bridge only to the VLAN +rather than to underlying NICs or bond + +Change-Id: I1c554853b5be9330933174da810b6d67c83eb96e +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5284 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5553 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 11 +++++++---- + 1 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 5353d0e..97aec7c 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -617,16 +617,19 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + mtu=mtu, gateway=gateway, **options) + ifdown(network) + ++ # For VLAN we should attach bridge only to the VLAN device ++ # rather than to underlying NICs or bond + brName = network if bridged else None ++ bridgeForNic = None if vlan else brName + +- # nics must be activated in the same order of boot time to expose the correct +- # MAC address. ++ # NICs must be activated in the same order of boot time ++ # to expose the correct MAC address. + for nic in nicSort(nics): +- configWriter.addNic(nic, bonding=bonding, bridge=brName, ++ configWriter.addNic(nic, bonding=bonding, bridge=bridgeForNic, + mtu=max(prevmtu, mtu)) + ifup(nic) + if bonding: +- configWriter.addBonding(bonding, bridge=brName, ++ configWriter.addBonding(bonding, bridge=bridgeForNic, + bondingOptions=bondingOptions, + mtu=max(prevmtu, mtu)) + ifup(bonding) +-- +1.7.1 + diff --git a/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch b/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch new file mode 100644 index 0000000..2f2ae71 --- /dev/null +++ b/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch @@ -0,0 +1,30 @@ +From b5198d7ea6325374ad166043cf8597a148870a14 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 11 Jun 2012 19:37:58 +0300 +Subject: [PATCH 12/17] BZ#830485 - Add netConfigDirty bit to getVdsCaps report + +Change-Id: Iba641a74d33157186ddc6ceb6196b531953c9c8b +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5257 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5554 +Tested-by: Federico Simoncelli +--- + vdsm/API.py | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/vdsm/API.py b/vdsm/API.py +index 70034aa..abb3510 100644 +--- a/vdsm/API.py ++++ b/vdsm/API.py +@@ -1073,6 +1073,7 @@ class Global(object): + Report host capabilities. + """ + c = caps.get() ++ c['netConfigDirty'] = str(self._cif._netConfigDirty) + + return {'status': doneCode, 'info': c} + +-- +1.7.1 + diff --git a/0013-remove-flag-skipLibvirt.patch b/0013-remove-flag-skipLibvirt.patch new file mode 100644 index 0000000..5d9e8b7 --- /dev/null +++ b/0013-remove-flag-skipLibvirt.patch @@ -0,0 +1,132 @@ +From 325aa66a2c32a6889f199628f2aedfaba742cb00 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Wed, 13 Jun 2012 17:44:16 -0400 +Subject: [PATCH 13/17] remove flag skipLibvirt + +Currently, VDSM manage networks by it's own and uses libvirt to store the net definitions, not requiring any additional +flag as skipLibvirt. This patch will remove completely skipLibvirt flag. + +Change-Id: Id87c89f04912976797d629344238749a8562382b +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5262 +Reviewed-by: Shu Ming +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5555 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 29 ++++++++++------------------- + vdsm_reg/deployUtil.py.in | 5 ++--- + 2 files changed, 12 insertions(+), 22 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 97aec7c..effb279 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -238,8 +238,7 @@ class ConfigWriter(object): + s += 'NM_CONTROLLED=no\n' + BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', + 'force', 'blockingdhcp', +- 'connectivityCheck', 'connectivityTimeout', +- 'skipLibvirt'] ++ 'connectivityCheck', 'connectivityTimeout'] + for k in set(kwargs.keys()).difference(set(BLACKLIST)): + if re.match('^[a-zA-Z_]\w*$', k): + s += '%s=%s\n' % (k.upper(), pipes.quote(kwargs[k])) +@@ -493,7 +492,7 @@ def validateVlanId(vlan): + + + def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask, gateway, +- bondingOptions, bridged=True, skipLibvirt=False): ++ bondingOptions, bridged=True): + if (vlan or bonding) and not nics: + raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'vlan/bonding definition requires nics. got: %r'%(nics,)) + +@@ -502,12 +501,9 @@ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask + validateBridgeName(bridge) + if bridge in _netinfo.networks: + raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'Bridge already exists') +- elif not skipLibvirt: ++ + if bridge in _netinfo.getBridgelessNetworks(): + raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'network already exists') +- else: +- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, +- 'bridgeless network can not be added when skip libvirt') + + # vlan + if vlan: +@@ -576,7 +572,6 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + gateway=None, force=False, configWriter=None, bondingOptions=None, bridged=True, **options): + nics = nics or () + _netinfo = NetInfo() +- skipLibvirt = utils.tobool(options.get('skipLibvirt', False)) + bridged = utils.tobool(bridged) + + if mtu: +@@ -588,7 +583,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + _addNetworkValidation(_netinfo, bridge=network if bridged else None, + vlan=vlan, bonding=bonding, nics=nics, ipaddr=ipaddr, + netmask=netmask, gateway=gateway, bondingOptions=bondingOptions, +- bridged=bridged, skipLibvirt=skipLibvirt) ++ bridged=bridged) + + logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," + " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", +@@ -650,8 +645,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + ifup(network) + + # add libvirt network +- if not skipLibvirt: +- createLibvirtNetwork(network, bridged, iface) ++ createLibvirtNetwork(network, bridged, iface) + + def createLibvirtNetwork(network, bridged=True, iface=None): + conn = libvirtconnection.get() +@@ -737,15 +731,12 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + + validateBridgeName(network) + +- if not utils.tobool(options.get('skipLibvirt', False)): +- if network not in _netinfo.networks: +- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, +- "Cannot delete network %r: It doesn't exist" % network) ++ if network not in _netinfo.networks: ++ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, ++ "Cannot delete network %r: It doesn't exist" % network) + +- nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) +- bridged = _netinfo.networks[network]['bridged'] +- else: +- bridged = True ++ nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) ++ bridged = _netinfo.networks[network]['bridged'] + + logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s," + "options=%s" % (network, vlan, bonding, nics, options)) +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 1474196..2f240cc 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -894,7 +894,7 @@ def makeBridge(vdcName, vdsmDir): + #Delete existing bridge in oVirt + if fReturn and fIsOvirt: + try: +- out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan, bonding, nic] + ['skipLibvirt=True']) ++ out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan, bonding, nic]) + if ret: + if ret == 17: #ERR_BAD_BRIDGE + logging.debug("makeBridge Ignoring error of del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) +@@ -909,8 +909,7 @@ def makeBridge(vdcName, vdsmDir): + if fReturn: + try: + lstBridgeOptions.append('blockingdhcp=true') +- out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_ADD) , MGT_BRIDGE_NAME, vlan, bonding, nic] + lstBridgeOptions +- + ['skipLibvirt=True']) ++ out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_ADD) , MGT_BRIDGE_NAME, vlan, bonding, nic] + lstBridgeOptions) + if ret: + fReturn = False + logging.debug("makeBridge Failed to add " + MGT_BRIDGE_NAME + " bridge out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) +-- +1.7.1 + diff --git a/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch b/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch new file mode 100644 index 0000000..b091f0a --- /dev/null +++ b/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch @@ -0,0 +1,140 @@ +From ca7a6b1244f7a400bf5dc51a5d59662e5602534b Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Wed, 13 Jun 2012 12:18:02 +0300 +Subject: [PATCH 14/17] BZ#826873 - Allow to change bond without network attached to it + +Change-Id: I3770017d8e633ccf5f9cf9b41a93df57229c443e +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5312 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5556 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- + vdsm/netinfo.py | 4 +++ + 2 files changed, 67 insertions(+), 1 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index effb279..fce3e71 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -958,6 +958,52 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): + "Setup attached more than one network to bonding %s, some of which aren't vlans"%(bonding)) + + ++def _editBondings(bondings, configWriter): ++ """ Add/Edit bond interface """ ++ logger = logging.getLogger("_editBondings") ++ ++ _netinfo = NetInfo() ++ ++ for bond, bondAttrs in bondings.iteritems(): ++ logger.debug("Creating/Editing bond %s with attributes %s", ++ bond, bondAttrs) ++ if bond in _netinfo.bondings: ++ ifdown(bond) ++ # Take down all bond's NICs. ++ for nic in _netinfo.getNicsForBonding(bond): ++ ifdown(nic) ++ configWriter.removeNic(nic) ++ ++ # NICs must be activated in the same order of boot time ++ # to expose the correct MAC address. ++ for nic in nicSort(bondAttrs['nics']): ++ configWriter.addNic(nic, bonding=bond) ++ ifup(nic) ++ ++ configWriter.addBonding(bond, ++ bondingOptions=bondAttrs.get('options', None)) ++ ifup(bond) ++ ++def _removeBondings(bondings, configWriter): ++ """ Add/Edit bond interface """ ++ logger = logging.getLogger("_removeBondings") ++ ++ _netinfo = NetInfo() ++ ++ for bond, bondAttrs in bondings.items(): ++ if 'remove' in bondAttrs: ++ nics = _netinfo.getNicsForBonding(bond) ++ logger.debug("Removing bond %r with nics = %s", bond, nics) ++ ifdown(bond) ++ configWriter.removeBonding(bond) ++ ++ for nic in nics: ++ ifdown(nic) ++ configWriter.removeNic(nic) ++ ++ del bondings[bond] ++ ++ + def setupNetworks(networks={}, bondings={}, **options): + """Add/Edit/Remove configuration for networks and bondings. + +@@ -1009,7 +1055,6 @@ def setupNetworks(networks={}, bondings={}, **options): + _netinfo = NetInfo() + configWriter = ConfigWriter() + networksAdded = [] +- #bondingNetworks = {} # Reminder TODO + + logger.debug("Setting up network according to configuration: " + "networks:%r, bondings:%r, options:%r" % (networks, +@@ -1031,16 +1076,21 @@ def setupNetworks(networks={}, bondings={}, **options): + delNetwork(network, configWriter=configWriter, force=force) + del networks[network] + ++ handledBonds = set() + for network, networkAttrs in networks.items(): + if network in _netinfo.networks: + delNetwork(network, configWriter=configWriter, force=force) + else: + networksAdded.append(network) ++ + d = dict(networkAttrs) + if 'bonding' in d: + d['nics'] = bondings[d['bonding']]['nics'] + d['bondingOptions'] = bondings[d['bonding']].get('options', + None) ++ # Don't remove bondX from the bonding list here, ++ # because it may be in use for other networks ++ handledBonds.add(d['bonding']) + else: + d['nics'] = [d.pop('nic')] + d['force'] = force +@@ -1048,6 +1098,18 @@ def setupNetworks(networks={}, bondings={}, **options): + logger.debug("Adding network %r" % network) + addNetwork(network, configWriter=configWriter, **d) + ++ # Do not handle a bonding device twice. ++ # We already handled it before during addNetwork. ++ for bond in handledBonds: ++ del bondings[bond] ++ ++ # We are now left with bondings whose network was not mentioned ++ # Remove bonds with 'remove' attribute ++ _removeBondings(bondings, configWriter) ++ ++ # Check whether bonds should be resized ++ _editBondings(bondings, configWriter) ++ + if utils.tobool(options.get('connectivityCheck', True)): + logger.debug('Checking connectivity...') + if not clientSeen(int(options.get('connectivityTimeout', +diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py +index 05f8323..536b4c7 100644 +--- a/vdsm/netinfo.py ++++ b/vdsm/netinfo.py +@@ -339,6 +339,10 @@ class NetInfo(object): + if nic in bdict['slaves']: + yield b + ++ def getNicsForBonding(self, bond): ++ bondAttrs = self.bondings[bond] ++ return bondAttrs['slaves'] ++ + def getBondingForNic(self, nic): + bondings = list(self.getBondingsForNic(nic)) + if bondings: +-- +1.7.1 + diff --git a/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch b/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch new file mode 100644 index 0000000..3fed28a --- /dev/null +++ b/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch @@ -0,0 +1,47 @@ +From d3c91bc345f27a78d17c836f04fe13f5d1be6856 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Sun, 10 Jun 2012 10:40:48 +0300 +Subject: [PATCH 15/17] BZ#830486 - Allow to change network according the diffs from previous state + +We may not receive any information about the bonding device if it is unchanged. +In this case vdsm shouldn't check the bond information of this network. + +Change-Id: I1ece66a351576d5789a8968ccda9e67f423b860c +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5211 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5557 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 15 +++++++++------ + 1 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index fce3e71..ab07da6 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1085,12 +1085,15 @@ def setupNetworks(networks={}, bondings={}, **options): + + d = dict(networkAttrs) + if 'bonding' in d: +- d['nics'] = bondings[d['bonding']]['nics'] +- d['bondingOptions'] = bondings[d['bonding']].get('options', +- None) +- # Don't remove bondX from the bonding list here, +- # because it may be in use for other networks +- handledBonds.add(d['bonding']) ++ # we may not receive any information ++ # about the bonding device if it is unchanged ++ if bondings: ++ d['nics'] = bondings[d['bonding']]['nics'] ++ d['bondingOptions'] = bondings[d['bonding']].get('options', ++ None) ++ # Don't remove bondX from the bonding list here, ++ # because it may be in use for other networks ++ handledBonds.add(d['bonding']) + else: + d['nics'] = [d.pop('nic')] + d['force'] = force +-- +1.7.1 + diff --git a/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch b/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch new file mode 100644 index 0000000..8ca276b --- /dev/null +++ b/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch @@ -0,0 +1,49 @@ +From 990be7c6e07646fb176d90f679baa691b28d279f Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Wed, 13 Jun 2012 16:10:58 +0300 +Subject: [PATCH 16/17] BZ#826467 - Allow to remove bond and attach network to NIC + +Change-Id: I0be3dafe6a0a65a09bf268c8c8c6ee6fd7ba1084 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5323 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5558 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 14 ++++++-------- + 1 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index ab07da6..0df6c8f 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1069,20 +1069,18 @@ def setupNetworks(networks={}, bondings={}, **options): + + logger.debug("Applying...") + try: +- # Remove networks with 'remove' attribute +- for network, networkAttrs in networks.items(): +- if 'remove' in networkAttrs: +- logger.debug("Removing network %r" % network) +- delNetwork(network, configWriter=configWriter, force=force) +- del networks[network] +- +- handledBonds = set() ++ # Remove edited networks and networks with 'remove' attribute + for network, networkAttrs in networks.items(): + if network in _netinfo.networks: ++ logger.debug("Removing network %r" % network) + delNetwork(network, configWriter=configWriter, force=force) ++ if 'remove' in networkAttrs: ++ del networks[network] + else: + networksAdded.append(network) + ++ handledBonds = set() ++ for network, networkAttrs in networks.iteritems(): + d = dict(networkAttrs) + if 'bonding' in d: + # we may not receive any information +-- +1.7.1 + diff --git a/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch b/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch new file mode 100644 index 0000000..454538b --- /dev/null +++ b/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch @@ -0,0 +1,31 @@ +From 0329fec019726434a3313cc2acbd5f23480f365b Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Tue, 19 Jun 2012 17:32:55 +0300 +Subject: [PATCH 17/17] Related to BZ#826873 - Allow to create bond without network + +Change-Id: Ic4bfababbc9b81d921b2e26be9e70d07aee7124e +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5487 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5559 +Tested-by: Federico Simoncelli +--- + vdsm/configNetwork.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 0df6c8f..8b831d6 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -950,7 +950,7 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): + "Setup attached more than one network to nic %s, some of which aren't vlans"%(nic)) + + for bonding, bondingAttrs in bondings.iteritems(): +- networks = bondingAttrs['_networks'] ++ networks = bondingAttrs.get('_networks', {}) + if len(networks) > 1: + for network, networkAttrs in networks.iteritems(): + if not networkAttrs.get('vlan', None): +-- +1.7.1 + diff --git a/0018-BZ-832577-node-can-t-be-approved.patch b/0018-BZ-832577-node-can-t-be-approved.patch new file mode 100644 index 0000000..1702ee5 --- /dev/null +++ b/0018-BZ-832577-node-can-t-be-approved.patch @@ -0,0 +1,38 @@ +From 013b2208f20d1b7ce0b894fc54a41980c0afc62f Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Wed, 20 Jun 2012 15:48:03 -0400 +Subject: [PATCH 18/19] BZ#832577: node can't be approved + +Because of ovirt-node's readonly filesystem, directory creation at runtime has to be handled carefully. +/rhev/data-center used to be created by the vdsm rpm when it is installed. +It's now listed in vdsm.spec as %ghost which means it is *not* laid down by default. +At runtime, it fails to be created because of the read-only filesystem. + +Regression introduced by commit ee1e68d3416d8fd728df75c0a41dd3db48f9138d +Patch provided by: Mike Burns + +Change-Id: I3818661c886118d34620e5308434e57bad92913f +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5567 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm.spec.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index c567e65..3fd404e 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -500,7 +500,7 @@ exit 0 + /lib/systemd/systemd-vdsmd + %{_unitdir}/vdsmd.service + %endif +-%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ ++%dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ + %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks + %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt + %dir %{_libexecdir}/%{vdsm_name} +-- +1.7.10.2 + diff --git a/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch b/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch new file mode 100644 index 0000000..60aa0ea --- /dev/null +++ b/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch @@ -0,0 +1,57 @@ +From 5982cb826a56ee322c7e5d6fbee479ff5b996561 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Sat, 23 Jun 2012 18:46:51 +0300 +Subject: [PATCH 19/19] BZ#824298 fix typo in keyword argument exc_info + +Change-Id: Iff2ba114298bc1223ae4969f5da0eb5a5ce8672e +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5617 +Reviewed-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5628 +--- + vdsm/configNetwork.py | 4 ++-- + vdsm/storage/image.py | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 8b831d6..c535499 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1,4 +1,4 @@ +-# Copyright 2011 Red Hat, Inc. ++# Copyright 2011-2012 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -673,7 +673,7 @@ def removeLibvirtNetwork(network, log=True): + except libvirt.libvirtError: + if log: + logging.debug('failed to remove libvirt network %s', netName, +- exec_info=True) ++ exc_info=True) + + def assertBridgeClean(bridge, vlan, bonding, nics): + brifs = os.listdir('/sys/class/net/%s/brif/' % bridge) +diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py +index 03c94dc..a868568 100644 +--- a/vdsm/storage/image.py ++++ b/vdsm/storage/image.py +@@ -1,5 +1,5 @@ + # +-# Copyright 2009-2011 Red Hat, Inc. ++# Copyright 2009-2012 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -676,7 +676,7 @@ class Image: + raise + except Exception, e: + self.__cleanupMultimove(sdUUID=dstSdUUID, imgList=cleanup_candidates, postZero=postZero) +- self.log.error(e, exec_info=True) ++ self.log.error(e, exc_info=True) + raise se.CopyImageError("image=%s, src domain=%s, dst domain=%s: msg %s" % (imgUUID, srcSdUUID, dstSdUUID, str(e))) + + cleanup_candidates.append(imgUUID) +-- +1.7.10.2 + diff --git a/sources b/sources index 45fc83a..87c07ec 100644 --- a/sources +++ b/sources @@ -1,18 +1 @@ e8ab5eccdea0b4a4da2e812174971393 vdsm-4.10.0.tar.gz -271a4bf061238b0485f588e5da989c6a 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch -1f82b6892731e7be936db6ec695caeef 0002-drop-deployUtil.yumSearch.patch -6e51c8e0bd728f180bccf78ad7e4b761 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch -3eb5b34836f09e3bea17605665ddd238 0004-Iterates-over-delete-candidates-networks-only-once.patch -a34b83250137d392cc88f3cf8bb044ec 0005-options-translation-in-setupNetworks-is-not-relevant.patch -ae0b01009e5cd7bc0bbf168e61948406 0006-Minor-optimization-for-delNetwork.patch -e3d365f2fdae5b48e0bbb7bc9d4792b7 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch -7f7465f7dcd480890195e7dc550e7901 0008-Minor-optimization-for-addNetwork.patch -8f0c154cbaef660dad9c55a1cffa03b9 0009-Use-already-known-iface-in-addNetwork.patch -a02ec209a8763ca8f862f8787786b822 0010-Use-proper-MTU-on-bonding-when-add-network.patch -443f8204853b13663b96adfe8970046c 0011-Add-bridge-on-top-of-VLAN-if-exists.patch -71deacdfda0e338e043614274c5f55e4 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch -36d6ef004846bab4730dfd34a0d50de2 0013-remove-flag-skipLibvirt.patch -3a06c6d62ca1f5bc142c8241e2aa3eb3 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch -1926fd68e471424d3130a894c6bea6f1 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch -87f4dc171371ee591c45838479661355 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch -5221fe91ae85f29d763746b36126393b 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch diff --git a/vdsm.spec b/vdsm.spec index 0f928ac..27e77b1 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 3%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -52,6 +52,8 @@ Patch13: 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch Patch14: 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch Patch15: 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch Patch16: 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch +Patch17: 0018-BZ-832577-node-can-t-be-approved.patch +Patch18: 0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -360,6 +362,8 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch14 -p1 -b .patch14 %patch15 -p1 -b .patch15 %patch16 -p1 -b .patch16 +%patch17 -p1 -b .patch17 +%patch18 -p1 -b .patch18 %build %configure %{?with_hooks:--enable-hooks} @@ -550,7 +554,7 @@ exit 0 /lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service %endif -%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center +%dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} @@ -901,6 +905,10 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3.fc17 +- BZ#832577: node can't be approved +- BZ#824298 fix typo in keyword argument exc_info + * Wed Jun 20 2012 Federico Simoncelli 4.10.0-2.fc17 - deployUtil.yumFind: rename and simplify semantics - drop deployUtil.yumSearch From 2728a144b912cf205e4ad9b5dcc9811b53b9191c Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Fri, 29 Jun 2012 00:38:00 +0200 Subject: [PATCH 018/126] update to vdsm-4.10.0-4 - deployUtil: use os.uname instead of /bin/uname - deployUtil: slightly saner kernel version comparison - BZ#835784 - Allow to create a network on top of existing bond in additional to create a new bond and network - BZ#833119 - Allow to create VLANed network on top of existing bond - BZ#833803 - Avoid bond breaking after network detach - Handle bond properly if connectivity check fail. - BZ#806555 having /etc/ovirt-node-* means it is a node Signed-off-by: Federico Simoncelli --- ...il-use-os.uname-instead-of-bin-uname.patch | 63 +++++++++ ...htly-saner-kernel-version-comparison.patch | 125 ++++++++++++++++++ ...to-create-a-network-on-top-of-existi.patch | 39 ++++++ ...to-create-VLANed-network-on-top-of-e.patch | 77 +++++++++++ ...d-bond-breaking-after-network-detach.patch | 72 ++++++++++ ...-properly-if-connectivity-check-fail.patch | 70 ++++++++++ ...ng-etc-ovirt-node-means-it-is-a-node.patch | 38 ++++++ vdsm.spec | 26 +++- 8 files changed, 509 insertions(+), 1 deletion(-) create mode 100644 0020-deployUtil-use-os.uname-instead-of-bin-uname.patch create mode 100644 0021-deployUtil-slightly-saner-kernel-version-comparison.patch create mode 100644 0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch create mode 100644 0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch create mode 100644 0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch create mode 100644 0025-Handle-bond-properly-if-connectivity-check-fail.patch create mode 100644 0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch diff --git a/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch b/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch new file mode 100644 index 0000000..02e9d3d --- /dev/null +++ b/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch @@ -0,0 +1,63 @@ +From 1be9207d91f1f3df02161356f0057c24b6a230c3 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 19 Jun 2012 00:52:25 +0300 +Subject: [PATCH 20/25] deployUtil: use os.uname instead of /bin/uname + +simpler, quicker, and less error-prone. + +Change-Id: I7abc1f010bbf15b39d7590c4b55d1835c645a87f +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5636 +Tested-by: Douglas Schilling Landgraf +Reviewed-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5749 +--- + configure.ac | 1 - + vdsm_reg/deployUtil.py.in | 11 ++--------- + 2 files changed, 2 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f3a609f..7b829f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -177,7 +177,6 @@ AC_PATH_PROG([TC_PATH], [tc], [/sbin/tc]) + AC_PATH_PROG([TUNE2FS_PATH], [tune2fs], [/sbin/tune2fs]) + AC_PATH_PROG([UDEVADM_PATH], [udevadm], [/sbin/udevadm]) + AC_PATH_PROG([UMOUNT_PATH], [umount], [/bin/umount]) +-AC_PATH_PROG([UNAME_PATH], [uname], [/bin/uname]) + AC_PATH_PROG([UNPERSIST_PATH], [unpersist], [/usr/sbin/unpersist]) + AC_PATH_PROG([VCONFIG_PATH], [vconfig], [/sbin/vconfig]) + AC_PATH_PROG([WGET_PATH], [wget], [/usr/bin/wget]) +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 2f240cc..7586aca 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -72,7 +72,6 @@ EX_RPM = '@RPM_PATH@' + EX_SED = '@SED_PATH@' + EX_SERVICE = '@SERVICE_PATH@' + EX_SYSTEMCTL = '@SYSTEMCTL_PATH@' +-EX_UNAME = '@UNAME_PATH@' + EX_YUM = '@YUM_PATH@' + + # Other constants +@@ -400,15 +399,9 @@ def getOSVersion(): + return "Unknown OS" + + def getKernelVersion(): +- """ +- Return current kernel release. +- """ +- strReturn = '0' +- out, err, rc = _logExec([EX_UNAME, "-r"]) +- if not rc: +- strReturn = out ++ """Return current kernel version adn release.""" + +- return strReturn ++ return os.uname()[2] + + def updateKernelArgs(arg): + """ +-- +1.7.10.2 + diff --git a/0021-deployUtil-slightly-saner-kernel-version-comparison.patch b/0021-deployUtil-slightly-saner-kernel-version-comparison.patch new file mode 100644 index 0000000..29fdb43 --- /dev/null +++ b/0021-deployUtil-slightly-saner-kernel-version-comparison.patch @@ -0,0 +1,125 @@ +From 61672ca8a0d5140aa09ae79c5c0f7b962495a94e Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 19 Jun 2012 02:00:14 +0300 +Subject: [PATCH 21/25] deployUtil: slightly saner kernel version comparison + +Change-Id: If2348ce464943e873e31eb61d0aaaa8b936679b2 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5637 +Reviewed-by: Douglas Schilling Landgraf +Tested-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5750 +--- + vds_bootstrap/vds_bootstrap.py | 33 ++++++++------------------------- + vdsm_reg/deployUtil.py.in | 16 +++++++++++++--- + 2 files changed, 21 insertions(+), 28 deletions(-) + +diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py +index 9801459..5ddc950 100755 +--- a/vds_bootstrap/vds_bootstrap.py ++++ b/vds_bootstrap/vds_bootstrap.py +@@ -48,7 +48,6 @@ import shutil + import logging + import logging.config + import random +-import re + import ConfigParser + import socket + import tempfile +@@ -81,14 +80,12 @@ fedorabased = deployUtil.versionCompare(deployUtil.getOSVersion(), "16") >= 0 + if rhel6based: + VDSM_NAME = "vdsm" + VDSM_MIN_VER = "4.9" +- KERNEL_VER = "2.6.32-.*.el6" +- KERNEL_MIN_VER = 150 ++ KERNEL_MIN_VR = ("2.6.32", "150") + MINIMAL_SUPPORTED_PLATFORM = "6.0" + else: + VDSM_NAME = "vdsm22" + VDSM_MIN_VER = "4.5" +- KERNEL_VER = "2.6.18-.*.el5" +- KERNEL_MIN_VER = 159 ++ KERNEL_MIN_VR = ("2.6.18", "159") + MINIMAL_SUPPORTED_PLATFORM = "5.5" + + # Required packages +@@ -300,7 +297,6 @@ class Deploy: + """ + Check the compatibility of OS and kernel + """ +- kernel_ver = None + os_status = "FAIL" + kernel_status = "FAIL" + os_message = "Unsupported platform version" +@@ -329,34 +325,21 @@ class Deploy: + os_status = "OK" + + if self.rc: +- res = deployUtil.getKernelVersion() +- try: +- kernel_ver = res.split()[0] +- if re.match(KERNEL_VER, kernel_ver): +- kernel_ver = int(kernel_ver.split('-')[1].split('.')[0]) +- else: +- kernel_ver = 0 +- except: +- kernel_ver = 0 +- +- if fedorabased: +- kernel_status = "OK" +- kernel_message = "Skipped kernel version check" +- elif kernel_ver >= KERNEL_MIN_VER: ++ kernel_vr = deployUtil.getKernelVR() ++ if deployUtil.compareVR(kernel_vr, KERNEL_MIN_VR) >= 0: + kernel_status = "OK" +- kernel_message = "Supported kernel version: " + str(kernel_ver) ++ kernel_message = "Supported kernel version: " + str(kernel_vr) + else: + kernel_status = "FAIL" + kernel_message = ( +- "Unsupported kernel version: " + str(kernel_ver) + +- ". Minimal supported version: " + str(KERNEL_MIN_VER) ++ "Unsupported kernel version: " + str(kernel_vr) + ++ ". Minimal supported version: " + str(KERNEL_MIN_VR) + ) + self.rc = False + + if os_name is not None: + self._xmlOutput('OS', os_status, "type", os_name, os_message) +- if kernel_ver is not None: +- self._xmlOutput('KERNEL', kernel_status, "version", kernel_ver, kernel_message) ++ self._xmlOutput('KERNEL', kernel_status, "version", '-'.join(kernel_vr), kernel_message) + + return self.rc + +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 7586aca..6bd4b3d 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -398,10 +398,20 @@ def getOSVersion(): + logging.error('failed to parse os release from `%s`.', s, exc_info=True) + return "Unknown OS" + +-def getKernelVersion(): +- """Return current kernel version adn release.""" ++def getKernelVR(): ++ """Return current kernel version and release.""" + +- return os.uname()[2] ++ components = os.uname()[2].split('-', 1) ++ if len(components) == 2: ++ return components ++ else: ++ return components[0], '0' ++ ++def compareVR(vr1, vr2): ++ import rpmUtils.miscutils ++ ++ return rpmUtils.miscutils.compareEVR((0, vr1[0], vr1[1]), ++ (0, vr2[0], vr2[1])) + + def updateKernelArgs(arg): + """ +-- +1.7.10.2 + diff --git a/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch b/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch new file mode 100644 index 0000000..61d75a7 --- /dev/null +++ b/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch @@ -0,0 +1,39 @@ +From 44a2eba8d6c7a7ea9e78454388b859304398ec8d Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Wed, 27 Jun 2012 10:37:28 +0300 +Subject: [PATCH 22/25] BZ#835784 - Allow to create a network on top of + existing bond in additional to create a new bond and + network + +If we already have a bond0 with (eth1, eth2) and now we want to create +network "bridge_woVlan" on top of it and in additional we want to create +a new bond1 with (eth3, eth4) and create a network "bridge_woVlan_2" on +top of bond 1. +This patch will allow us to do it in the same setupNetwork command. + +Change-Id: I67d24d656934ea9dcb0a8209c6a375e19c23f82b +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5737 +Reviewed-on: http://gerrit.ovirt.org/5759 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm/configNetwork.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index c535499..d4e1177 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1085,7 +1085,7 @@ def setupNetworks(networks={}, bondings={}, **options): + if 'bonding' in d: + # we may not receive any information + # about the bonding device if it is unchanged +- if bondings: ++ if bondings.get(d['bonding']): + d['nics'] = bondings[d['bonding']]['nics'] + d['bondingOptions'] = bondings[d['bonding']].get('options', + None) +-- +1.7.10.2 + diff --git a/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch b/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch new file mode 100644 index 0000000..0591e56 --- /dev/null +++ b/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch @@ -0,0 +1,77 @@ +From 16d2eff4fc41a2a8c87923ed9d5d97cca3037144 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Wed, 20 Jun 2012 16:36:08 +0300 +Subject: [PATCH 23/25] BZ#833119 - Allow to create VLANed network on top of + existing bond + +The (relatively) new setupNetwork verb allows to specify a network on +top of an existing bonding device. The nics of this bonds are taken +implictly from current host configuration. + +Change-Id: If45aed68847f5a79380c629a70290a2c687cbd30 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5456 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5760 +--- + vdsm/configNetwork.py | 23 ++++++++++++++++------- + 1 file changed, 16 insertions(+), 7 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index d4e1177..8c4d36d 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -238,7 +238,8 @@ class ConfigWriter(object): + s += 'NM_CONTROLLED=no\n' + BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', + 'force', 'blockingdhcp', +- 'connectivityCheck', 'connectivityTimeout'] ++ 'connectivityCheck', 'connectivityTimeout', ++ 'implicitBonding'] + for k in set(kwargs.keys()).difference(set(BLACKLIST)): + if re.match('^[a-zA-Z_]\w*$', k): + s += '%s=%s\n' % (k.upper(), pipes.quote(kwargs[k])) +@@ -491,10 +492,17 @@ def validateVlanId(vlan): + raise ConfigNetworkError(ne.ERR_BAD_VLAN, 'vlan id must be a number') + + +-def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask, gateway, +- bondingOptions, bridged=True): +- if (vlan or bonding) and not nics: +- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'vlan/bonding definition requires nics. got: %r'%(nics,)) ++def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, ++ netmask, gateway, bondingOptions, bridged=True, ++ implicitBonding=False): ++ # The (relatively) new setupNetwork verb allows to specify a network on ++ # top of an existing bonding device. The nics of this bonds are taken ++ # implictly from current host configuration ++ if bonding and implicitBonding: ++ pass ++ elif (vlan or bonding) and not nics: ++ raise ConfigNetworkError(ne.ERR_BAD_PARAMS, ++ 'vlan/bonding definition requires nics. got: %r' % (nics,)) + + # Check bridge + if bridged: +@@ -583,7 +591,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + _addNetworkValidation(_netinfo, bridge=network if bridged else None, + vlan=vlan, bonding=bonding, nics=nics, ipaddr=ipaddr, + netmask=netmask, gateway=gateway, bondingOptions=bondingOptions, +- bridged=bridged) ++ bridged=bridged, **options) + + logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," + " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", +@@ -1097,7 +1105,8 @@ def setupNetworks(networks={}, bondings={}, **options): + d['force'] = force + + logger.debug("Adding network %r" % network) +- addNetwork(network, configWriter=configWriter, **d) ++ addNetwork(network, configWriter=configWriter, ++ implicitBonding=True, **d) + + # Do not handle a bonding device twice. + # We already handled it before during addNetwork. +-- +1.7.10.2 + diff --git a/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch b/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch new file mode 100644 index 0000000..ed2d15f --- /dev/null +++ b/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch @@ -0,0 +1,72 @@ +From 66cf76b0d2dc362bb698df2b0ec491a54dc55d5c Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 25 Jun 2012 17:46:43 +0300 +Subject: [PATCH 24/25] BZ#833803 - Avoid bond breaking after network detach + +The (relatively) new setupNetwork verb allows to remove a network +defined on top of an bonding device without break the bond itself. + +Change-Id: Idebd0cd0a9d54ceb3714a8cd82fe042ed2c05f2e +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5711 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5761 +--- + vdsm/configNetwork.py | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 8c4d36d..96dd452 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -734,7 +734,7 @@ def listNetworks(): + print "Bondings:", _netinfo.bondings.keys() + + def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, +- configWriter=None, **options): ++ configWriter=None, implicitBonding=True, **options): + _netinfo = NetInfo() + + validateBridgeName(network) +@@ -786,16 +786,19 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + stderr=subprocess.PIPE) + configWriter.removeVlan(vlan, bonding or nics[0]) + +- if bonding: +- if not bridged or not bondingOtherUsers(network, vlan, bonding): +- ifdown(bonding) +- configWriter.removeBonding(bonding) ++ # The (relatively) new setupNetwork verb allows to remove a network ++ # defined on top of an bonding device without break the bond itself. ++ if implicitBonding: ++ if bonding: ++ if not bridged or not bondingOtherUsers(network, vlan, bonding): ++ ifdown(bonding) ++ configWriter.removeBonding(bonding) + +- for nic in nics: +- nicUsers = nicOtherUsers(network, vlan, bonding, nic) +- if not nicUsers: +- ifdown(nic) +- configWriter.removeNic(nic) ++ for nic in nics: ++ nicUsers = nicOtherUsers(network, vlan, bonding, nic) ++ if not nicUsers: ++ ifdown(nic) ++ configWriter.removeNic(nic) + + def clientSeen(timeout): + start = time.time() +@@ -1081,7 +1084,8 @@ def setupNetworks(networks={}, bondings={}, **options): + for network, networkAttrs in networks.items(): + if network in _netinfo.networks: + logger.debug("Removing network %r" % network) +- delNetwork(network, configWriter=configWriter, force=force) ++ delNetwork(network, configWriter=configWriter, force=force, ++ implicitBonding=False) + if 'remove' in networkAttrs: + del networks[network] + else: +-- +1.7.10.2 + diff --git a/0025-Handle-bond-properly-if-connectivity-check-fail.patch b/0025-Handle-bond-properly-if-connectivity-check-fail.patch new file mode 100644 index 0000000..fe27672 --- /dev/null +++ b/0025-Handle-bond-properly-if-connectivity-check-fail.patch @@ -0,0 +1,70 @@ +From 31eac2c98a865a94803785fa660b612d5231c5c4 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Tue, 26 Jun 2012 15:41:37 +0300 +Subject: [PATCH 25/25] Handle bond properly if connectivity check fail. + +We need to be able remove a new added network if connectivity check fail. +If a new network needs to be created on top of existing bond, +we will need to keep the bond on rollback flow, +else we will break the new created bond + +Change-Id: I4bb04f6f3b8d5cdbfd9af8904570af071af6d4f4 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5712 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5762 +--- + vdsm/configNetwork.py | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 96dd452..af6c19d 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1065,7 +1065,13 @@ def setupNetworks(networks={}, bondings={}, **options): + try: + _netinfo = NetInfo() + configWriter = ConfigWriter() +- networksAdded = [] ++ networksAdded = set() ++ # keep set netsWithNewBonds to be able remove ++ # a new added network if connectivity check fail. ++ # If a new network needs to be created on top of existing bond, ++ # we will need to keep the bond on rollback flow, ++ # else we will break the new created bond. ++ netsWithNewBonds = set() + + logger.debug("Setting up network according to configuration: " + "networks:%r, bondings:%r, options:%r" % (networks, +@@ -1089,7 +1095,7 @@ def setupNetworks(networks={}, bondings={}, **options): + if 'remove' in networkAttrs: + del networks[network] + else: +- networksAdded.append(network) ++ networksAdded.add(network) + + handledBonds = set() + for network, networkAttrs in networks.iteritems(): +@@ -1104,6 +1110,9 @@ def setupNetworks(networks={}, bondings={}, **options): + # Don't remove bondX from the bonding list here, + # because it may be in use for other networks + handledBonds.add(d['bonding']) ++ # we create a new bond ++ if network in networksAdded: ++ netsWithNewBonds.add(network) + else: + d['nics'] = [d.pop('nic')] + d['force'] = force +@@ -1130,7 +1139,8 @@ def setupNetworks(networks={}, bondings={}, **options): + CONNECTIVITY_TIMEOUT_DEFAULT))): + logger.info('Connectivity check failed, rolling back') + for network in networksAdded: +- delNetwork(network, force=True) ++ delNetwork(network, force=True, ++ implicitBonding=network in netsWithNewBonds) + raise ConfigNetworkError(ne.ERR_LOST_CONNECTION, + 'connectivity check failed') + except: +-- +1.7.10.2 + diff --git a/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch b/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch new file mode 100644 index 0000000..62d3f85 --- /dev/null +++ b/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch @@ -0,0 +1,38 @@ +From b1a0e712b394496544bbb62f9466a8aa75f4c669 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 26 Jun 2012 15:43:33 +0300 +Subject: [PATCH 26/26] BZ#806555 having /etc/ovirt-node-* means it is a node + +Not vice versa. + +This patch fixes http://gerrit.ovirt.org/3055 . + +Change-Id: Id13c5621a2ff1c8bdcfc1e40a27951efb0d75cfe +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5713 +Reviewed-by: Michael Burns +Reviewed-by: Douglas Schilling Landgraf +Tested-by: Ofer Schreiber +Reviewed-on: http://gerrit.ovirt.org/5768 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/caps.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/caps.py b/vdsm/caps.py +index 5950ee9..5c9fa78 100644 +--- a/vdsm/caps.py ++++ b/vdsm/caps.py +@@ -156,7 +156,7 @@ def _getIscsiIniName(): + def getos(): + if os.path.exists('/etc/rhev-hypervisor-release'): + return OSName.RHEVH +- elif len(glob.glob('/etc/ovirt-node-*-release')) == 0: ++ elif glob.glob('/etc/ovirt-node-*-release'): + return OSName.OVIRT + elif os.path.exists('/etc/fedora-release'): + return OSName.FEDORA +-- +1.7.10.2 + diff --git a/vdsm.spec b/vdsm.spec index 27e77b1..31cb3c3 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 3%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -54,6 +54,13 @@ Patch15: 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch Patch16: 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch Patch17: 0018-BZ-832577-node-can-t-be-approved.patch Patch18: 0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch +Patch19: 0020-deployUtil-use-os.uname-instead-of-bin-uname.patch +Patch20: 0021-deployUtil-slightly-saner-kernel-version-comparison.patch +Patch21: 0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch +Patch22: 0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch +Patch23: 0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch +Patch24: 0025-Handle-bond-properly-if-connectivity-check-fail.patch +Patch25: 0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -364,6 +371,13 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch16 -p1 -b .patch16 %patch17 -p1 -b .patch17 %patch18 -p1 -b .patch18 +%patch19 -p1 -b .patch19 +%patch20 -p1 -b .patch20 +%patch21 -p1 -b .patch21 +%patch22 -p1 -b .patch22 +%patch23 -p1 -b .patch23 +%patch24 -p1 -b .patch24 +%patch25 -p1 -b .patch25 %build %configure %{?with_hooks:--enable-hooks} @@ -905,6 +919,16 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4.fc17 +- deployUtil: use os.uname instead of /bin/uname +- deployUtil: slightly saner kernel version comparison +- BZ#835784 - Allow to create a network on top of existing bond in additional + to create a new bond and network +- BZ#833119 - Allow to create VLANed network on top of existing bond +- BZ#833803 - Avoid bond breaking after network detach +- Handle bond properly if connectivity check fail. +- BZ#806555 having /etc/ovirt-node-* means it is a node + * Tue Jun 26 2012 Federico Simoncelli 4.10.0-3.fc17 - BZ#832577: node can't be approved - BZ#824298 fix typo in keyword argument exc_info From 6581ca8abd70837a0020e61439103120e59f56fd Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 17 Jul 2012 12:52:19 +0200 Subject: [PATCH 019/126] update to vdsm-4.10.0-5 - configNet: atomicBackup: remove new files upon restore - configNet: clear up atomicBackup arg - Remove redundant 'explicitBonding' parameter from setupNetworks - BZ#837054 - Do not detach network from the bond during bond resize - BZ#836954 - Allow to break bond and create a new network on its interface in single action. - BZ#837443: remove bridge before add VDSM bridge - BZ#837443: removeVlan() drop/remove interface - configNetwork: fix NetInfo call - BZ#837443: replace the netinfo import - BZ#837443: removeBridge() drop/remove interface - ovirt_functions: fix elif statement - BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option passed - BZ#832199: move selinux from init to spec - bump libvirt version to fix readonly lease unsupported issue Signed-off-by: Federico Simoncelli --- ...sion-to-fix-readonly-lease-unsupport.patch | 32 +++ ...32199-move-selinux-from-init-to-spec.patch | 89 ++++++++ ...tworkValidation-do-not-explode-if-ST.patch | 34 +++ 0030-ovirt_functions-fix-elif-statement.patch | 39 ++++ ...3-removeBridge-drop-remove-interface.patch | 44 ++++ ...BZ-837443-replace-the-netinfo-import.patch | 199 ++++++++++++++++++ 0033-configNetwork-fix-NetInfo-call.patch | 32 +++ ...443-removeVlan-drop-remove-interface.patch | 55 +++++ ...remove-bridge-before-add-VDSM-bridge.patch | 64 ++++++ ...to-break-bond-and-create-a-new-netwo.patch | 47 +++++ ...-detach-network-from-the-bond-during.patch | 47 +++++ ...-explicitBonding-parameter-from-setu.patch | 115 ++++++++++ ...-configNet-clear-up-atomicBackup-arg.patch | 41 ++++ ...Backup-remove-new-files-upon-restore.patch | 51 +++++ vdsm.spec | 71 ++++++- 15 files changed, 957 insertions(+), 3 deletions(-) create mode 100644 0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch create mode 100644 0028-BZ-832199-move-selinux-from-init-to-spec.patch create mode 100644 0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch create mode 100644 0030-ovirt_functions-fix-elif-statement.patch create mode 100644 0031-BZ-837443-removeBridge-drop-remove-interface.patch create mode 100644 0032-BZ-837443-replace-the-netinfo-import.patch create mode 100644 0033-configNetwork-fix-NetInfo-call.patch create mode 100644 0034-BZ-837443-removeVlan-drop-remove-interface.patch create mode 100644 0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch create mode 100644 0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch create mode 100644 0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch create mode 100644 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch create mode 100644 0039-configNet-clear-up-atomicBackup-arg.patch create mode 100644 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch diff --git a/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch b/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch new file mode 100644 index 0000000..17e09ab --- /dev/null +++ b/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch @@ -0,0 +1,32 @@ +From ada1caae80ef463d511395ccbd0cb773b3e8b8b6 Mon Sep 17 00:00:00 2001 +From: lvroyce +Date: Fri, 29 Jun 2012 13:13:52 +0800 +Subject: [PATCH 27/40] bump libvirt version to fix readonly lease unsupported + issue + +Change-Id: I116f3ce07fff8075902a862e0259198232efd2f4 +Signed-off-by: Royce Lv +Reviewed-on: http://gerrit.ovirt.org/5787 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm.spec.in | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 3fd404e..88fe373 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -63,7 +63,8 @@ Requires: e2fsprogs >= 1.41.12-11 + Requires: python >= 2.7.3 + Requires: qemu-kvm >= 2:0.15.0-4 + Requires: qemu-img >= 2:0.15.0-4 +-Requires: libvirt >= 0.9.10 ++#readonly lease ignored by default on 0.9.11.4-3 ++Requires: libvirt >= 0.9.11.4-3 + Requires: libvirt-python, libvirt-lock-sanlock + Requires: iscsi-initiator-utils >= 6.2.0.872-14 + Requires: device-mapper-multipath >= 0.4.9-18 +-- +1.7.7.6 + diff --git a/0028-BZ-832199-move-selinux-from-init-to-spec.patch b/0028-BZ-832199-move-selinux-from-init-to-spec.patch new file mode 100644 index 0000000..c133b68 --- /dev/null +++ b/0028-BZ-832199-move-selinux-from-init-to-spec.patch @@ -0,0 +1,89 @@ +From 16ad84b47fac0e325073e1b08e99a364c7850699 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Fri, 6 Jul 2012 09:40:17 -0400 +Subject: [PATCH 28/40] BZ#832199: move selinux from init to spec + +To reduce the time during the init, transferring all the selinux +set to spec instead use it during the vdsm init. + +Change-Id: Id515ddb96cbfb4f3a936336b3f7e261658df662a +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5614 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 22 +++++++++++++++++++++- + vdsm/vdsmd.init.in | 8 -------- + 2 files changed, 21 insertions(+), 9 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 88fe373..6be7da4 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -78,6 +78,7 @@ Requires: sos + Requires: tree + Requires: dosfstools + Requires: policycoreutils-python ++Requires(pre,preun): policycoreutils-python + Requires: libselinux-python + Requires: kernel >= 2.6.32-198 + Requires: %{name}-python = %{version}-%{release} +@@ -375,6 +376,23 @@ rm -rf %{buildroot} + /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} + /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} + ++# vdsm makes extensive use of nfs-exported images ++# The next lines will collect the default selinux behaviour for the booleans ++virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2) ++virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2) ++ ++if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then ++ /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF ++virt_use_nfs=1 ++virt_use_sanlock=1 ++_EOF ++fi ++ ++if /usr/sbin/selinuxenabled; then ++ /usr/sbin/setsebool virt_use_nfs on ++ /usr/sbin/setsebool virt_use_sanlock on ++fi ++ + %post + # update the vdsm "secret" password for libvirt + if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then +@@ -415,10 +433,12 @@ then + + /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF + virt_use_nfs=0 ++virt_use_sanlock=0 + _EOF + +- if selinuxenabled; then ++ if /usr/sbin/selinuxenabled; then + /usr/sbin/setsebool virt_use_nfs off ++ /usr/sbin/setsebool virt_use_sanlock off + fi + + /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh +diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in +index ac3bd08..dd6f3c6 100755 +--- a/vdsm/vdsmd.init.in ++++ b/vdsm/vdsmd.init.in +@@ -410,14 +410,6 @@ EOF + + ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr" + +- # vdsm makes extensive use of nfs-exported images +- /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF +-virt_use_nfs=1 +-virt_use_sanlock=1 +-_EOF +- /usr/sbin/setsebool virt_use_nfs on +- /usr/sbin/setsebool virt_use_sanlock on +- + /sbin/initctl restart libvirtd 2>/dev/null || : + } + +-- +1.7.7.6 + diff --git a/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch b/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch new file mode 100644 index 0000000..41d95ee --- /dev/null +++ b/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch @@ -0,0 +1,34 @@ +From 34f080dd8b7456248ed2e2693030cf736e097606 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 3 Jul 2012 10:53:37 +0300 +Subject: [PATCH 29/40] BZ#838097 _addNetworkValidation: do not explode if + STP/DNS1 option passed + +http://gerrit.ovirt.org/5456 has started passing all optional parameters +to _addNetworkValidation, but no one is expecting them there. + +Change-Id: I071e6a7a53279c24d45ebec3858d9b0c0d6294ae +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5885 +Reviewed-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/6017 +--- + vdsm/configNetwork.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index af6c19d..961dd33 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -494,7 +494,7 @@ def validateVlanId(vlan): + + def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, + netmask, gateway, bondingOptions, bridged=True, +- implicitBonding=False): ++ implicitBonding=False, **options): + # The (relatively) new setupNetwork verb allows to specify a network on + # top of an existing bonding device. The nics of this bonds are taken + # implictly from current host configuration +-- +1.7.7.6 + diff --git a/0030-ovirt_functions-fix-elif-statement.patch b/0030-ovirt_functions-fix-elif-statement.patch new file mode 100644 index 0000000..4cc9980 --- /dev/null +++ b/0030-ovirt_functions-fix-elif-statement.patch @@ -0,0 +1,39 @@ +From fe88d1834032776638fc41c9fc96123923e1432a Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 9 Jul 2012 10:49:24 -0400 +Subject: [PATCH 30/40] ovirt_functions: fix elif statement + +Identify correctly the ovirt Node and fix the error message from vdsm-reg logs: + +[: /etc/ovirt-node-image-release: binary operator expected + +Change-Id: I4eae7e64361d148d60c50dbacd273de7a2490be2 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/6072 +Reviewed-by: Dan Kenigsberg +--- + vdsm/ovirt_functions.sh | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/vdsm/ovirt_functions.sh b/vdsm/ovirt_functions.sh +index 84cf686..b1e3ef2 100644 +--- a/vdsm/ovirt_functions.sh ++++ b/vdsm/ovirt_functions.sh +@@ -9,10 +9,12 @@ + # + + function isOvirt() { ++ for f in /etc/ovirt-node-*-release; do ++ [ -f "$f" ] && return 0 ++ done ++ + if [ -f /etc/rhev-hypervisor-release ]; then + return 0 +- elif [ -f /etc/ovirt-node-*-release ]; then +- return 0 + else + return 1 + fi +-- +1.7.7.6 + diff --git a/0031-BZ-837443-removeBridge-drop-remove-interface.patch b/0031-BZ-837443-removeBridge-drop-remove-interface.patch new file mode 100644 index 0000000..df21615 --- /dev/null +++ b/0031-BZ-837443-removeBridge-drop-remove-interface.patch @@ -0,0 +1,44 @@ +From f1792cfb33bff5ef5c9a8c1f938ff92b00d192a8 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 9 Jul 2012 17:20:35 -0400 +Subject: [PATCH 31/40] BZ#837443: removeBridge() drop/remove interface + +Move ifdown() and brctl delbr to removeBridge(). We need a generic +function to be called multiple times. For example, removing a bridge listed +or not listed in libvirt database. + +Change-Id: Iea798b2ddf6413b58dbfc3d8d11dc4bf54c592fc +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/5914 +Reviewed-by: Igor Lvovsky +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/6204 +--- + vdsm/configNetwork.py | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 961dd33..51471bc 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -321,6 +321,8 @@ class ConfigWriter(object): + self._removeFile(self.NET_CONF_PREF + bonding) + + def removeBridge(self, bridge): ++ ifdown(bridge) ++ subprocess.call([constants.EXT_BRCTL, 'delbr', bridge]) + self._backup(self.NET_CONF_PREF + bridge) + self._removeFile(self.NET_CONF_PREF + bridge) + +@@ -775,8 +777,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + "delNetwork: bridge %s still exists" % network) + + if network and bridged: +- ifdown(network) +- subprocess.call([constants.EXT_BRCTL, 'delbr', network]) + configWriter.removeBridge(network) + + if vlan: +-- +1.7.7.6 + diff --git a/0032-BZ-837443-replace-the-netinfo-import.patch b/0032-BZ-837443-replace-the-netinfo-import.patch new file mode 100644 index 0000000..77acbcb --- /dev/null +++ b/0032-BZ-837443-replace-the-netinfo-import.patch @@ -0,0 +1,199 @@ +From a2e8aa85f270d5bd2390b07ac82710fa398c755b Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Thu, 12 Jul 2012 17:01:22 -0400 +Subject: [PATCH 32/40] BZ#837443: replace the netinfo import + +We will use functions like netinfo.bridges() to +verify if there is any bridge listed in the system +but not in the libvirt database. + +Change-Id: I76ac6f21267f9e2c26f032dbe0334aeaa59aa030 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/6205 +Reviewed-by: Dan Kenigsberg +--- + vdsm/configNetwork.py | 42 +++++++++++++++++++++--------------------- + 1 files changed, 21 insertions(+), 21 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 51471bc..bddf71c 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -33,7 +33,7 @@ from vdsm import constants + from vdsm import utils + import neterrors as ne + from vdsm import define +-from vdsm.netinfo import NetInfo, NET_CONF_DIR, NET_CONF_BACK_DIR, LIBVIRT_NET_PREFIX ++from vdsm import netinfo + from vdsm import libvirtconnection + + CONNECTIVITY_TIMEOUT_DEFAULT = 4 +@@ -84,7 +84,7 @@ def ifup(iface): + + def ifaceUsers(iface): + "Returns a list of entities using the interface" +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + users = set() + for n, ndict in _netinfo.networks.iteritems(): + if ndict['bridged'] and iface in ndict['ports']: +@@ -155,7 +155,7 @@ def nicSort(nics): + return [x + z for x, y, z in sorted(nics_list)] + + class ConfigWriter(object): +- NET_CONF_PREF = NET_CONF_DIR + 'ifcfg-' ++ NET_CONF_PREF = netinfo.NET_CONF_DIR + 'ifcfg-' + CONFFILE_HEADER = '# automatically generated by vdsm' + DELETED_HEADER = '# original file did not exist' + +@@ -168,7 +168,7 @@ class ConfigWriter(object): + + def _atomicBackup(self, filename): + """Backs up configuration to memory, for a later rollback in case of error.""" +- confFile = os.path.join(NET_CONF_DIR, filename) ++ confFile = os.path.join(netinfo.NET_CONF_DIR, filename) + if confFile not in self._backups: + try: + self._backups[confFile] = open(confFile).read() +@@ -201,7 +201,7 @@ class ConfigWriter(object): + logging.debug("unmounted %s using ovirt" % filename) + + (dummy, basename) = os.path.split(filename) +- backup = os.path.join(NET_CONF_BACK_DIR, basename) ++ backup = os.path.join(netinfo.NET_CONF_BACK_DIR, basename) + if os.path.exists(backup): + # original copy already backed up + return +@@ -209,9 +209,9 @@ class ConfigWriter(object): + vdsm_uid = pwd.getpwnam('vdsm').pw_uid + + # make directory (if it doesn't exist) and assign it to vdsm +- if not os.path.exists(NET_CONF_BACK_DIR): +- os.mkdir(NET_CONF_BACK_DIR) +- os.chown(NET_CONF_BACK_DIR, vdsm_uid, 0) ++ if not os.path.exists(netinfo.NET_CONF_BACK_DIR): ++ os.mkdir(netinfo.NET_CONF_BACK_DIR) ++ os.chown(netinfo.NET_CONF_BACK_DIR, vdsm_uid, 0) + + if os.path.exists(filename): + shutil.copy2(filename, backup) +@@ -285,7 +285,7 @@ class ConfigWriter(object): + "Based on addNetwork" + conffile = self.NET_CONF_PREF + nic + self._backup(conffile) +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + hwaddr = _netinfo.nics[nic].get('permhwaddr') or \ + _netinfo.nics[nic]['hwaddr'] + with open(conffile, 'w') as f: +@@ -413,7 +413,7 @@ class ConfigWriter(object): + Or added a new value, + also set the bridge to the higher value if its under vlans or bond + """ +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + cf = self.NET_CONF_PREF + bridge + currmtu = self._getConfigValue(cf, 'MTU') + if currmtu is None: +@@ -581,7 +581,7 @@ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, + def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask=None, mtu=None, + gateway=None, force=False, configWriter=None, bondingOptions=None, bridged=True, **options): + nics = nics or () +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + bridged = utils.tobool(bridged) + + if mtu: +@@ -659,7 +659,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask + + def createLibvirtNetwork(network, bridged=True, iface=None): + conn = libvirtconnection.get() +- netName = LIBVIRT_NET_PREFIX + network ++ netName = netinfo.LIBVIRT_NET_PREFIX + network + if bridged: + netXml = '''%s + ''' % (escape(netName), escape(network)) +@@ -672,7 +672,7 @@ def createLibvirtNetwork(network, bridged=True, iface=None): + net.setAutostart(1) + + def removeLibvirtNetwork(network, log=True): +- netName = LIBVIRT_NET_PREFIX + network ++ netName = netinfo.LIBVIRT_NET_PREFIX + network + conn = libvirtconnection.get() + try: + net = conn.networkLookupByName(netName) +@@ -705,7 +705,7 @@ def assertBridgeClean(bridge, vlan, bonding, nics): + raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'bridge %s has interfaces %s connected' % (bridge, brifs)) + + def showNetwork(network): +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + if network not in _netinfo.networks: + print "Network %r doesn't exist" % network + return +@@ -729,7 +729,7 @@ def showNetwork(network): + print "vlan=%s, bonding=%s, nics=%s" % (vlan, bonding, nics) + + def listNetworks(): +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + print "Networks:", _netinfo.networks.keys() + print "Vlans:", _netinfo.vlans.keys() + print "Nics:", _netinfo.nics.keys() +@@ -737,7 +737,7 @@ def listNetworks(): + + def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + configWriter=None, implicitBonding=True, **options): +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + + validateBridgeName(network) + +@@ -772,7 +772,7 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + removeLibvirtNetwork(network, log=False) + # We need to gather NetInfo again to refresh networks info from libvirt. + # The deleted bridge should never be up at this stage. +- if network in NetInfo().networks: ++ if network in netinfo.NetInfo().networks: + raise ConfigNetworkError(ne.ERR_USED_BRIDGE, + "delNetwork: bridge %s still exists" % network) + +@@ -825,7 +825,7 @@ def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None, **opti + return define.errCode['noConPeer']['status']['code'] + + def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + + # Step 1: Initial validation (validate names, existence of params, etc.) + for network, networkAttrs in networks.iteritems(): +@@ -973,7 +973,7 @@ def _editBondings(bondings, configWriter): + """ Add/Edit bond interface """ + logger = logging.getLogger("_editBondings") + +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + + for bond, bondAttrs in bondings.iteritems(): + logger.debug("Creating/Editing bond %s with attributes %s", +@@ -999,7 +999,7 @@ def _removeBondings(bondings, configWriter): + """ Add/Edit bond interface """ + logger = logging.getLogger("_removeBondings") + +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + + for bond, bondAttrs in bondings.items(): + if 'remove' in bondAttrs: +@@ -1063,7 +1063,7 @@ def setupNetworks(networks={}, bondings={}, **options): + logger = logging.getLogger("setupNetworks") + + try: +- _netinfo = NetInfo() ++ _netinfo = netinfo.NetInfo() + configWriter = ConfigWriter() + networksAdded = set() + # keep set netsWithNewBonds to be able remove +-- +1.7.7.6 + diff --git a/0033-configNetwork-fix-NetInfo-call.patch b/0033-configNetwork-fix-NetInfo-call.patch new file mode 100644 index 0000000..7973f79 --- /dev/null +++ b/0033-configNetwork-fix-NetInfo-call.patch @@ -0,0 +1,32 @@ +From ce31be09f8e1ae3decaa5219d6ffdfb9a39115f9 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Thu, 12 Jul 2012 16:09:50 -0400 +Subject: [PATCH 33/40] configNetwork: fix NetInfo call + +Commit 9be0497ba77333577e3f5e8738c9efd8794e7a36 changed the import of +netinfo. This patch fix a NetInfo call missed from the previous patch. + +Change-Id: I962cbd39d601300d10a25f5ccb36875b2e544cf1 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/6206 +Reviewed-by: Dan Kenigsberg +--- + vdsm/configNetwork.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index bddf71c..5d2469d 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -440,7 +440,7 @@ class ConfigWriter(object): + + if newmtu != currmtu: + if bonding: +- slaves = NetInfo.slaves(bonding) ++ slaves = netinfo.NetInfo.slaves(bonding) + for slave in slaves: + cf = self.NET_CONF_PREF + slave + self._updateConfigValue(cf, 'MTU', newmtu, newmtu is None) +-- +1.7.7.6 + diff --git a/0034-BZ-837443-removeVlan-drop-remove-interface.patch b/0034-BZ-837443-removeVlan-drop-remove-interface.patch new file mode 100644 index 0000000..0ca179c --- /dev/null +++ b/0034-BZ-837443-removeVlan-drop-remove-interface.patch @@ -0,0 +1,55 @@ +From 229e294cf3649e03df7b9d876a918c9604ebbdc5 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 9 Jul 2012 17:27:35 -0400 +Subject: [PATCH 34/40] BZ#837443: removeVlan() drop/remove interface + +Move ifdown() and vconfig rm to removeVlan(). We need a generic +function to be called multiple times. For example, removing a vlan listed +or not listed in libvirt database. + +Change-Id: I2db7d26e3bb7fda62f1a8fcdbd0445554df20ad7 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/6090 +Reviewed-by: Igor Lvovsky +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/6207 +--- + vdsm/configNetwork.py | 14 +++++++------- + 1 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 5d2469d..dabd219 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -312,9 +312,13 @@ class ConfigWriter(object): + except IOError: + pass + +- def removeVlan(self, vlanId, iface): +- self._backup(self.NET_CONF_PREF + iface + '.' + vlanId) +- self._removeFile(self.NET_CONF_PREF + iface + '.' + vlanId) ++ def removeVlan(self, vlan, iface): ++ vlandev = iface + '.' + vlan ++ ifdown(vlandev) ++ subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], ++ stderr=subprocess.PIPE) ++ self._backup(self.NET_CONF_PREF + iface + '.' + vlan) ++ self._removeFile(self.NET_CONF_PREF + iface + '.' + vlan) + + def removeBonding(self, bonding): + self._backup(self.NET_CONF_PREF + bonding) +@@ -780,10 +784,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + configWriter.removeBridge(network) + + if vlan: +- vlandev = (bonding or nics[0]) + '.' + vlan +- ifdown(vlandev) +- subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], +- stderr=subprocess.PIPE) + configWriter.removeVlan(vlan, bonding or nics[0]) + + # The (relatively) new setupNetwork verb allows to remove a network +-- +1.7.7.6 + diff --git a/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch b/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch new file mode 100644 index 0000000..14f4411 --- /dev/null +++ b/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch @@ -0,0 +1,64 @@ +From dbe23c6eb50b6dc59738dceb0ece78221cadcfd3 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Wed, 11 Jul 2012 11:18:42 -0400 +Subject: [PATCH 35/40] BZ#837443: remove bridge before add VDSM bridge + +Related to BZ#837443: ovirt-node fails to register with ovirt-engine + +oVirt Node when installed manually creates a bridge to be consumed. +VDSM should remove any bridge (listed or not listed in libvirt) +to create it's own bridge. + +Change-Id: Ibc2842db371483225042d511c6495df1bc5047de +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/6016 +Reviewed-by: Igor Lvovsky +Reviewed-by: Mark Wu +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/6208 +--- + vdsm/configNetwork.py | 20 +++++++++++++++----- + 1 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index dabd219..c94648c 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -745,9 +745,22 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + + validateBridgeName(network) + ++ if configWriter is None: ++ configWriter = ConfigWriter() ++ + if network not in _netinfo.networks: +- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, +- "Cannot delete network %r: It doesn't exist" % network) ++ logging.info("Network %r: doesn't exist in libvirt database", network) ++ if network in netinfo.bridges(): ++ configWriter.removeBridge(network) ++ else: ++ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, ++ "Cannot delete network %r: It doesn't exist " ++ "in the system" % network) ++ ++ if vlan: ++ configWriter.removeVlan(vlan, bonding or nics[0]) ++ ++ return + + nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) + bridged = _netinfo.networks[network]['bridged'] +@@ -767,9 +780,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, + if bridged: + assertBridgeClean(network, vlan, bonding, nics) + +- if configWriter is None: +- configWriter = ConfigWriter() +- + if bridged: + configWriter.setNewMtu(network) + +-- +1.7.7.6 + diff --git a/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch b/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch new file mode 100644 index 0000000..cdbdac7 --- /dev/null +++ b/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch @@ -0,0 +1,47 @@ +From ee31f19b5340506bc73d9f2fc27366d5241c3ca2 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 2 Jul 2012 13:00:19 +0300 +Subject: [PATCH 36/40] BZ#836954 - Allow to break bond and create a new + network on its interface in single action. + +Assume we have a bond0 on (eth1, eth2) with defined network brNet on it. +This patch will allow to break the bond0 and create a new network brNet2 on one +of its interfaces (e.g. eth2) with single setupNetworks operation + +Change-Id: Iaa6459ec24f9c81a2cfbc107b5e3548126903357 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5841 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/6210 +Tested-by: Dan Kenigsberg +--- + vdsm/configNetwork.py | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index c94648c..d277cd6 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -1107,6 +1107,9 @@ def setupNetworks(networks={}, bondings={}, **options): + else: + networksAdded.add(network) + ++ # Remove bonds with 'remove' attribute ++ _removeBondings(bondings, configWriter) ++ + handledBonds = set() + for network, networkAttrs in networks.iteritems(): + d = dict(networkAttrs) +@@ -1137,9 +1140,6 @@ def setupNetworks(networks={}, bondings={}, **options): + del bondings[bond] + + # We are now left with bondings whose network was not mentioned +- # Remove bonds with 'remove' attribute +- _removeBondings(bondings, configWriter) +- + # Check whether bonds should be resized + _editBondings(bondings, configWriter) + +-- +1.7.7.6 + diff --git a/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch b/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch new file mode 100644 index 0000000..c7fd1a2 --- /dev/null +++ b/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch @@ -0,0 +1,47 @@ +From 3060b9110bb37ee2b05356b37fde4d79b1e46c5f Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Thu, 5 Jul 2012 15:05:14 +0300 +Subject: [PATCH 37/40] BZ#837054 - Do not detach network from the bond during + bond resize + +Let's say you have bond and bridged non-VLANed network on it. +This patch will fix detaching such network from the bond during bond resizing. + +Change-Id: Idf2a7f73b23dc9692bec9cc3fad01e947a7294af +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5970 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/6213 +Tested-by: Dan Kenigsberg +--- + vdsm/configNetwork.py | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index d277cd6..eb140f8 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -988,6 +988,11 @@ def _editBondings(bondings, configWriter): + for bond, bondAttrs in bondings.iteritems(): + logger.debug("Creating/Editing bond %s with attributes %s", + bond, bondAttrs) ++ ++ brNets = list(_netinfo.getBridgedNetworksForNic(bond)) ++ # Only one bridged-non-VLANed network allowed on same nic/bond ++ bridge = brNets[0] if brNets else None ++ + if bond in _netinfo.bondings: + ifdown(bond) + # Take down all bond's NICs. +@@ -1001,7 +1006,7 @@ def _editBondings(bondings, configWriter): + configWriter.addNic(nic, bonding=bond) + ifup(nic) + +- configWriter.addBonding(bond, ++ configWriter.addBonding(bond, bridge=bridge, + bondingOptions=bondAttrs.get('options', None)) + ifup(bond) + +-- +1.7.7.6 + diff --git a/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch b/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch new file mode 100644 index 0000000..c8e2ef5 --- /dev/null +++ b/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch @@ -0,0 +1,115 @@ +From 5cb2be8ed2406928525072360c3a2571229415f9 Mon Sep 17 00:00:00 2001 +From: Igor Lvovsky +Date: Mon, 2 Jul 2012 12:40:54 +0300 +Subject: [PATCH 38/40] Remove redundant 'explicitBonding' parameter from + setupNetworks + +Change-Id: Id8cd878109ab5fe9d082412f6d05e1c964823779 +Signed-off-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/5840 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/6209 +--- + vdsm/configNetwork.py | 34 ++++++++-------------------------- + 1 files changed, 8 insertions(+), 26 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index eb140f8..d8cad5d 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -834,7 +834,7 @@ def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None, **opti + configWriter.restoreAtomicBackup() + return define.errCode['noConPeer']['status']['code'] + +-def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): ++def _validateNetworkSetup(networks={}, bondings={}): + _netinfo = netinfo.NetInfo() + + # Step 1: Initial validation (validate names, existence of params, etc.) +@@ -897,7 +897,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): + + + # Step 2: Make sure we have complete information about the Setup, more validation +- # (if explicitBonding==False we complete the missing information ourselves, else we raise an exception) + nics = defaultdict(lambda: {'networks':{}, 'bonding':None}) + for network, networkAttrs in networks.iteritems(): + if networkAttrs.get('remove', False): +@@ -908,10 +907,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): + + bonding = networkAttrs['bonding'] + if bonding not in bondings: +- if explicitBonding: +- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "Network %s requires unspecified bonding %s"%( +- network, bonding)) +- + # fill in bonding info + bondings[bonding] = {'nics':_netinfo.bondings[bonding]['slaves']} + +@@ -930,9 +925,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): + + for network in connectedNetworks: + if network not in networks: +- if explicitBonding: +- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "Bonding %s is associated with unspecified network %s"%( +- bonding, network)) + # fill in network info + _, vlan, bonding2 = _netinfo.getNicsVlanAndBondingForNetwork(network) + assert bonding == bonding2 +@@ -1035,7 +1027,7 @@ def setupNetworks(networks={}, bondings={}, **options): + + Params: + networks - dict of key=network, value=attributes +- where 'attributes' is a dict with the following optional items: ++ where 'attributes' is a dict with the following optional items: + vlan= + bonding="" | nic="" + (bonding and nics are mutually exclusive) +@@ -1050,7 +1042,7 @@ def setupNetworks(networks={}, bondings={}, **options): + remove=True (other attributes can't be specified) + + bondings - dict of key=bonding, value=attributes +- where 'attributes' is a dict with the following optional items: ++ where 'attributes' is a dict with the following optional items: + nics=["" , "", ...] + options="" + -- OR -- +@@ -1060,20 +1052,12 @@ def setupNetworks(networks={}, bondings={}, **options): + force=0|1 + connectivityCheck=0|1 + connectivityTimeout= +- explicitBonding=0|1 +- + + Notes: +- Bondings are removed when they change state from 'used' to 'unused'. +- +- By default, if you edit a network that is attached to a bonding, it's not +- necessary to re-specify the bonding (you need only to note the attachment +- in the network's attributes). Similarly, if you edit a bonding, it's not +- necessary to specify its networks. +- However, if you specify the 'explicitBonding' option as true, the function +- will expect you to specify all networks that are attached to a specified +- bonding, and vice-versa, the bonding attached to a specified network. +- ++ When you edit a network that is attached to a bonding, it's not ++ necessary to re-specify the bonding (you need only to note ++ the attachment in the network's attributes). Similarly, if you edit ++ a bonding, it's not necessary to specify its networks. + """ + logger = logging.getLogger("setupNetworks") + +@@ -1095,9 +1079,7 @@ def setupNetworks(networks={}, bondings={}, **options): + force = options.get('force', False) + if not utils.tobool(force): + logging.debug("Validating configuration") +- _validateNetworkSetup(dict(networks), dict(bondings), +- explicitBonding=options.get('explicitBonding', +- False)) ++ _validateNetworkSetup(dict(networks), dict(bondings)) + + logger.debug("Applying...") + try: +-- +1.7.7.6 + diff --git a/0039-configNet-clear-up-atomicBackup-arg.patch b/0039-configNet-clear-up-atomicBackup-arg.patch new file mode 100644 index 0000000..8af3bae --- /dev/null +++ b/0039-configNet-clear-up-atomicBackup-arg.patch @@ -0,0 +1,41 @@ +From df7e06353bcd1c48304884384e5d8575747a3b7a Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Wed, 4 Jul 2012 17:25:55 +0300 +Subject: [PATCH 39/40] configNet: clear up atomicBackup arg + +Apparently, os.path.join('/a/b/', '/a/b/c') == '/a/b/c'. +Let us not trust this peculiarity, and have atomicBackup +expect a full path to the config file. + +Change-Id: Id4f4fc8dd1db785837d868a45787b3fa5be901a6 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5953 +Reviewed-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/6211 +--- + vdsm/configNetwork.py | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index d8cad5d..dbec079 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -168,11 +168,11 @@ class ConfigWriter(object): + + def _atomicBackup(self, filename): + """Backs up configuration to memory, for a later rollback in case of error.""" +- confFile = os.path.join(netinfo.NET_CONF_DIR, filename) +- if confFile not in self._backups: ++ ++ if filename not in self._backups: + try: +- self._backups[confFile] = open(confFile).read() +- logging.debug("Backed up %s" % confFile) ++ self._backups[filename] = open(filename).read() ++ logging.debug("Backed up %s", filename) + except IOError: + pass + +-- +1.7.7.6 + diff --git a/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch b/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch new file mode 100644 index 0000000..367e3a5 --- /dev/null +++ b/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch @@ -0,0 +1,51 @@ +From 72580d30893de15fea9af0050e989bc6d33e3216 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Wed, 4 Jul 2012 16:36:05 +0300 +Subject: [PATCH 40/40] configNet: atomicBackup: remove new files upon restore + +Files that are created by ConfigWriter._atomicBackup() should be removed +by restoreAtomicBackup, not forgotten on disk. + +Change-Id: I66bdb20b6e7e78be198f2616aa0ef7a8efeec18a +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/5952 +Reviewed-by: Igor Lvovsky +Reviewed-on: http://gerrit.ovirt.org/6212 +--- + vdsm/configNetwork.py | 14 ++++++++++---- + 1 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index dbec079..bb4e81e 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -173,16 +173,22 @@ class ConfigWriter(object): + try: + self._backups[filename] = open(filename).read() + logging.debug("Backed up %s", filename) +- except IOError: +- pass ++ except IOError, e: ++ if e.errno == os.errno.ENOENT: ++ self._backups[filename] = None ++ else: ++ raise + + def restoreAtomicBackup(self): + logging.info("Rolling back configuration (restoring atomic backup)") + if not self._backups: + return + for confFile, content in self._backups.iteritems(): +- open(confFile, 'w').write(content) +- logging.debug('Restored %s', confFile) ++ if content is None: ++ utils.rmFile(confFile) ++ else: ++ open(confFile, 'w').write(content) ++ logging.info('Restored %s', confFile) + subprocess.Popen(['/etc/init.d/network', 'start']) + + @staticmethod +-- +1.7.7.6 + diff --git a/vdsm.spec b/vdsm.spec index 31cb3c3..fcaa97c 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -61,6 +61,20 @@ Patch22: 0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch Patch23: 0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch Patch24: 0025-Handle-bond-properly-if-connectivity-check-fail.patch Patch25: 0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch +Patch26: 0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch +Patch27: 0028-BZ-832199-move-selinux-from-init-to-spec.patch +Patch28: 0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch +Patch29: 0030-ovirt_functions-fix-elif-statement.patch +Patch30: 0031-BZ-837443-removeBridge-drop-remove-interface.patch +Patch31: 0032-BZ-837443-replace-the-netinfo-import.patch +Patch32: 0033-configNetwork-fix-NetInfo-call.patch +Patch33: 0034-BZ-837443-removeVlan-drop-remove-interface.patch +Patch34: 0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch +Patch35: 0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch +Patch36: 0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch +Patch37: 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch +Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch +Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -103,7 +117,8 @@ Requires: e2fsprogs >= 1.41.12-11 Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 -Requires: libvirt >= 0.9.10 +#readonly lease ignored by default on 0.9.11.4-3 +Requires: libvirt >= 0.9.11.4-3 Requires: libvirt-python, libvirt-lock-sanlock Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 @@ -117,6 +132,7 @@ Requires: sos Requires: tree Requires: dosfstools Requires: policycoreutils-python +Requires(pre,preun): policycoreutils-python Requires: libselinux-python Requires: kernel >= 2.6.32-198 Requires: %{name}-python = %{version}-%{release} @@ -378,6 +394,20 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch23 -p1 -b .patch23 %patch24 -p1 -b .patch24 %patch25 -p1 -b .patch25 +%patch26 -p1 -b .patch26 +%patch27 -p1 -b .patch27 +%patch28 -p1 -b .patch28 +%patch29 -p1 -b .patch29 +%patch30 -p1 -b .patch30 +%patch31 -p1 -b .patch31 +%patch32 -p1 -b .patch32 +%patch33 -p1 -b .patch33 +%patch34 -p1 -b .patch34 +%patch35 -p1 -b .patch35 +%patch36 -p1 -b .patch36 +%patch37 -p1 -b .patch37 +%patch38 -p1 -b .patch38 +%patch39 -p1 -b .patch39 %build %configure %{?with_hooks:--enable-hooks} @@ -442,6 +472,23 @@ rm -rf %{buildroot} /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} +# vdsm makes extensive use of nfs-exported images +# The next lines will collect the default selinux behaviour for the booleans +virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2) +virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2) + +if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then + /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF +virt_use_nfs=1 +virt_use_sanlock=1 +_EOF +fi + +if /usr/sbin/selinuxenabled; then + /usr/sbin/setsebool virt_use_nfs on + /usr/sbin/setsebool virt_use_sanlock on +fi + %post # update the vdsm "secret" password for libvirt if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then @@ -482,10 +529,12 @@ then /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF virt_use_nfs=0 +virt_use_sanlock=0 _EOF - if selinuxenabled; then + if /usr/sbin/selinuxenabled; then /usr/sbin/setsebool virt_use_nfs off + /usr/sbin/setsebool virt_use_sanlock off fi /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh @@ -919,6 +968,22 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Tue Jul 17 2012 Federico Simoncelli 4.10.0-5.fc17 +- configNet: atomicBackup: remove new files upon restore +- configNet: clear up atomicBackup arg +- Remove redundant 'explicitBonding' parameter from setupNetworks +- BZ#837054 - Do not detach network from the bond during bond resize +- BZ#836954 - Allow to break bond and create a new network on its interface in single action. +- BZ#837443: remove bridge before add VDSM bridge +- BZ#837443: removeVlan() drop/remove interface +- configNetwork: fix NetInfo call +- BZ#837443: replace the netinfo import +- BZ#837443: removeBridge() drop/remove interface +- ovirt_functions: fix elif statement +- BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option passed +- BZ#832199: move selinux from init to spec +- bump libvirt version to fix readonly lease unsupported issue + * Fri Jun 29 2012 Federico Simoncelli 4.10.0-4.fc17 - deployUtil: use os.uname instead of /bin/uname - deployUtil: slightly saner kernel version comparison From 61671d5980ff4398dc466a457dd92c842919cd77 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 21:32:40 -0500 Subject: [PATCH 020/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index db67e97..2bb23fc 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -864,6 +864,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 4.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Mon Jun 11 2012 Federico Simoncelli 4.10.0-1.fc18 - vdsm-4.10.0 From 9240b569204c69d63dae2384670877cb5ef6726d Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Wed, 1 Aug 2012 11:38:39 +0200 Subject: [PATCH 021/126] update to vdsm-4.10.0-6 - BZ#842948: deployUtil - safely remove bridge Signed-off-by: Federico Simoncelli --- ...2948-deployUtil-safely-remove-bridge.patch | 33 +++++++++++++++++++ vdsm.spec | 7 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0041-BZ-842948-deployUtil-safely-remove-bridge.patch diff --git a/0041-BZ-842948-deployUtil-safely-remove-bridge.patch b/0041-BZ-842948-deployUtil-safely-remove-bridge.patch new file mode 100644 index 0000000..8741a36 --- /dev/null +++ b/0041-BZ-842948-deployUtil-safely-remove-bridge.patch @@ -0,0 +1,33 @@ +From 15d46e0809e27eb39fde58fb47a0b3914f1d0c90 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 31 Jul 2012 19:36:53 -0400 +Subject: [PATCH 41/41] BZ#842948: deployUtil - safely remove bridge + +deployUtil calls /usr/share/vdsm/delNetwork to remove previously created bridge. +This patch will add ovirtfunctions.ovirt_safe_delete_config() to safely remove +bridge config files in oVirt Node. + +Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/6798 +Reviewed-by: Dan Kenigsberg +--- + vdsm_reg/deployUtil.py.in | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 6bd4b3d..62aef01 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -904,6 +904,8 @@ def makeBridge(vdcName, vdsmDir): + else: + fReturn = False + logging.debug("makeBridge Failed to del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) ++ else: ++ ovirtfunctions.ovirt_safe_delete_config(IFACE_CONFIG + mgtBridge) + except: + fReturn = False + logging.debug("makeBridge Failed to del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) +-- +1.7.7.6 + diff --git a/vdsm.spec b/vdsm.spec index fcaa97c..652c99e 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -20,7 +20,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 6%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -75,6 +75,7 @@ Patch36: 0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch Patch37: 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch +Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -408,6 +409,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch37 -p1 -b .patch37 %patch38 -p1 -b .patch38 %patch39 -p1 -b .patch39 +%patch40 -p1 -b .patch40 %build %configure %{?with_hooks:--enable-hooks} @@ -968,6 +970,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6.fc17 +- BZ#842948: deployUtil - safely remove bridge + * Tue Jul 17 2012 Federico Simoncelli 4.10.0-5.fc17 - configNet: atomicBackup: remove new files upon restore - configNet: clear up atomicBackup arg From cadbf41ea78099a51ba4848aad2514e9837bc0da Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Fri, 17 Aug 2012 16:28:51 +0200 Subject: [PATCH 022/126] enable all the vdsm hooks on fedora Signed-off-by: Federico Simoncelli --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 652c99e..b38a800 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -15,12 +15,15 @@ %global snlk_group sanlock %global snlk_user sanlock +# Fedora specific configuration +%global with_hooks 1 + # Required paths %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d Name: %{vdsm_name} Version: 4.10.0 -Release: 6%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 7%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System From 439e9e85cde98e5e8ee60a562b38ef4a070a8dab Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 11 Sep 2012 11:44:09 +0200 Subject: [PATCH 023/126] add the autotools support Signed-off-by: Federico Simoncelli --- ...p-the-version-file-with-the-tarballs.patch | 147 ++++++++++++++++++ vdsm.spec | 27 +++- 2 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 0042-Ship-the-version-file-with-the-tarballs.patch diff --git a/0042-Ship-the-version-file-with-the-tarballs.patch b/0042-Ship-the-version-file-with-the-tarballs.patch new file mode 100644 index 0000000..905e8a5 --- /dev/null +++ b/0042-Ship-the-version-file-with-the-tarballs.patch @@ -0,0 +1,147 @@ +From 0b3cd04300005c995d20306446a2ab804d74b6be Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Fri, 17 Aug 2012 05:23:38 -0400 +Subject: [PATCH] Ship the version file with the tarballs + +Shipping the VERSION file allows running the autoreconf tool also from a +tarball package (no need of the entire git repository). + +In this patch: +* generate and ship the VERSION file +* move, unify (and ship) version.sh and release.sh in pkg-version +* use the VERSION file when the git repository is not available + (eg: tarball) + +Signed-off-by: Federico Simoncelli +Change-Id: I8b72a1740803a9401e4b5a4504a4faa07c29f2b9 +Reviewed-on: http://gerrit.ovirt.org/7295 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Alon Bar-Lev +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + Makefile.am | 13 +++++++++++-- + build-aux/pkg-version | 39 +++++++++++++++++++++++++++++++++++++++ + configure.ac | 4 ++-- + VERSION | 1 + + 4 files changed, 52 insertions(+), 34 deletions(-) + create mode 100755 build-aux/pkg-version + create mode 100644 VERSION + delete mode 100755 build-aux/release.sh + delete mode 100755 build-aux/version.sh + +diff --git a/Makefile.am b/Makefile.am +index ab9b240..2b6d273 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -25,6 +25,7 @@ include $(top_srcdir)/build-aux/Makefile.subs + # This is an *exception*, we ship also vdsm.spec so it's possible to build the + # rpm from the tarball. + EXTRA_DIST = \ ++ build-aux/pkg-version \ + vdsm.spec \ + vdsm.spec.in + +@@ -80,11 +81,11 @@ rpm: dist + rpmbuild -ta $(if $(BUILDID),--define="extra_release .$(BUILDID)") \ + $(WITH_HOOKS) $(DIST_ARCHIVES) + +-dist-hook: gen-ChangeLog ++dist-hook: gen-VERSION gen-ChangeLog ++.PHONY: gen-VERSION gen-ChangeLog + + # Generate the ChangeLog file and insert it into the directory + # we're about to use to create a tarball. +-.PHONY: gen-ChangeLog + gen-ChangeLog: + if test -d .git; then \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ +@@ -92,3 +93,11 @@ gen-ChangeLog: + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi ++ ++gen-VERSION: ++ if test -d .git; then \ ++ $(top_srcdir)/build-aux/pkg-version --full \ ++ > $(distdir)/ve-t; \ ++ rm -f $(distdir)/VERSION; \ ++ mv $(distdir)/ve-t $(distdir)/VERSION; \ ++ fi +diff --git a/build-aux/pkg-version b/build-aux/pkg-version +new file mode 100755 +index 0000000..a8d9d77 +--- /dev/null ++++ b/build-aux/pkg-version +@@ -0,0 +1,39 @@ ++#!/bin/sh ++ ++# tags and output versions: ++# - v4.9.0 => 4.9.0 (upstream clean) ++# - v4.9.0-1 => 4.9.0 (downstream clean) ++# - v4.9.0-2-g34e62f => 4.9.0 (upstream dirty) ++# - v4.9.0-1-2-g34e62f => 4.9.0 (downstream dirty) ++AWK_VERSION=' ++ BEGIN { FS="-" } ++ /^v[0-9]/ { ++ sub(/^v/,"") ; print $1 ++ }' ++ ++# tags and output releases: ++# - v4.9.0 => 0 (upstream clean) ++# - v4.9.0-1 => 1 (downstream clean) ++# - v4.9.0-2-g34e62f1 => 0.2.git34e62f1 (upstream dirty) ++# - v4.9.0-1-2-g34e62f1 => 1.2.git34e62f1 (downstream dirty) ++AWK_RELEASE=' ++ BEGIN { FS="-"; OFS="." } ++ /^v[0-9]/ { ++ if (NF == 1) print 0 ++ else if (NF == 2) print $2 ++ else if (NF == 3) print 0, $2, "git" substr($3, 2) ++ else if (NF == 4) print $2, $3, "git" substr($4, 2) ++ }' ++ ++PKG_VERSION=`cat VERSION 2> /dev/null || git describe --match "v[0-9]*"` ++ ++if test "x$1" == "x--full"; then ++ echo $PKG_VERSION | tr -d '[:space:]' ++elif test "x$1" == "x--version"; then ++ echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].' ++elif test "x$1" == "x--release"; then ++ echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].' ++else ++ echo "usage: $0 [--full|--version|--release]" ++ exit 1 ++fi +diff --git a/configure.ac b/configure.ac +index 7b829f5..cb1dc56 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,7 +20,7 @@ + + # Autoconf initialization + AC_INIT([vdsm], +- [m4_esyscmd([build-aux/version.sh])], ++ [m4_esyscmd([build-aux/pkg-version --version])], + [vdsm-devel@lists.fedorahosted.org]) + AC_CONFIG_AUX_DIR([build-aux]) + +@@ -28,7 +28,7 @@ m4_include([m4/ax_python_module.m4]) + + # Package release + AC_SUBST([PACKAGE_RELEASE], +- [m4_esyscmd([build-aux/release.sh])]) ++ [m4_esyscmd([build-aux/pkg-version --release])]) + + # Testing for version and release + AS_IF([test "x$PACKAGE_VERSION" = x], +diff --git a/VERSION b/VERSION +new file mode 100644 +index 0000000..bbc89f8 +--- /dev/null ++++ b/VERSION +@@ -0,0 +1,1 @@ ++v4.10.0 +-- +1.7.1 + diff --git a/vdsm.spec b/vdsm.spec index b38a800..60ec9a5 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -21,9 +21,14 @@ # Required paths %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%{!?enable_autotools:%define enable_autotools 1} + Name: %{vdsm_name} Version: 4.10.0 -Release: 7%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 8%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -79,6 +84,7 @@ Patch37: 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch +Patch41: 0042-Ship-the-version-file-with-the-tarballs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -92,6 +98,14 @@ BuildRequires: python-pep8 BuildRequires: python-ethtool BuildRequires: libvirt-python +# Autotools BuildRequires +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif + %if !0%{?rhel} BuildRequires: systemd-units %endif @@ -413,8 +427,13 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch38 -p1 -b .patch38 %patch39 -p1 -b .patch39 %patch40 -p1 -b .patch40 +%patch41 -p1 -b .patch41 +%{__chmod} +x build-aux/pkg-version # required by patch41 %build +%if 0%{?enable_autotools} +autoreconf -if +%endif %configure %{?with_hooks:--enable-hooks} make # Setting software_version and software_revision in dsaversion.py @@ -973,6 +992,12 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8.fc17 +- add the autotools support + +* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7.fc17 +- enable all the vdsm hooks + * Wed Aug 1 2012 Federico Simoncelli 4.10.0-6.fc17 - BZ#842948: deployUtil - safely remove bridge From 6368f7b6f026f937e3e84b3ebbc4af763b122589 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 24 Sep 2012 23:28:51 +0200 Subject: [PATCH 024/126] update to vdsm-4.10.0-9 - BZ#845660 Use the recommended alignment instead of using pagesize Signed-off-by: Federico Simoncelli --- ...ded-alignment-instead-of-using-pages.patch | 59 +++++++++++++++++++ vdsm.spec | 7 ++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 0043-Use-the-recommended-alignment-instead-of-using-pages.patch diff --git a/0043-Use-the-recommended-alignment-instead-of-using-pages.patch b/0043-Use-the-recommended-alignment-instead-of-using-pages.patch new file mode 100644 index 0000000..d62de9d --- /dev/null +++ b/0043-Use-the-recommended-alignment-instead-of-using-pages.patch @@ -0,0 +1,59 @@ +From b4f0985266f5fba817602e8af9ad900425c5a853 Mon Sep 17 00:00:00 2001 +From: Saggi Mizrahi +Date: Mon, 24 Sep 2012 01:28:38 +0200 +Subject: [PATCH] Use the recommended alignment instead of using pagesize + +Page size is the usual recommended alignment but when it isn't using it +can cause memory corruption. + +Change-Id: If9da41a2f74d3cea7300df9606c78eebcc9927a9 +Signed-off-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/8143 +Tested-by: Noam Slomianko +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/8174 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/storage/fileUtils.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py +index 020f16d..511dff9 100644 +--- a/vdsm/storage/fileUtils.py ++++ b/vdsm/storage/fileUtils.py +@@ -45,9 +45,10 @@ NFS_OPTIONS = "".join(config.get('irs', 'nfs_mount_options').split()) + + log = logging.getLogger('fileUtils') + +-PAGESIZE = libc.getpagesize() + CharPointer = ctypes.POINTER(ctypes.c_char) + ++_PC_REC_XFER_ALIGN = 17 ++ + class TarCopyFailed(RuntimeError): pass + + def tarCopy(src, dst, exclude=[]): +@@ -71,7 +72,8 @@ def isStaleHandle(path): + os.listdir(path) + except OSError as ex: + if ex.errno in (errno.EIO, errno.ESTALE): +- return True ++ return True ++ + # We could get contradictory results because of + # soft mounts + if (exists or st) and ex.errno == errno.ENOENT: +@@ -262,7 +264,8 @@ class DirectFile(object): + ppbuff = ctypes.pointer(pbuff) + # Because we usually have fixed sizes for our reads, caching + # buffers might give a slight performance boost. +- rc = libc.posix_memalign(ppbuff, PAGESIZE, size) ++ alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN) ++ rc = libc.posix_memalign(ppbuff, alignment, size) + if rc: + raise OSError(rc, "Could not allocate aligned buffer") + try: +-- +1.7.11.4 + diff --git a/vdsm.spec b/vdsm.spec index 60ec9a5..b9c02ec 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -28,7 +28,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 8%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 9%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -85,6 +85,7 @@ Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch Patch41: 0042-Ship-the-version-file-with-the-tarballs.patch +Patch42: 0043-Use-the-recommended-alignment-instead-of-using-pages.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -429,6 +430,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch40 -p1 -b .patch40 %patch41 -p1 -b .patch41 %{__chmod} +x build-aux/pkg-version # required by patch41 +%patch42 -p1 -b .patch42 %build %if 0%{?enable_autotools} @@ -992,6 +994,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9.fc17 +- BZ#845660 Use the recommended alignment instead of using pagesize + * Tue Sep 11 2012 Federico Simoncelli 4.10.0-8.fc17 - add the autotools support From 53d7f88fbd8342b6acf6af3774f2bf9d0b21a26d Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Thu, 4 Oct 2012 22:37:01 +0200 Subject: [PATCH 025/126] update to vdsm-4.10.0-10 - BZ#845660 Use buffer size in multiplies of the recommended transfer size Signed-off-by: Federico Simoncelli --- ...in-multiplies-of-the-recommended-tra.patch | 50 +++++++++++++++++++ vdsm.spec | 7 ++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch diff --git a/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch b/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch new file mode 100644 index 0000000..edcbaae --- /dev/null +++ b/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch @@ -0,0 +1,50 @@ +From c219c4455bb93d9f136849b58ceb0255e407fdbe Mon Sep 17 00:00:00 2001 +From: Saggi Mizrahi +Date: Thu, 4 Oct 2012 13:14:21 +0200 +Subject: [PATCH] Use buffer size in multiplies of the recommended transfer + size + +Using the recommended transfer size fixes the memory corruption for NFS. + +Bug-Id: http://bugzilla.redhat.com/845660 +Change-Id: Iadea310039b30073197b7ad90afb930c460bda17 +Signed-off-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/8356 +Reviewed-by: Dan Kenigsberg +Tested-by: Jason Brooks +Reviewed-on: http://gerrit.ovirt.org/8369 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/storage/fileUtils.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py +index 511dff9..ccc2bfe 100644 +--- a/vdsm/storage/fileUtils.py ++++ b/vdsm/storage/fileUtils.py +@@ -48,6 +48,7 @@ log = logging.getLogger('fileUtils') + CharPointer = ctypes.POINTER(ctypes.c_char) + + _PC_REC_XFER_ALIGN = 17 ++_PC_REC_MIN_XFER_SIZE = 16 + + class TarCopyFailed(RuntimeError): pass + +@@ -265,6 +266,13 @@ class DirectFile(object): + # Because we usually have fixed sizes for our reads, caching + # buffers might give a slight performance boost. + alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN) ++ minXferSize = libc.fpathconf(self.fileno(), _PC_REC_MIN_XFER_SIZE) ++ chunks, remainder = divmod(size, minXferSize) ++ if remainder > 0: ++ chunks += 1 ++ ++ size = chunks * minXferSize ++ + rc = libc.posix_memalign(ppbuff, alignment, size) + if rc: + raise OSError(rc, "Could not allocate aligned buffer") +-- +1.7.11.4 + diff --git a/vdsm.spec b/vdsm.spec index b9c02ec..53d5aef 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -28,7 +28,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 9%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 10%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -86,6 +86,7 @@ Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch Patch41: 0042-Ship-the-version-file-with-the-tarballs.patch Patch42: 0043-Use-the-recommended-alignment-instead-of-using-pages.patch +Patch43: 0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -431,6 +432,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch41 -p1 -b .patch41 %{__chmod} +x build-aux/pkg-version # required by patch41 %patch42 -p1 -b .patch42 +%patch43 -p1 -b .patch43 %build %if 0%{?enable_autotools} @@ -994,6 +996,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10.fc17 +- BZ#845660 Use buffer size in multiplies of the recommended transfer size + * Mon Sep 24 2012 Federico Simoncelli 4.10.0-9.fc17 - BZ#845660 Use the recommended alignment instead of using pagesize From 2ca4079ecf5f5ccbec658c386994d3f5e7145d26 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 20 Oct 2012 16:48:19 +0100 Subject: [PATCH 026/126] Merge F17 changes into F18+ and disable make check due to pep8 issues, Add pyparted dependency --- vdsm.spec | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 33aa641..2793579 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -28,7 +28,7 @@ Name: %{vdsm_name} Version: 4.10.0 -Release: 10%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 11%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -99,6 +99,7 @@ BuildRequires: python-pep8 # BuildRequires needed by the tests during the build BuildRequires: python-ethtool BuildRequires: libvirt-python +BuildRequires: pyparted # Autotools BuildRequires %if 0%{?enable_autotools} @@ -488,7 +489,8 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %check # Disabling the nose tests until they'll all succeed in koji. -make check NOSE_EXCLUDE=".*" +# make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 +# make check NOSE_EXCLUDE=".*" %clean rm -rf %{buildroot} @@ -996,22 +998,26 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog -* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10.fc17 +* Sat Oct 20 2012 Peter Robinson 4.10.0-11 +- Merge F17 changes into F18+ and disable make check due to pep8 issues +- Add pyparted dependency + +* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10 - BZ#845660 Use buffer size in multiplies of the recommended transfer size -* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9.fc17 +* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9 - BZ#845660 Use the recommended alignment instead of using pagesize -* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8.fc17 +* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8 - add the autotools support -* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7.fc17 +* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7 - enable all the vdsm hooks -* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6.fc17 +* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6 - BZ#842948: deployUtil - safely remove bridge -* Tue Jul 17 2012 Federico Simoncelli 4.10.0-5.fc17 +* Tue Jul 17 2012 Federico Simoncelli 4.10.0-5 - configNet: atomicBackup: remove new files upon restore - configNet: clear up atomicBackup arg - Remove redundant 'explicitBonding' parameter from setupNetworks @@ -1027,7 +1033,7 @@ exit 0 - BZ#832199: move selinux from init to spec - bump libvirt version to fix readonly lease unsupported issue -* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4.fc17 +* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4 - deployUtil: use os.uname instead of /bin/uname - deployUtil: slightly saner kernel version comparison - BZ#835784 - Allow to create a network on top of existing bond in additional @@ -1037,11 +1043,11 @@ exit 0 - Handle bond properly if connectivity check fail. - BZ#806555 having /etc/ovirt-node-* means it is a node -* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3.fc17 +* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3 - BZ#832577: node can't be approved - BZ#824298 fix typo in keyword argument exc_info -* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2.fc17 +* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2 - deployUtil.yumFind: rename and simplify semantics - drop deployUtil.yumSearch - deployUtil.yumSearchVersion: compare versions sanely @@ -1060,41 +1066,38 @@ exit 0 - BZ#826467 - Allow to remove bond and attach network to NIC - Related to BZ#826873 - Allow to create bond without network -* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1.fc17 +* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1 - vdsm-4.10.0 -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471.fc17 +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471 - BZ#822158 Report version-release in a short format -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471.fc17 +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471 - vdsm-4.9.6-ge952471 -* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249.fc16 +* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249 - vdsm-4.9.6-g1b07249 -<<<<<<< HEAD -======= -* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5.fc17 +* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5 - vdsm-4.9.4-0.gb3642e5 ->>>>>>> f17 -* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0.fc16 +* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0 - vdsm-4.9.3.2 - Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." -* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0.fc16 +* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0 - vdsm-4.9.3.1 -* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929.fc16 +* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929 - vdsm-4.9.2-g1d7b929 -* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d.fc16 +* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d - vdsm-4.9.2-g951b41d -* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e.fc16 +* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e - add the revision control comments to the specfile -* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c.fc16 +* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c - require iscsi-initiator-utils >= 6.2.0.872-14 bz442980 - fix the rpmlint errors From 3483c149aa585cf707a76e7e208e2e0a71f51db1 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 1 Nov 2012 09:50:08 -0400 Subject: [PATCH 027/126] vdsm.spec: update to vdsm-4.10.1-1 update to vdsm-4.10.1-1 --- vdsm.spec | 382 +++++++++++++++++++++++++++--------------------------- 1 file changed, 188 insertions(+), 194 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 2793579..e120533 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -19,7 +19,11 @@ %global with_hooks 1 # Required paths +%if 0%{?fedora} >= 18 +%global _polkitdir %{_datadir}/polkit-1/rules.d +%else %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d +%endif # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that @@ -27,8 +31,8 @@ %{!?enable_autotools:%define enable_autotools 1} Name: %{vdsm_name} -Version: 4.10.0 -Release: 11%{?vdsm_relvtag}%{?dist}%{?extra_release} +Version: 4.10.1 +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -43,51 +47,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -Patch0: 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch -Patch1: 0002-drop-deployUtil.yumSearch.patch -Patch2: 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch -Patch3: 0004-Iterates-over-delete-candidates-networks-only-once.patch -Patch4: 0005-options-translation-in-setupNetworks-is-not-relevant.patch -Patch5: 0006-Minor-optimization-for-delNetwork.patch -Patch6: 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch -Patch7: 0008-Minor-optimization-for-addNetwork.patch -Patch8: 0009-Use-already-known-iface-in-addNetwork.patch -Patch9: 0010-Use-proper-MTU-on-bonding-when-add-network.patch -Patch10: 0011-Add-bridge-on-top-of-VLAN-if-exists.patch -Patch11: 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch -Patch12: 0013-remove-flag-skipLibvirt.patch -Patch13: 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch -Patch14: 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch -Patch15: 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch -Patch16: 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch -Patch17: 0018-BZ-832577-node-can-t-be-approved.patch -Patch18: 0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch -Patch19: 0020-deployUtil-use-os.uname-instead-of-bin-uname.patch -Patch20: 0021-deployUtil-slightly-saner-kernel-version-comparison.patch -Patch21: 0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch -Patch22: 0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch -Patch23: 0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch -Patch24: 0025-Handle-bond-properly-if-connectivity-check-fail.patch -Patch25: 0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch -Patch26: 0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch -Patch27: 0028-BZ-832199-move-selinux-from-init-to-spec.patch -Patch28: 0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch -Patch29: 0030-ovirt_functions-fix-elif-statement.patch -Patch30: 0031-BZ-837443-removeBridge-drop-remove-interface.patch -Patch31: 0032-BZ-837443-replace-the-netinfo-import.patch -Patch32: 0033-configNetwork-fix-NetInfo-call.patch -Patch33: 0034-BZ-837443-removeVlan-drop-remove-interface.patch -Patch34: 0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch -Patch35: 0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch -Patch36: 0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch -Patch37: 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch -Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch -Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch -Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch -Patch41: 0042-Ship-the-version-file-with-the-tarballs.patch -Patch42: 0043-Use-the-recommended-alignment-instead-of-using-pages.patch -Patch43: 0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -99,7 +58,8 @@ BuildRequires: python-pep8 # BuildRequires needed by the tests during the build BuildRequires: python-ethtool BuildRequires: libvirt-python -BuildRequires: pyparted +BuildRequires: sanlock-python >= 2.3 +BuildRequires: genisoimage # Autotools BuildRequires %if 0%{?enable_autotools} @@ -118,32 +78,46 @@ Requires: sudo >= 1.7.3 Requires: logrotate >= 3.8.0 Requires: xz Requires: ntp +Requires: iproute Requires: python-ethtool -Requires: nfs-utils dmidecode -Requires: lvm2 >= 2.02.95 -Requires: sanlock >= 2.1, sanlock-python +Requires: rpm-python +Requires: nfs-utils +Requires: python-pthreading + +%ifarch x86_64 +Requires: dmidecode +%endif %if 0%{?rhel} Requires: python # Update the qemu-kvm requires when block_stream will be included -Requires: qemu-kvm >= 2:0.12.1.2-2.227 -Requires: qemu-img >= 2:0.12.1.2-2.227 -Requires: libvirt >= 0.9.10-20 -Requires: libvirt-python, libvirt-lock-sanlock +Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 +Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 +Requires: libvirt >= 0.9.10-21.el6_3.5 +Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 +Requires: kernel >= 2.6.32-279.9.1 +Requires: sanlock >= 2.3-4, sanlock-python +Requires: initscripts >= 9.03.31-2.el6_3.1 +Requires: selinux-policy-targeted >= 3.7.19-80 +Requires: lvm2 >= 2.02.95-10.el6_3.2 %else # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 -#readonly lease ignored by default on 0.9.11.4-3 -Requires: libvirt >= 0.9.11.4-3 -Requires: libvirt-python, libvirt-lock-sanlock +Requires: libvirt >= 0.10.1-1 +Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 +Requires: kernel >= 3.6 +Requires: sanlock >= 2.4-2, sanlock-python +Requires: sed >= 4.2.1-10 +Requires: selinux-policy-targeted >= 3.10.0-149 +Requires: lvm2 >= 2.02.95 %endif Requires: psmisc >= 22.6-15 @@ -153,13 +127,14 @@ Requires: sos Requires: tree Requires: dosfstools Requires: policycoreutils-python -Requires(pre,preun): policycoreutils-python +Requires: genisoimage Requires: libselinux-python -Requires: kernel >= 2.6.32-198 Requires: %{name}-python = %{version}-%{release} -Requires: selinux-policy-targeted >= 3.7.19-80.el6 Requires: pyparted + +Requires(pre,preun): policycoreutils-python Requires(post): /usr/sbin/saslpasswd2 +Requires(post): /bin/hostname %description The VDSM service is required by a Virtualization Manager to manage the @@ -210,7 +185,7 @@ Summary: VDSM registration package BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: traceroute +Requires: m2crypto %description reg VDSM registration package. Used to register a Linux host to a Virtualization @@ -234,6 +209,8 @@ Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. %package tests Summary: VDSM Test Suite Requires: vdsm = %{version}-%{release} +Requires: dracut +Requires: python-nose BuildArch: noarch %description tests @@ -250,10 +227,13 @@ VDSM hook to use vhostmd per VM according to Virtualization Manager requests. %package hook-faqemu Summary: Fake qemu process for VDSM quality assurance BuildArch: noarch +Requires: vdsm %description hook-faqemu VDSM hook used for testing VDSM with multiple fake virtual machines without running real guests. +To enable this hook on your host, set vars.fake_kvm_support=True in your +/etc/vdsm/vdsm.conf before adding the host to ovirt-Engine. %package hook-directlun Summary: Direct LUN support for VDSM @@ -266,6 +246,7 @@ without the sharing and storage handling of VDSM. %package hook-fileinject Summary: Allow uploading file to VMs disk BuildArch: noarch +Requires: python-libguestfs %description hook-fileinject Hook is getting target file name and its content and @@ -328,6 +309,16 @@ BuildArch: noarch VDSM promiscuous mode let user define a VM interface that will capture all network traffic. +%package hook-qemucmdline +Summary: QEMU cmdline hook for VDSM +BuildArch: noarch +Requires: vdsm + +%description hook-qemucmdline +Provides support for injecting QEMU cmdline via VDSM hook. +It exploits libvirt's qemu:commandline facility available in the +qemu xml namespace. + %package hook-qos Summary: QoS network in/out traffic support for VDSM BuildArch: noarch @@ -387,53 +378,7 @@ Requires: glusterfs glusterfs-server glusterfs-fuse Gluster plugin enables VDSM to serve Gluster functionalities. %prep -%setup -q -n %{vdsm_name}-%{version}%{?vdsm_relttag} - -%patch0 -p1 -b .patch0 -%patch1 -p1 -b .patch1 -%patch2 -p1 -b .patch2 -%patch3 -p1 -b .patch3 -%patch4 -p1 -b .patch4 -%patch5 -p1 -b .patch5 -%patch6 -p1 -b .patch6 -%patch7 -p1 -b .patch7 -%patch8 -p1 -b .patch8 -%patch9 -p1 -b .patch9 -%patch10 -p1 -b .patch10 -%patch11 -p1 -b .patch11 -%patch12 -p1 -b .patch12 -%patch13 -p1 -b .patch13 -%patch14 -p1 -b .patch14 -%patch15 -p1 -b .patch15 -%patch16 -p1 -b .patch16 -%patch17 -p1 -b .patch17 -%patch18 -p1 -b .patch18 -%patch19 -p1 -b .patch19 -%patch20 -p1 -b .patch20 -%patch21 -p1 -b .patch21 -%patch22 -p1 -b .patch22 -%patch23 -p1 -b .patch23 -%patch24 -p1 -b .patch24 -%patch25 -p1 -b .patch25 -%patch26 -p1 -b .patch26 -%patch27 -p1 -b .patch27 -%patch28 -p1 -b .patch28 -%patch29 -p1 -b .patch29 -%patch30 -p1 -b .patch30 -%patch31 -p1 -b .patch31 -%patch32 -p1 -b .patch32 -%patch33 -p1 -b .patch33 -%patch34 -p1 -b .patch34 -%patch35 -p1 -b .patch35 -%patch36 -p1 -b .patch36 -%patch37 -p1 -b .patch37 -%patch38 -p1 -b .patch38 -%patch39 -p1 -b .patch39 -%patch40 -p1 -b .patch40 -%patch41 -p1 -b .patch41 -%{__chmod} +x build-aux/pkg-version # required by patch41 -%patch42 -p1 -b .patch42 -%patch43 -p1 -b .patch43 +%setup -q %build %if 0%{?enable_autotools} @@ -482,10 +427,16 @@ install -Dm 0755 vdsm_reg/vdsm-reg.init \ %{buildroot}/lib/systemd/systemd-vdsm-reg install -Dm 0644 vdsm_reg/vdsm-reg.service \ %{buildroot}%{_unitdir}/vdsm-reg.service + # Install the polkit for libvirt +%if 0%{?fedora} >= 18 +install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ + %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules +%else install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla %endif +%endif %check # Disabling the nose tests until they'll all succeed in koji. @@ -496,6 +447,9 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ rm -rf %{buildroot} %pre +# Force standard locale behavior (English) +export LC_ALL=C + /usr/bin/getent passwd %{vdsm_user} >/dev/null || \ /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} @@ -506,28 +460,38 @@ rm -rf %{buildroot} # The next lines will collect the default selinux behaviour for the booleans virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2) virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2) +snlkNFS=$(/usr/sbin/semanage boolean -l | /bin/grep sanlock_use_nfs | cut -d ',' -f 2) -if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then +# Set the booleans and persist it across reboots +if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* || \ + "${snlkNFS}" == *off* ]]; then /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF virt_use_nfs=1 virt_use_sanlock=1 +sanlock_use_nfs=1 _EOF fi +# Set the current state of SELinux booleans if /usr/sbin/selinuxenabled; then /usr/sbin/setsebool virt_use_nfs on /usr/sbin/setsebool virt_use_sanlock on + /usr/sbin/setsebool sanlock_use_nfs on fi %post -# update the vdsm "secret" password for libvirt -if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then - /usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ - /etc/pki/vdsm/keys/libvirt_password +# set the vdsm "secret" password for libvirt +%{_bindir}/vdsm-tool set-saslpasswd + +# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm. +# So Remove them if it is played with /etc/sysctl.conf. +if grep -q "# VDSM section begin" /etc/sysctl.conf; then + /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ + /etc/sysctl.conf fi -# generate the vdsm certificates (if missing) -%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh +# Make the /etc/sysctl.d/vdsm take effect immediately after installation. +/sbin/sysctl -q -p /etc/sysctl.d/vdsm %if 0%{?rhel} if [ "$1" -eq 1 ] ; then @@ -560,14 +524,16 @@ then /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF virt_use_nfs=0 virt_use_sanlock=0 +sanlock_use_nfs=0 _EOF if /usr/sbin/selinuxenabled; then /usr/sbin/setsebool virt_use_nfs off /usr/sbin/setsebool virt_use_sanlock off + /usr/sbin/setsebool sanlock_use_nfs off fi - /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh + /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then /sbin/initctl stop libvirtd >/dev/null 2>/dev/null @@ -617,7 +583,7 @@ if [ "$1" -eq 1 ] ; then fi %else if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsmd-reg.service >/dev/null 2>&1 || : + /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi exit 0 @@ -632,8 +598,8 @@ then fi %else if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsmd-reg.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsmd-reg.service > /dev/null 2>&1 || : + /bin/systemctl --no-reload disable vdsm-reg.service > /dev/null 2>&1 || : + /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1 || : fi exit 0 %endif @@ -653,6 +619,7 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/storage +%dir %{_datadir}/%{vdsm_name}/storage/imageRepository %{_datadir}/%{vdsm_name}/alignmentScan.py* %{_datadir}/%{vdsm_name}/blkid.py* %{_datadir}/%{vdsm_name}/caps.py* @@ -676,18 +643,19 @@ exit 0 %{_datadir}/%{vdsm_name}/vdsm-store-net-config %{_datadir}/%{vdsm_name}/vm.py* %{_datadir}/%{vdsm_name}/write-net-config +%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py* %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.policy %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm -%config(noreplace) %{_sysconfdir}/modprobe.d/vdsm.conf %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm +%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/cron.d/vdsm-libvirt-logrotate %{_datadir}/%{vdsm_name}/guestIF.py* %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* -%{_datadir}/%{vdsm_name}/pthread.py* -%{_datadir}/%{vdsm_name}/betterThreading.py* %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh @@ -715,8 +683,8 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/nfsSD.py* %{_datadir}/%{vdsm_name}/storage/outOfProcess.py* %{_datadir}/%{vdsm_name}/storage/persistentDict.py* -%{_datadir}/%{vdsm_name}/storage/processPool.py* %{_datadir}/%{vdsm_name}/storage/resourceFactories.py* +%{_datadir}/%{vdsm_name}/storage/remoteFileHandler.py* %{_datadir}/%{vdsm_name}/storage/resourceManager.py* %{_datadir}/%{vdsm_name}/storage/safelease.py* %{_datadir}/%{vdsm_name}/storage/sdc.py* @@ -733,6 +701,8 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/threadLocal.py* %{_datadir}/%{vdsm_name}/storage/threadPool.py* %{_datadir}/%{vdsm_name}/storage/volume.py* +%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py* +%{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py* %{_libexecdir}/%{vdsm_name}/safelease %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh @@ -756,16 +726,17 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop -%{_datadir}/%{vdsm_name}/configNetwork.py* %{_datadir}/%{vdsm_name}/addNetwork +%{_datadir}/%{vdsm_name}/configNetwork.py* %{_datadir}/%{vdsm_name}/delNetwork -%{_datadir}/%{vdsm_name}/respawn -%{_datadir}/%{vdsm_name}/get-conf-item -%{_datadir}/%{vdsm_name}/set-conf-item -%{_datadir}/%{vdsm_name}/kaxmlrpclib.py* %{_datadir}/%{vdsm_name}/dumpStorageTable.py* +%{_datadir}/%{vdsm_name}/get-conf-item +%{_datadir}/%{vdsm_name}/kaxmlrpclib.py* %{_datadir}/%{vdsm_name}/ksm.py* +%{_datadir}/%{vdsm_name}/momIF.py* %{_datadir}/%{vdsm_name}/neterrors.py* +%{_datadir}/%{vdsm_name}/respawn +%{_datadir}/%{vdsm_name}/set-conf-item %{python_sitelib}/sos/plugins/vdsm.py* /lib/udev/rules.d/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -773,8 +744,12 @@ exit 0 %if 0%{?rhel} %dir %{_localstatedir}/log/core %else +%if 0%{?fedora} >= 18 +%{_polkitdir}/10-vdsm-libvirt-access.rules +%else %{_polkitdir}/10-vdsm-libvirt-access.pkla %endif +%endif %defattr(-, %{vdsm_user}, %{qemu_group}, -) %dir %{_localstatedir}/lib/libvirt/qemu/channels @@ -798,28 +773,36 @@ exit 0 %if !0%{?rhel} %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %endif -%{python_sitelib}/%{vdsm_name}/__init__.py* -%{python_sitelib}/%{vdsm_name}/config.py* -%{python_sitelib}/%{vdsm_name}/constants.py* -%{python_sitelib}/%{vdsm_name}/define.py* -%{python_sitelib}/%{vdsm_name}/exception.py* -%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* -%{python_sitelib}/%{vdsm_name}/netinfo.py* -%{python_sitelib}/%{vdsm_name}/qemuImg.py* -%{python_sitelib}/%{vdsm_name}/SecureXMLRPCServer.py* -%{python_sitelib}/%{vdsm_name}/utils.py* -%{python_sitelib}/%{vdsm_name}/vdscli.py* -%{python_sitelib}/%{vdsm_name}/betterPopen/__init__.py* -%{python_sitelib}/%{vdsm_name}/betterPopen/createprocess.so -%{python_sitelib}/%{vdsm_name}/tool/__init__.py* +%{python_sitearch}/%{vdsm_name}/__init__.py* +%{python_sitearch}/%{vdsm_name}/config.py* +%{python_sitearch}/%{vdsm_name}/constants.py* +%{python_sitearch}/%{vdsm_name}/define.py* +%{python_sitearch}/%{vdsm_name}/exception.py* +%{python_sitearch}/%{vdsm_name}/libvirtconnection.py* +%{python_sitearch}/%{vdsm_name}/netinfo.py* +%{python_sitearch}/%{vdsm_name}/qemuImg.py* +%{python_sitearch}/%{vdsm_name}/SecureXMLRPCServer.py* +%{python_sitearch}/%{vdsm_name}/utils.py* +%{python_sitearch}/%{vdsm_name}/vdscli.py* +%{python_sitearch}/%{vdsm_name}/betterPopen/__init__.py* +%{python_sitearch}/%{vdsm_name}/betterPopen/createprocess.so +%{python_sitearch}/%{vdsm_name}/tool/__init__.py* +%{python_sitearch}/%{vdsm_name}/tool/passwd.py* +%{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py* +%{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README %defattr(-, root, root, -) %{_datadir}/%{vdsm_name}/tests/*.py* -%{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/cpu_info.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt.out +%{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out +%{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out %{_datadir}/%{vdsm_name}/tests/netmaskconversions +%{_datadir}/%{vdsm_name}/tests/run_tests.sh +%{_datadir}/%{vdsm_name}/tests/route_info.out +%{_datadir}/%{vdsm_name}/tests/tc_filter_show.out %{_datadir}/%{vdsm_name}/tests/functional/*.py* %files hook-vhostmd @@ -831,84 +814,89 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%files hook-qemucmdline +%defattr(-, root, root, -) +%doc COPYING +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline + %if 0%{?with_hooks} %files hook-directlun -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_directlun -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_directlun +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun %files hook-fileinject -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject %files hook-floppy -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy %files hook-hostusb -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb %files hook-hugepages -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages %files hook-isolatedprivatevlan -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan %config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml %files hook-numa -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa %files hook-pincpu -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu %files hook-promisc -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc %files hook-qos -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos %files hook-scratchpad -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad %files hook-smartcard -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard %files hook-smbios -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios %files hook-sriov -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_sriov -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_sriov -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_sriov -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_sriov +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_sriov +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_sriov +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_sriov +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_sriov %files hook-vmdisk -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk %endif %files debug-plugin @@ -942,9 +930,7 @@ exit 0 %files bootstrap %defattr(-, root, root, -) %doc COPYING -%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* -%{_datadir}/%{vdsm_bootstrap}/deployUtil.py* -%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* +%{_datadir}/%{vdsm_bootstrap} %files reg %defattr(-, root, root, -) @@ -985,6 +971,7 @@ exit 0 %defattr(-, root, root, -) %doc COPYING %{_libexecdir}/%{vdsm_name}/vdsm-faqemu +%{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop/10_faqemu %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %files gluster @@ -998,6 +985,13 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Wed Oct 31 2012 Douglas Schilling Landgraf 4.10.1-1 +- vdsm-4.10.1 +- merged vdsm.spec from f17 with last upstream vdsm.spec + +* Wed Oct 24 2012 Federico Simoncelli 4.10.0-12 +- configure selinux for sanlock on nfs + * Sat Oct 20 2012 Peter Robinson 4.10.0-11 - Merge F17 changes into F18+ and disable make check due to pep8 issues - Add pyparted dependency From e2e90dccd74d4d91a4e0af55703ffb05999949e8 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 1 Nov 2012 09:51:21 -0400 Subject: [PATCH 028/126] vdsm update to vdsm-4.10.1-1.fc18.src.rpm --- ...umFind-rename-and-simplify-semantics.patch | 70 ------ 0002-drop-deployUtil.yumSearch.patch | 63 ------ ...earchVersion-compare-versions-sanely.patch | 95 --------- ...delete-candidates-networks-only-once.patch | 77 ------- ...ion-in-setupNetworks-is-not-relevant.patch | 33 --- 0006-Minor-optimization-for-delNetwork.patch | 97 --------- ...re-bridgeless-networks-in-ifaceUsers.patch | 38 ---- 0008-Minor-optimization-for-addNetwork.patch | 65 ------ ...se-already-known-iface-in-addNetwork.patch | 37 ---- ...oper-MTU-on-bonding-when-add-network.patch | 39 ---- ...-Add-bridge-on-top-of-VLAN-if-exists.patch | 50 ----- ...tConfigDirty-bit-to-getVdsCaps-repor.patch | 30 --- 0013-remove-flag-skipLibvirt.patch | 132 ------------ ...to-change-bond-without-network-attac.patch | 140 ------------ ...to-change-network-according-the-diff.patch | 47 ----- ...to-remove-bond-and-attach-network-to.patch | 49 ----- ...6873-Allow-to-create-bond-without-ne.patch | 31 --- 0018-BZ-832577-node-can-t-be-approved.patch | 38 ---- ...ix-typo-in-keyword-argument-exc_info.patch | 57 ----- ...il-use-os.uname-instead-of-bin-uname.patch | 63 ------ ...htly-saner-kernel-version-comparison.patch | 125 ----------- ...to-create-a-network-on-top-of-existi.patch | 39 ---- ...to-create-VLANed-network-on-top-of-e.patch | 77 ------- ...d-bond-breaking-after-network-detach.patch | 72 ------- ...-properly-if-connectivity-check-fail.patch | 70 ------ ...ng-etc-ovirt-node-means-it-is-a-node.patch | 38 ---- ...sion-to-fix-readonly-lease-unsupport.patch | 32 --- ...32199-move-selinux-from-init-to-spec.patch | 89 -------- ...tworkValidation-do-not-explode-if-ST.patch | 34 --- 0030-ovirt_functions-fix-elif-statement.patch | 39 ---- ...3-removeBridge-drop-remove-interface.patch | 44 ---- ...BZ-837443-replace-the-netinfo-import.patch | 199 ------------------ 0033-configNetwork-fix-NetInfo-call.patch | 32 --- ...443-removeVlan-drop-remove-interface.patch | 55 ----- ...remove-bridge-before-add-VDSM-bridge.patch | 64 ------ ...to-break-bond-and-create-a-new-netwo.patch | 47 ----- ...-detach-network-from-the-bond-during.patch | 47 ----- ...-explicitBonding-parameter-from-setu.patch | 115 ---------- ...-configNet-clear-up-atomicBackup-arg.patch | 41 ---- ...Backup-remove-new-files-upon-restore.patch | 51 ----- ...2948-deployUtil-safely-remove-bridge.patch | 33 --- ...p-the-version-file-with-the-tarballs.patch | 147 ------------- ...ded-alignment-instead-of-using-pages.patch | 59 ------ ...in-multiplies-of-the-recommended-tra.patch | 50 ----- sources | 2 +- 45 files changed, 1 insertion(+), 2851 deletions(-) delete mode 100644 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch delete mode 100644 0002-drop-deployUtil.yumSearch.patch delete mode 100644 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch delete mode 100644 0004-Iterates-over-delete-candidates-networks-only-once.patch delete mode 100644 0005-options-translation-in-setupNetworks-is-not-relevant.patch delete mode 100644 0006-Minor-optimization-for-delNetwork.patch delete mode 100644 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch delete mode 100644 0008-Minor-optimization-for-addNetwork.patch delete mode 100644 0009-Use-already-known-iface-in-addNetwork.patch delete mode 100644 0010-Use-proper-MTU-on-bonding-when-add-network.patch delete mode 100644 0011-Add-bridge-on-top-of-VLAN-if-exists.patch delete mode 100644 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch delete mode 100644 0013-remove-flag-skipLibvirt.patch delete mode 100644 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch delete mode 100644 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch delete mode 100644 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch delete mode 100644 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch delete mode 100644 0018-BZ-832577-node-can-t-be-approved.patch delete mode 100644 0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch delete mode 100644 0020-deployUtil-use-os.uname-instead-of-bin-uname.patch delete mode 100644 0021-deployUtil-slightly-saner-kernel-version-comparison.patch delete mode 100644 0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch delete mode 100644 0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch delete mode 100644 0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch delete mode 100644 0025-Handle-bond-properly-if-connectivity-check-fail.patch delete mode 100644 0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch delete mode 100644 0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch delete mode 100644 0028-BZ-832199-move-selinux-from-init-to-spec.patch delete mode 100644 0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch delete mode 100644 0030-ovirt_functions-fix-elif-statement.patch delete mode 100644 0031-BZ-837443-removeBridge-drop-remove-interface.patch delete mode 100644 0032-BZ-837443-replace-the-netinfo-import.patch delete mode 100644 0033-configNetwork-fix-NetInfo-call.patch delete mode 100644 0034-BZ-837443-removeVlan-drop-remove-interface.patch delete mode 100644 0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch delete mode 100644 0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch delete mode 100644 0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch delete mode 100644 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch delete mode 100644 0039-configNet-clear-up-atomicBackup-arg.patch delete mode 100644 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch delete mode 100644 0041-BZ-842948-deployUtil-safely-remove-bridge.patch delete mode 100644 0042-Ship-the-version-file-with-the-tarballs.patch delete mode 100644 0043-Use-the-recommended-alignment-instead-of-using-pages.patch delete mode 100644 0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch diff --git a/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch b/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch deleted file mode 100644 index 46041c1..0000000 --- a/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 8cf22884c2134353981bca1cb0600451391dd0de Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:17:13 +0300 -Subject: [PATCH 01/17] deployUtil.yumFind: rename and simplify semantics - -deployUtil.yumListPackages is a convenience wrapper around -yum.YumBase.pkgSack.searchNevra() - -Change-Id: I5ad5405ae0f8548c0116ac5a8066325455aef13a -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5467 -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5542 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm_reg/deployUtil.py.in | 14 ++++++-------- - 1 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 976295f..c80b487 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1029,18 +1029,16 @@ def installAndVerify(pckgType, pckgName, action, args=None): - - return fReturn, msg - --def yumFind(pkgName): -+def yumListPackages(pkgName): - """ - Returns a list of available packages exists in yum's db. - """ - import yum -- lReturn = None - - my = yum.YumBase() - my.preconf.debuglevel = 0 # Remove yum noise -- lReturn = my.pkgSack.searchNevra(name=pkgName) -+ return my.pkgSack.searchNevra(name=pkgName) - -- return lReturn - - def yumSearch(pkgName): - """ -@@ -1048,8 +1046,8 @@ def yumSearch(pkgName): - """ - fReturn = False - -- pkgs = yumFind(pkgName) -- if pkgs and len(pkgs)>0: -+ pkgs = yumListPackages(pkgName) -+ if pkgs: - fReturn = True - logging.debug("yumSearch: found " + str(pkgName) + " entries: " + str(pkgs)) - else: -@@ -1064,8 +1062,8 @@ def yumSearchVersion(pkgName, ver, startWith=True): - """ - fReturn = False - -- pkgs = yumFind(pkgName) -- if pkgs and len(pkgs)>0: -+ pkgs = yumListPackages(pkgName) -+ if pkgs: - for item in pkgs: - if startWith: - if str(item).startswith(ver): --- -1.7.1 - diff --git a/0002-drop-deployUtil.yumSearch.patch b/0002-drop-deployUtil.yumSearch.patch deleted file mode 100644 index 4980e65..0000000 --- a/0002-drop-deployUtil.yumSearch.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 5edbed09c4091959e569e8cccc888bb72958082b Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:21:55 +0300 -Subject: [PATCH 02/17] drop deployUtil.yumSearch - -It was just a complex way of calculating bool(yumFind()). - -Change-Id: Iafc9d67fef5cb348255b06a9e6b404a70ec35693 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5468 -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5543 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vds_bootstrap/vds_bootstrap.py | 2 +- - vdsm_reg/deployUtil.py.in | 16 ---------------- - 2 files changed, 1 insertions(+), 17 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 0df5023..12e127e 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -225,7 +225,7 @@ class Deploy: - rc = True - - try: -- rc = deployUtil.yumSearch(VDSM_NAME) -+ rc = bool(deployUtil.yumListPackages(VDSM_NAME)) - except: - rc = False - logging.error("checkRegistration: Error searching for VDSM package!", -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index c80b487..1adf1a5 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1039,22 +1039,6 @@ def yumListPackages(pkgName): - my.preconf.debuglevel = 0 # Remove yum noise - return my.pkgSack.searchNevra(name=pkgName) - -- --def yumSearch(pkgName): -- """ -- Returns True is package exists in yum's db. -- """ -- fReturn = False -- -- pkgs = yumListPackages(pkgName) -- if pkgs: -- fReturn = True -- logging.debug("yumSearch: found " + str(pkgName) + " entries: " + str(pkgs)) -- else: -- logging.debug("yumSearch: package " + str(pkgName) + " not found!") -- -- return fReturn -- - def yumSearchVersion(pkgName, ver, startWith=True): - """ - Returns True is package exists in yum's db with the given version. --- -1.7.1 - diff --git a/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch b/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch deleted file mode 100644 index d9b45d7..0000000 --- a/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 67309fc8a7a4edd4996490b64f51ce37f0ed2327 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:33:22 +0300 -Subject: [PATCH 03/17] deployUtil.yumSearchVersion: compare versions sanely - -Change-Id: I0aa40c3395ca012a21f148f20125b54e3ba16d8a -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5469 -Reviewed-by: Mark Wu -Tested-by: Douglas Schilling Landgraf -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5544 -Tested-by: Federico Simoncelli -Reviewed-by: Federico Simoncelli ---- - vds_bootstrap/vds_bootstrap.py | 6 +++--- - vdsm_reg/deployUtil.py.in | 31 +++++++------------------------ - 2 files changed, 10 insertions(+), 27 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 12e127e..9801459 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -80,13 +80,13 @@ fedorabased = deployUtil.versionCompare(deployUtil.getOSVersion(), "16") >= 0 - - if rhel6based: - VDSM_NAME = "vdsm" -- VDSM_MIN_VER = VDSM_NAME + "-4.9" -+ VDSM_MIN_VER = "4.9" - KERNEL_VER = "2.6.32-.*.el6" - KERNEL_MIN_VER = 150 - MINIMAL_SUPPORTED_PLATFORM = "6.0" - else: - VDSM_NAME = "vdsm22" -- VDSM_MIN_VER = VDSM_NAME + "-4.5" -+ VDSM_MIN_VER = "4.5" - KERNEL_VER = "2.6.18-.*.el5" - KERNEL_MIN_VER = 159 - MINIMAL_SUPPORTED_PLATFORM = "5.5" -@@ -250,7 +250,7 @@ class Deploy: - rc = True - - try: -- rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER, True) -+ rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER) - except: - rc = False - logging.error("checkMajorVersion: Error searching for VDSM version!", -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 1adf1a5..1474196 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1039,32 +1039,15 @@ def yumListPackages(pkgName): - my.preconf.debuglevel = 0 # Remove yum noise - return my.pkgSack.searchNevra(name=pkgName) - --def yumSearchVersion(pkgName, ver, startWith=True): -- """ -- Returns True is package exists in yum's db with the given version. -- Note: yum internal code has verEQ and verGT. We should use it ASAP. -- """ -- fReturn = False -+def yumSearchVersion(pkgName, ver): -+ "Return True if package exists in yum's db with the given version or higer" -+ import rpmUtils.miscutils - -- pkgs = yumListPackages(pkgName) -- if pkgs: -- for item in pkgs: -- if startWith: -- if str(item).startswith(ver): -- fReturn = True -- logging.debug("yumSearchVersion: pkg " + str(item) + " starts with: " + ver) -- else: -- logging.debug("yumSearchVersion: pkg " + str(item) + " does not start with: " + ver) -- else: -- if str(item) == ver: -- fReturn = True -- logging.debug("yumSearchVersion: pkg " + str(item) + " matches: " + ver) -- else: -- logging.debug("yumSearchVersion: pkg " + str(item) + " does not match: " + ver) -+ for pkg in yumListPackages(pkgName): -+ if rpmUtils.miscutils.compareVerOnly(pkg.ver, ver) >= 0: -+ return True - else: -- logging.debug("yumSearchVersion: package " + str(pkgName) + " not found!") -- -- return fReturn -+ return False - - ############################################################################################################# - # Host PKI functions. --- -1.7.1 - diff --git a/0004-Iterates-over-delete-candidates-networks-only-once.patch b/0004-Iterates-over-delete-candidates-networks-only-once.patch deleted file mode 100644 index 3cb42b4..0000000 --- a/0004-Iterates-over-delete-candidates-networks-only-once.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 165284de4e03fb72fb9e4ca811fbcc77618ff02d Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 11:02:56 +0300 -Subject: [PATCH 04/17] Iterates over delete candidates networks only once - -Change-Id: Iec45c1cb3d76a70555e256f96c983e13a0518cbe -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5204 -Reviewed-by: Livnat Peer -Reviewed-by: Shu Ming -Tested-by: Dan Kenigsberg -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5546 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 26 ++++++++++++-------------- - 1 files changed, 12 insertions(+), 14 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index b37ff0f..3f2e5fe 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1010,26 +1010,23 @@ def setupNetworks(networks={}, bondings={}, **options): - networksAdded = [] - #bondingNetworks = {} # Reminder TODO - -- logger.info("Setting up network") -- logger.debug("Setting up network according to configuration: networks:%r, bondings:%r, options:%r" % (networks, bondings, options)) -+ logger.debug("Setting up network according to configuration: " -+ "networks:%r, bondings:%r, options:%r" % (networks, -+ bondings, options)) - - force = options.get('force', False) - if not utils.tobool(force): - logging.debug("Validating configuration") -- _validateNetworkSetup(dict(networks), dict(bondings), explicitBonding=options.get('explicitBonding', False)) -+ _validateNetworkSetup(dict(networks), dict(bondings), -+ explicitBonding=options.get('explicitBonding', -+ False)) - - logger.debug("Applying...") - try: -- delnetworks = {} -- for network, networkAttrs in networks.iteritems(): -+ # Remove networks with 'remove' attribute -+ for network, networkAttrs in networks.items(): - if 'remove' in networkAttrs: -- delnetworks[network] = networkAttrs -- -- for network, networkAttrs in delnetworks.iteritems(): -- if networkAttrs.pop('remove', False): -- assert not networkAttrs -- -- logger.debug('Removing network %r'%network) -+ logger.debug("Removing network %r" % network) - delNetwork(network, configWriter=configWriter, force=force) - del networks[network] - -@@ -1041,12 +1038,13 @@ def setupNetworks(networks={}, bondings={}, **options): - d = dict(networkAttrs) - if 'bonding' in d: - d['nics'] = bondings[d['bonding']]['nics'] -- d['bondingOptions'] = bondings[d['bonding']].get('options', None) -+ d['bondingOptions'] = bondings[d['bonding']].get('options', -+ None) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force - -- logger.debug('Adding network %r'%network) -+ logger.debug("Adding network %r" % network) - addNetwork(network, configWriter=configWriter, **d) - - if utils.tobool(options.get('connectivityCheck', True)): --- -1.7.1 - diff --git a/0005-options-translation-in-setupNetworks-is-not-relevant.patch b/0005-options-translation-in-setupNetworks-is-not-relevant.patch deleted file mode 100644 index a70cfca..0000000 --- a/0005-options-translation-in-setupNetworks-is-not-relevant.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 752dd81155caf00895d14fadc4aa1cbbc3e88364 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 15:08:09 +0300 -Subject: [PATCH 05/17] 'options' translation in setupNetworks is not relevant - -Change-Id: I68871fe1a4112fd7223e794a1b67bf98e26c104c -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5205 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Lei Li -Tested-by: Lei Li -Reviewed-by: Livnat Peer -Reviewed-on: http://gerrit.ovirt.org/5547 -Tested-by: Federico Simoncelli ---- - vdsm/API.py | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/vdsm/API.py b/vdsm/API.py -index c098b4b..70034aa 100644 ---- a/vdsm/API.py -+++ b/vdsm/API.py -@@ -1145,7 +1145,6 @@ class Global(object): - def setupNetworks(self, networks={}, bondings={}, options={}): - """Add a new network to this vds, replacing an old one.""" - -- self._translateOptionsToNew(options) - if not self._cif._networkSemaphore.acquire(blocking=False): - self.log.warn('concurrent network verb already executing') - return errCode['unavail'] --- -1.7.1 - diff --git a/0006-Minor-optimization-for-delNetwork.patch b/0006-Minor-optimization-for-delNetwork.patch deleted file mode 100644 index d142f96..0000000 --- a/0006-Minor-optimization-for-delNetwork.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 4accdc21e59f573ec0135ceb0faeda1b452acb22 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 20:23:28 +0300 -Subject: [PATCH 06/17] Minor optimization for delNetwork - -Change-Id: I66a37cb1100411af13197642bdb13ae745bc6e53 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5207 -Reviewed-by: Lei Li -Tested-by: Lei Li -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5548 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 31 +++++++++++++++++++------------ - 1 files changed, 19 insertions(+), 12 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 3f2e5fe..8d71375 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -736,22 +736,25 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - - if not utils.tobool(options.get('skipLibvirt', False)): - if network not in _netinfo.networks: -- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, "Cannot delete network %r: It doesn't exist" % network) -+ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -+ "Cannot delete network %r: It doesn't exist" % network) - - nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) - bridged = _netinfo.networks[network]['bridged'] - else: - bridged = True - -- logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s. options=%s"%(network, vlan, bonding, nics, options)) -+ logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s," -+ "options=%s" % (network, vlan, bonding, nics, options)) - - if not utils.tobool(force): - if bonding: - validateBondingName(bonding) - if set(nics) != set(_netinfo.bondings[bonding]["slaves"]): -- raise ConfigNetworkError(ne.ERR_BAD_NIC, 'delNetwork: %s are not all nics enslaved to %s' % (nics, bonding)) -+ raise ConfigNetworkError(ne.ERR_BAD_NIC, -+ "delNetwork: %s are not all nics enslaved to %s" % \ -+ (nics, bonding)) - if vlan: -- #assertVlan(vlan) - validateVlanId(vlan) - if bridged: - assertBridgeClean(network, vlan, bonding, nics) -@@ -763,30 +766,34 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - configWriter.setNewMtu(network) - - removeLibvirtNetwork(network, log=False) -- # the deleted bridge should never be up at this stage. -+ # We need to gather NetInfo again to refresh networks info from libvirt. -+ # The deleted bridge should never be up at this stage. - if network in NetInfo().networks: -- raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'delNetwork: bridge %s still exists' % network) -+ raise ConfigNetworkError(ne.ERR_USED_BRIDGE, -+ "delNetwork: bridge %s still exists" % network) - - if network and bridged: - ifdown(network) - subprocess.call([constants.EXT_BRCTL, 'delbr', network]) - configWriter.removeBridge(network) -+ - if vlan: - vlandev = (bonding or nics[0]) + '.' + vlan - ifdown(vlandev) -- subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], stderr=subprocess.PIPE) -+ subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], -+ stderr=subprocess.PIPE) - configWriter.removeVlan(vlan, bonding or nics[0]) -+ - if bonding: - if not bridged or not bondingOtherUsers(network, vlan, bonding): - ifdown(bonding) -- if not bridged or not bondingOtherUsers(network, vlan, bonding): - configWriter.removeBonding(bonding) -+ - for nic in nics: -- if not bridged or not nicOtherUsers(network, vlan, bonding, nic): -+ nicUsers = nicOtherUsers(network, vlan, bonding, nic) -+ if not nicUsers: - ifdown(nic) -- if bridged and nicOtherUsers(network, vlan, bonding, nic): -- continue -- configWriter.removeNic(nic) -+ configWriter.removeNic(nic) - - def clientSeen(timeout): - start = time.time() --- -1.7.1 - diff --git a/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch b/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch deleted file mode 100644 index 93fd5ae..0000000 --- a/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b66fdcfbfe9022aa6ec33df274a5a81a73d1af5f Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 19:24:12 +0300 -Subject: [PATCH 07/17] Don't ignore bridgeless networks in ifaceUsers - -Change-Id: Id45b37683d52feebd1b31421c2a717695394147a -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5206 -Tested-by: Dan Kenigsberg -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5549 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 8d71375..fc43d67 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -86,9 +86,11 @@ def ifaceUsers(iface): - "Returns a list of entities using the interface" - _netinfo = NetInfo() - users = set() -- for b, bdict in _netinfo.networks.iteritems(): -- if bdict['bridged'] and iface in bdict['ports']: -- users.add(b) -+ for n, ndict in _netinfo.networks.iteritems(): -+ if ndict['bridged'] and iface in ndict['ports']: -+ users.add(n) -+ elif not ndict['bridged'] and iface == ndict['interface']: -+ users.add(n) - for b, bdict in _netinfo.bondings.iteritems(): - if iface in bdict['slaves']: - users.add(b) --- -1.7.1 - diff --git a/0008-Minor-optimization-for-addNetwork.patch b/0008-Minor-optimization-for-addNetwork.patch deleted file mode 100644 index 4d711f4..0000000 --- a/0008-Minor-optimization-for-addNetwork.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5bdaa7c0a1cc696ed4e1d492d9af576fd8c8e4eb Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 6 Jun 2012 09:25:03 +0300 -Subject: [PATCH 08/17] Minor optimization for addNetwork - -Change-Id: I5506140ccd065d76a77414593635598f26289829 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5208 -Reviewed-by: Lei Li -Tested-by: Lei Li -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5550 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 21 ++++++++------------- - 1 files changed, 8 insertions(+), 13 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index fc43d67..89b3047 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -613,32 +613,27 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - ifdown(nic) - - if bridged: -- configWriter.addBridge(network, ipaddr=ipaddr, netmask=netmask, mtu=mtu, -- gateway=gateway, **options) -+ configWriter.addBridge(network, ipaddr=ipaddr, netmask=netmask, -+ mtu=mtu, gateway=gateway, **options) - ifdown(network) - -- # since we have vlan device, it is connected to the bridge. other -- # interfaces should be connected to the bridge through vlan, and not directly. -- brName = network if bridged and not vlan else None -+ brName = network if bridged else None - - # nics must be activated in the same order of boot time to expose the correct - # MAC address. - for nic in nicSort(nics): -- if not bonding and bridged: -- configWriter.addNic(nic, bridge=brName, mtu=max(prevmtu, mtu)) -+ configWriter.addNic(nic, bonding=bonding, bridge=brName, mtu=max(prevmtu, mtu)) - ifup(nic) - if bonding: - configWriter.addBonding(bonding, bridge=brName, bondingOptions=bondingOptions, mtu=mtu) -- for nic in nics: -- configWriter.addNic(nic, bonding=bonding, mtu=max(prevmtu, mtu)) - ifup(bonding) -+ - if vlan: - iface += '.' + vlan -- configWriter.addVlan(vlan, bonding or nics[0], network=network if bridged else None, mtu=mtu, bridged=bridged) -- # since we have vlan device, it is connected to the network. other -- # interfaces should be connected to the network through vlan, and not -- # directly. -+ configWriter.addVlan(vlan, bonding or nics[0], network=brName, -+ mtu=mtu, bridged=bridged) - ifup((bonding or nics[0]) + '.' + vlan) -+ - if bridged: - if options.get('bootproto') == 'dhcp' and not utils.tobool(options.get('blockingdhcp')): - # wait for dhcp in another thread, so vdsm won't get stuck (BZ#498940) --- -1.7.1 - diff --git a/0009-Use-already-known-iface-in-addNetwork.patch b/0009-Use-already-known-iface-in-addNetwork.patch deleted file mode 100644 index 09ea6db..0000000 --- a/0009-Use-already-known-iface-in-addNetwork.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 16e43715e9731db46b4ea519eb4c0c1294bf18a4 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 12 Jun 2012 15:38:27 +0300 -Subject: [PATCH 09/17] Use already known iface in addNetwork - -Change-Id: I085792401a04d7695855e81b16b442e4c31ab706 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5283 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5551 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 89b3047..87b32ed 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -629,10 +629,10 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - ifup(bonding) - - if vlan: -- iface += '.' + vlan -- configWriter.addVlan(vlan, bonding or nics[0], network=brName, -+ configWriter.addVlan(vlan, iface, network=brName, - mtu=mtu, bridged=bridged) -- ifup((bonding or nics[0]) + '.' + vlan) -+ iface += '.' + vlan -+ ifup(iface) - - if bridged: - if options.get('bootproto') == 'dhcp' and not utils.tobool(options.get('blockingdhcp')): --- -1.7.1 - diff --git a/0010-Use-proper-MTU-on-bonding-when-add-network.patch b/0010-Use-proper-MTU-on-bonding-when-add-network.patch deleted file mode 100644 index 7a24e2d..0000000 --- a/0010-Use-proper-MTU-on-bonding-when-add-network.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 34a348e500b2c0f50f3de3095db8aa7d61f2953a Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 6 Jun 2012 14:16:37 +0300 -Subject: [PATCH 10/17] Use proper MTU on bonding when add network - -Change-Id: Id34f2462ddfc2c9f4a323235c79f919c0cce12a7 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5209 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5552 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 87b32ed..5353d0e 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -622,10 +622,13 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - # nics must be activated in the same order of boot time to expose the correct - # MAC address. - for nic in nicSort(nics): -- configWriter.addNic(nic, bonding=bonding, bridge=brName, mtu=max(prevmtu, mtu)) -+ configWriter.addNic(nic, bonding=bonding, bridge=brName, -+ mtu=max(prevmtu, mtu)) - ifup(nic) - if bonding: -- configWriter.addBonding(bonding, bridge=brName, bondingOptions=bondingOptions, mtu=mtu) -+ configWriter.addBonding(bonding, bridge=brName, -+ bondingOptions=bondingOptions, -+ mtu=max(prevmtu, mtu)) - ifup(bonding) - - if vlan: --- -1.7.1 - diff --git a/0011-Add-bridge-on-top-of-VLAN-if-exists.patch b/0011-Add-bridge-on-top-of-VLAN-if-exists.patch deleted file mode 100644 index a566e93..0000000 --- a/0011-Add-bridge-on-top-of-VLAN-if-exists.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 69af2fcbdedfe6eab77c4c748a911caa78366590 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 12 Jun 2012 16:03:04 +0300 -Subject: [PATCH 11/17] Add bridge on top of VLAN if exists - -In VLAN case we should attach bridge only to the VLAN -rather than to underlying NICs or bond - -Change-Id: I1c554853b5be9330933174da810b6d67c83eb96e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5284 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5553 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 5353d0e..97aec7c 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -617,16 +617,19 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - mtu=mtu, gateway=gateway, **options) - ifdown(network) - -+ # For VLAN we should attach bridge only to the VLAN device -+ # rather than to underlying NICs or bond - brName = network if bridged else None -+ bridgeForNic = None if vlan else brName - -- # nics must be activated in the same order of boot time to expose the correct -- # MAC address. -+ # NICs must be activated in the same order of boot time -+ # to expose the correct MAC address. - for nic in nicSort(nics): -- configWriter.addNic(nic, bonding=bonding, bridge=brName, -+ configWriter.addNic(nic, bonding=bonding, bridge=bridgeForNic, - mtu=max(prevmtu, mtu)) - ifup(nic) - if bonding: -- configWriter.addBonding(bonding, bridge=brName, -+ configWriter.addBonding(bonding, bridge=bridgeForNic, - bondingOptions=bondingOptions, - mtu=max(prevmtu, mtu)) - ifup(bonding) --- -1.7.1 - diff --git a/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch b/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch deleted file mode 100644 index 2f2ae71..0000000 --- a/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b5198d7ea6325374ad166043cf8597a148870a14 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 11 Jun 2012 19:37:58 +0300 -Subject: [PATCH 12/17] BZ#830485 - Add netConfigDirty bit to getVdsCaps report - -Change-Id: Iba641a74d33157186ddc6ceb6196b531953c9c8b -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5257 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5554 -Tested-by: Federico Simoncelli ---- - vdsm/API.py | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/vdsm/API.py b/vdsm/API.py -index 70034aa..abb3510 100644 ---- a/vdsm/API.py -+++ b/vdsm/API.py -@@ -1073,6 +1073,7 @@ class Global(object): - Report host capabilities. - """ - c = caps.get() -+ c['netConfigDirty'] = str(self._cif._netConfigDirty) - - return {'status': doneCode, 'info': c} - --- -1.7.1 - diff --git a/0013-remove-flag-skipLibvirt.patch b/0013-remove-flag-skipLibvirt.patch deleted file mode 100644 index 5d9e8b7..0000000 --- a/0013-remove-flag-skipLibvirt.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 325aa66a2c32a6889f199628f2aedfaba742cb00 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Wed, 13 Jun 2012 17:44:16 -0400 -Subject: [PATCH 13/17] remove flag skipLibvirt - -Currently, VDSM manage networks by it's own and uses libvirt to store the net definitions, not requiring any additional -flag as skipLibvirt. This patch will remove completely skipLibvirt flag. - -Change-Id: Id87c89f04912976797d629344238749a8562382b -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5262 -Reviewed-by: Shu Ming -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5555 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 29 ++++++++++------------------- - vdsm_reg/deployUtil.py.in | 5 ++--- - 2 files changed, 12 insertions(+), 22 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 97aec7c..effb279 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -238,8 +238,7 @@ class ConfigWriter(object): - s += 'NM_CONTROLLED=no\n' - BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', - 'force', 'blockingdhcp', -- 'connectivityCheck', 'connectivityTimeout', -- 'skipLibvirt'] -+ 'connectivityCheck', 'connectivityTimeout'] - for k in set(kwargs.keys()).difference(set(BLACKLIST)): - if re.match('^[a-zA-Z_]\w*$', k): - s += '%s=%s\n' % (k.upper(), pipes.quote(kwargs[k])) -@@ -493,7 +492,7 @@ def validateVlanId(vlan): - - - def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask, gateway, -- bondingOptions, bridged=True, skipLibvirt=False): -+ bondingOptions, bridged=True): - if (vlan or bonding) and not nics: - raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'vlan/bonding definition requires nics. got: %r'%(nics,)) - -@@ -502,12 +501,9 @@ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask - validateBridgeName(bridge) - if bridge in _netinfo.networks: - raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'Bridge already exists') -- elif not skipLibvirt: -+ - if bridge in _netinfo.getBridgelessNetworks(): - raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'network already exists') -- else: -- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, -- 'bridgeless network can not be added when skip libvirt') - - # vlan - if vlan: -@@ -576,7 +572,6 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - gateway=None, force=False, configWriter=None, bondingOptions=None, bridged=True, **options): - nics = nics or () - _netinfo = NetInfo() -- skipLibvirt = utils.tobool(options.get('skipLibvirt', False)) - bridged = utils.tobool(bridged) - - if mtu: -@@ -588,7 +583,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - _addNetworkValidation(_netinfo, bridge=network if bridged else None, - vlan=vlan, bonding=bonding, nics=nics, ipaddr=ipaddr, - netmask=netmask, gateway=gateway, bondingOptions=bondingOptions, -- bridged=bridged, skipLibvirt=skipLibvirt) -+ bridged=bridged) - - logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," - " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", -@@ -650,8 +645,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - ifup(network) - - # add libvirt network -- if not skipLibvirt: -- createLibvirtNetwork(network, bridged, iface) -+ createLibvirtNetwork(network, bridged, iface) - - def createLibvirtNetwork(network, bridged=True, iface=None): - conn = libvirtconnection.get() -@@ -737,15 +731,12 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - - validateBridgeName(network) - -- if not utils.tobool(options.get('skipLibvirt', False)): -- if network not in _netinfo.networks: -- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -- "Cannot delete network %r: It doesn't exist" % network) -+ if network not in _netinfo.networks: -+ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -+ "Cannot delete network %r: It doesn't exist" % network) - -- nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) -- bridged = _netinfo.networks[network]['bridged'] -- else: -- bridged = True -+ nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) -+ bridged = _netinfo.networks[network]['bridged'] - - logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s," - "options=%s" % (network, vlan, bonding, nics, options)) -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 1474196..2f240cc 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -894,7 +894,7 @@ def makeBridge(vdcName, vdsmDir): - #Delete existing bridge in oVirt - if fReturn and fIsOvirt: - try: -- out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan, bonding, nic] + ['skipLibvirt=True']) -+ out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan, bonding, nic]) - if ret: - if ret == 17: #ERR_BAD_BRIDGE - logging.debug("makeBridge Ignoring error of del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) -@@ -909,8 +909,7 @@ def makeBridge(vdcName, vdsmDir): - if fReturn: - try: - lstBridgeOptions.append('blockingdhcp=true') -- out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_ADD) , MGT_BRIDGE_NAME, vlan, bonding, nic] + lstBridgeOptions -- + ['skipLibvirt=True']) -+ out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_ADD) , MGT_BRIDGE_NAME, vlan, bonding, nic] + lstBridgeOptions) - if ret: - fReturn = False - logging.debug("makeBridge Failed to add " + MGT_BRIDGE_NAME + " bridge out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) --- -1.7.1 - diff --git a/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch b/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch deleted file mode 100644 index b091f0a..0000000 --- a/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch +++ /dev/null @@ -1,140 +0,0 @@ -From ca7a6b1244f7a400bf5dc51a5d59662e5602534b Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 13 Jun 2012 12:18:02 +0300 -Subject: [PATCH 14/17] BZ#826873 - Allow to change bond without network attached to it - -Change-Id: I3770017d8e633ccf5f9cf9b41a93df57229c443e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5312 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5556 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- - vdsm/netinfo.py | 4 +++ - 2 files changed, 67 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index effb279..fce3e71 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -958,6 +958,52 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - "Setup attached more than one network to bonding %s, some of which aren't vlans"%(bonding)) - - -+def _editBondings(bondings, configWriter): -+ """ Add/Edit bond interface """ -+ logger = logging.getLogger("_editBondings") -+ -+ _netinfo = NetInfo() -+ -+ for bond, bondAttrs in bondings.iteritems(): -+ logger.debug("Creating/Editing bond %s with attributes %s", -+ bond, bondAttrs) -+ if bond in _netinfo.bondings: -+ ifdown(bond) -+ # Take down all bond's NICs. -+ for nic in _netinfo.getNicsForBonding(bond): -+ ifdown(nic) -+ configWriter.removeNic(nic) -+ -+ # NICs must be activated in the same order of boot time -+ # to expose the correct MAC address. -+ for nic in nicSort(bondAttrs['nics']): -+ configWriter.addNic(nic, bonding=bond) -+ ifup(nic) -+ -+ configWriter.addBonding(bond, -+ bondingOptions=bondAttrs.get('options', None)) -+ ifup(bond) -+ -+def _removeBondings(bondings, configWriter): -+ """ Add/Edit bond interface """ -+ logger = logging.getLogger("_removeBondings") -+ -+ _netinfo = NetInfo() -+ -+ for bond, bondAttrs in bondings.items(): -+ if 'remove' in bondAttrs: -+ nics = _netinfo.getNicsForBonding(bond) -+ logger.debug("Removing bond %r with nics = %s", bond, nics) -+ ifdown(bond) -+ configWriter.removeBonding(bond) -+ -+ for nic in nics: -+ ifdown(nic) -+ configWriter.removeNic(nic) -+ -+ del bondings[bond] -+ -+ - def setupNetworks(networks={}, bondings={}, **options): - """Add/Edit/Remove configuration for networks and bondings. - -@@ -1009,7 +1055,6 @@ def setupNetworks(networks={}, bondings={}, **options): - _netinfo = NetInfo() - configWriter = ConfigWriter() - networksAdded = [] -- #bondingNetworks = {} # Reminder TODO - - logger.debug("Setting up network according to configuration: " - "networks:%r, bondings:%r, options:%r" % (networks, -@@ -1031,16 +1076,21 @@ def setupNetworks(networks={}, bondings={}, **options): - delNetwork(network, configWriter=configWriter, force=force) - del networks[network] - -+ handledBonds = set() - for network, networkAttrs in networks.items(): - if network in _netinfo.networks: - delNetwork(network, configWriter=configWriter, force=force) - else: - networksAdded.append(network) -+ - d = dict(networkAttrs) - if 'bonding' in d: - d['nics'] = bondings[d['bonding']]['nics'] - d['bondingOptions'] = bondings[d['bonding']].get('options', - None) -+ # Don't remove bondX from the bonding list here, -+ # because it may be in use for other networks -+ handledBonds.add(d['bonding']) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force -@@ -1048,6 +1098,18 @@ def setupNetworks(networks={}, bondings={}, **options): - logger.debug("Adding network %r" % network) - addNetwork(network, configWriter=configWriter, **d) - -+ # Do not handle a bonding device twice. -+ # We already handled it before during addNetwork. -+ for bond in handledBonds: -+ del bondings[bond] -+ -+ # We are now left with bondings whose network was not mentioned -+ # Remove bonds with 'remove' attribute -+ _removeBondings(bondings, configWriter) -+ -+ # Check whether bonds should be resized -+ _editBondings(bondings, configWriter) -+ - if utils.tobool(options.get('connectivityCheck', True)): - logger.debug('Checking connectivity...') - if not clientSeen(int(options.get('connectivityTimeout', -diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py -index 05f8323..536b4c7 100644 ---- a/vdsm/netinfo.py -+++ b/vdsm/netinfo.py -@@ -339,6 +339,10 @@ class NetInfo(object): - if nic in bdict['slaves']: - yield b - -+ def getNicsForBonding(self, bond): -+ bondAttrs = self.bondings[bond] -+ return bondAttrs['slaves'] -+ - def getBondingForNic(self, nic): - bondings = list(self.getBondingsForNic(nic)) - if bondings: --- -1.7.1 - diff --git a/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch b/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch deleted file mode 100644 index 3fed28a..0000000 --- a/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d3c91bc345f27a78d17c836f04fe13f5d1be6856 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Sun, 10 Jun 2012 10:40:48 +0300 -Subject: [PATCH 15/17] BZ#830486 - Allow to change network according the diffs from previous state - -We may not receive any information about the bonding device if it is unchanged. -In this case vdsm shouldn't check the bond information of this network. - -Change-Id: I1ece66a351576d5789a8968ccda9e67f423b860c -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5211 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5557 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 15 +++++++++------ - 1 files changed, 9 insertions(+), 6 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index fce3e71..ab07da6 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1085,12 +1085,15 @@ def setupNetworks(networks={}, bondings={}, **options): - - d = dict(networkAttrs) - if 'bonding' in d: -- d['nics'] = bondings[d['bonding']]['nics'] -- d['bondingOptions'] = bondings[d['bonding']].get('options', -- None) -- # Don't remove bondX from the bonding list here, -- # because it may be in use for other networks -- handledBonds.add(d['bonding']) -+ # we may not receive any information -+ # about the bonding device if it is unchanged -+ if bondings: -+ d['nics'] = bondings[d['bonding']]['nics'] -+ d['bondingOptions'] = bondings[d['bonding']].get('options', -+ None) -+ # Don't remove bondX from the bonding list here, -+ # because it may be in use for other networks -+ handledBonds.add(d['bonding']) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force --- -1.7.1 - diff --git a/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch b/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch deleted file mode 100644 index 8ca276b..0000000 --- a/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 990be7c6e07646fb176d90f679baa691b28d279f Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 13 Jun 2012 16:10:58 +0300 -Subject: [PATCH 16/17] BZ#826467 - Allow to remove bond and attach network to NIC - -Change-Id: I0be3dafe6a0a65a09bf268c8c8c6ee6fd7ba1084 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5323 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5558 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 14 ++++++-------- - 1 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index ab07da6..0df6c8f 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1069,20 +1069,18 @@ def setupNetworks(networks={}, bondings={}, **options): - - logger.debug("Applying...") - try: -- # Remove networks with 'remove' attribute -- for network, networkAttrs in networks.items(): -- if 'remove' in networkAttrs: -- logger.debug("Removing network %r" % network) -- delNetwork(network, configWriter=configWriter, force=force) -- del networks[network] -- -- handledBonds = set() -+ # Remove edited networks and networks with 'remove' attribute - for network, networkAttrs in networks.items(): - if network in _netinfo.networks: -+ logger.debug("Removing network %r" % network) - delNetwork(network, configWriter=configWriter, force=force) -+ if 'remove' in networkAttrs: -+ del networks[network] - else: - networksAdded.append(network) - -+ handledBonds = set() -+ for network, networkAttrs in networks.iteritems(): - d = dict(networkAttrs) - if 'bonding' in d: - # we may not receive any information --- -1.7.1 - diff --git a/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch b/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch deleted file mode 100644 index 454538b..0000000 --- a/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0329fec019726434a3313cc2acbd5f23480f365b Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 19 Jun 2012 17:32:55 +0300 -Subject: [PATCH 17/17] Related to BZ#826873 - Allow to create bond without network - -Change-Id: Ic4bfababbc9b81d921b2e26be9e70d07aee7124e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5487 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5559 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 0df6c8f..8b831d6 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -950,7 +950,7 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - "Setup attached more than one network to nic %s, some of which aren't vlans"%(nic)) - - for bonding, bondingAttrs in bondings.iteritems(): -- networks = bondingAttrs['_networks'] -+ networks = bondingAttrs.get('_networks', {}) - if len(networks) > 1: - for network, networkAttrs in networks.iteritems(): - if not networkAttrs.get('vlan', None): --- -1.7.1 - diff --git a/0018-BZ-832577-node-can-t-be-approved.patch b/0018-BZ-832577-node-can-t-be-approved.patch deleted file mode 100644 index 1702ee5..0000000 --- a/0018-BZ-832577-node-can-t-be-approved.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 013b2208f20d1b7ce0b894fc54a41980c0afc62f Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Wed, 20 Jun 2012 15:48:03 -0400 -Subject: [PATCH 18/19] BZ#832577: node can't be approved - -Because of ovirt-node's readonly filesystem, directory creation at runtime has to be handled carefully. -/rhev/data-center used to be created by the vdsm rpm when it is installed. -It's now listed in vdsm.spec as %ghost which means it is *not* laid down by default. -At runtime, it fails to be created because of the read-only filesystem. - -Regression introduced by commit ee1e68d3416d8fd728df75c0a41dd3db48f9138d -Patch provided by: Mike Burns - -Change-Id: I3818661c886118d34620e5308434e57bad92913f -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5567 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index c567e65..3fd404e 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -500,7 +500,7 @@ exit 0 - /lib/systemd/systemd-vdsmd - %{_unitdir}/vdsmd.service - %endif --%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ -+%dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ - %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks - %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt - %dir %{_libexecdir}/%{vdsm_name} --- -1.7.10.2 - diff --git a/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch b/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch deleted file mode 100644 index 60aa0ea..0000000 --- a/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 5982cb826a56ee322c7e5d6fbee479ff5b996561 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Sat, 23 Jun 2012 18:46:51 +0300 -Subject: [PATCH 19/19] BZ#824298 fix typo in keyword argument exc_info - -Change-Id: Iff2ba114298bc1223ae4969f5da0eb5a5ce8672e -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5617 -Reviewed-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5628 ---- - vdsm/configNetwork.py | 4 ++-- - vdsm/storage/image.py | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 8b831d6..c535499 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1,4 +1,4 @@ --# Copyright 2011 Red Hat, Inc. -+# Copyright 2011-2012 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -673,7 +673,7 @@ def removeLibvirtNetwork(network, log=True): - except libvirt.libvirtError: - if log: - logging.debug('failed to remove libvirt network %s', netName, -- exec_info=True) -+ exc_info=True) - - def assertBridgeClean(bridge, vlan, bonding, nics): - brifs = os.listdir('/sys/class/net/%s/brif/' % bridge) -diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py -index 03c94dc..a868568 100644 ---- a/vdsm/storage/image.py -+++ b/vdsm/storage/image.py -@@ -1,5 +1,5 @@ - # --# Copyright 2009-2011 Red Hat, Inc. -+# Copyright 2009-2012 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -676,7 +676,7 @@ class Image: - raise - except Exception, e: - self.__cleanupMultimove(sdUUID=dstSdUUID, imgList=cleanup_candidates, postZero=postZero) -- self.log.error(e, exec_info=True) -+ self.log.error(e, exc_info=True) - raise se.CopyImageError("image=%s, src domain=%s, dst domain=%s: msg %s" % (imgUUID, srcSdUUID, dstSdUUID, str(e))) - - cleanup_candidates.append(imgUUID) --- -1.7.10.2 - diff --git a/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch b/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch deleted file mode 100644 index 02e9d3d..0000000 --- a/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 1be9207d91f1f3df02161356f0057c24b6a230c3 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:52:25 +0300 -Subject: [PATCH 20/25] deployUtil: use os.uname instead of /bin/uname - -simpler, quicker, and less error-prone. - -Change-Id: I7abc1f010bbf15b39d7590c4b55d1835c645a87f -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5636 -Tested-by: Douglas Schilling Landgraf -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5749 ---- - configure.ac | 1 - - vdsm_reg/deployUtil.py.in | 11 ++--------- - 2 files changed, 2 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f3a609f..7b829f5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -177,7 +177,6 @@ AC_PATH_PROG([TC_PATH], [tc], [/sbin/tc]) - AC_PATH_PROG([TUNE2FS_PATH], [tune2fs], [/sbin/tune2fs]) - AC_PATH_PROG([UDEVADM_PATH], [udevadm], [/sbin/udevadm]) - AC_PATH_PROG([UMOUNT_PATH], [umount], [/bin/umount]) --AC_PATH_PROG([UNAME_PATH], [uname], [/bin/uname]) - AC_PATH_PROG([UNPERSIST_PATH], [unpersist], [/usr/sbin/unpersist]) - AC_PATH_PROG([VCONFIG_PATH], [vconfig], [/sbin/vconfig]) - AC_PATH_PROG([WGET_PATH], [wget], [/usr/bin/wget]) -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 2f240cc..7586aca 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -72,7 +72,6 @@ EX_RPM = '@RPM_PATH@' - EX_SED = '@SED_PATH@' - EX_SERVICE = '@SERVICE_PATH@' - EX_SYSTEMCTL = '@SYSTEMCTL_PATH@' --EX_UNAME = '@UNAME_PATH@' - EX_YUM = '@YUM_PATH@' - - # Other constants -@@ -400,15 +399,9 @@ def getOSVersion(): - return "Unknown OS" - - def getKernelVersion(): -- """ -- Return current kernel release. -- """ -- strReturn = '0' -- out, err, rc = _logExec([EX_UNAME, "-r"]) -- if not rc: -- strReturn = out -+ """Return current kernel version adn release.""" - -- return strReturn -+ return os.uname()[2] - - def updateKernelArgs(arg): - """ --- -1.7.10.2 - diff --git a/0021-deployUtil-slightly-saner-kernel-version-comparison.patch b/0021-deployUtil-slightly-saner-kernel-version-comparison.patch deleted file mode 100644 index 29fdb43..0000000 --- a/0021-deployUtil-slightly-saner-kernel-version-comparison.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 61672ca8a0d5140aa09ae79c5c0f7b962495a94e Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 02:00:14 +0300 -Subject: [PATCH 21/25] deployUtil: slightly saner kernel version comparison - -Change-Id: If2348ce464943e873e31eb61d0aaaa8b936679b2 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5637 -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5750 ---- - vds_bootstrap/vds_bootstrap.py | 33 ++++++++------------------------- - vdsm_reg/deployUtil.py.in | 16 +++++++++++++--- - 2 files changed, 21 insertions(+), 28 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 9801459..5ddc950 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -48,7 +48,6 @@ import shutil - import logging - import logging.config - import random --import re - import ConfigParser - import socket - import tempfile -@@ -81,14 +80,12 @@ fedorabased = deployUtil.versionCompare(deployUtil.getOSVersion(), "16") >= 0 - if rhel6based: - VDSM_NAME = "vdsm" - VDSM_MIN_VER = "4.9" -- KERNEL_VER = "2.6.32-.*.el6" -- KERNEL_MIN_VER = 150 -+ KERNEL_MIN_VR = ("2.6.32", "150") - MINIMAL_SUPPORTED_PLATFORM = "6.0" - else: - VDSM_NAME = "vdsm22" - VDSM_MIN_VER = "4.5" -- KERNEL_VER = "2.6.18-.*.el5" -- KERNEL_MIN_VER = 159 -+ KERNEL_MIN_VR = ("2.6.18", "159") - MINIMAL_SUPPORTED_PLATFORM = "5.5" - - # Required packages -@@ -300,7 +297,6 @@ class Deploy: - """ - Check the compatibility of OS and kernel - """ -- kernel_ver = None - os_status = "FAIL" - kernel_status = "FAIL" - os_message = "Unsupported platform version" -@@ -329,34 +325,21 @@ class Deploy: - os_status = "OK" - - if self.rc: -- res = deployUtil.getKernelVersion() -- try: -- kernel_ver = res.split()[0] -- if re.match(KERNEL_VER, kernel_ver): -- kernel_ver = int(kernel_ver.split('-')[1].split('.')[0]) -- else: -- kernel_ver = 0 -- except: -- kernel_ver = 0 -- -- if fedorabased: -- kernel_status = "OK" -- kernel_message = "Skipped kernel version check" -- elif kernel_ver >= KERNEL_MIN_VER: -+ kernel_vr = deployUtil.getKernelVR() -+ if deployUtil.compareVR(kernel_vr, KERNEL_MIN_VR) >= 0: - kernel_status = "OK" -- kernel_message = "Supported kernel version: " + str(kernel_ver) -+ kernel_message = "Supported kernel version: " + str(kernel_vr) - else: - kernel_status = "FAIL" - kernel_message = ( -- "Unsupported kernel version: " + str(kernel_ver) + -- ". Minimal supported version: " + str(KERNEL_MIN_VER) -+ "Unsupported kernel version: " + str(kernel_vr) + -+ ". Minimal supported version: " + str(KERNEL_MIN_VR) - ) - self.rc = False - - if os_name is not None: - self._xmlOutput('OS', os_status, "type", os_name, os_message) -- if kernel_ver is not None: -- self._xmlOutput('KERNEL', kernel_status, "version", kernel_ver, kernel_message) -+ self._xmlOutput('KERNEL', kernel_status, "version", '-'.join(kernel_vr), kernel_message) - - return self.rc - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 7586aca..6bd4b3d 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -398,10 +398,20 @@ def getOSVersion(): - logging.error('failed to parse os release from `%s`.', s, exc_info=True) - return "Unknown OS" - --def getKernelVersion(): -- """Return current kernel version adn release.""" -+def getKernelVR(): -+ """Return current kernel version and release.""" - -- return os.uname()[2] -+ components = os.uname()[2].split('-', 1) -+ if len(components) == 2: -+ return components -+ else: -+ return components[0], '0' -+ -+def compareVR(vr1, vr2): -+ import rpmUtils.miscutils -+ -+ return rpmUtils.miscutils.compareEVR((0, vr1[0], vr1[1]), -+ (0, vr2[0], vr2[1])) - - def updateKernelArgs(arg): - """ --- -1.7.10.2 - diff --git a/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch b/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch deleted file mode 100644 index 61d75a7..0000000 --- a/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 44a2eba8d6c7a7ea9e78454388b859304398ec8d Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 27 Jun 2012 10:37:28 +0300 -Subject: [PATCH 22/25] BZ#835784 - Allow to create a network on top of - existing bond in additional to create a new bond and - network - -If we already have a bond0 with (eth1, eth2) and now we want to create -network "bridge_woVlan" on top of it and in additional we want to create -a new bond1 with (eth3, eth4) and create a network "bridge_woVlan_2" on -top of bond 1. -This patch will allow us to do it in the same setupNetwork command. - -Change-Id: I67d24d656934ea9dcb0a8209c6a375e19c23f82b -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5737 -Reviewed-on: http://gerrit.ovirt.org/5759 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm/configNetwork.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index c535499..d4e1177 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1085,7 +1085,7 @@ def setupNetworks(networks={}, bondings={}, **options): - if 'bonding' in d: - # we may not receive any information - # about the bonding device if it is unchanged -- if bondings: -+ if bondings.get(d['bonding']): - d['nics'] = bondings[d['bonding']]['nics'] - d['bondingOptions'] = bondings[d['bonding']].get('options', - None) --- -1.7.10.2 - diff --git a/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch b/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch deleted file mode 100644 index 0591e56..0000000 --- a/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 16d2eff4fc41a2a8c87923ed9d5d97cca3037144 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 20 Jun 2012 16:36:08 +0300 -Subject: [PATCH 23/25] BZ#833119 - Allow to create VLANed network on top of - existing bond - -The (relatively) new setupNetwork verb allows to specify a network on -top of an existing bonding device. The nics of this bonds are taken -implictly from current host configuration. - -Change-Id: If45aed68847f5a79380c629a70290a2c687cbd30 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5456 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5760 ---- - vdsm/configNetwork.py | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index d4e1177..8c4d36d 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -238,7 +238,8 @@ class ConfigWriter(object): - s += 'NM_CONTROLLED=no\n' - BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', - 'force', 'blockingdhcp', -- 'connectivityCheck', 'connectivityTimeout'] -+ 'connectivityCheck', 'connectivityTimeout', -+ 'implicitBonding'] - for k in set(kwargs.keys()).difference(set(BLACKLIST)): - if re.match('^[a-zA-Z_]\w*$', k): - s += '%s=%s\n' % (k.upper(), pipes.quote(kwargs[k])) -@@ -491,10 +492,17 @@ def validateVlanId(vlan): - raise ConfigNetworkError(ne.ERR_BAD_VLAN, 'vlan id must be a number') - - --def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask, gateway, -- bondingOptions, bridged=True): -- if (vlan or bonding) and not nics: -- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'vlan/bonding definition requires nics. got: %r'%(nics,)) -+def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, -+ netmask, gateway, bondingOptions, bridged=True, -+ implicitBonding=False): -+ # The (relatively) new setupNetwork verb allows to specify a network on -+ # top of an existing bonding device. The nics of this bonds are taken -+ # implictly from current host configuration -+ if bonding and implicitBonding: -+ pass -+ elif (vlan or bonding) and not nics: -+ raise ConfigNetworkError(ne.ERR_BAD_PARAMS, -+ 'vlan/bonding definition requires nics. got: %r' % (nics,)) - - # Check bridge - if bridged: -@@ -583,7 +591,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - _addNetworkValidation(_netinfo, bridge=network if bridged else None, - vlan=vlan, bonding=bonding, nics=nics, ipaddr=ipaddr, - netmask=netmask, gateway=gateway, bondingOptions=bondingOptions, -- bridged=bridged) -+ bridged=bridged, **options) - - logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," - " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", -@@ -1097,7 +1105,8 @@ def setupNetworks(networks={}, bondings={}, **options): - d['force'] = force - - logger.debug("Adding network %r" % network) -- addNetwork(network, configWriter=configWriter, **d) -+ addNetwork(network, configWriter=configWriter, -+ implicitBonding=True, **d) - - # Do not handle a bonding device twice. - # We already handled it before during addNetwork. --- -1.7.10.2 - diff --git a/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch b/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch deleted file mode 100644 index ed2d15f..0000000 --- a/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 66cf76b0d2dc362bb698df2b0ec491a54dc55d5c Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 25 Jun 2012 17:46:43 +0300 -Subject: [PATCH 24/25] BZ#833803 - Avoid bond breaking after network detach - -The (relatively) new setupNetwork verb allows to remove a network -defined on top of an bonding device without break the bond itself. - -Change-Id: Idebd0cd0a9d54ceb3714a8cd82fe042ed2c05f2e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5711 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5761 ---- - vdsm/configNetwork.py | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 8c4d36d..96dd452 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -734,7 +734,7 @@ def listNetworks(): - print "Bondings:", _netinfo.bondings.keys() - - def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, -- configWriter=None, **options): -+ configWriter=None, implicitBonding=True, **options): - _netinfo = NetInfo() - - validateBridgeName(network) -@@ -786,16 +786,19 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - stderr=subprocess.PIPE) - configWriter.removeVlan(vlan, bonding or nics[0]) - -- if bonding: -- if not bridged or not bondingOtherUsers(network, vlan, bonding): -- ifdown(bonding) -- configWriter.removeBonding(bonding) -+ # The (relatively) new setupNetwork verb allows to remove a network -+ # defined on top of an bonding device without break the bond itself. -+ if implicitBonding: -+ if bonding: -+ if not bridged or not bondingOtherUsers(network, vlan, bonding): -+ ifdown(bonding) -+ configWriter.removeBonding(bonding) - -- for nic in nics: -- nicUsers = nicOtherUsers(network, vlan, bonding, nic) -- if not nicUsers: -- ifdown(nic) -- configWriter.removeNic(nic) -+ for nic in nics: -+ nicUsers = nicOtherUsers(network, vlan, bonding, nic) -+ if not nicUsers: -+ ifdown(nic) -+ configWriter.removeNic(nic) - - def clientSeen(timeout): - start = time.time() -@@ -1081,7 +1084,8 @@ def setupNetworks(networks={}, bondings={}, **options): - for network, networkAttrs in networks.items(): - if network in _netinfo.networks: - logger.debug("Removing network %r" % network) -- delNetwork(network, configWriter=configWriter, force=force) -+ delNetwork(network, configWriter=configWriter, force=force, -+ implicitBonding=False) - if 'remove' in networkAttrs: - del networks[network] - else: --- -1.7.10.2 - diff --git a/0025-Handle-bond-properly-if-connectivity-check-fail.patch b/0025-Handle-bond-properly-if-connectivity-check-fail.patch deleted file mode 100644 index fe27672..0000000 --- a/0025-Handle-bond-properly-if-connectivity-check-fail.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 31eac2c98a865a94803785fa660b612d5231c5c4 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 26 Jun 2012 15:41:37 +0300 -Subject: [PATCH 25/25] Handle bond properly if connectivity check fail. - -We need to be able remove a new added network if connectivity check fail. -If a new network needs to be created on top of existing bond, -we will need to keep the bond on rollback flow, -else we will break the new created bond - -Change-Id: I4bb04f6f3b8d5cdbfd9af8904570af071af6d4f4 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5712 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5762 ---- - vdsm/configNetwork.py | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 96dd452..af6c19d 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1065,7 +1065,13 @@ def setupNetworks(networks={}, bondings={}, **options): - try: - _netinfo = NetInfo() - configWriter = ConfigWriter() -- networksAdded = [] -+ networksAdded = set() -+ # keep set netsWithNewBonds to be able remove -+ # a new added network if connectivity check fail. -+ # If a new network needs to be created on top of existing bond, -+ # we will need to keep the bond on rollback flow, -+ # else we will break the new created bond. -+ netsWithNewBonds = set() - - logger.debug("Setting up network according to configuration: " - "networks:%r, bondings:%r, options:%r" % (networks, -@@ -1089,7 +1095,7 @@ def setupNetworks(networks={}, bondings={}, **options): - if 'remove' in networkAttrs: - del networks[network] - else: -- networksAdded.append(network) -+ networksAdded.add(network) - - handledBonds = set() - for network, networkAttrs in networks.iteritems(): -@@ -1104,6 +1110,9 @@ def setupNetworks(networks={}, bondings={}, **options): - # Don't remove bondX from the bonding list here, - # because it may be in use for other networks - handledBonds.add(d['bonding']) -+ # we create a new bond -+ if network in networksAdded: -+ netsWithNewBonds.add(network) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force -@@ -1130,7 +1139,8 @@ def setupNetworks(networks={}, bondings={}, **options): - CONNECTIVITY_TIMEOUT_DEFAULT))): - logger.info('Connectivity check failed, rolling back') - for network in networksAdded: -- delNetwork(network, force=True) -+ delNetwork(network, force=True, -+ implicitBonding=network in netsWithNewBonds) - raise ConfigNetworkError(ne.ERR_LOST_CONNECTION, - 'connectivity check failed') - except: --- -1.7.10.2 - diff --git a/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch b/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch deleted file mode 100644 index 62d3f85..0000000 --- a/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b1a0e712b394496544bbb62f9466a8aa75f4c669 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 26 Jun 2012 15:43:33 +0300 -Subject: [PATCH 26/26] BZ#806555 having /etc/ovirt-node-* means it is a node - -Not vice versa. - -This patch fixes http://gerrit.ovirt.org/3055 . - -Change-Id: Id13c5621a2ff1c8bdcfc1e40a27951efb0d75cfe -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5713 -Reviewed-by: Michael Burns -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Ofer Schreiber -Reviewed-on: http://gerrit.ovirt.org/5768 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/caps.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/caps.py b/vdsm/caps.py -index 5950ee9..5c9fa78 100644 ---- a/vdsm/caps.py -+++ b/vdsm/caps.py -@@ -156,7 +156,7 @@ def _getIscsiIniName(): - def getos(): - if os.path.exists('/etc/rhev-hypervisor-release'): - return OSName.RHEVH -- elif len(glob.glob('/etc/ovirt-node-*-release')) == 0: -+ elif glob.glob('/etc/ovirt-node-*-release'): - return OSName.OVIRT - elif os.path.exists('/etc/fedora-release'): - return OSName.FEDORA --- -1.7.10.2 - diff --git a/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch b/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch deleted file mode 100644 index 17e09ab..0000000 --- a/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ada1caae80ef463d511395ccbd0cb773b3e8b8b6 Mon Sep 17 00:00:00 2001 -From: lvroyce -Date: Fri, 29 Jun 2012 13:13:52 +0800 -Subject: [PATCH 27/40] bump libvirt version to fix readonly lease unsupported - issue - -Change-Id: I116f3ce07fff8075902a862e0259198232efd2f4 -Signed-off-by: Royce Lv -Reviewed-on: http://gerrit.ovirt.org/5787 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 3fd404e..88fe373 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -63,7 +63,8 @@ Requires: e2fsprogs >= 1.41.12-11 - Requires: python >= 2.7.3 - Requires: qemu-kvm >= 2:0.15.0-4 - Requires: qemu-img >= 2:0.15.0-4 --Requires: libvirt >= 0.9.10 -+#readonly lease ignored by default on 0.9.11.4-3 -+Requires: libvirt >= 0.9.11.4-3 - Requires: libvirt-python, libvirt-lock-sanlock - Requires: iscsi-initiator-utils >= 6.2.0.872-14 - Requires: device-mapper-multipath >= 0.4.9-18 --- -1.7.7.6 - diff --git a/0028-BZ-832199-move-selinux-from-init-to-spec.patch b/0028-BZ-832199-move-selinux-from-init-to-spec.patch deleted file mode 100644 index c133b68..0000000 --- a/0028-BZ-832199-move-selinux-from-init-to-spec.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 16ad84b47fac0e325073e1b08e99a364c7850699 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Fri, 6 Jul 2012 09:40:17 -0400 -Subject: [PATCH 28/40] BZ#832199: move selinux from init to spec - -To reduce the time during the init, transferring all the selinux -set to spec instead use it during the vdsm init. - -Change-Id: Id515ddb96cbfb4f3a936336b3f7e261658df662a -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5614 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 22 +++++++++++++++++++++- - vdsm/vdsmd.init.in | 8 -------- - 2 files changed, 21 insertions(+), 9 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 88fe373..6be7da4 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -78,6 +78,7 @@ Requires: sos - Requires: tree - Requires: dosfstools - Requires: policycoreutils-python -+Requires(pre,preun): policycoreutils-python - Requires: libselinux-python - Requires: kernel >= 2.6.32-198 - Requires: %{name}-python = %{version}-%{release} -@@ -375,6 +376,23 @@ rm -rf %{buildroot} - /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} - /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} - -+# vdsm makes extensive use of nfs-exported images -+# The next lines will collect the default selinux behaviour for the booleans -+virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2) -+virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2) -+ -+if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then -+ /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF -+virt_use_nfs=1 -+virt_use_sanlock=1 -+_EOF -+fi -+ -+if /usr/sbin/selinuxenabled; then -+ /usr/sbin/setsebool virt_use_nfs on -+ /usr/sbin/setsebool virt_use_sanlock on -+fi -+ - %post - # update the vdsm "secret" password for libvirt - if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then -@@ -415,10 +433,12 @@ then - - /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF - virt_use_nfs=0 -+virt_use_sanlock=0 - _EOF - -- if selinuxenabled; then -+ if /usr/sbin/selinuxenabled; then - /usr/sbin/setsebool virt_use_nfs off -+ /usr/sbin/setsebool virt_use_sanlock off - fi - - /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh -diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in -index ac3bd08..dd6f3c6 100755 ---- a/vdsm/vdsmd.init.in -+++ b/vdsm/vdsmd.init.in -@@ -410,14 +410,6 @@ EOF - - ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr" - -- # vdsm makes extensive use of nfs-exported images -- /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF --virt_use_nfs=1 --virt_use_sanlock=1 --_EOF -- /usr/sbin/setsebool virt_use_nfs on -- /usr/sbin/setsebool virt_use_sanlock on -- - /sbin/initctl restart libvirtd 2>/dev/null || : - } - --- -1.7.7.6 - diff --git a/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch b/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch deleted file mode 100644 index 41d95ee..0000000 --- a/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 34f080dd8b7456248ed2e2693030cf736e097606 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 3 Jul 2012 10:53:37 +0300 -Subject: [PATCH 29/40] BZ#838097 _addNetworkValidation: do not explode if - STP/DNS1 option passed - -http://gerrit.ovirt.org/5456 has started passing all optional parameters -to _addNetworkValidation, but no one is expecting them there. - -Change-Id: I071e6a7a53279c24d45ebec3858d9b0c0d6294ae -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5885 -Reviewed-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/6017 ---- - vdsm/configNetwork.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index af6c19d..961dd33 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -494,7 +494,7 @@ def validateVlanId(vlan): - - def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, - netmask, gateway, bondingOptions, bridged=True, -- implicitBonding=False): -+ implicitBonding=False, **options): - # The (relatively) new setupNetwork verb allows to specify a network on - # top of an existing bonding device. The nics of this bonds are taken - # implictly from current host configuration --- -1.7.7.6 - diff --git a/0030-ovirt_functions-fix-elif-statement.patch b/0030-ovirt_functions-fix-elif-statement.patch deleted file mode 100644 index 4cc9980..0000000 --- a/0030-ovirt_functions-fix-elif-statement.patch +++ /dev/null @@ -1,39 +0,0 @@ -From fe88d1834032776638fc41c9fc96123923e1432a Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 9 Jul 2012 10:49:24 -0400 -Subject: [PATCH 30/40] ovirt_functions: fix elif statement - -Identify correctly the ovirt Node and fix the error message from vdsm-reg logs: - -[: /etc/ovirt-node-image-release: binary operator expected - -Change-Id: I4eae7e64361d148d60c50dbacd273de7a2490be2 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6072 -Reviewed-by: Dan Kenigsberg ---- - vdsm/ovirt_functions.sh | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/vdsm/ovirt_functions.sh b/vdsm/ovirt_functions.sh -index 84cf686..b1e3ef2 100644 ---- a/vdsm/ovirt_functions.sh -+++ b/vdsm/ovirt_functions.sh -@@ -9,10 +9,12 @@ - # - - function isOvirt() { -+ for f in /etc/ovirt-node-*-release; do -+ [ -f "$f" ] && return 0 -+ done -+ - if [ -f /etc/rhev-hypervisor-release ]; then - return 0 -- elif [ -f /etc/ovirt-node-*-release ]; then -- return 0 - else - return 1 - fi --- -1.7.7.6 - diff --git a/0031-BZ-837443-removeBridge-drop-remove-interface.patch b/0031-BZ-837443-removeBridge-drop-remove-interface.patch deleted file mode 100644 index df21615..0000000 --- a/0031-BZ-837443-removeBridge-drop-remove-interface.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f1792cfb33bff5ef5c9a8c1f938ff92b00d192a8 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 9 Jul 2012 17:20:35 -0400 -Subject: [PATCH 31/40] BZ#837443: removeBridge() drop/remove interface - -Move ifdown() and brctl delbr to removeBridge(). We need a generic -function to be called multiple times. For example, removing a bridge listed -or not listed in libvirt database. - -Change-Id: Iea798b2ddf6413b58dbfc3d8d11dc4bf54c592fc -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5914 -Reviewed-by: Igor Lvovsky -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6204 ---- - vdsm/configNetwork.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 961dd33..51471bc 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -321,6 +321,8 @@ class ConfigWriter(object): - self._removeFile(self.NET_CONF_PREF + bonding) - - def removeBridge(self, bridge): -+ ifdown(bridge) -+ subprocess.call([constants.EXT_BRCTL, 'delbr', bridge]) - self._backup(self.NET_CONF_PREF + bridge) - self._removeFile(self.NET_CONF_PREF + bridge) - -@@ -775,8 +777,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - "delNetwork: bridge %s still exists" % network) - - if network and bridged: -- ifdown(network) -- subprocess.call([constants.EXT_BRCTL, 'delbr', network]) - configWriter.removeBridge(network) - - if vlan: --- -1.7.7.6 - diff --git a/0032-BZ-837443-replace-the-netinfo-import.patch b/0032-BZ-837443-replace-the-netinfo-import.patch deleted file mode 100644 index 77acbcb..0000000 --- a/0032-BZ-837443-replace-the-netinfo-import.patch +++ /dev/null @@ -1,199 +0,0 @@ -From a2e8aa85f270d5bd2390b07ac82710fa398c755b Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Thu, 12 Jul 2012 17:01:22 -0400 -Subject: [PATCH 32/40] BZ#837443: replace the netinfo import - -We will use functions like netinfo.bridges() to -verify if there is any bridge listed in the system -but not in the libvirt database. - -Change-Id: I76ac6f21267f9e2c26f032dbe0334aeaa59aa030 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6205 -Reviewed-by: Dan Kenigsberg ---- - vdsm/configNetwork.py | 42 +++++++++++++++++++++--------------------- - 1 files changed, 21 insertions(+), 21 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 51471bc..bddf71c 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -33,7 +33,7 @@ from vdsm import constants - from vdsm import utils - import neterrors as ne - from vdsm import define --from vdsm.netinfo import NetInfo, NET_CONF_DIR, NET_CONF_BACK_DIR, LIBVIRT_NET_PREFIX -+from vdsm import netinfo - from vdsm import libvirtconnection - - CONNECTIVITY_TIMEOUT_DEFAULT = 4 -@@ -84,7 +84,7 @@ def ifup(iface): - - def ifaceUsers(iface): - "Returns a list of entities using the interface" -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - users = set() - for n, ndict in _netinfo.networks.iteritems(): - if ndict['bridged'] and iface in ndict['ports']: -@@ -155,7 +155,7 @@ def nicSort(nics): - return [x + z for x, y, z in sorted(nics_list)] - - class ConfigWriter(object): -- NET_CONF_PREF = NET_CONF_DIR + 'ifcfg-' -+ NET_CONF_PREF = netinfo.NET_CONF_DIR + 'ifcfg-' - CONFFILE_HEADER = '# automatically generated by vdsm' - DELETED_HEADER = '# original file did not exist' - -@@ -168,7 +168,7 @@ class ConfigWriter(object): - - def _atomicBackup(self, filename): - """Backs up configuration to memory, for a later rollback in case of error.""" -- confFile = os.path.join(NET_CONF_DIR, filename) -+ confFile = os.path.join(netinfo.NET_CONF_DIR, filename) - if confFile not in self._backups: - try: - self._backups[confFile] = open(confFile).read() -@@ -201,7 +201,7 @@ class ConfigWriter(object): - logging.debug("unmounted %s using ovirt" % filename) - - (dummy, basename) = os.path.split(filename) -- backup = os.path.join(NET_CONF_BACK_DIR, basename) -+ backup = os.path.join(netinfo.NET_CONF_BACK_DIR, basename) - if os.path.exists(backup): - # original copy already backed up - return -@@ -209,9 +209,9 @@ class ConfigWriter(object): - vdsm_uid = pwd.getpwnam('vdsm').pw_uid - - # make directory (if it doesn't exist) and assign it to vdsm -- if not os.path.exists(NET_CONF_BACK_DIR): -- os.mkdir(NET_CONF_BACK_DIR) -- os.chown(NET_CONF_BACK_DIR, vdsm_uid, 0) -+ if not os.path.exists(netinfo.NET_CONF_BACK_DIR): -+ os.mkdir(netinfo.NET_CONF_BACK_DIR) -+ os.chown(netinfo.NET_CONF_BACK_DIR, vdsm_uid, 0) - - if os.path.exists(filename): - shutil.copy2(filename, backup) -@@ -285,7 +285,7 @@ class ConfigWriter(object): - "Based on addNetwork" - conffile = self.NET_CONF_PREF + nic - self._backup(conffile) -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - hwaddr = _netinfo.nics[nic].get('permhwaddr') or \ - _netinfo.nics[nic]['hwaddr'] - with open(conffile, 'w') as f: -@@ -413,7 +413,7 @@ class ConfigWriter(object): - Or added a new value, - also set the bridge to the higher value if its under vlans or bond - """ -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - cf = self.NET_CONF_PREF + bridge - currmtu = self._getConfigValue(cf, 'MTU') - if currmtu is None: -@@ -581,7 +581,7 @@ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, - def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask=None, mtu=None, - gateway=None, force=False, configWriter=None, bondingOptions=None, bridged=True, **options): - nics = nics or () -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - bridged = utils.tobool(bridged) - - if mtu: -@@ -659,7 +659,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - - def createLibvirtNetwork(network, bridged=True, iface=None): - conn = libvirtconnection.get() -- netName = LIBVIRT_NET_PREFIX + network -+ netName = netinfo.LIBVIRT_NET_PREFIX + network - if bridged: - netXml = '''%s - ''' % (escape(netName), escape(network)) -@@ -672,7 +672,7 @@ def createLibvirtNetwork(network, bridged=True, iface=None): - net.setAutostart(1) - - def removeLibvirtNetwork(network, log=True): -- netName = LIBVIRT_NET_PREFIX + network -+ netName = netinfo.LIBVIRT_NET_PREFIX + network - conn = libvirtconnection.get() - try: - net = conn.networkLookupByName(netName) -@@ -705,7 +705,7 @@ def assertBridgeClean(bridge, vlan, bonding, nics): - raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'bridge %s has interfaces %s connected' % (bridge, brifs)) - - def showNetwork(network): -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - if network not in _netinfo.networks: - print "Network %r doesn't exist" % network - return -@@ -729,7 +729,7 @@ def showNetwork(network): - print "vlan=%s, bonding=%s, nics=%s" % (vlan, bonding, nics) - - def listNetworks(): -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - print "Networks:", _netinfo.networks.keys() - print "Vlans:", _netinfo.vlans.keys() - print "Nics:", _netinfo.nics.keys() -@@ -737,7 +737,7 @@ def listNetworks(): - - def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - configWriter=None, implicitBonding=True, **options): -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - - validateBridgeName(network) - -@@ -772,7 +772,7 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - removeLibvirtNetwork(network, log=False) - # We need to gather NetInfo again to refresh networks info from libvirt. - # The deleted bridge should never be up at this stage. -- if network in NetInfo().networks: -+ if network in netinfo.NetInfo().networks: - raise ConfigNetworkError(ne.ERR_USED_BRIDGE, - "delNetwork: bridge %s still exists" % network) - -@@ -825,7 +825,7 @@ def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None, **opti - return define.errCode['noConPeer']['status']['code'] - - def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - - # Step 1: Initial validation (validate names, existence of params, etc.) - for network, networkAttrs in networks.iteritems(): -@@ -973,7 +973,7 @@ def _editBondings(bondings, configWriter): - """ Add/Edit bond interface """ - logger = logging.getLogger("_editBondings") - -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - - for bond, bondAttrs in bondings.iteritems(): - logger.debug("Creating/Editing bond %s with attributes %s", -@@ -999,7 +999,7 @@ def _removeBondings(bondings, configWriter): - """ Add/Edit bond interface """ - logger = logging.getLogger("_removeBondings") - -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - - for bond, bondAttrs in bondings.items(): - if 'remove' in bondAttrs: -@@ -1063,7 +1063,7 @@ def setupNetworks(networks={}, bondings={}, **options): - logger = logging.getLogger("setupNetworks") - - try: -- _netinfo = NetInfo() -+ _netinfo = netinfo.NetInfo() - configWriter = ConfigWriter() - networksAdded = set() - # keep set netsWithNewBonds to be able remove --- -1.7.7.6 - diff --git a/0033-configNetwork-fix-NetInfo-call.patch b/0033-configNetwork-fix-NetInfo-call.patch deleted file mode 100644 index 7973f79..0000000 --- a/0033-configNetwork-fix-NetInfo-call.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ce31be09f8e1ae3decaa5219d6ffdfb9a39115f9 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Thu, 12 Jul 2012 16:09:50 -0400 -Subject: [PATCH 33/40] configNetwork: fix NetInfo call - -Commit 9be0497ba77333577e3f5e8738c9efd8794e7a36 changed the import of -netinfo. This patch fix a NetInfo call missed from the previous patch. - -Change-Id: I962cbd39d601300d10a25f5ccb36875b2e544cf1 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6206 -Reviewed-by: Dan Kenigsberg ---- - vdsm/configNetwork.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index bddf71c..5d2469d 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -440,7 +440,7 @@ class ConfigWriter(object): - - if newmtu != currmtu: - if bonding: -- slaves = NetInfo.slaves(bonding) -+ slaves = netinfo.NetInfo.slaves(bonding) - for slave in slaves: - cf = self.NET_CONF_PREF + slave - self._updateConfigValue(cf, 'MTU', newmtu, newmtu is None) --- -1.7.7.6 - diff --git a/0034-BZ-837443-removeVlan-drop-remove-interface.patch b/0034-BZ-837443-removeVlan-drop-remove-interface.patch deleted file mode 100644 index 0ca179c..0000000 --- a/0034-BZ-837443-removeVlan-drop-remove-interface.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 229e294cf3649e03df7b9d876a918c9604ebbdc5 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 9 Jul 2012 17:27:35 -0400 -Subject: [PATCH 34/40] BZ#837443: removeVlan() drop/remove interface - -Move ifdown() and vconfig rm to removeVlan(). We need a generic -function to be called multiple times. For example, removing a vlan listed -or not listed in libvirt database. - -Change-Id: I2db7d26e3bb7fda62f1a8fcdbd0445554df20ad7 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6090 -Reviewed-by: Igor Lvovsky -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6207 ---- - vdsm/configNetwork.py | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 5d2469d..dabd219 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -312,9 +312,13 @@ class ConfigWriter(object): - except IOError: - pass - -- def removeVlan(self, vlanId, iface): -- self._backup(self.NET_CONF_PREF + iface + '.' + vlanId) -- self._removeFile(self.NET_CONF_PREF + iface + '.' + vlanId) -+ def removeVlan(self, vlan, iface): -+ vlandev = iface + '.' + vlan -+ ifdown(vlandev) -+ subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], -+ stderr=subprocess.PIPE) -+ self._backup(self.NET_CONF_PREF + iface + '.' + vlan) -+ self._removeFile(self.NET_CONF_PREF + iface + '.' + vlan) - - def removeBonding(self, bonding): - self._backup(self.NET_CONF_PREF + bonding) -@@ -780,10 +784,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - configWriter.removeBridge(network) - - if vlan: -- vlandev = (bonding or nics[0]) + '.' + vlan -- ifdown(vlandev) -- subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], -- stderr=subprocess.PIPE) - configWriter.removeVlan(vlan, bonding or nics[0]) - - # The (relatively) new setupNetwork verb allows to remove a network --- -1.7.7.6 - diff --git a/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch b/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch deleted file mode 100644 index 14f4411..0000000 --- a/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch +++ /dev/null @@ -1,64 +0,0 @@ -From dbe23c6eb50b6dc59738dceb0ece78221cadcfd3 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Wed, 11 Jul 2012 11:18:42 -0400 -Subject: [PATCH 35/40] BZ#837443: remove bridge before add VDSM bridge - -Related to BZ#837443: ovirt-node fails to register with ovirt-engine - -oVirt Node when installed manually creates a bridge to be consumed. -VDSM should remove any bridge (listed or not listed in libvirt) -to create it's own bridge. - -Change-Id: Ibc2842db371483225042d511c6495df1bc5047de -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6016 -Reviewed-by: Igor Lvovsky -Reviewed-by: Mark Wu -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6208 ---- - vdsm/configNetwork.py | 20 +++++++++++++++----- - 1 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index dabd219..c94648c 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -745,9 +745,22 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - - validateBridgeName(network) - -+ if configWriter is None: -+ configWriter = ConfigWriter() -+ - if network not in _netinfo.networks: -- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -- "Cannot delete network %r: It doesn't exist" % network) -+ logging.info("Network %r: doesn't exist in libvirt database", network) -+ if network in netinfo.bridges(): -+ configWriter.removeBridge(network) -+ else: -+ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -+ "Cannot delete network %r: It doesn't exist " -+ "in the system" % network) -+ -+ if vlan: -+ configWriter.removeVlan(vlan, bonding or nics[0]) -+ -+ return - - nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) - bridged = _netinfo.networks[network]['bridged'] -@@ -767,9 +780,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - if bridged: - assertBridgeClean(network, vlan, bonding, nics) - -- if configWriter is None: -- configWriter = ConfigWriter() -- - if bridged: - configWriter.setNewMtu(network) - --- -1.7.7.6 - diff --git a/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch b/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch deleted file mode 100644 index cdbdac7..0000000 --- a/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch +++ /dev/null @@ -1,47 +0,0 @@ -From ee31f19b5340506bc73d9f2fc27366d5241c3ca2 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 2 Jul 2012 13:00:19 +0300 -Subject: [PATCH 36/40] BZ#836954 - Allow to break bond and create a new - network on its interface in single action. - -Assume we have a bond0 on (eth1, eth2) with defined network brNet on it. -This patch will allow to break the bond0 and create a new network brNet2 on one -of its interfaces (e.g. eth2) with single setupNetworks operation - -Change-Id: Iaa6459ec24f9c81a2cfbc107b5e3548126903357 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5841 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6210 -Tested-by: Dan Kenigsberg ---- - vdsm/configNetwork.py | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index c94648c..d277cd6 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1107,6 +1107,9 @@ def setupNetworks(networks={}, bondings={}, **options): - else: - networksAdded.add(network) - -+ # Remove bonds with 'remove' attribute -+ _removeBondings(bondings, configWriter) -+ - handledBonds = set() - for network, networkAttrs in networks.iteritems(): - d = dict(networkAttrs) -@@ -1137,9 +1140,6 @@ def setupNetworks(networks={}, bondings={}, **options): - del bondings[bond] - - # We are now left with bondings whose network was not mentioned -- # Remove bonds with 'remove' attribute -- _removeBondings(bondings, configWriter) -- - # Check whether bonds should be resized - _editBondings(bondings, configWriter) - --- -1.7.7.6 - diff --git a/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch b/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch deleted file mode 100644 index c7fd1a2..0000000 --- a/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3060b9110bb37ee2b05356b37fde4d79b1e46c5f Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Thu, 5 Jul 2012 15:05:14 +0300 -Subject: [PATCH 37/40] BZ#837054 - Do not detach network from the bond during - bond resize - -Let's say you have bond and bridged non-VLANed network on it. -This patch will fix detaching such network from the bond during bond resizing. - -Change-Id: Idf2a7f73b23dc9692bec9cc3fad01e947a7294af -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5970 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6213 -Tested-by: Dan Kenigsberg ---- - vdsm/configNetwork.py | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index d277cd6..eb140f8 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -988,6 +988,11 @@ def _editBondings(bondings, configWriter): - for bond, bondAttrs in bondings.iteritems(): - logger.debug("Creating/Editing bond %s with attributes %s", - bond, bondAttrs) -+ -+ brNets = list(_netinfo.getBridgedNetworksForNic(bond)) -+ # Only one bridged-non-VLANed network allowed on same nic/bond -+ bridge = brNets[0] if brNets else None -+ - if bond in _netinfo.bondings: - ifdown(bond) - # Take down all bond's NICs. -@@ -1001,7 +1006,7 @@ def _editBondings(bondings, configWriter): - configWriter.addNic(nic, bonding=bond) - ifup(nic) - -- configWriter.addBonding(bond, -+ configWriter.addBonding(bond, bridge=bridge, - bondingOptions=bondAttrs.get('options', None)) - ifup(bond) - --- -1.7.7.6 - diff --git a/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch b/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch deleted file mode 100644 index c8e2ef5..0000000 --- a/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 5cb2be8ed2406928525072360c3a2571229415f9 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 2 Jul 2012 12:40:54 +0300 -Subject: [PATCH 38/40] Remove redundant 'explicitBonding' parameter from - setupNetworks - -Change-Id: Id8cd878109ab5fe9d082412f6d05e1c964823779 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5840 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6209 ---- - vdsm/configNetwork.py | 34 ++++++++-------------------------- - 1 files changed, 8 insertions(+), 26 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index eb140f8..d8cad5d 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -834,7 +834,7 @@ def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None, **opti - configWriter.restoreAtomicBackup() - return define.errCode['noConPeer']['status']['code'] - --def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): -+def _validateNetworkSetup(networks={}, bondings={}): - _netinfo = netinfo.NetInfo() - - # Step 1: Initial validation (validate names, existence of params, etc.) -@@ -897,7 +897,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - - - # Step 2: Make sure we have complete information about the Setup, more validation -- # (if explicitBonding==False we complete the missing information ourselves, else we raise an exception) - nics = defaultdict(lambda: {'networks':{}, 'bonding':None}) - for network, networkAttrs in networks.iteritems(): - if networkAttrs.get('remove', False): -@@ -908,10 +907,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - - bonding = networkAttrs['bonding'] - if bonding not in bondings: -- if explicitBonding: -- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "Network %s requires unspecified bonding %s"%( -- network, bonding)) -- - # fill in bonding info - bondings[bonding] = {'nics':_netinfo.bondings[bonding]['slaves']} - -@@ -930,9 +925,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - - for network in connectedNetworks: - if network not in networks: -- if explicitBonding: -- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "Bonding %s is associated with unspecified network %s"%( -- bonding, network)) - # fill in network info - _, vlan, bonding2 = _netinfo.getNicsVlanAndBondingForNetwork(network) - assert bonding == bonding2 -@@ -1035,7 +1027,7 @@ def setupNetworks(networks={}, bondings={}, **options): - - Params: - networks - dict of key=network, value=attributes -- where 'attributes' is a dict with the following optional items: -+ where 'attributes' is a dict with the following optional items: - vlan= - bonding="" | nic="" - (bonding and nics are mutually exclusive) -@@ -1050,7 +1042,7 @@ def setupNetworks(networks={}, bondings={}, **options): - remove=True (other attributes can't be specified) - - bondings - dict of key=bonding, value=attributes -- where 'attributes' is a dict with the following optional items: -+ where 'attributes' is a dict with the following optional items: - nics=["" , "", ...] - options="" - -- OR -- -@@ -1060,20 +1052,12 @@ def setupNetworks(networks={}, bondings={}, **options): - force=0|1 - connectivityCheck=0|1 - connectivityTimeout= -- explicitBonding=0|1 -- - - Notes: -- Bondings are removed when they change state from 'used' to 'unused'. -- -- By default, if you edit a network that is attached to a bonding, it's not -- necessary to re-specify the bonding (you need only to note the attachment -- in the network's attributes). Similarly, if you edit a bonding, it's not -- necessary to specify its networks. -- However, if you specify the 'explicitBonding' option as true, the function -- will expect you to specify all networks that are attached to a specified -- bonding, and vice-versa, the bonding attached to a specified network. -- -+ When you edit a network that is attached to a bonding, it's not -+ necessary to re-specify the bonding (you need only to note -+ the attachment in the network's attributes). Similarly, if you edit -+ a bonding, it's not necessary to specify its networks. - """ - logger = logging.getLogger("setupNetworks") - -@@ -1095,9 +1079,7 @@ def setupNetworks(networks={}, bondings={}, **options): - force = options.get('force', False) - if not utils.tobool(force): - logging.debug("Validating configuration") -- _validateNetworkSetup(dict(networks), dict(bondings), -- explicitBonding=options.get('explicitBonding', -- False)) -+ _validateNetworkSetup(dict(networks), dict(bondings)) - - logger.debug("Applying...") - try: --- -1.7.7.6 - diff --git a/0039-configNet-clear-up-atomicBackup-arg.patch b/0039-configNet-clear-up-atomicBackup-arg.patch deleted file mode 100644 index 8af3bae..0000000 --- a/0039-configNet-clear-up-atomicBackup-arg.patch +++ /dev/null @@ -1,41 +0,0 @@ -From df7e06353bcd1c48304884384e5d8575747a3b7a Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 4 Jul 2012 17:25:55 +0300 -Subject: [PATCH 39/40] configNet: clear up atomicBackup arg - -Apparently, os.path.join('/a/b/', '/a/b/c') == '/a/b/c'. -Let us not trust this peculiarity, and have atomicBackup -expect a full path to the config file. - -Change-Id: Id4f4fc8dd1db785837d868a45787b3fa5be901a6 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5953 -Reviewed-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/6211 ---- - vdsm/configNetwork.py | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index d8cad5d..dbec079 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -168,11 +168,11 @@ class ConfigWriter(object): - - def _atomicBackup(self, filename): - """Backs up configuration to memory, for a later rollback in case of error.""" -- confFile = os.path.join(netinfo.NET_CONF_DIR, filename) -- if confFile not in self._backups: -+ -+ if filename not in self._backups: - try: -- self._backups[confFile] = open(confFile).read() -- logging.debug("Backed up %s" % confFile) -+ self._backups[filename] = open(filename).read() -+ logging.debug("Backed up %s", filename) - except IOError: - pass - --- -1.7.7.6 - diff --git a/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch b/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch deleted file mode 100644 index 367e3a5..0000000 --- a/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 72580d30893de15fea9af0050e989bc6d33e3216 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 4 Jul 2012 16:36:05 +0300 -Subject: [PATCH 40/40] configNet: atomicBackup: remove new files upon restore - -Files that are created by ConfigWriter._atomicBackup() should be removed -by restoreAtomicBackup, not forgotten on disk. - -Change-Id: I66bdb20b6e7e78be198f2616aa0ef7a8efeec18a -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5952 -Reviewed-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/6212 ---- - vdsm/configNetwork.py | 14 ++++++++++---- - 1 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index dbec079..bb4e81e 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -173,16 +173,22 @@ class ConfigWriter(object): - try: - self._backups[filename] = open(filename).read() - logging.debug("Backed up %s", filename) -- except IOError: -- pass -+ except IOError, e: -+ if e.errno == os.errno.ENOENT: -+ self._backups[filename] = None -+ else: -+ raise - - def restoreAtomicBackup(self): - logging.info("Rolling back configuration (restoring atomic backup)") - if not self._backups: - return - for confFile, content in self._backups.iteritems(): -- open(confFile, 'w').write(content) -- logging.debug('Restored %s', confFile) -+ if content is None: -+ utils.rmFile(confFile) -+ else: -+ open(confFile, 'w').write(content) -+ logging.info('Restored %s', confFile) - subprocess.Popen(['/etc/init.d/network', 'start']) - - @staticmethod --- -1.7.7.6 - diff --git a/0041-BZ-842948-deployUtil-safely-remove-bridge.patch b/0041-BZ-842948-deployUtil-safely-remove-bridge.patch deleted file mode 100644 index 8741a36..0000000 --- a/0041-BZ-842948-deployUtil-safely-remove-bridge.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 15d46e0809e27eb39fde58fb47a0b3914f1d0c90 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 31 Jul 2012 19:36:53 -0400 -Subject: [PATCH 41/41] BZ#842948: deployUtil - safely remove bridge - -deployUtil calls /usr/share/vdsm/delNetwork to remove previously created bridge. -This patch will add ovirtfunctions.ovirt_safe_delete_config() to safely remove -bridge config files in oVirt Node. - -Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6798 -Reviewed-by: Dan Kenigsberg ---- - vdsm_reg/deployUtil.py.in | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 6bd4b3d..62aef01 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -904,6 +904,8 @@ def makeBridge(vdcName, vdsmDir): - else: - fReturn = False - logging.debug("makeBridge Failed to del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) -+ else: -+ ovirtfunctions.ovirt_safe_delete_config(IFACE_CONFIG + mgtBridge) - except: - fReturn = False - logging.debug("makeBridge Failed to del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) --- -1.7.7.6 - diff --git a/0042-Ship-the-version-file-with-the-tarballs.patch b/0042-Ship-the-version-file-with-the-tarballs.patch deleted file mode 100644 index 905e8a5..0000000 --- a/0042-Ship-the-version-file-with-the-tarballs.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 0b3cd04300005c995d20306446a2ab804d74b6be Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Fri, 17 Aug 2012 05:23:38 -0400 -Subject: [PATCH] Ship the version file with the tarballs - -Shipping the VERSION file allows running the autoreconf tool also from a -tarball package (no need of the entire git repository). - -In this patch: -* generate and ship the VERSION file -* move, unify (and ship) version.sh and release.sh in pkg-version -* use the VERSION file when the git repository is not available - (eg: tarball) - -Signed-off-by: Federico Simoncelli -Change-Id: I8b72a1740803a9401e4b5a4504a4faa07c29f2b9 -Reviewed-on: http://gerrit.ovirt.org/7295 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Alon Bar-Lev -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - Makefile.am | 13 +++++++++++-- - build-aux/pkg-version | 39 +++++++++++++++++++++++++++++++++++++++ - configure.ac | 4 ++-- - VERSION | 1 + - 4 files changed, 52 insertions(+), 34 deletions(-) - create mode 100755 build-aux/pkg-version - create mode 100644 VERSION - delete mode 100755 build-aux/release.sh - delete mode 100755 build-aux/version.sh - -diff --git a/Makefile.am b/Makefile.am -index ab9b240..2b6d273 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -25,6 +25,7 @@ include $(top_srcdir)/build-aux/Makefile.subs - # This is an *exception*, we ship also vdsm.spec so it's possible to build the - # rpm from the tarball. - EXTRA_DIST = \ -+ build-aux/pkg-version \ - vdsm.spec \ - vdsm.spec.in - -@@ -80,11 +81,11 @@ rpm: dist - rpmbuild -ta $(if $(BUILDID),--define="extra_release .$(BUILDID)") \ - $(WITH_HOOKS) $(DIST_ARCHIVES) - --dist-hook: gen-ChangeLog -+dist-hook: gen-VERSION gen-ChangeLog -+.PHONY: gen-VERSION gen-ChangeLog - - # Generate the ChangeLog file and insert it into the directory - # we're about to use to create a tarball. --.PHONY: gen-ChangeLog - gen-ChangeLog: - if test -d .git; then \ - $(top_srcdir)/build-aux/gitlog-to-changelog \ -@@ -92,3 +93,11 @@ gen-ChangeLog: - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/cl-t $(distdir)/ChangeLog; \ - fi -+ -+gen-VERSION: -+ if test -d .git; then \ -+ $(top_srcdir)/build-aux/pkg-version --full \ -+ > $(distdir)/ve-t; \ -+ rm -f $(distdir)/VERSION; \ -+ mv $(distdir)/ve-t $(distdir)/VERSION; \ -+ fi -diff --git a/build-aux/pkg-version b/build-aux/pkg-version -new file mode 100755 -index 0000000..a8d9d77 ---- /dev/null -+++ b/build-aux/pkg-version -@@ -0,0 +1,39 @@ -+#!/bin/sh -+ -+# tags and output versions: -+# - v4.9.0 => 4.9.0 (upstream clean) -+# - v4.9.0-1 => 4.9.0 (downstream clean) -+# - v4.9.0-2-g34e62f => 4.9.0 (upstream dirty) -+# - v4.9.0-1-2-g34e62f => 4.9.0 (downstream dirty) -+AWK_VERSION=' -+ BEGIN { FS="-" } -+ /^v[0-9]/ { -+ sub(/^v/,"") ; print $1 -+ }' -+ -+# tags and output releases: -+# - v4.9.0 => 0 (upstream clean) -+# - v4.9.0-1 => 1 (downstream clean) -+# - v4.9.0-2-g34e62f1 => 0.2.git34e62f1 (upstream dirty) -+# - v4.9.0-1-2-g34e62f1 => 1.2.git34e62f1 (downstream dirty) -+AWK_RELEASE=' -+ BEGIN { FS="-"; OFS="." } -+ /^v[0-9]/ { -+ if (NF == 1) print 0 -+ else if (NF == 2) print $2 -+ else if (NF == 3) print 0, $2, "git" substr($3, 2) -+ else if (NF == 4) print $2, $3, "git" substr($4, 2) -+ }' -+ -+PKG_VERSION=`cat VERSION 2> /dev/null || git describe --match "v[0-9]*"` -+ -+if test "x$1" == "x--full"; then -+ echo $PKG_VERSION | tr -d '[:space:]' -+elif test "x$1" == "x--version"; then -+ echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].' -+elif test "x$1" == "x--release"; then -+ echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].' -+else -+ echo "usage: $0 [--full|--version|--release]" -+ exit 1 -+fi -diff --git a/configure.ac b/configure.ac -index 7b829f5..cb1dc56 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,7 +20,7 @@ - - # Autoconf initialization - AC_INIT([vdsm], -- [m4_esyscmd([build-aux/version.sh])], -+ [m4_esyscmd([build-aux/pkg-version --version])], - [vdsm-devel@lists.fedorahosted.org]) - AC_CONFIG_AUX_DIR([build-aux]) - -@@ -28,7 +28,7 @@ m4_include([m4/ax_python_module.m4]) - - # Package release - AC_SUBST([PACKAGE_RELEASE], -- [m4_esyscmd([build-aux/release.sh])]) -+ [m4_esyscmd([build-aux/pkg-version --release])]) - - # Testing for version and release - AS_IF([test "x$PACKAGE_VERSION" = x], -diff --git a/VERSION b/VERSION -new file mode 100644 -index 0000000..bbc89f8 ---- /dev/null -+++ b/VERSION -@@ -0,0 +1,1 @@ -+v4.10.0 --- -1.7.1 - diff --git a/0043-Use-the-recommended-alignment-instead-of-using-pages.patch b/0043-Use-the-recommended-alignment-instead-of-using-pages.patch deleted file mode 100644 index d62de9d..0000000 --- a/0043-Use-the-recommended-alignment-instead-of-using-pages.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b4f0985266f5fba817602e8af9ad900425c5a853 Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Mon, 24 Sep 2012 01:28:38 +0200 -Subject: [PATCH] Use the recommended alignment instead of using pagesize - -Page size is the usual recommended alignment but when it isn't using it -can cause memory corruption. - -Change-Id: If9da41a2f74d3cea7300df9606c78eebcc9927a9 -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/8143 -Tested-by: Noam Slomianko -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/8174 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/storage/fileUtils.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py -index 020f16d..511dff9 100644 ---- a/vdsm/storage/fileUtils.py -+++ b/vdsm/storage/fileUtils.py -@@ -45,9 +45,10 @@ NFS_OPTIONS = "".join(config.get('irs', 'nfs_mount_options').split()) - - log = logging.getLogger('fileUtils') - --PAGESIZE = libc.getpagesize() - CharPointer = ctypes.POINTER(ctypes.c_char) - -+_PC_REC_XFER_ALIGN = 17 -+ - class TarCopyFailed(RuntimeError): pass - - def tarCopy(src, dst, exclude=[]): -@@ -71,7 +72,8 @@ def isStaleHandle(path): - os.listdir(path) - except OSError as ex: - if ex.errno in (errno.EIO, errno.ESTALE): -- return True -+ return True -+ - # We could get contradictory results because of - # soft mounts - if (exists or st) and ex.errno == errno.ENOENT: -@@ -262,7 +264,8 @@ class DirectFile(object): - ppbuff = ctypes.pointer(pbuff) - # Because we usually have fixed sizes for our reads, caching - # buffers might give a slight performance boost. -- rc = libc.posix_memalign(ppbuff, PAGESIZE, size) -+ alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN) -+ rc = libc.posix_memalign(ppbuff, alignment, size) - if rc: - raise OSError(rc, "Could not allocate aligned buffer") - try: --- -1.7.11.4 - diff --git a/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch b/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch deleted file mode 100644 index edcbaae..0000000 --- a/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch +++ /dev/null @@ -1,50 +0,0 @@ -From c219c4455bb93d9f136849b58ceb0255e407fdbe Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Thu, 4 Oct 2012 13:14:21 +0200 -Subject: [PATCH] Use buffer size in multiplies of the recommended transfer - size - -Using the recommended transfer size fixes the memory corruption for NFS. - -Bug-Id: http://bugzilla.redhat.com/845660 -Change-Id: Iadea310039b30073197b7ad90afb930c460bda17 -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/8356 -Reviewed-by: Dan Kenigsberg -Tested-by: Jason Brooks -Reviewed-on: http://gerrit.ovirt.org/8369 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/storage/fileUtils.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py -index 511dff9..ccc2bfe 100644 ---- a/vdsm/storage/fileUtils.py -+++ b/vdsm/storage/fileUtils.py -@@ -48,6 +48,7 @@ log = logging.getLogger('fileUtils') - CharPointer = ctypes.POINTER(ctypes.c_char) - - _PC_REC_XFER_ALIGN = 17 -+_PC_REC_MIN_XFER_SIZE = 16 - - class TarCopyFailed(RuntimeError): pass - -@@ -265,6 +266,13 @@ class DirectFile(object): - # Because we usually have fixed sizes for our reads, caching - # buffers might give a slight performance boost. - alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN) -+ minXferSize = libc.fpathconf(self.fileno(), _PC_REC_MIN_XFER_SIZE) -+ chunks, remainder = divmod(size, minXferSize) -+ if remainder > 0: -+ chunks += 1 -+ -+ size = chunks * minXferSize -+ - rc = libc.posix_memalign(ppbuff, alignment, size) - if rc: - raise OSError(rc, "Could not allocate aligned buffer") --- -1.7.11.4 - diff --git a/sources b/sources index 87c07ec..0d0f9be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e8ab5eccdea0b4a4da2e812174971393 vdsm-4.10.0.tar.gz +1c0ab3c9414d22e8a3b027e8f22d8d0e vdsm-4.10.1.tar.gz From 5cdc942b40b9eb7dd09ab1bf7876f74d3312661c Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 5 Nov 2012 15:16:32 -0500 Subject: [PATCH 029/126] update to vdsm-4.10.1-1.gitgf2f6683 vdsm-4.10.1-1.gitgf2f6683 --- vdsm.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index e120533..3f811c9 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,9 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream release -#% global vdsm_release e952471 -#% global vdsm_relvtag .git%{vdsm_release} -#% global vdsm_relttag -%{vdsm_release} +%global vdsm_release gf2f6683 +%global vdsm_relvtag .git%{vdsm_release} +%global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -51,9 +51,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python BuildRequires: python-devel -BuildRequires: pyflakes BuildRequires: python-nose -BuildRequires: python-pep8 # BuildRequires needed by the tests during the build BuildRequires: python-ethtool @@ -70,6 +68,8 @@ BuildRequires: libtool %endif %if !0%{?rhel} +BuildRequires: pyflakes +BuildRequires: python-pep8 BuildRequires: systemd-units %endif @@ -985,6 +985,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Nov 5 2012 Douglas Schilling Landgraf 4.10.1-100.gf2f6683 +- vdsm-4.10.1-100-gf2f6683 + * Wed Oct 31 2012 Douglas Schilling Landgraf 4.10.1-1 - vdsm-4.10.1 - merged vdsm.spec from f17 with last upstream vdsm.spec From 49aef36f21a601bb33c4e40e7e857f3925c9e277 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 5 Nov 2012 15:17:12 -0500 Subject: [PATCH 030/126] update to vdsm-4.10.1-1.gitgf2f6683 vdsm-4.10.1-1.gitgf2f6683 --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 0d0f9be..e59e5b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1c0ab3c9414d22e8a3b027e8f22d8d0e vdsm-4.10.1.tar.gz +dc9d0e809808877a52555484ffb29025 vdsm-4.10.1-gf2f6683.tar.gz From e18cab929f8ae74fc5fe8525e8923c0affa13893 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Wed, 12 Dec 2012 13:33:03 +0100 Subject: [PATCH 031/126] update to vdsm-4.10.3-1 vdsm-4.10.3-1 Signed-off-by: Federico Simoncelli --- sources | 2 +- vdsm.spec | 157 ++++++++++++++++++++++++++++++++---------------------- 2 files changed, 95 insertions(+), 64 deletions(-) diff --git a/sources b/sources index e59e5b1..d373508 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dc9d0e809808877a52555484ffb29025 vdsm-4.10.1-gf2f6683.tar.gz +6e181a25b2b4fc9e5f85faafc9d73aa1 vdsm-4.10.3.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 3f811c9..dc0a536 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -3,10 +3,10 @@ %global vdsm_bootstrap vdsm-bootstrap %global vdsm_reg vdsm-reg -# Upstream release -%global vdsm_release gf2f6683 -%global vdsm_relvtag .git%{vdsm_release} -%global vdsm_relttag -%{vdsm_release} +# Upstream git release +# % global vdsm_release gf2f6683 +# % global vdsm_relvtag .git%{vdsm_release} +# % global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -31,7 +31,7 @@ %{!?enable_autotools:%define enable_autotools 1} Name: %{vdsm_name} -Version: 4.10.1 +Version: 4.10.3 Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -55,9 +55,14 @@ BuildRequires: python-nose # BuildRequires needed by the tests during the build BuildRequires: python-ethtool +BuildRequires: libselinux-python BuildRequires: libvirt-python -BuildRequires: sanlock-python >= 2.3 BuildRequires: genisoimage +BuildRequires: openssl +BuildRequires: m2crypto +%if 0%{?rhel} +BuildRequires: python-ordereddict +%endif # Autotools BuildRequires %if 0%{?enable_autotools} @@ -71,11 +76,12 @@ BuildRequires: libtool BuildRequires: pyflakes BuildRequires: python-pep8 BuildRequires: systemd-units +BuildRequires: python-pthreading %endif Requires: which Requires: sudo >= 1.7.3 -Requires: logrotate >= 3.8.0 +Requires: logrotate Requires: xz Requires: ntp Requires: iproute @@ -83,43 +89,61 @@ Requires: python-ethtool Requires: rpm-python Requires: nfs-utils Requires: python-pthreading +Requires: m2crypto +Requires: %{name}-xmlrpc = %{version}-%{release} %ifarch x86_64 Requires: dmidecode %endif %if 0%{?rhel} +%if 0%{?rhel} >= 7 +ExclusiveArch: x86_64 +Requires: device-mapper-multipath +Requires: e2fsprogs +Requires: iscsi-initiator-utils +Requires: libvirt +Requires: lvm2 +Requires: python +Requires: qemu-kvm +Requires: qemu-kvm-img +Requires: sanlock, sanlock-python +Requires: selinux-policy-targeted +%else Requires: python # Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 Requires: libvirt >= 0.9.10-21.el6_3.5 -Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 +Requires: mom >= 0.3.0 Requires: selinux-policy-targeted >= 3.7.19-80 Requires: lvm2 >= 2.02.95-10.el6_3.2 +Requires: logrotate < 3.8.0 +%endif %else # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 Requires: libvirt >= 0.10.1-1 -Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 Requires: kernel >= 3.6 +Requires: mom >= 0.3.0 Requires: sanlock >= 2.4-2, sanlock-python Requires: sed >= 4.2.1-10 Requires: selinux-policy-targeted >= 3.10.0-149 Requires: lvm2 >= 2.02.95 %endif +Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: psmisc >= 22.6-15 Requires: fence-agents Requires: bridge-utils @@ -132,9 +156,10 @@ Requires: libselinux-python Requires: %{name}-python = %{version}-%{release} Requires: pyparted -Requires(pre,preun): policycoreutils-python Requires(post): /usr/sbin/saslpasswd2 Requires(post): /bin/hostname +Requires(post): policycoreutils-python +Requires(preun): policycoreutils-python %description The VDSM service is required by a Virtualization Manager to manage the @@ -162,15 +187,17 @@ Requires: %{name}-python = %{version}-%{release} An XMLRPC interface for interacting with vdsmd. Primary control interface for ovirt-engine and vdsClient. -%package rest -Summary: VDSM REST API +%package jsonrpc +Summary: VDSM API Server BuildArch: noarch Requires: %{name}-python = %{version}-%{release} -Requires: python-cherrypy python-cheetah +%if 0%{?rhel} +Requires: python-ordereddict +%endif -%description rest -A REST interface for interacting with vdsmd. +%description jsonrpc +A Json-based RPC interface that serves as the protocol for libvdsm. %package bootstrap Summary: VDSM bootstrapping package @@ -195,7 +222,7 @@ Manager. Summary: VDSM python libraries %description python -Shared libraries beween the various VDSM packages. +Shared libraries between the various VDSM packages. %package debug-plugin Summary: VDSM Debug Plugin @@ -285,6 +312,14 @@ hook prevent VM from spoofing its mac or ip address by using libvirt filter and by adding custom filter: isolatedprivatevlan-vdsm.xml +%package hook-nestedvt +Summary: Nested Virtualization support for VDSM +BuildArch: noarch + +%description hook-nestedvt +If the nested virtualization is enabled in your kvm module +this hook will expose it to the guests. + %package hook-numa Summary: numa sopport for VDSM BuildArch: noarch @@ -360,6 +395,13 @@ BuildArch: noarch sr-iov hook enable to add virtual functions exposed by the device directly to a virtual machine. +%package hook-vmfex +Summary: vmfex support for VDSM +BuildArch: noarch + +%description hook-vmfex +Hook for vmfex. + %package hook-vmdisk Summary: External disk support for VDSM BuildArch: noarch @@ -379,6 +421,9 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +%if 0%{?rhel} == 6 +sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in +%endif %build %if 0%{?enable_autotools} @@ -456,30 +501,8 @@ export LC_ALL=C /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} -# vdsm makes extensive use of nfs-exported images -# The next lines will collect the default selinux behaviour for the booleans -virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2) -virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2) -snlkNFS=$(/usr/sbin/semanage boolean -l | /bin/grep sanlock_use_nfs | cut -d ',' -f 2) - -# Set the booleans and persist it across reboots -if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* || \ - "${snlkNFS}" == *off* ]]; then - /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF -virt_use_nfs=1 -virt_use_sanlock=1 -sanlock_use_nfs=1 -_EOF -fi - -# Set the current state of SELinux booleans -if /usr/sbin/selinuxenabled; then - /usr/sbin/setsebool virt_use_nfs on - /usr/sbin/setsebool virt_use_sanlock on - /usr/sbin/setsebool sanlock_use_nfs on -fi - %post +%{_bindir}/vdsm-tool sebool-config # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd @@ -521,17 +544,7 @@ then /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf - /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF -virt_use_nfs=0 -virt_use_sanlock=0 -sanlock_use_nfs=0 -_EOF - - if /usr/sbin/selinuxenabled; then - /usr/sbin/setsebool virt_use_nfs off - /usr/sbin/setsebool virt_use_sanlock off - /usr/sbin/setsebool sanlock_use_nfs off - fi + %{_bindir}/vdsm-tool sebool-unconfig /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt @@ -627,7 +640,6 @@ exit 0 %{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/hooking.py* %{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/libvirtev.py* %{_datadir}/%{vdsm_name}/libvirtvm.py* %{_datadir}/%{vdsm_name}/lsblk.py* %{_datadir}/%{vdsm_name}/md_utils.py* @@ -643,6 +655,8 @@ exit 0 %{_datadir}/%{vdsm_name}/vdsm-store-net-config %{_datadir}/%{vdsm_name}/vm.py* %{_datadir}/%{vdsm_name}/write-net-config +%{_datadir}/%{vdsm_name}/zombieReaper.py* +%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/dummybr.py* %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py* %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf @@ -724,6 +738,12 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug_fail %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop %{_datadir}/%{vdsm_name}/addNetwork @@ -787,9 +807,10 @@ exit 0 %{python_sitearch}/%{vdsm_name}/betterPopen/__init__.py* %{python_sitearch}/%{vdsm_name}/betterPopen/createprocess.so %{python_sitearch}/%{vdsm_name}/tool/__init__.py* -%{python_sitearch}/%{vdsm_name}/tool/passwd.py* -%{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py* %{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py* +%{python_sitearch}/%{vdsm_name}/tool/passwd.py* +%{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py* +%{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README @@ -803,6 +824,8 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/route_info.out %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out +%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml %{_datadir}/%{vdsm_name}/tests/functional/*.py* %files hook-vhostmd @@ -855,6 +878,11 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan %config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml +%files hook-nestedvt +%defattr(-, root, root, -) +%{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_nestedvt + %files hook-numa %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa @@ -897,6 +925,11 @@ exit 0 %files hook-vmdisk %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk + +%files hook-vmfex +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex %endif %files debug-plugin @@ -917,15 +950,11 @@ exit 0 %defattr(-, root, root, -) %{_datadir}/%{vdsm_name}/BindingXMLRPC.py* -%files rest -%defattr(-, root, root, -) -%{_datadir}/%{vdsm_name}/rest/__init__.py* -%{_datadir}/%{vdsm_name}/rest/BindingREST.py* -%{_datadir}/%{vdsm_name}/rest/Dispatcher.py* -%{_datadir}/%{vdsm_name}/rest/Controller.py* -%{_datadir}/%{vdsm_name}/rest/templates/*.x -%{_datadir}/%{vdsm_name}/rest/templates/api.xsd -%{_datadir}/%{vdsm_name}/rest/templates/rsdl.xml +%files jsonrpc +%{_datadir}/%{vdsm_name}/BindingJsonRpc.py* +%{_datadir}/%{vdsm_name}/Bridge.py* +%{_datadir}/%{vdsm_name}/vdsmapi.py* +%{_datadir}/%{vdsm_name}/vdsmapi-schema.json %files bootstrap %defattr(-, root, root, -) @@ -949,7 +978,6 @@ exit 0 %{_unitdir}/vdsm-reg.service %endif %{_datadir}/%{vdsm_reg}/vdsm-reg-setup -%{_datadir}/%{vdsm_reg}/define.py* %{_datadir}/%{vdsm_reg}/vdsm-complete %{_datadir}/%{vdsm_reg}/vdsm-gen-cert %{_datadir}/%{vdsm_reg}/vdsm-upgrade @@ -985,6 +1013,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Wed Dec 12 2012 Federico Simoncelli 4.10.3-1 +- vdsm-4.10.3 + * Mon Nov 5 2012 Douglas Schilling Landgraf 4.10.1-100.gf2f6683 - vdsm-4.10.1-100-gf2f6683 From 67917429d2d819814874230b1268bb44d1fe14ac Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Sun, 13 Jan 2013 19:20:16 -0500 Subject: [PATCH 032/126] vdsm.spec: v4.10.3-78-gb005b54 update v4.10.3-78-gb005b54 --- vdsm.spec | 67 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index dc0a536..82e86eb 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,9 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream git release -# % global vdsm_release gf2f6683 -# % global vdsm_relvtag .git%{vdsm_release} -# % global vdsm_relttag -%{vdsm_release} +%global vdsm_release b005b54 +%global vdsm_relvtag .git%{vdsm_release} +%global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -32,7 +32,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -55,12 +55,16 @@ BuildRequires: python-nose # BuildRequires needed by the tests during the build BuildRequires: python-ethtool +BuildRequires: python-pthreading BuildRequires: libselinux-python BuildRequires: libvirt-python BuildRequires: genisoimage BuildRequires: openssl BuildRequires: m2crypto -%if 0%{?rhel} +%ifarch x86_64 +BuildRequires: python-dmidecode +%endif +%if 0%{?rhel} == 6 BuildRequires: python-ordereddict %endif @@ -76,7 +80,6 @@ BuildRequires: libtool BuildRequires: pyflakes BuildRequires: python-pep8 BuildRequires: systemd-units -BuildRequires: python-pthreading %endif Requires: which @@ -85,7 +88,7 @@ Requires: logrotate Requires: xz Requires: ntp Requires: iproute -Requires: python-ethtool +Requires: python-ethtool >= 0.6-3 Requires: rpm-python Requires: nfs-utils Requires: python-pthreading @@ -93,6 +96,7 @@ Requires: m2crypto Requires: %{name}-xmlrpc = %{version}-%{release} %ifarch x86_64 +Requires: python-dmidecode Requires: dmidecode %endif @@ -114,7 +118,7 @@ Requires: python # Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 -Requires: libvirt >= 0.9.10-21.el6_3.5 +Requires: libvirt >= 0.9.10-21.el6_3.6 Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 @@ -122,7 +126,7 @@ Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: mom >= 0.3.0 -Requires: selinux-policy-targeted >= 3.7.19-80 +Requires: selinux-policy-targeted >= 3.7.19-155 Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif @@ -143,6 +147,12 @@ Requires: selinux-policy-targeted >= 3.10.0-149 Requires: lvm2 >= 2.02.95 %endif +# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is +# disabled we now require the version 2.1.13-44 (or newer) of Fedora. +%if 0%{?fedora} >= 18 +Requires: policycoreutils >= 2.1.13-44 +%endif + Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: psmisc >= 22.6-15 Requires: fence-agents @@ -192,7 +202,7 @@ Summary: VDSM API Server BuildArch: noarch Requires: %{name}-python = %{version}-%{release} -%if 0%{?rhel} +%if 0%{?rhel} == 6 Requires: python-ordereddict %endif @@ -321,11 +331,11 @@ If the nested virtualization is enabled in your kvm module this hook will expose it to the guests. %package hook-numa -Summary: numa sopport for VDSM +Summary: NUMA support for VDSM BuildArch: noarch %description hook-numa -Hooks is getting number/rage of numa nodes and numa mode, +Hooks is getting number/rage of NUMA nodes and NUMA mode, and update the VM xml. %package hook-pincpu @@ -371,14 +381,6 @@ Hook creates a disk for a VM onetime usage, the disk will be erased when the VM destroyed. VM cannot be migrated when using scratchpad hook -%package hook-smartcard -Summary: Smartcard support for Spice protocol in VDSM -BuildArch: noarch - -%description hook-smartcard -Smartcard hook add support for spice in VDSM. -Smartcard hook enable user to use its smartcard inside virtual machines. - %package hook-smbios Summary: Adding custom smbios entries to libvirt domain via VDSM BuildArch: noarch @@ -421,6 +423,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -502,7 +505,7 @@ export LC_ALL=C /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} %post -%{_bindir}/vdsm-tool sebool-config +%{_bindir}/vdsm-tool sebool-config || : # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd @@ -544,7 +547,7 @@ then /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf - %{_bindir}/vdsm-tool sebool-unconfig + %{_bindir}/vdsm-tool sebool-unconfig || : /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt @@ -619,7 +622,7 @@ exit 0 %files %defattr(-, root, root, -) -%doc COPYING README vdsm/vdsm.conf.sample +%doc COPYING README vdsm/vdsm.conf.sample vdsm_api/vdsm-api.html %if 0%{?rhel} %{_initrddir}/vdsmd %else @@ -637,6 +640,7 @@ exit 0 %{_datadir}/%{vdsm_name}/blkid.py* %{_datadir}/%{vdsm_name}/caps.py* %{_datadir}/%{vdsm_name}/clientIF.py* +%{_datadir}/%{vdsm_name}/dmidecodeUtil.py* %{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/hooking.py* %{_datadir}/%{vdsm_name}/hooks.py* @@ -757,6 +761,11 @@ exit 0 %{_datadir}/%{vdsm_name}/neterrors.py* %{_datadir}/%{vdsm_name}/respawn %{_datadir}/%{vdsm_name}/set-conf-item +%dir %{_datadir}/%{vdsm_name}/gluster +%{_datadir}/%{vdsm_name}/gluster/__init__.py* +%{_datadir}/%{vdsm_name}/gluster/cli.py* +%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{_datadir}/%{vdsm_name}/gluster/hostname.py* %{python_sitelib}/sos/plugins/vdsm.py* /lib/udev/rules.d/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -823,6 +832,7 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/route_info.out +%{_datadir}/%{vdsm_name}/tests/route_info_ppc64.out %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml @@ -907,10 +917,6 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad -%files hook-smartcard -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard - %files hook-smbios %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios @@ -1006,13 +1012,12 @@ exit 0 %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name}/gluster %doc COPYING -%{_datadir}/%{vdsm_name}/gluster/__init__.py* %{_datadir}/%{vdsm_name}/gluster/api.py* -%{_datadir}/%{vdsm_name}/gluster/cli.py* -%{_datadir}/%{vdsm_name}/gluster/exception.py* -%{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Sun Jan 13 2013 Douglas Schilling Landgraf v4.10.3-78-gb005b54 +* v4.10.3-78-gb005b54 + * Wed Dec 12 2012 Federico Simoncelli 4.10.3-1 - vdsm-4.10.3 From c702136cb2cf29eeb89f8788bef989fd60fb2f7c Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Sun, 13 Jan 2013 19:22:09 -0500 Subject: [PATCH 033/126] v4.10.3-78-gb005b54 --- sources | 2 +- vdsm.spec | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sources b/sources index d373508..0027272 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e181a25b2b4fc9e5f85faafc9d73aa1 vdsm-4.10.3.tar.gz +55dae854f0d9d71ee791c0d7373ca7e9 vdsm-4.10.3-b005b54.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 82e86eb..12a8d82 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1018,6 +1018,16 @@ exit 0 * Sun Jan 13 2013 Douglas Schilling Landgraf v4.10.3-78-gb005b54 * v4.10.3-78-gb005b54 +* Wed Jan 02 2013 Federico Simoncelli 4.10.3-3 +- caps.py: osversion() validate OVIRT +- restarting libvirtd didn't work over allinone setup +- Integrate Smartcard support + +* Thu Dec 27 2012 Federico Simoncelli 4.10.3-2 +- api: Report CPU thread info in getVdsCapabilities +- schema: Missing comment for new VmDeviceType +- schema: Fix schema for VM.updateDevice + * Wed Dec 12 2012 Federico Simoncelli 4.10.3-1 - vdsm-4.10.3 From 6133c3970e9556e2545a9ee2de0547c1af330f54 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 20:43:14 -0600 Subject: [PATCH 034/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 12a8d82..2d72259 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -32,7 +32,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1015,6 +1015,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/api.py* %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 4.10.3-5.gitb005b54 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sun Jan 13 2013 Douglas Schilling Landgraf v4.10.3-78-gb005b54 * v4.10.3-78-gb005b54 From 83d581e06eed322982da89f7411b0c331048f06e Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 25 Mar 2013 10:52:19 -0300 Subject: [PATCH 035/126] update master branch with vdsm-4.10.3-11.fc19 --- ...chema-Fix-schema-for-VM.updateDevice.patch | 65 ++ ...Missing-comment-for-new-VmDeviceType.patch | 36 + ...PU-thread-info-in-getVdsCapabilities.patch | 53 ++ 0004-caps.py-osversion-validate-OVIRT.patch | 35 + ...irtd-didn-t-work-over-allinone-setup.patch | 37 + 0006-Integrate-Smartcard-support.patch | 421 +++++++++ ...c-python-ordereddict-only-for-rhel-7.patch | 42 + ...require-python-ordereddict-on-fedora.patch | 42 + ...spec-BuildRequires-python-pthreading.patch | 31 + ...th-py-and-pyc-file-to-start-super-vd.patch | 54 ++ 0011-adding-getHardwareInfo-API-to-vdsm.patch | 334 +++++++ ...-Explicitly-shutdown-m2crypto-socket.patch | 55 ++ ...licycoreutils-and-skip-sebool-errors.patch | 59 ++ ...linux-policy-to-avoid-selinux-failur.patch | 42 + ...rvice-require-either-ntpd-or-chronyd.patch | 36 + ...-check-local-variable-before-reading.patch | 44 + ...v-Race-fix-load-and-trigger-dev-rule.patch | 115 +++ ...ommand-path-to-be-configured-at-runt.patch | 171 ++++ ...upgrade-to-v2-before-upgrading-to-v3.patch | 91 ++ ...misc-rename-safelease-to-clusterlock.patch | 866 ++++++++++++++++++ ...e-cluster-lock-using-makeClusterLock.patch | 151 +++ ...add-the-local-locking-implementation.patch | 225 +++++ ...taDataKeyNotFoundError-when-preparin.patch | 38 + 0024-vdsm.spec-Require-openssl.patch | 31 + 0025-Fedora-18-require-a-newer-udev.patch | 36 + ...-sloppy-backport-of-safelease-rename.patch | 40 + ...-use-of-zombie-reaper-from-supervdsm.patch | 52 ++ ...delete-update-of-devices-with-no-ifc.patch | 63 ++ ...oreutils-2.1.13-55-to-avoid-another-.patch | 41 + ...nnect-to-supervdsm-more-than-3-time-.patch | 50 + ...kaging-add-load_needed_modules.py.in.patch | 81 ++ ...d_dev-reopen-bonding_masters-per-bon.patch | 38 + ...ndling-Attribute-error-in-Python-2.6.patch | 91 ++ ...-bootstrap-remove-glusterfs-packages.patch | 52 ++ ...ter-set-glusterfs-dependency-version.patch | 33 + ...e-template-when-zeroing-a-dependant-.patch | 65 ++ 0037-vdsm.spec-fence-agents-all.patch | 59 ++ sources | 2 +- vdsm.spec | 177 +++- 39 files changed, 3928 insertions(+), 26 deletions(-) create mode 100644 0001-schema-Fix-schema-for-VM.updateDevice.patch create mode 100644 0002-schema-Missing-comment-for-new-VmDeviceType.patch create mode 100644 0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch create mode 100644 0004-caps.py-osversion-validate-OVIRT.patch create mode 100644 0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch create mode 100644 0006-Integrate-Smartcard-support.patch create mode 100644 0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch create mode 100644 0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch create mode 100644 0009-vdsm.spec-BuildRequires-python-pthreading.patch create mode 100644 0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch create mode 100644 0011-adding-getHardwareInfo-API-to-vdsm.patch create mode 100644 0012-Explicitly-shutdown-m2crypto-socket.patch create mode 100644 0013-spec-require-policycoreutils-and-skip-sebool-errors.patch create mode 100644 0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch create mode 100644 0015-vdsmd.service-require-either-ntpd-or-chronyd.patch create mode 100644 0016-isRunning-didn-t-check-local-variable-before-reading.patch create mode 100644 0017-udev-Race-fix-load-and-trigger-dev-rule.patch create mode 100644 0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch create mode 100644 0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch create mode 100644 0020-misc-rename-safelease-to-clusterlock.patch create mode 100644 0021-domain-select-the-cluster-lock-using-makeClusterLock.patch create mode 100644 0022-clusterlock-add-the-local-locking-implementation.patch create mode 100644 0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch create mode 100644 0024-vdsm.spec-Require-openssl.patch create mode 100644 0025-Fedora-18-require-a-newer-udev.patch create mode 100644 0026-fix-sloppy-backport-of-safelease-rename.patch create mode 100644 0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch create mode 100644 0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch create mode 100644 0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch create mode 100644 0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch create mode 100644 0031-packaging-add-load_needed_modules.py.in.patch create mode 100644 0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch create mode 100644 0033-gluster-Handling-Attribute-error-in-Python-2.6.patch create mode 100644 0034-bootstrap-remove-glusterfs-packages.patch create mode 100644 0035-gluster-set-glusterfs-dependency-version.patch create mode 100644 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch create mode 100644 0037-vdsm.spec-fence-agents-all.patch diff --git a/0001-schema-Fix-schema-for-VM.updateDevice.patch b/0001-schema-Fix-schema-for-VM.updateDevice.patch new file mode 100644 index 0000000..59cd4bc --- /dev/null +++ b/0001-schema-Fix-schema-for-VM.updateDevice.patch @@ -0,0 +1,65 @@ +From 844f10a9aafd55018e9966a61dece726d3e62511 Mon Sep 17 00:00:00 2001 +From: Adam Litke +Date: Wed, 12 Dec 2012 13:52:19 -0600 +Subject: [PATCH 1/3] schema: Fix schema for VM.updateDevice + +Another recent update broke the schema file. I'll take the blame for this one +since I approved the change :) Some missing and/or malformed data in comments +was causing the process-schema script to fail. Another reason for validating +the schema during the build. + +Change-Id: If88596050ace9511bcc7be65ee46645359e30532 +Signed-off-by: Adam Litke +Reviewed-on: http://gerrit.ovirt.org/10012 +Reviewed-by: Saggi Mizrahi +Tested-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/10019 +Reviewed-by: Dan Kenigsberg +Tested-by: Antoni Segura Puimedon +--- + vdsm_api/vdsmapi-schema.json | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json +index 9772e18..487e69a 100644 +--- a/vdsm_api/vdsmapi-schema.json ++++ b/vdsm_api/vdsmapi-schema.json +@@ -4894,10 +4894,12 @@ + ## + # @vmUpdateDeviceParams: + # ++# A discriminated record of update parameters for a VM device. ++# + # @deviceType: The VM device type to update. For example 'interface' for + # network devices or 'disk' for disk storage devices. + # +-# Since 4.10.3 ++# Since: 4.10.3 + ## + {'type': 'vmUpdateDeviceParams', + 'data': {'deviceType': 'VmDeviceType'}, +@@ -4924,11 +4926,11 @@ + # by alias. If omitted, it keeps the current mirroring + # configuration. + # +-# Since 4.10.3 ++# Since: 4.10.3 + ## + {'type': 'vmUpdateInterfaceDeviceParams', + 'data': {'*network': 'str', '*linkActive': 'bool', +- 'alias': 'str', '*portMirroring': '[str]'}} ++ 'alias': 'str', '*portMirroring': ['str']}} + + ## + # @VM.updateDevice: +@@ -4943,7 +4945,6 @@ + # The VM definition, as updated + # + # Since: 4.10.3 +-# + ## + {'command': {'class': 'VM', 'name': 'updateDevice'}, + 'data': {'vmId': 'UUID', 'params': 'vmUpdateDeviceParams'}, +-- +1.7.11.7 + diff --git a/0002-schema-Missing-comment-for-new-VmDeviceType.patch b/0002-schema-Missing-comment-for-new-VmDeviceType.patch new file mode 100644 index 0000000..d44579b --- /dev/null +++ b/0002-schema-Missing-comment-for-new-VmDeviceType.patch @@ -0,0 +1,36 @@ +From 244713456b87d4ea1873c98cbaae52bffd3ce1ee Mon Sep 17 00:00:00 2001 +From: Adam Litke +Date: Wed, 12 Dec 2012 14:11:16 -0600 +Subject: [PATCH 2/3] schema: Missing comment for new VmDeviceType + +When adding a new 'console' VmDeviceType, the submitter forgot to include +documentation in the comment block. This caused process-schema.py to fail. + +Change-Id: Icd7db71a4cd1a2addd31815a73dcd5c1cda7af4f +Signed-off-by: Adam Litke +Reviewed-on: http://gerrit.ovirt.org/10013 +Reviewed-by: Saggi Mizrahi +Tested-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/10020 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm_api/vdsmapi-schema.json | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json +index 487e69a..58dd6e2 100644 +--- a/vdsm_api/vdsmapi-schema.json ++++ b/vdsm_api/vdsmapi-schema.json +@@ -1681,6 +1681,8 @@ + # + # @channel: A host-guest communication channel + # ++# @console: A console device ++# + # Since: 4.10.0 + ## + {'enum': 'VmDeviceType', +-- +1.7.11.7 + diff --git a/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch b/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch new file mode 100644 index 0000000..e502d73 --- /dev/null +++ b/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch @@ -0,0 +1,53 @@ +From b8c1c973d9767859d144042531f7a5ae76fce389 Mon Sep 17 00:00:00 2001 +From: Greg Padgett +Date: Thu, 20 Dec 2012 09:43:29 -0500 +Subject: [PATCH 3/3] api: Report CPU thread info in getVdsCapabilities + +Report CPU thread info in getVdsCapabilities + +Change-Id: I11f1e139a3f3d5bd18032713694bdebf9ab8c1d7 +Signed-off-by: Greg Padgett +Reviewed-on: http://gerrit.ovirt.org/10300 +Reviewed-by: Federico Simoncelli +--- + vdsm/caps.py | 1 + + vdsm_api/vdsmapi-schema.json | 4 +++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/vdsm/caps.py b/vdsm/caps.py +index 0438fb4..6749227 100644 +--- a/vdsm/caps.py ++++ b/vdsm/caps.py +@@ -261,6 +261,7 @@ def get(): + else: + caps['cpuCores'] = str(cpuTopology.cores()) + ++ caps['cpuThreads'] = str(cpuTopology.threads()) + caps['cpuSockets'] = str(cpuTopology.sockets()) + caps['cpuSpeed'] = cpuInfo.mhz() + if config.getboolean('vars', 'fake_kvm_support'): +diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json +index 58dd6e2..c72ec4b 100644 +--- a/vdsm_api/vdsmapi-schema.json ++++ b/vdsm_api/vdsmapi-schema.json +@@ -848,6 +848,8 @@ + # + # @kvmEnabled: KVM is enabled on the host + # ++# @cpuThreads: The number of CPU threads present ++# + # @cpuCores: The number of CPU cores present + # + # @cpuSockets: The numbet of CPU sockets +@@ -909,7 +911,7 @@ + # the current API truncates @software_version to 'x.y'. + ## + {'type': 'VdsmCapabilities', +- 'data': {'kvmEnabled': 'bool', 'cpuCores': 'uint', ++ 'data': {'kvmEnabled': 'bool', 'cpuThreads': 'uint', 'cpuCores': 'uint', + 'cpuSockets': 'uint', 'cpuSpeed': 'float', 'cpuModel': 'str', + 'cpuFlags': 'str', 'version_name': 'str', 'software_version': 'str', + 'software_revision': 'str', 'supportedENGINEs': ['str'], +-- +1.7.11.7 + diff --git a/0004-caps.py-osversion-validate-OVIRT.patch b/0004-caps.py-osversion-validate-OVIRT.patch new file mode 100644 index 0000000..9333042 --- /dev/null +++ b/0004-caps.py-osversion-validate-OVIRT.patch @@ -0,0 +1,35 @@ +From 95be2057db1bea2730bc4b65058f5b1a42ab45bd Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 17 Dec 2012 19:23:21 -0500 +Subject: [PATCH 4/6] caps.py: osversion() validate OVIRT + +Currently we are only validating RHEV-H node. +This patch will validate oVirt node as well in osversion(). + +Change-Id: I58efd4660f94b2f68ead470a54f0f301a1b9b4ba +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=873917 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/10177 +Reviewed-by: Alon Bar-Lev +Tested-by: Alon Bar-Lev +Reviewed-by: Dan Kenigsberg +--- + vdsm/caps.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/caps.py b/vdsm/caps.py +index 6749227..e9a1476 100644 +--- a/vdsm/caps.py ++++ b/vdsm/caps.py +@@ -229,7 +229,7 @@ def osversion(): + + osname = getos() + try: +- if osname == OSName.RHEVH: ++ if osname == OSName.RHEVH or osname == OSName.OVIRT: + d = _parseKeyVal(file('/etc/default/version')) + version = d.get('VERSION', '') + release = d.get('RELEASE', '') +-- +1.7.11.7 + diff --git a/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch b/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch new file mode 100644 index 0000000..bc7af92 --- /dev/null +++ b/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch @@ -0,0 +1,37 @@ +From 87dfb384debe7c171c3df27f13dc95ba3f0f0d5b Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Sun, 23 Dec 2012 10:40:29 +0200 +Subject: [PATCH 5/6] restarting libvirtd didn't work over allinone setup + +Change-Id: I300adc5ac3d9b12fee49023a54e5ffb4dee98da1 +Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=888258 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/10237 +Tested-by: Ohad Basan +Reviewed-by: Ohad Basan +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/10316 +--- + vdsm/vdsmd.init.in | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in +index 7a7ae84..c8223d3 100755 +--- a/vdsm/vdsmd.init.in ++++ b/vdsm/vdsmd.init.in +@@ -362,7 +362,11 @@ EOF + + ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr" + +- /sbin/initctl restart libvirtd 2>/dev/null || : ++ if libvirt_should_use_upstart; then ++ /sbin/initctl restart libvirtd 2>/dev/null || : ++ else ++ /bin/systemctl restart libvirtd.service ++ fi + + # + # finished reconfiguration, do not trigger +-- +1.7.11.7 + diff --git a/0006-Integrate-Smartcard-support.patch b/0006-Integrate-Smartcard-support.patch new file mode 100644 index 0000000..7837b0e --- /dev/null +++ b/0006-Integrate-Smartcard-support.patch @@ -0,0 +1,421 @@ +From d33da223da1160b1ad2a8d02316b6b435bee9c29 Mon Sep 17 00:00:00 2001 +From: Tomas Jelinek +Date: Wed, 10 Oct 2012 03:06:21 -0400 +Subject: [PATCH 6/6] Integrate Smartcard support + +This patch is a VDSM part of the integrating +the smartcard support to the ovirt: + +This VDSM part integrates the smartcard in +a supported way, not just as an unsupported custom hook. + +It also removes the smartcard hook itself. + +Change-Id: I7cdaef420c8381d588f6215e66e6a80dd9d2e44b +Signed-off-by: Tomas Jelinek +Signed-off-by: Peter V. Saveliev +Signed-off-by: Antoni S. Puimedon +Reviewed-on: http://gerrit.ovirt.org/10547 +Tested-by: Omer Frenkel +Reviewed-by: Dan Kenigsberg +Reviewed-by: Federico Simoncelli +--- + configure.ac | 1 - + tests/libvirtvmTests.py | 7 +++++ + vdsm.spec.in | 12 -------- + vdsm/libvirtvm.py | 44 ++++++++++++++++++++++++++++- + vdsm/vm.py | 19 +++++++++++-- + vdsm_api/vdsmapi-schema.json | 49 +++++++++++++++++++++++++++++++-- + vdsm_hooks/Makefile.am | 1 - + vdsm_hooks/README | 4 +-- + vdsm_hooks/smartcard/Makefile.am | 18 ------------ + vdsm_hooks/smartcard/README | 9 ------ + vdsm_hooks/smartcard/before_vm_start.py | 29 ------------------- + 11 files changed, 116 insertions(+), 77 deletions(-) + delete mode 100644 vdsm_hooks/smartcard/Makefile.am + delete mode 100644 vdsm_hooks/smartcard/README + delete mode 100755 vdsm_hooks/smartcard/before_vm_start.py + +diff --git a/configure.ac b/configure.ac +index a6265b5..3489e38 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -209,7 +209,6 @@ AC_OUTPUT([ + vdsm_hooks/qos/Makefile + vdsm_hooks/qemucmdline/Makefile + vdsm_hooks/scratchpad/Makefile +- vdsm_hooks/smartcard/Makefile + vdsm_hooks/smbios/Makefile + vdsm_hooks/sriov/Makefile + vdsm_hooks/vhostmd/Makefile +diff --git a/tests/libvirtvmTests.py b/tests/libvirtvmTests.py +index 4ed7318..bd68f2a 100644 +--- a/tests/libvirtvmTests.py ++++ b/tests/libvirtvmTests.py +@@ -91,6 +91,13 @@ class TestLibvirtvm(TestCaseBase): + domxml.appendOs() + self.assertXML(domxml.dom, xml, 'os') + ++ def testSmartcardXML(self): ++ smartcardXML = '' ++ dev = {'device': 'smartcard', ++ 'specParams': {'mode': 'passthrough', 'type': 'spicevmc'}} ++ smartcard = libvirtvm.SmartCardDevice(self.conf, self.log, **dev) ++ self.assertXML(smartcard.getXML(), smartcardXML) ++ + def testFeaturesXML(self): + featuresXML = """ + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 1978fa9..f9e238b 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -353,14 +353,6 @@ Hook creates a disk for a VM onetime usage, + the disk will be erased when the VM destroyed. + VM cannot be migrated when using scratchpad hook + +-%package hook-smartcard +-Summary: Smartcard support for Spice protocol in VDSM +-BuildArch: noarch +- +-%description hook-smartcard +-Smartcard hook add support for spice in VDSM. +-Smartcard hook enable user to use its smartcard inside virtual machines. +- + %package hook-smbios + Summary: Adding custom smbios entries to libvirt domain via VDSM + BuildArch: noarch +@@ -887,10 +879,6 @@ exit 0 + %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad + %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad + +-%files hook-smartcard +-%defattr(-, root, root, -) +-%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard +- + %files hook-smbios + %defattr(-, root, root, -) + %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios +diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py +index 219e382..fe140ec 100644 +--- a/vdsm/libvirtvm.py ++++ b/vdsm/libvirtvm.py +@@ -1243,6 +1243,21 @@ class WatchdogDevice(LibvirtVmDevice): + return m + + ++class SmartCardDevice(LibvirtVmDevice): ++ def getXML(self): ++ """ ++ Add smartcard section to domain xml ++ ++ ++
++ ++ """ ++ card = self.createXmlElem(self.device, None, ['address']) ++ card.setAttribute('mode', self.specParams['mode']) ++ card.setAttribute('type', self.specParams['type']) ++ return card ++ ++ + class RedirDevice(LibvirtVmDevice): + def getXML(self): + """ +@@ -1395,6 +1410,7 @@ class LibvirtVm(vm.Vm): + self._getUnderlyingControllerDeviceInfo() + self._getUnderlyingBalloonDeviceInfo() + self._getUnderlyingWatchdogDeviceInfo() ++ self._getUnderlyingSmartcardDeviceInfo() + # Obtain info of all unknown devices. Must be last! + self._getUnderlyingUnknownDeviceInfo() + +@@ -1486,7 +1502,8 @@ class LibvirtVm(vm.Vm): + vm.BALLOON_DEVICES: BalloonDevice, + vm.WATCHDOG_DEVICES: WatchdogDevice, + vm.REDIR_DEVICES: RedirDevice, +- vm.CONSOLE_DEVICES: ConsoleDevice} ++ vm.CONSOLE_DEVICES: ConsoleDevice, ++ vm.SMARTCARD_DEVICES: SmartCardDevice} + + for devType, devClass in devMap.items(): + for dev in devices[devType]: +@@ -2800,6 +2817,31 @@ class LibvirtVm(vm.Vm): + dev['address'] = address + dev['alias'] = alias + ++ def _getUnderlyingSmartcardDeviceInfo(self): ++ """ ++ Obtain smartcard device info from libvirt. ++ """ ++ smartcardxml = _domParseStr(self._lastXMLDesc).childNodes[0].\ ++ getElementsByTagName('devices')[0].\ ++ getElementsByTagName('smartcard') ++ for x in smartcardxml: ++ if not x.getElementsByTagName('address'): ++ continue ++ ++ address = self._getUnderlyingDeviceAddress(x) ++ alias = x.getElementsByTagName('alias')[0].getAttribute('name') ++ ++ for dev in self._devices[vm.SMARTCARD_DEVICES]: ++ if not hasattr(dev, 'address'): ++ dev.address = address ++ dev.alias = alias ++ ++ for dev in self.conf['devices']: ++ if dev['device'] == vm.SMARTCARD_DEVICES and \ ++ not dev.get('address'): ++ dev['address'] = address ++ dev['alias'] = alias ++ + def _getUnderlyingWatchdogDeviceInfo(self): + """ + Obtain watchdog device info from libvirt. +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 49fcb11..9610644 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -47,6 +47,7 @@ BALLOON_DEVICES = 'balloon' + REDIR_DEVICES = 'redir' + WATCHDOG_DEVICES = 'watchdog' + CONSOLE_DEVICES = 'console' ++SMARTCARD_DEVICES = 'smartcard' + + """ + A module containing classes needed for VM communication. +@@ -364,7 +365,8 @@ class Vm(object): + SOUND_DEVICES: [], VIDEO_DEVICES: [], + CONTROLLER_DEVICES: [], GENERAL_DEVICES: [], + BALLOON_DEVICES: [], REDIR_DEVICES: [], +- WATCHDOG_DEVICES: [], CONSOLE_DEVICES: []} ++ WATCHDOG_DEVICES: [], CONSOLE_DEVICES: [], ++ SMARTCARD_DEVICES: []} + + def _get_lastStatus(self): + PAUSED_STATES = ('Powering down', 'RebootInProgress', 'Up') +@@ -447,7 +449,8 @@ class Vm(object): + SOUND_DEVICES: [], VIDEO_DEVICES: [], + CONTROLLER_DEVICES: [], GENERAL_DEVICES: [], + BALLOON_DEVICES: [], REDIR_DEVICES: [], +- WATCHDOG_DEVICES: [], CONSOLE_DEVICES: []} ++ WATCHDOG_DEVICES: [], CONSOLE_DEVICES: [], ++ SMARTCARD_DEVICES: []} + for dev in self.conf.get('devices'): + try: + devices[dev['type']].append(dev) +@@ -485,6 +488,7 @@ class Vm(object): + devices[GENERAL_DEVICES] = [] + devices[BALLOON_DEVICES] = [] + devices[WATCHDOG_DEVICES] = [] ++ devices[SMARTCARD_DEVICES] = self.getConfSmartcard() + devices[REDIR_DEVICES] = [] + devices[CONSOLE_DEVICES] = [] + else: +@@ -549,6 +553,17 @@ class Vm(object): + + return vcards + ++ def getConfSmartcard(self): ++ """ ++ Normalize smartcard device (now there is only one) ++ """ ++ cards = [] ++ if self.conf.get('smartcard'): ++ cards.append({'device': SMARTCARD_DEVICES, ++ 'specParams': {'mode': 'passthrough', ++ 'type': 'spicevmc'}}) ++ return cards ++ + def getConfSound(self): + """ + Normalize sound device provided by conf. +diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json +index c72ec4b..7c9ef22 100644 +--- a/vdsm_api/vdsmapi-schema.json ++++ b/vdsm_api/vdsmapi-schema.json +@@ -1685,11 +1685,13 @@ + # + # @console: A console device + # ++# @smartcard: A smartcard device ++# + # Since: 4.10.0 + ## + {'enum': 'VmDeviceType', + 'data': ['disk', 'interface', 'video', 'sound', 'controller', 'balloon', +- 'channel', 'console']} ++ 'channel', 'console', 'smartcard']} + + ## + # @VmDiskDeviceType: +@@ -2356,6 +2358,48 @@ + 'address': 'VmDeviceAddress', 'alias': 'str', 'deviceId': 'UUID'}} + + ## ++# @VmSmartcardDeviceSpecParams: ++# ++# Additional VM smartcard device parameters. ++# ++# Since: 4.10.3 ++## ++{'type': 'VmSmartcardDeviceSpecParams', 'data': {}} ++ ++## ++# @VmSmartcardDeviceType: ++# ++# An enumeration of VM smartcard device types. ++# ++# @smartcard: A smartcard ++# ++# Since: 4.10.3 ++## ++{'enum': 'VmSmartcardDeviceType', 'data': ['smartcard']} ++ ++## ++# @VmSmartcardDevice: ++# ++# Properties of a VM smartcard device. ++# ++# @deviceType: The device type (always @smartcard) ++# ++# @device: The the type of smartcard device ++# ++# @address: Device hardware address ++# ++# @alias: Alias used to identify this device in commands ++# ++# @specParams: #optional Additional device parameters ++# ++# Since: 4.10.3 ++## ++{'type': 'VmSmartcardDevice', ++ 'data': {'deviceType': 'VmDeviceType', 'device': 'VmSmartcardDeviceType', ++ 'address': 'VmDeviceAddress', 'alias': 'str', ++ '*specParams': 'VmSmartcardDeviceSpecParams'}} ++ ++## + # @VmConsoleDevice: + # + # Properties of a VM console device. +@@ -2382,7 +2426,8 @@ + 'data': {'deviceType': 'VmDeviceType',}, + 'union': ['VmDiskDevice', 'VmInterfaceDevice', 'VmVideoDevice', + 'VmSoundDevice', 'VmControllerDevice', 'VmBalloonDevice', +- 'VmChannelDevice', 'VmWatchdogDevice', 'VmConsoleDevice']} ++ 'VmChannelDevice', 'VmWatchdogDevice', 'VmConsoleDevice', ++ 'VmSmartcardDevice']} + + ## + # @VmShortStatus: +diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am +index 9f00d4d..0e27a98 100644 +--- a/vdsm_hooks/Makefile.am ++++ b/vdsm_hooks/Makefile.am +@@ -37,7 +37,6 @@ SUBDIRS += \ + promisc \ + qos \ + scratchpad \ +- smartcard \ + smbios \ + sriov \ + vmdisk \ +diff --git a/vdsm_hooks/README b/vdsm_hooks/README +index b45b93e..1659610 100644 +--- a/vdsm_hooks/README ++++ b/vdsm_hooks/README +@@ -24,7 +24,7 @@ To work with VDSM hooks you need first to do the following: + + If you want to enable more then one custom hook use the semicolon as + a separator: +- # rhevm-config -s UserDefinedVMProperties='pincpu=^[0-9]+$;smartcard=^(true|false)$' --cver=3.0 ++ # rhevm-config -s UserDefinedVMProperties='pincpu=^[0-9]+$;sap_agent=^(true|false)$' --cver=3.0 + + The convention is [hook name]=[value], the value is evaluate with regular expression, + If you find regular expression too complex, you can always use the following command: +@@ -47,7 +47,7 @@ To work with VDSM hooks you need first to do the following: + pincpu=1 + if you want to use more then on hook and you did enable it with the rhevm-config + tool, you can use the semicolon as a separator: +- pincpu=1;smartcard=true ++ pincpu=1;sap_agent=true + b. Another option is to use "Run Once" dialog which mean that you add a custom property + only this time to the VM, next time that you run the VM it will run without the + custom property that you provided. +diff --git a/vdsm_hooks/smartcard/Makefile.am b/vdsm_hooks/smartcard/Makefile.am +deleted file mode 100644 +index dfefff5..0000000 +--- a/vdsm_hooks/smartcard/Makefile.am ++++ /dev/null +@@ -1,18 +0,0 @@ +-# Copyright 2008 Red Hat, Inc. and/or its affiliates. +-# +-# Licensed to you under the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. See the files README and +-# LICENSE_GPL_v2 which accompany this distribution. +-# +- +-EXTRA_DIST = \ +- before_vm_start.py +- +-install-data-local: +- $(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_vm_start +- $(INSTALL_SCRIPT) $(srcdir)/before_vm_start.py \ +- $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_smartcard +- +-uninstall-local: +- $(RM) $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_smartcard +diff --git a/vdsm_hooks/smartcard/README b/vdsm_hooks/smartcard/README +deleted file mode 100644 +index bd376bf..0000000 +--- a/vdsm_hooks/smartcard/README ++++ /dev/null +@@ -1,9 +0,0 @@ +-smartcard hook: +-=============== +-add smartcard support for spice +- +-syntax: +-smartcard: smartcard=true +- +-libvirt xml: +- +diff --git a/vdsm_hooks/smartcard/before_vm_start.py b/vdsm_hooks/smartcard/before_vm_start.py +deleted file mode 100755 +index 1944978..0000000 +--- a/vdsm_hooks/smartcard/before_vm_start.py ++++ /dev/null +@@ -1,29 +0,0 @@ +-#!/usr/bin/python +- +-import os +-import sys +-import hooking +-import traceback +- +-''' +-smartcard vdsm hook +-adding to domain xml +- +-''' +- +-if 'smartcard' in os.environ: +- try: +- sys.stderr.write('smartcard: adding smartcard support\n') +- domxml = hooking.read_domxml() +- +- devices = domxml.getElementsByTagName('devices')[0] +- card = domxml.createElement('smartcard') +- card.setAttribute('mode', 'passthrough') +- card.setAttribute('type', 'spicevmc') +- +- devices.appendChild(card) +- +- hooking.write_domxml(domxml) +- except: +- sys.stderr.write('smartcard: [unexpected error]: %s\n' % traceback.format_exc()) +- sys.exit(2) +-- +1.7.11.7 + diff --git a/0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch b/0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch new file mode 100644 index 0000000..d20a3c9 --- /dev/null +++ b/0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch @@ -0,0 +1,42 @@ +From 03389bcfa0808927ad7e8115073f89f05ce7fe5b Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 15 Jan 2013 13:12:08 -0500 +Subject: [PATCH 07/22] vdsm.spec: python-ordereddict only for rhel < 7 + +rhel7 contains python 2.7 which already includes ordereddict module, +no need extra python package. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891542 +Change-Id: I784d82a7fb5a1c6a13f015747f077020b91c19cb +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/11056 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index f9e238b..c01d29f 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -44,7 +44,7 @@ BuildRequires: libvirt-python + BuildRequires: genisoimage + BuildRequires: openssl + BuildRequires: m2crypto +-%if 0%{?rhel} ++%if 0%{?rhel} < 7 + BuildRequires: python-ordereddict + %endif + +@@ -174,7 +174,7 @@ Summary: VDSM API Server + BuildArch: noarch + + Requires: %{name}-python = %{version}-%{release} +-%if 0%{?rhel} ++%if 0%{?rhel} < 7 + Requires: python-ordereddict + %endif + +-- +1.8.1 + diff --git a/0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch b/0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch new file mode 100644 index 0000000..20dcf5b --- /dev/null +++ b/0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch @@ -0,0 +1,42 @@ +From 95765433ada7074f49fb33bb2f2ea59799022e98 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 15 Jan 2013 13:16:06 -0500 +Subject: [PATCH 08/22] vdsm.spec: Don't require python-ordereddict on fedora + +It is a regression introduced by commit bb0620f. The condition "0%{?rhel} < 7" +also holds true on fedora, so it causes to require python-ordereddict on fedora + +Change-Id: I87e167f207669f4dda5bb71d7809fe301ea7e905 +Signed-off-by: Mark Wu +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/11057 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index c01d29f..b518045 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -44,7 +44,7 @@ BuildRequires: libvirt-python + BuildRequires: genisoimage + BuildRequires: openssl + BuildRequires: m2crypto +-%if 0%{?rhel} < 7 ++%if 0%{?rhel} == 6 + BuildRequires: python-ordereddict + %endif + +@@ -174,7 +174,7 @@ Summary: VDSM API Server + BuildArch: noarch + + Requires: %{name}-python = %{version}-%{release} +-%if 0%{?rhel} < 7 ++%if 0%{?rhel} == 6 + Requires: python-ordereddict + %endif + +-- +1.8.1 + diff --git a/0009-vdsm.spec-BuildRequires-python-pthreading.patch b/0009-vdsm.spec-BuildRequires-python-pthreading.patch new file mode 100644 index 0000000..1aff2c9 --- /dev/null +++ b/0009-vdsm.spec-BuildRequires-python-pthreading.patch @@ -0,0 +1,31 @@ +From bed07103fc279eefd3f879f7f47e7d3b3c2cd8a9 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 15 Jan 2013 14:16:01 -0500 +Subject: [PATCH 09/22] vdsm.spec: BuildRequires: python-pthreading + +Moving python-pthreading to be a generic BuildRequirement + +Change-Id: If996c366cac42e149193651d2d8a6dbde6d8c81e +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891542 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/11058 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index b518045..14381e5 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -39,6 +39,7 @@ BuildRequires: python-nose + + # BuildRequires needed by the tests during the build + BuildRequires: python-ethtool ++BuildRequires: python-pthreading + BuildRequires: libselinux-python + BuildRequires: libvirt-python + BuildRequires: genisoimage +-- +1.8.1 + diff --git a/0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch b/0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch new file mode 100644 index 0000000..658729a --- /dev/null +++ b/0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch @@ -0,0 +1,54 @@ +From 72ff12082013c1682604e2ffb9e8a06b2714d64e Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Thu, 17 Jan 2013 09:38:43 +0200 +Subject: [PATCH 10/22] Searching for both py and pyc file to start super vdsm + +In oVirt Node we don't keep py files. + +Change-Id: I36771ce46f5d00ad8befe33569252bdb8cffeaa1 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/10854 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11133 +Reviewed-by: Vinzenz Feenstra +--- + vdsm/supervdsm.py | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py +index 532d5ac..740a93e 100644 +--- a/vdsm/supervdsm.py ++++ b/vdsm/supervdsm.py +@@ -35,19 +35,23 @@ _g_singletonSupervdsmInstance = None + _g_singletonSupervdsmInstance_lock = threading.Lock() + + +-def __supervdsmServerPath(serverFile): ++def __supervdsmServerPath(): + base = os.path.dirname(__file__) + +- serverPath = os.path.join(base, serverFile) +- if os.path.exists(serverPath): +- return os.path.abspath(serverPath) ++ # serverFile can be both the py or pyc file. In oVirt node we don't keep ++ # py files. this method looks for one of the two to calculate the absolute ++ # path of supervdsmServer ++ for serverFile in ("supervdsmServer.py", "supervdsmServer.pyc"): ++ serverPath = os.path.join(base, serverFile) ++ if os.path.exists(serverPath): ++ return os.path.abspath(serverPath) + + raise RuntimeError("SuperVDSM Server not found") + + PIDFILE = os.path.join(constants.P_VDSM_RUN, "svdsm.pid") + TIMESTAMP = os.path.join(constants.P_VDSM_RUN, "svdsm.time") + ADDRESS = os.path.join(constants.P_VDSM_RUN, "svdsm.sock") +-SUPERVDSM = __supervdsmServerPath("supervdsmServer.py") ++SUPERVDSM = __supervdsmServerPath() + + extraPythonPathList = [] + +-- +1.8.1 + diff --git a/0011-adding-getHardwareInfo-API-to-vdsm.patch b/0011-adding-getHardwareInfo-API-to-vdsm.patch new file mode 100644 index 0000000..85a1509 --- /dev/null +++ b/0011-adding-getHardwareInfo-API-to-vdsm.patch @@ -0,0 +1,334 @@ +From 6d25123c36637eb82966d52e33330bdbfa733413 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Fri, 18 Jan 2013 15:01:37 +0200 +Subject: [PATCH 11/22] adding getHardwareInfo API to vdsm + +Super vdsm retrieves system info about host hardware +parameters. This info will be shown as part of getHardwareInfo +API call in a structure called HardwareInformation. + +This feature currently available only for x86 cpu platfroms, for other +platfroms the api call returns empty dictionary. + +Feature-Description: +http://wiki.ovirt.org/wiki/Features/Design/HostHardwareInfo + +Change-Id: Ic429ef101fcf9047c4b552405314dc7ba9ba07a0 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/9258 +Reviewed-by: Barak Azulay +Reviewed-by: Shu Ming +Reviewed-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/11168 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 5 +++ + vdsm/API.py | 11 +++++ + vdsm/BindingXMLRPC.py | 5 +++ + vdsm/Makefile.am | 1 + + vdsm/define.py | 3 ++ + vdsm/dmidecodeUtil.py | 99 ++++++++++++++++++++++++++++++++++++++++++++ + vdsm/supervdsmServer.py | 10 +++++ + vdsm_api/vdsmapi-schema.json | 25 +++++++++++ + vdsm_cli/vdsClient.py | 7 ++++ + 9 files changed, 166 insertions(+) + create mode 100644 vdsm/dmidecodeUtil.py + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 14381e5..5b13419 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -45,6 +45,9 @@ BuildRequires: libvirt-python + BuildRequires: genisoimage + BuildRequires: openssl + BuildRequires: m2crypto ++%ifarch x86_64 ++BuildRequires: python-dmidecode ++%endif + %if 0%{?rhel} == 6 + BuildRequires: python-ordereddict + %endif +@@ -77,6 +80,7 @@ Requires: m2crypto + Requires: %{name}-xmlrpc = %{version}-%{release} + + %ifarch x86_64 ++Requires: python-dmidecode + Requires: dmidecode + %endif + +@@ -610,6 +614,7 @@ exit 0 + %{_datadir}/%{vdsm_name}/blkid.py* + %{_datadir}/%{vdsm_name}/caps.py* + %{_datadir}/%{vdsm_name}/clientIF.py* ++%{_datadir}/%{vdsm_name}/dmidecodeUtil.py* + %{_datadir}/%{vdsm_name}/API.py* + %{_datadir}/%{vdsm_name}/hooking.py* + %{_datadir}/%{vdsm_name}/hooks.py* +diff --git a/vdsm/API.py b/vdsm/API.py +index a1e3f2c..732f8a3 100644 +--- a/vdsm/API.py ++++ b/vdsm/API.py +@@ -1119,6 +1119,17 @@ class Global(APIBase): + + return {'status': doneCode, 'info': c} + ++ def getHardwareInfo(self): ++ """ ++ Report host hardware information ++ """ ++ try: ++ hw = supervdsm.getProxy().getHardwareInfo() ++ return {'status': doneCode, 'info': hw} ++ except: ++ self.log.error("failed to retrieve hardware info", exc_info=True) ++ return errCode['hwInfoErr'] ++ + def getStats(self): + """ + Report host statistics. +diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py +index 73185b9..f19a8bb 100644 +--- a/vdsm/BindingXMLRPC.py ++++ b/vdsm/BindingXMLRPC.py +@@ -288,6 +288,10 @@ class BindingXMLRPC(object): + ret['info'].update(self.getServerInfo()) + return ret + ++ def getHardwareInfo(self): ++ api = API.Global() ++ return api.getHardwareInfo() ++ + def getStats(self): + api = API.Global() + return api.getStats() +@@ -768,6 +772,7 @@ class BindingXMLRPC(object): + (self.vmGetMigrationStatus, 'migrateStatus'), + (self.vmMigrationCancel, 'migrateCancel'), + (self.getCapabilities, 'getVdsCapabilities'), ++ (self.getHardwareInfo, 'getVdsHardwareInfo'), + (self.getStats, 'getVdsStats'), + (self.vmGetStats, 'getVmStats'), + (self.getAllVmStats, 'getAllVmStats'), +diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am +index dc0590e..88b3287 100644 +--- a/vdsm/Makefile.am ++++ b/vdsm/Makefile.am +@@ -32,6 +32,7 @@ dist_vdsm_PYTHON = \ + configNetwork.py \ + debugPluginClient.py \ + dummybr.py \ ++ dmidecodeUtil.py \ + guestIF.py \ + hooking.py \ + hooks.py \ +diff --git a/vdsm/define.py b/vdsm/define.py +index efebea1..01b0c60 100644 +--- a/vdsm/define.py ++++ b/vdsm/define.py +@@ -127,6 +127,9 @@ errCode = {'noVM': {'status': + 'updateDevice': {'status': + {'code': 56, + 'message': 'Failed to update device'}}, ++ 'hwInfoErr': {'status': ++ {'code': 57, ++ 'message': 'Failed to read hardware information'}}, + 'recovery': {'status': + {'code': 99, + 'message': +diff --git a/vdsm/dmidecodeUtil.py b/vdsm/dmidecodeUtil.py +new file mode 100644 +index 0000000..eb8d834 +--- /dev/null ++++ b/vdsm/dmidecodeUtil.py +@@ -0,0 +1,99 @@ ++# ++# Copyright 2012 Red Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Refer to the README and COPYING files for full details of the license ++# ++ ++import dmidecode ++from vdsm import utils ++ ++ ++# This function gets dict and returns new dict that includes only string ++# value for each key. Keys in d that their value is a dictionary will be ++# ignored because those keys define a lable for the sub dictionary ++# (and those keys are irrelevant for us in dmidecode output) ++def __leafDict(d): ++ ret = {} ++ for k, v in d.iteritems(): ++ if isinstance(v, dict): ++ ret.update(__leafDict(v)) ++ else: ++ ret[k] = v ++ return ret ++ ++ ++@utils.memoized ++def getAllDmidecodeInfo(): ++ myLeafDict = {} ++ for k in ('system', 'bios', 'cache', 'processor', 'chassis', 'memory'): ++ myLeafDict[k] = __leafDict(getattr(dmidecode, k)()) ++ return myLeafDict ++ ++ ++@utils.memoized ++def getHardwareInfoStructure(): ++ dmiInfo = getAllDmidecodeInfo() ++ sysStruct = {} ++ for k1, k2 in (('system', 'Manufacturer'), ++ ('system', 'Product Name'), ++ ('system', 'Version'), ++ ('system', 'Serial Number'), ++ ('system', 'UUID'), ++ ('system', 'Family')): ++ sysStruct[(k1 + k2).replace(' ', '')] = dmiInfo[k1][k2] ++ ++ return sysStruct ++ ++ ++def printInfo(d): ++ ++ def formatData(data): ++ return '\n'.join(['%s - %s' % (k, v) for k, v in data.iteritems()]) ++ ++ print( ++ """ ++ SYSTEM INFORMATION ++ ================== ++{system} ++ ++ BIOS INFORMATION ++ ================ ++{bios} ++ ++ CACHE INFORMATION ++ ================= ++{cache} ++ ++ PROCESSOR INFO ++ ============== ++{processor} ++ ++ CHASSIS INFO ++ ============ ++{chassis} ++ ++ MEMORY INFORMATION ++ ================== ++{memory} ++ """.format( ++ system=formatData(d['system']), ++ bios=formatData(d['bios']), ++ cache=formatData(d['cache']), ++ processor=formatData(d['processor']), ++ chassis=formatData(d['chassis']), ++ memory=formatData(d['memory'])) ++ ) +diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py +index 5effd41..dc89218 100755 +--- a/vdsm/supervdsmServer.py ++++ b/vdsm/supervdsmServer.py +@@ -17,6 +17,7 @@ + # Refer to the README and COPYING files for full details of the license + # + ++import platform + import logging + import logging.config + import sys +@@ -94,6 +95,15 @@ class _SuperVdsm(object): + return True + + @logDecorator ++ def getHardwareInfo(self, *args, **kwargs): ++ if platform.machine() in ('x86_64', 'i686'): ++ from dmidecodeUtil import getHardwareInfoStructure ++ return getHardwareInfoStructure() ++ else: ++ # not implemented over other architecture ++ return {} ++ ++ @logDecorator + def getDevicePartedInfo(self, *args, **kwargs): + return _getDevicePartedInfo(*args, **kwargs) + +diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json +index 7c9ef22..b69d33e 100644 +--- a/vdsm_api/vdsmapi-schema.json ++++ b/vdsm_api/vdsmapi-schema.json +@@ -690,6 +690,31 @@ + 'data': {'release': 'str', 'version': 'str', 'name': 'OSName'}} + + ## ++# @HardwareInformation: ++# ++# Host hardware fields. ++# ++# @systemManufacturer:  Host manufacturer's name ++# ++# @systemProductName:   Host's hardware module ++# ++# @systemSerialNumber:  Hardware serial number ++# ++# @systemFamily:        Processor type ++# ++# @systemUUID:          Host's hardware UUID ++# ++# @systemVersion:       Host's hardware version ++# ++# Since: 4.10.3 ++## ++{'type': 'HardwareInformation', ++ 'data': {'systemManufacturer': 'str', ++ 'systemProductName': 'str', 'systemVersion': 'str', ++ 'systemSerialNumber': 'str', 'systemUUID': 'str', ++ 'systemFamily': 'str'}} ++ ++## + # @SoftwarePackage: + # + # An enumeration of aliases for important software components. +diff --git a/vdsm_cli/vdsClient.py b/vdsm_cli/vdsClient.py +index c67e3fe..884dc5d 100644 +--- a/vdsm_cli/vdsClient.py ++++ b/vdsm_cli/vdsClient.py +@@ -411,6 +411,9 @@ class service: + def do_getCap(self, args): + return self.ExecAndExit(self.s.getVdsCapabilities()) + ++ def do_getHardware(self, args): ++ return self.ExecAndExit(self.s.getVdsHardwareInfo()) ++ + def do_getVdsStats(self, args): + return self.ExecAndExit(self.s.getVdsStats()) + +@@ -1900,6 +1903,10 @@ if __name__ == '__main__': + ('', + 'Get Capabilities info of the VDS' + )), ++ 'getVdsHardwareInfo': (serv.do_getHardware, ++ ('', ++ 'Get hardware info of the VDS' ++ )), + 'getVdsStats': (serv.do_getVdsStats, + ('', + 'Get Statistics info on the VDS' +-- +1.8.1 + diff --git a/0012-Explicitly-shutdown-m2crypto-socket.patch b/0012-Explicitly-shutdown-m2crypto-socket.patch new file mode 100644 index 0000000..00ac452 --- /dev/null +++ b/0012-Explicitly-shutdown-m2crypto-socket.patch @@ -0,0 +1,55 @@ +From dcdc1ce83f0f4d426d31401ca14fb8c685150c45 Mon Sep 17 00:00:00 2001 +From: Andrey Gordeev +Date: Mon, 14 Jan 2013 10:30:52 +0100 +Subject: [PATCH 12/22] Explicitly shutdown m2crypto socket + +Aparently some versions of the m2crypto library don't shutdown correctly +underlying sockets when a SSL connection is closed. + +In Python 2.6.6 (the version in RHEL6 and in CentOS6) when the XML RPC +server closes a connection it calls the shutdown method on that +connection with sock.SHUT_WR as the parameter. This works fine for plain +sockets, and works well also for SSL sockets using the builtin ssl +module as it translates the call to shutdown to a complete shutdown of +the SSL connection. But m2crypto does an different translation and the +net result is that the underlying SSL connection is not completely +closed. + +In Python 2.7.3 (the version in Fedora 18) when the XML RPC server +closes a connection it calls the shutdown method on that connection with +sock.SHUT_RDWR, so no matter what SSL implementation is used the +underlying SSL connection is completely closed. + +This patch changes the SSLSocket class so that it explicitly shuts down +and closes the underlying socket when when the connection is closed. + +Change-Id: Ie1a471aaccb32554b94340ebfb92b9d7ba14407a +Signed-off-by: Juan Hernandez +Reviewed-on: http://gerrit.ovirt.org/10972 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11384 +Reviewed-by: Federico Simoncelli +--- + vdsm/SecureXMLRPCServer.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/vdsm/SecureXMLRPCServer.py b/vdsm/SecureXMLRPCServer.py +index 2de1cf7..bad2067 100644 +--- a/vdsm/SecureXMLRPCServer.py ++++ b/vdsm/SecureXMLRPCServer.py +@@ -57,6 +57,10 @@ class SSLSocket(object): + def gettimeout(self): + return self.connection.socket.gettimeout() + ++ def close(self): ++ self.connection.shutdown(socket.SHUT_RDWR) ++ self.connection.close() ++ + def __getattr__(self, name): + # This is how we delegate all the rest of the methods to the + # underlying SSL connection: +-- +1.8.1 + diff --git a/0013-spec-require-policycoreutils-and-skip-sebool-errors.patch b/0013-spec-require-policycoreutils-and-skip-sebool-errors.patch new file mode 100644 index 0000000..d8f3a98 --- /dev/null +++ b/0013-spec-require-policycoreutils-and-skip-sebool-errors.patch @@ -0,0 +1,59 @@ +From f28df85573914d1ccb57fdc7bae5121a9a24576c Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Tue, 11 Dec 2012 04:01:21 -0500 +Subject: [PATCH 13/22] spec: require policycoreutils and skip sebool errors + +In order to avoid a policycoreutils bug (rhbz 883355) when selinux is +disabled we now require the version 2.1.13-44 (or newer) of Fedora. +Additionally we now skip any error in the rpm scriptlets for the sebool +configuration (sebool-config) since they could interfere with the rpm +installation potentially leaving multiple packages installed. + +Change-Id: Iefd5f53c9118eeea6817ce9660ea18abcfd1955c +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/9840 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11363 +--- + vdsm.spec.in | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 5b13419..e153880 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -131,6 +131,12 @@ Requires: selinux-policy-targeted >= 3.10.0-149 + Requires: lvm2 >= 2.02.95 + %endif + ++# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is ++# disabled we now require the version 2.1.13-44 (or newer) of Fedora. ++%if 0%{?fedora} >= 18 ++Requires: policycoreutils >= 2.1.13-44 ++%endif ++ + Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client + Requires: psmisc >= 22.6-15 + Requires: fence-agents +@@ -479,7 +485,7 @@ export LC_ALL=C + /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} + + %post +-%{_bindir}/vdsm-tool sebool-config ++%{_bindir}/vdsm-tool sebool-config || : + # set the vdsm "secret" password for libvirt + %{_bindir}/vdsm-tool set-saslpasswd + +@@ -521,7 +527,7 @@ then + /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ + /etc/sysctl.conf + +- %{_bindir}/vdsm-tool sebool-unconfig ++ %{_bindir}/vdsm-tool sebool-unconfig || : + + /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt + +-- +1.8.1 + diff --git a/0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch b/0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch new file mode 100644 index 0000000..360ec83 --- /dev/null +++ b/0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch @@ -0,0 +1,42 @@ +From d28299352e54fe6615aba70280f76d25a088f851 Mon Sep 17 00:00:00 2001 +From: Mark Wu +Date: Wed, 23 Jan 2013 10:55:47 +0800 +Subject: [PATCH 14/22] spec: requires selinux-policy to avoid selinux failure + on access tls cert + +selinux-policy tightened up the security on svirt_t on fedora18. It causes +that svirt_t is disallowed to access cert_t file. And therefore it will block +qemu run spice server with tls. For more details, please see: +https://bugzilla.redhat.com/show_bug.cgi?id=890345 + +Change-Id: I9fe74c6187e7e9f2a8c0b2a824d2871fb5497d86 +Signed-off-by: Mark Wu +Reviewed-on: http://gerrit.ovirt.org/11290 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11364 +Tested-by: Federico Simoncelli +Reviewed-by: Federico Simoncelli +--- + vdsm.spec.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index e153880..dfc2459 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -131,9 +131,10 @@ Requires: selinux-policy-targeted >= 3.10.0-149 + Requires: lvm2 >= 2.02.95 + %endif + ++%if 0%{?fedora} >= 18 ++Requires: selinux-policy-targeted >= 3.11.1-71 + # In order to avoid a policycoreutils bug (rhbz 883355) when selinux is + # disabled we now require the version 2.1.13-44 (or newer) of Fedora. +-%if 0%{?fedora} >= 18 + Requires: policycoreutils >= 2.1.13-44 + %endif + +-- +1.8.1 + diff --git a/0015-vdsmd.service-require-either-ntpd-or-chronyd.patch b/0015-vdsmd.service-require-either-ntpd-or-chronyd.patch new file mode 100644 index 0000000..cceab27 --- /dev/null +++ b/0015-vdsmd.service-require-either-ntpd-or-chronyd.patch @@ -0,0 +1,36 @@ +From 8a0e831eafedb0aefc6aadab7ac1448cab6b7643 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Wed, 23 Jan 2013 10:27:01 +0200 +Subject: [PATCH 15/22] vdsmd.service: require either ntpd or chronyd + +Fedora 18 ships with chronyd by default, which conflicts with ntpd. We +do not really care which one of the two is running, as long as the host +clock is synchronized. That's what requiring time-sync.target means. + +Change-Id: Ie0605bea6d34c214aea8814a72a03e9ad2883fdb +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11291 +Reviewed-by: Zhou Zheng Sheng +Reviewed-by: Antoni Segura Puimedon +Reviewed-on: http://gerrit.ovirt.org/11366 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/vdsmd.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/vdsmd.service b/vdsm/vdsmd.service +index 6a650f4..9823b34 100644 +--- a/vdsm/vdsmd.service ++++ b/vdsm/vdsmd.service +@@ -1,6 +1,6 @@ + [Unit] + Description=Virtual Desktop Server Manager +-Requires=multipathd.service libvirtd.service ntpd.service ++Requires=multipathd.service libvirtd.service time-sync.target + Conflicts=libvirt-guests.service + + [Service] +-- +1.8.1 + diff --git a/0016-isRunning-didn-t-check-local-variable-before-reading.patch b/0016-isRunning-didn-t-check-local-variable-before-reading.patch new file mode 100644 index 0000000..c2b85cb --- /dev/null +++ b/0016-isRunning-didn-t-check-local-variable-before-reading.patch @@ -0,0 +1,44 @@ +From c95e492ccef335e82b2eb79495c35d08beab6629 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Thu, 17 Jan 2013 10:01:54 +0200 +Subject: [PATCH 16/22] isRunning didn't check local variable before reading + saved data + +All internal svdsm files contained last svdsm instance info, +after restart we didn't verify local manager instance before processing +the operation and got AttributeError exception when calling svdsm +manager. + +This returns false when _svdsm instance is None or in firstLaunch. + +Change-Id: I9dec0c6955dadcd959cc1c8df4e9745322fb0ce3 +Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=890365 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/10491 +Reviewed-by: Ayal Baron +Reviewed-on: http://gerrit.ovirt.org/11135 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/supervdsm.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py +index 740a93e..6a38076 100644 +--- a/vdsm/supervdsm.py ++++ b/vdsm/supervdsm.py +@@ -148,6 +148,9 @@ class SuperVdsmProxy(object): + self._firstLaunch = True + + def isRunning(self): ++ if self._firstLaunch or self._svdsm is None: ++ return False ++ + try: + with open(self.pidfile, "r") as f: + spid = f.read().strip() +-- +1.8.1 + diff --git a/0017-udev-Race-fix-load-and-trigger-dev-rule.patch b/0017-udev-Race-fix-load-and-trigger-dev-rule.patch new file mode 100644 index 0000000..7615ee8 --- /dev/null +++ b/0017-udev-Race-fix-load-and-trigger-dev-rule.patch @@ -0,0 +1,115 @@ +From 959a8703937f01161988221940d189acc4f7a796 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Sun, 13 Jan 2013 16:21:55 +0200 +Subject: [PATCH 17/22] udev: Race fix- load and trigger dev rule + +The rule file is generated, yet not synch-loaded in memory, so a VM with +a direct lun fails to start. +This patch reloads the rules before triggering using the new private +udev functions - udevReloadRules() in supervdsmServer.py . +Also added a check in appropriateDevice() (hsm.py) to make sure the +mapping is indeed there. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891300 +Change-Id: If3b2008a3d9df2dcaf54190721c2dd9764338627 +Signed-off-by: Lee Yarwood +Signed-off-by: Vered Volansky +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/11410 +Reviewed-by: Allon Mureinik +--- + vdsm/storage/hsm.py | 7 +++++++ + vdsm/supervdsmServer.py | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 38 insertions(+) + +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index efb2749..62e9f74 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -67,6 +67,7 @@ import mount + import dispatcher + import supervdsm + import storageServer ++from vdsm import utils + + GUID = "guid" + NAME = "name" +@@ -87,6 +88,8 @@ SECTOR_SIZE = 512 + + STORAGE_CONNECTION_DIR = os.path.join(constants.P_VDSM_RUN, "connections/") + ++QEMU_READABLE_TIMEOUT = 30 ++ + + def public(f=None, **kwargs): + if f is None: +@@ -2925,6 +2928,10 @@ class HSM: + """ + supervdsm.getProxy().appropriateDevice(guid, thiefId) + supervdsm.getProxy().udevTrigger(guid) ++ devPath = devicemapper.DMPATH_FORMAT % guid ++ utils.retry(partial(fileUtils.validateQemuReadable, devPath), ++ expectedException=OSError, ++ timeout=QEMU_READABLE_TIMEOUT) + + @public + def inappropriateDevices(self, thiefId): +diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py +index dc89218..833e91f 100755 +--- a/vdsm/supervdsmServer.py ++++ b/vdsm/supervdsmServer.py +@@ -89,6 +89,10 @@ LOG_CONF_PATH = "/etc/vdsm/logger.conf" + + class _SuperVdsm(object): + ++ UDEV_WITH_RELOAD_VERSION = 181 ++ ++ log = logging.getLogger("SuperVdsm.ServerCallback") ++ + @logDecorator + def ping(self, *args, **kwargs): + # This method exists for testing purposes +@@ -226,6 +230,7 @@ class _SuperVdsm(object): + + @logDecorator + def udevTrigger(self, guid): ++ self.__udevReloadRules(guid) + cmd = [EXT_UDEVADM, 'trigger', '--verbose', '--action', 'change', + '--property-match=DM_NAME=%s' % guid] + rc, out, err = misc.execCmd(cmd, sudo=False) +@@ -304,6 +309,32 @@ class _SuperVdsm(object): + def removeFs(self, path): + return mkimage.removeFs(path) + ++ def __udevReloadRules(self, guid): ++ if self.__udevOperationReload(): ++ reload = "--reload" ++ else: ++ reload = "--reload-rules" ++ cmd = [EXT_UDEVADM, 'control', reload] ++ rc, out, err = misc.execCmd(cmd, sudo=False) ++ if rc: ++ self.log.error("Udevadm reload-rules command failed rc=%s, " ++ "out=\"%s\", err=\"%s\"", rc, out, err) ++ raise OSError(errno.EINVAL, "Could not reload-rules for device " ++ "%s" % guid) ++ ++ @utils.memoized ++ def __udevVersion(self): ++ cmd = [EXT_UDEVADM, '--version'] ++ rc, out, err = misc.execCmd(cmd, sudo=False) ++ if rc: ++ self.log.error("Udevadm version command failed rc=%s, " ++ " out=\"%s\", err=\"%s\"", rc, out, err) ++ raise RuntimeError("Could not get udev version number") ++ return int(out[0]) ++ ++ def __udevOperationReload(self): ++ return self.__udevVersion() > self.UDEV_WITH_RELOAD_VERSION ++ + + def __pokeParent(parentPid, address, log): + try: +-- +1.8.1 + diff --git a/0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch b/0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch new file mode 100644 index 0000000..2412a47 --- /dev/null +++ b/0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch @@ -0,0 +1,171 @@ +From c7ee9217ec6edebec7b1d3a2536792114fd1a258 Mon Sep 17 00:00:00 2001 +From: Yeela Kaplan +Date: Fri, 25 Jan 2013 15:54:07 +0200 +Subject: [PATCH 18/22] Change scsi_id command path to be configured at runtime + +On fedora 18 scsi_id path is no longer under /sbin/scsi_id, +we configure vdsm to look for the path at runtime +and thus remove it from constants. + +Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886087 +Signed-off-by: Yeela Kaplan +Reviewed-on: http://gerrit.ovirt.org/10824 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11393 +Tested-by: Federico Simoncelli +--- + configure.ac | 2 -- + vdsm/constants.py.in | 24 ------------------------ + vdsm/storage/multipath.py | 45 ++++++++++++++++++++++++++++++++++++++++----- + vdsm/sudoers.vdsm.in | 1 - + 4 files changed, 40 insertions(+), 32 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3489e38..edc0b50 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -167,8 +167,6 @@ AC_PATH_PROG([QEMUIMG_PATH], [qemu-img], [/usr/bin/qemu-img]) + AC_PATH_PROG([REBOOT_PATH], [reboot], [/usr/bin/reboot]) + AC_PATH_PROG([RPM_PATH], [rpm], [/bin/rpm]) + AC_PATH_PROG([RSYNC_PATH], [rsync], [/usr/bin/rsync]) +-AC_PATH_PROG([SCSI_ID_PATH], [scsi_id], [/sbin/scsi_id], +- [$PATH$PATH_SEPARATOR/lib/udev]) + AC_PATH_PROG([SED_PATH], [sed], [/bin/sed]) + AC_PATH_PROG([SERVICE_PATH], [service], [/sbin/service]) + AC_PATH_PROG([SETSID_PATH], [setsid], [/usr/bin/setsid]) +diff --git a/vdsm/constants.py.in b/vdsm/constants.py.in +index 8034b8e..ec5fff9 100644 +--- a/vdsm/constants.py.in ++++ b/vdsm/constants.py.in +@@ -127,7 +127,6 @@ EXT_QEMUIMG = '@QEMUIMG_PATH@' + EXT_REBOOT = '@REBOOT_PATH@' + EXT_RSYNC = '@RSYNC_PATH@' + +-EXT_SCSI_ID = '@SCSI_ID_PATH@' # TBD ! + EXT_SERVICE = '@SERVICE_PATH@' + EXT_SETSID = '@SETSID_PATH@' + EXT_SH = '/bin/sh' # The shell path is invariable +@@ -157,26 +156,3 @@ CMD_LOWPRIO = [EXT_NICE, '-n', '19', EXT_IONICE, '-c', '3'] + STRG_ISCSI_HOST = "iscsi_host/" + STRG_SCSI_HOST = "scsi_host/" + STRG_ISCSI_SESSION = "iscsi_session/" +-STRG_MPATH_CONF = ( +- "\n\n" +- "defaults {\n" +- " polling_interval 5\n" +- " getuid_callout \"@SCSI_ID_PATH@ --whitelisted " +- "--replace-whitespace --device=/dev/%n\"\n" +- " no_path_retry fail\n" +- " user_friendly_names no\n" +- " flush_on_last_del yes\n" +- " fast_io_fail_tmo 5\n" +- " dev_loss_tmo 30\n" +- " max_fds 4096\n" +- "}\n" +- "\n" +- "devices {\n" +- "device {\n" +- " vendor \"HITACHI\"\n" +- " product \"DF.*\"\n" +- " getuid_callout \"@SCSI_ID_PATH@ --whitelisted " +- "--replace-whitespace --device=/dev/%n\"\n" +- "}\n" +- "}" +-) +diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py +index 741f1a1..05fd186 100644 +--- a/vdsm/storage/multipath.py ++++ b/vdsm/storage/multipath.py +@@ -30,6 +30,7 @@ import re + from collections import namedtuple + + from vdsm import constants ++from vdsm import utils + import misc + import iscsi + import supervdsm +@@ -49,13 +50,47 @@ MPATH_CONF = "/etc/multipath.conf" + + OLD_TAGS = ["# RHAT REVISION 0.2", "# RHEV REVISION 0.3", + "# RHEV REVISION 0.4", "# RHEV REVISION 0.5", +- "# RHEV REVISION 0.6", "# RHEV REVISION 0.7"] +-MPATH_CONF_TAG = "# RHEV REVISION 0.8" ++ "# RHEV REVISION 0.6", "# RHEV REVISION 0.7", ++ "# RHEV REVISION 0.8", "# RHEV REVISION 0.9"] ++MPATH_CONF_TAG = "# RHEV REVISION 1.0" + MPATH_CONF_PRIVATE_TAG = "# RHEV PRIVATE" +-MPATH_CONF_TEMPLATE = MPATH_CONF_TAG + constants.STRG_MPATH_CONF ++STRG_MPATH_CONF = ( ++ "\n\n" ++ "defaults {\n" ++ " polling_interval 5\n" ++ " getuid_callout \"%(scsi_id_path)s --whitelisted " ++ "--replace-whitespace --device=/dev/%%n\"\n" ++ " no_path_retry fail\n" ++ " user_friendly_names no\n" ++ " flush_on_last_del yes\n" ++ " fast_io_fail_tmo 5\n" ++ " dev_loss_tmo 30\n" ++ " max_fds 4096\n" ++ "}\n" ++ "\n" ++ "devices {\n" ++ "device {\n" ++ " vendor \"HITACHI\"\n" ++ " product \"DF.*\"\n" ++ " getuid_callout \"%(scsi_id_path)s --whitelisted " ++ "--replace-whitespace --device=/dev/%%n\"\n" ++ "}\n" ++ "device {\n" ++ " vendor \"COMPELNT\"\n" ++ " product \"Compellent Vol\"\n" ++ " no_path_retry fail\n" ++ "}\n" ++ "}" ++) ++MPATH_CONF_TEMPLATE = MPATH_CONF_TAG + STRG_MPATH_CONF + + log = logging.getLogger("Storage.Multipath") + ++_scsi_id = utils.CommandPath("scsi_id", ++ "/sbin/scsi_id", # EL6 ++ "/usr/lib/udev/scsi_id", # Fedora ++ ) ++ + + def rescan(): + """ +@@ -127,7 +162,7 @@ def setupMultipath(): + os.path.basename(MPATH_CONF), MAX_CONF_COPIES, + cp=True, persist=True) + with tempfile.NamedTemporaryFile() as f: +- f.write(MPATH_CONF_TEMPLATE) ++ f.write(MPATH_CONF_TEMPLATE % {'scsi_id_path': _scsi_id.cmd}) + f.flush() + cmd = [constants.EXT_CP, f.name, MPATH_CONF] + rc = misc.execCmd(cmd, sudo=True)[0] +@@ -173,7 +208,7 @@ def getDeviceSize(dev): + + def getScsiSerial(physdev): + blkdev = os.path.join("/dev", physdev) +- cmd = [constants.EXT_SCSI_ID, ++ cmd = [_scsi_id.cmd, + "--page=0x80", + "--whitelisted", + "--export", +diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in +index ab99e8e..4fc75f9 100644 +--- a/vdsm/sudoers.vdsm.in ++++ b/vdsm/sudoers.vdsm.in +@@ -23,7 +23,6 @@ Cmnd_Alias VDSM_STORAGE = @MOUNT_PATH@, @UMOUNT_PATH@, \ + @SERVICE_PATH@ iscsid *, \ + @SERVICE_PATH@ multipathd restart, \ + @SERVICE_PATH@ multipathd reload, \ +- @SCSI_ID_PATH@, \ + @ISCSIADM_PATH@ *, \ + @LVM_PATH@, \ + @CAT_PATH@ /sys/block/*/device/../../*, \ +-- +1.8.1 + diff --git a/0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch b/0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch new file mode 100644 index 0000000..5a1c4a9 --- /dev/null +++ b/0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch @@ -0,0 +1,91 @@ +From 33480cbc90a4810aa99e3fc7b36e879cdb0c19d4 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Wed, 9 Jan 2013 09:57:52 +0200 +Subject: [PATCH 19/22] upgrade: force upgrade to v2 before upgrading to v3 + +During the upgrade of a domain to version 3 vdsm reallocates the +metadata slots that are higher than 1947 (given a leases LV of 2Gb) +in order to use the same offsets for the volume leases (BZ#882276 +and git commit hash 2ba76e3). +This has no effect when the domain is version 0 since the metadata +slots offsets are fixed (the first physical extent of the LV) and +they can't be reallocated. In such case the domain must be upgraded +to version 2 first. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893184 +Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/10792 +Reviewed-by: Ayal Baron +Tested-by: Haim Ateya +Reviewed-on: http://gerrit.ovirt.org/11462 +--- + vdsm/storage/imageRepository/formatConverter.py | 26 +++++++++++++++++-------- + vdsm/storage/volume.py | 4 +++- + 2 files changed, 21 insertions(+), 9 deletions(-) + +diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py +index 0d7dd6d..88b053d 100644 +--- a/vdsm/storage/imageRepository/formatConverter.py ++++ b/vdsm/storage/imageRepository/formatConverter.py +@@ -93,6 +93,23 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): + log = logging.getLogger('Storage.v3DomainConverter') + log.debug("Starting conversion for domain %s", domain.sdUUID) + ++ targetVersion = 3 ++ currentVersion = domain.getVersion() ++ ++ # For block domains if we're upgrading from version 0 we need to first ++ # upgrade to version 2 and then proceed to upgrade to version 3. ++ if domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES: ++ if currentVersion == 0: ++ log.debug("Upgrading domain %s from version %s to version 2", ++ domain.sdUUID, currentVersion) ++ v2DomainConverter(repoPath, hostId, domain, isMsd) ++ currentVersion = domain.getVersion() ++ ++ if currentVersion != 2: ++ log.debug("Unsupported conversion from version %s to version %s", ++ currentVersion, targetVersion) ++ raise se.UnsupportedDomainVersion(currentVersion) ++ + if domain.getStorageType() in sd.FILE_DOMAIN_TYPES: + log.debug("Setting permissions for domain %s", domain.sdUUID) + domain.setMetadataPermissions() +@@ -268,17 +285,10 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): + "not critical since the volume might be in use", + imgUUID, exc_info=True) + +- targetVersion = 3 +- currentVersion = domain.getVersion() + log.debug("Finalizing the storage domain upgrade from version %s to " + "version %s for domain %s", currentVersion, targetVersion, + domain.sdUUID) +- +- if (currentVersion not in blockSD.VERS_METADATA_TAG +- and domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES): +- __convertDomainMetadataToTags(domain, targetVersion) +- else: +- domain.setMetaParam(sd.DMDK_VERSION, targetVersion) ++ domain.setMetaParam(sd.DMDK_VERSION, targetVersion) + + except: + if isMsd: +diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py +index cde612a..12dd188 100644 +--- a/vdsm/storage/volume.py ++++ b/vdsm/storage/volume.py +@@ -503,7 +503,9 @@ class Volume(object): + cls.newMetadata(metaId, sdUUID, imgUUID, srcVolUUID, size, + type2name(volFormat), type2name(preallocate), + volType, diskType, desc, LEGAL_VOL) +- cls.newVolumeLease(metaId, sdUUID, volUUID) ++ ++ if dom.hasVolumeLeases(): ++ cls.newVolumeLease(metaId, sdUUID, volUUID) + + except se.StorageException: + cls.log.error("Unexpected error", exc_info=True) +-- +1.8.1 + diff --git a/0020-misc-rename-safelease-to-clusterlock.patch b/0020-misc-rename-safelease-to-clusterlock.patch new file mode 100644 index 0000000..3e1684c --- /dev/null +++ b/0020-misc-rename-safelease-to-clusterlock.patch @@ -0,0 +1,866 @@ +From e60206af7781c86ddb5d2ef1fcac3f8f8b086ee4 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Fri, 14 Dec 2012 06:42:09 -0500 +Subject: [PATCH 20/22] misc: rename safelease to clusterlock + +The safelease module is now contaning also the sanlock implementation +and soon it might contain other (e.g.: a special lock for local storage +domains), for this reason it has been renamed with a more general name +clusterlock. The safelease implementation also required some cleanup in +order to achieve more uniformity between the locking mechanisms. + +Change-Id: I74070ebb43dd726362900a0746c08b2ee3d6eac7 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/10067 +Reviewed-by: Allon Mureinik +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11463 +--- + vdsm.spec.in | 2 +- + vdsm/API.py | 4 +- + vdsm/storage/Makefile.am | 4 +- + vdsm/storage/blockSD.py | 4 +- + vdsm/storage/clusterlock.py | 251 ++++++++++++++++++++++++ + vdsm/storage/hsm.py | 20 +- + vdsm/storage/imageRepository/formatConverter.py | 6 +- + vdsm/storage/safelease.py | 250 ----------------------- + vdsm/storage/sd.py | 12 +- + vdsm/storage/sp.py | 25 ++- + 10 files changed, 289 insertions(+), 289 deletions(-) + create mode 100644 vdsm/storage/clusterlock.py + delete mode 100644 vdsm/storage/safelease.py + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index dfc2459..8ad4dce 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -685,7 +685,7 @@ exit 0 + %{_datadir}/%{vdsm_name}/storage/resourceFactories.py* + %{_datadir}/%{vdsm_name}/storage/remoteFileHandler.py* + %{_datadir}/%{vdsm_name}/storage/resourceManager.py* +-%{_datadir}/%{vdsm_name}/storage/safelease.py* ++%{_datadir}/%{vdsm_name}/storage/clusterlock.py* + %{_datadir}/%{vdsm_name}/storage/sdc.py* + %{_datadir}/%{vdsm_name}/storage/sd.py* + %{_datadir}/%{vdsm_name}/storage/securable.py* +diff --git a/vdsm/API.py b/vdsm/API.py +index 732f8a3..a050a51 100644 +--- a/vdsm/API.py ++++ b/vdsm/API.py +@@ -33,7 +33,7 @@ import configNetwork + from vdsm import netinfo + from vdsm import constants + import storage.misc +-import storage.safelease ++import storage.clusterlock + import storage.volume + import storage.sd + import storage.image +@@ -992,7 +992,7 @@ class StoragePool(APIBase): + def spmStart(self, prevID, prevLver, enableScsiFencing, + maxHostID=None, domVersion=None): + if maxHostID is None: +- maxHostID = storage.safelease.MAX_HOST_ID ++ maxHostID = storage.clusterlock.MAX_HOST_ID + recoveryMode = None # unused + return self._irs.spmStart(self._UUID, prevID, prevLver, + recoveryMode, enableScsiFencing, maxHostID, domVersion) +diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am +index cff09be..abc1545 100644 +--- a/vdsm/storage/Makefile.am ++++ b/vdsm/storage/Makefile.am +@@ -25,6 +25,7 @@ dist_vdsmstorage_PYTHON = \ + __init__.py \ + blockSD.py \ + blockVolume.py \ ++ clusterlock.py \ + devicemapper.py \ + dispatcher.py \ + domainMonitor.py \ +@@ -35,8 +36,8 @@ dist_vdsmstorage_PYTHON = \ + hba.py \ + hsm.py \ + image.py \ ++ iscsiadm.py \ + iscsi.py \ +- iscsiadm.py \ + localFsSD.py \ + lvm.py \ + misc.py \ +@@ -48,7 +49,6 @@ dist_vdsmstorage_PYTHON = \ + remoteFileHandler.py \ + resourceFactories.py \ + resourceManager.py \ +- safelease.py \ + sdc.py \ + sd.py \ + securable.py \ +diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py +index 61ec996..862e413 100644 +--- a/vdsm/storage/blockSD.py ++++ b/vdsm/storage/blockSD.py +@@ -37,7 +37,7 @@ import misc + import fileUtils + import sd + import lvm +-import safelease ++import clusterlock + import blockVolume + import multipath + import resourceFactories +@@ -63,7 +63,7 @@ log = logging.getLogger("Storage.BlockSD") + + # FIXME: Make this calculated from something logical + RESERVED_METADATA_SIZE = 40 * (2 ** 20) +-RESERVED_MAILBOX_SIZE = MAILBOX_SIZE * safelease.MAX_HOST_ID ++RESERVED_MAILBOX_SIZE = MAILBOX_SIZE * clusterlock.MAX_HOST_ID + METADATA_BASE_SIZE = 378 + # VG's min metadata threshold is 20% + VG_MDA_MIN_THRESHOLD = 0.2 +diff --git a/vdsm/storage/clusterlock.py b/vdsm/storage/clusterlock.py +new file mode 100644 +index 0000000..4525b2f +--- /dev/null ++++ b/vdsm/storage/clusterlock.py +@@ -0,0 +1,251 @@ ++# ++# Copyright 2011 Red Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Refer to the README and COPYING files for full details of the license ++# ++ ++import os ++import threading ++import logging ++import subprocess ++from contextlib import nested ++import sanlock ++ ++import misc ++import storage_exception as se ++from vdsm import constants ++from vdsm.config import config ++ ++ ++MAX_HOST_ID = 250 ++ ++# The LEASE_OFFSET is used by SANLock to not overlap with safelease in ++# orfer to preserve the ability to acquire both locks (e.g.: during the ++# domain upgrade) ++SDM_LEASE_NAME = 'SDM' ++SDM_LEASE_OFFSET = 512 * 2048 ++ ++ ++class SafeLease(object): ++ log = logging.getLogger("SafeLease") ++ ++ lockUtilPath = config.get('irs', 'lock_util_path') ++ lockCmd = config.get('irs', 'lock_cmd') ++ freeLockCmd = config.get('irs', 'free_lock_cmd') ++ ++ def __init__(self, sdUUID, idsPath, leasesPath, lockRenewalIntervalSec, ++ leaseTimeSec, leaseFailRetry, ioOpTimeoutSec): ++ self._lock = threading.Lock() ++ self._sdUUID = sdUUID ++ self._idsPath = idsPath ++ self._leasesPath = leasesPath ++ self.setParams(lockRenewalIntervalSec, leaseTimeSec, leaseFailRetry, ++ ioOpTimeoutSec) ++ ++ def initLock(self): ++ lockUtil = os.path.join(self.lockUtilPath, "safelease") ++ initCommand = [lockUtil, "release", "-f", self._leasesPath, "0"] ++ rc, out, err = misc.execCmd(initCommand, sudo=False, ++ cwd=self.lockUtilPath) ++ if rc != 0: ++ self.log.warn("could not initialise spm lease (%s): %s", rc, out) ++ raise se.ClusterLockInitError() ++ ++ def setParams(self, lockRenewalIntervalSec, leaseTimeSec, leaseFailRetry, ++ ioOpTimeoutSec): ++ self._lockRenewalIntervalSec = lockRenewalIntervalSec ++ self._leaseTimeSec = leaseTimeSec ++ self._leaseFailRetry = leaseFailRetry ++ self._ioOpTimeoutSec = ioOpTimeoutSec ++ ++ def getReservedId(self): ++ return 1000 ++ ++ def acquireHostId(self, hostId, async): ++ self.log.debug("Host id for domain %s successfully acquired (id: %s)", ++ self._sdUUID, hostId) ++ ++ def releaseHostId(self, hostId, async, unused): ++ self.log.debug("Host id for domain %s released successfully (id: %s)", ++ self._sdUUID, hostId) ++ ++ def hasHostId(self, hostId): ++ return True ++ ++ def acquire(self, hostID): ++ leaseTimeMs = self._leaseTimeSec * 1000 ++ ioOpTimeoutMs = self._ioOpTimeoutSec * 1000 ++ with self._lock: ++ self.log.debug("Acquiring cluster lock for domain %s" % ++ self._sdUUID) ++ ++ lockUtil = self.getLockUtilFullPath() ++ acquireLockCommand = subprocess.list2cmdline([ ++ lockUtil, "start", self._sdUUID, str(hostID), ++ str(self._lockRenewalIntervalSec), str(self._leasesPath), ++ str(leaseTimeMs), str(ioOpTimeoutMs), str(self._leaseFailRetry) ++ ]) ++ ++ cmd = [constants.EXT_SETSID, constants.EXT_IONICE, '-c1', '-n0', ++ constants.EXT_SU, misc.IOUSER, '-s', constants.EXT_SH, '-c', ++ acquireLockCommand] ++ (rc, out, err) = misc.execCmd(cmd, cwd=self.lockUtilPath, ++ sudo=True) ++ if rc != 0: ++ raise se.AcquireLockFailure(self._sdUUID, rc, out, err) ++ self.log.debug("Clustered lock acquired successfully") ++ ++ def getLockUtilFullPath(self): ++ return os.path.join(self.lockUtilPath, self.lockCmd) ++ ++ def release(self): ++ with self._lock: ++ freeLockUtil = os.path.join(self.lockUtilPath, self.freeLockCmd) ++ releaseLockCommand = [freeLockUtil, self._sdUUID] ++ self.log.info("Releasing cluster lock for domain %s" % ++ self._sdUUID) ++ (rc, out, err) = misc.execCmd(releaseLockCommand, sudo=False, ++ cwd=self.lockUtilPath) ++ if rc != 0: ++ self.log.error("Could not release cluster lock " ++ "rc=%s out=%s, err=%s" % (str(rc), out, err)) ++ ++ self.log.debug("Cluster lock released successfully") ++ ++ ++class SANLock(object): ++ log = logging.getLogger("SANLock") ++ ++ _sanlock_fd = None ++ _sanlock_lock = threading.Lock() ++ ++ def __init__(self, sdUUID, idsPath, leasesPath, *args): ++ self._lock = threading.Lock() ++ self._sdUUID = sdUUID ++ self._idsPath = idsPath ++ self._leasesPath = leasesPath ++ self._sanlockfd = None ++ ++ def initLock(self): ++ try: ++ sanlock.init_lockspace(self._sdUUID, self._idsPath) ++ sanlock.init_resource(self._sdUUID, SDM_LEASE_NAME, ++ [(self._leasesPath, SDM_LEASE_OFFSET)]) ++ except sanlock.SanlockException: ++ self.log.warn("Cannot initialize clusterlock", exc_info=True) ++ raise se.ClusterLockInitError() ++ ++ def setParams(self, *args): ++ pass ++ ++ def getReservedId(self): ++ return MAX_HOST_ID ++ ++ def acquireHostId(self, hostId, async): ++ with self._lock: ++ self.log.info("Acquiring host id for domain %s (id: %s)", ++ self._sdUUID, hostId) ++ ++ try: ++ sanlock.add_lockspace(self._sdUUID, hostId, self._idsPath, ++ async=async) ++ except sanlock.SanlockException, e: ++ if e.errno == os.errno.EINPROGRESS: ++ # if the request is not asynchronous wait for the ongoing ++ # lockspace operation to complete ++ if not async and not sanlock.inq_lockspace( ++ self._sdUUID, hostId, self._idsPath, wait=True): ++ raise se.AcquireHostIdFailure(self._sdUUID, e) ++ # else silently continue, the host id has been acquired ++ # or it's in the process of being acquired (async) ++ elif e.errno != os.errno.EEXIST: ++ raise se.AcquireHostIdFailure(self._sdUUID, e) ++ ++ self.log.debug("Host id for domain %s successfully acquired " ++ "(id: %s)", self._sdUUID, hostId) ++ ++ def releaseHostId(self, hostId, async, unused): ++ with self._lock: ++ self.log.info("Releasing host id for domain %s (id: %s)", ++ self._sdUUID, hostId) ++ ++ try: ++ sanlock.rem_lockspace(self._sdUUID, hostId, self._idsPath, ++ async=async, unused=unused) ++ except sanlock.SanlockException, e: ++ if e.errno != os.errno.ENOENT: ++ raise se.ReleaseHostIdFailure(self._sdUUID, e) ++ ++ self.log.debug("Host id for domain %s released successfully " ++ "(id: %s)", self._sdUUID, hostId) ++ ++ def hasHostId(self, hostId): ++ with self._lock: ++ try: ++ return sanlock.inq_lockspace(self._sdUUID, ++ hostId, self._idsPath) ++ except sanlock.SanlockException: ++ self.log.debug("Unable to inquire sanlock lockspace " ++ "status, returning False", exc_info=True) ++ return False ++ ++ # The hostId parameter is maintained here only for compatibility with ++ # ClusterLock. We could consider to remove it in the future but keeping it ++ # for logging purpose is desirable. ++ def acquire(self, hostId): ++ with nested(self._lock, SANLock._sanlock_lock): ++ self.log.info("Acquiring cluster lock for domain %s (id: %s)", ++ self._sdUUID, hostId) ++ ++ while True: ++ if SANLock._sanlock_fd is None: ++ try: ++ SANLock._sanlock_fd = sanlock.register() ++ except sanlock.SanlockException, e: ++ raise se.AcquireLockFailure(self._sdUUID, e.errno, ++ "Cannot register to sanlock", str(e)) ++ ++ try: ++ sanlock.acquire(self._sdUUID, SDM_LEASE_NAME, ++ [(self._leasesPath, SDM_LEASE_OFFSET)], ++ slkfd=SANLock._sanlock_fd) ++ except sanlock.SanlockException, e: ++ if e.errno != os.errno.EPIPE: ++ raise se.AcquireLockFailure(self._sdUUID, e.errno, ++ "Cannot acquire cluster lock", str(e)) ++ SANLock._sanlock_fd = None ++ continue ++ ++ break ++ ++ self.log.debug("Cluster lock for domain %s successfully acquired " ++ "(id: %s)", self._sdUUID, hostId) ++ ++ def release(self): ++ with self._lock: ++ self.log.info("Releasing cluster lock for domain %s", self._sdUUID) ++ ++ try: ++ sanlock.release(self._sdUUID, SDM_LEASE_NAME, ++ [(self._leasesPath, SDM_LEASE_OFFSET)], ++ slkfd=SANLock._sanlock_fd) ++ except sanlock.SanlockException, e: ++ raise se.ReleaseLockFailure(self._sdUUID, e) ++ ++ self._sanlockfd = None ++ self.log.debug("Cluster lock for domain %s successfully released", ++ self._sdUUID) +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index 62e9f74..8bbe3b8 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -53,7 +53,7 @@ import iscsi + import misc + from misc import deprecated + import taskManager +-import safelease ++import clusterlock + import storage_exception as se + from threadLocal import vars + from vdsm import constants +@@ -528,7 +528,7 @@ class HSM: + + @public + def spmStart(self, spUUID, prevID, prevLVER, recoveryMode, scsiFencing, +- maxHostID=safelease.MAX_HOST_ID, domVersion=None, ++ maxHostID=clusterlock.MAX_HOST_ID, domVersion=None, + options=None): + """ + Starts an SPM. +@@ -845,7 +845,7 @@ class HSM: + :raises: an :exc:`Storage_Exception.InvalidParameterException` if the + master domain is not supplied in the domain list. + """ +- safeLease = sd.packLeaseParams( ++ leaseParams = sd.packLeaseParams( + lockRenewalIntervalSec=lockRenewalIntervalSec, + leaseTimeSec=leaseTimeSec, + ioOpTimeoutSec=ioOpTimeoutSec, +@@ -853,9 +853,9 @@ class HSM: + vars.task.setDefaultException( + se.StoragePoolCreationError( + "spUUID=%s, poolName=%s, masterDom=%s, domList=%s, " +- "masterVersion=%s, safelease params: (%s)" % ++ "masterVersion=%s, clusterlock params: (%s)" % + (spUUID, poolName, masterDom, domList, masterVersion, +- safeLease))) ++ leaseParams))) + misc.validateUUID(spUUID, 'spUUID') + if masterDom not in domList: + raise se.InvalidParameterException("masterDom", str(masterDom)) +@@ -892,7 +892,7 @@ class HSM: + + return sp.StoragePool( + spUUID, self.taskMng).create(poolName, masterDom, domList, +- masterVersion, safeLease) ++ masterVersion, leaseParams) + + @public + def connectStoragePool(self, spUUID, hostID, scsiKey, +@@ -1701,7 +1701,7 @@ class HSM: + :returns: Nothing ? pool.reconstructMaster return nothing + :rtype: ? + """ +- safeLease = sd.packLeaseParams( ++ leaseParams = sd.packLeaseParams( + lockRenewalIntervalSec=lockRenewalIntervalSec, + leaseTimeSec=leaseTimeSec, + ioOpTimeoutSec=ioOpTimeoutSec, +@@ -1710,9 +1710,9 @@ class HSM: + + vars.task.setDefaultException( + se.ReconstructMasterError( +- "spUUID=%s, masterDom=%s, masterVersion=%s, safelease " ++ "spUUID=%s, masterDom=%s, masterVersion=%s, clusterlock " + "params: (%s)" % (spUUID, masterDom, masterVersion, +- safeLease))) ++ leaseParams))) + + self.log.info("spUUID=%s master=%s", spUUID, masterDom) + +@@ -1738,7 +1738,7 @@ class HSM: + domDict[d] = sd.validateSDDeprecatedStatus(status) + + return pool.reconstructMaster(hostId, poolName, masterDom, domDict, +- masterVersion, safeLease) ++ masterVersion, leaseParams) + + def _logResp_getDeviceList(self, response): + logableDevs = deepcopy(response) +diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py +index 88b053d..0742560 100644 +--- a/vdsm/storage/imageRepository/formatConverter.py ++++ b/vdsm/storage/imageRepository/formatConverter.py +@@ -26,7 +26,7 @@ from vdsm import qemuImg + from storage import sd + from storage import blockSD + from storage import image +-from storage import safelease ++from storage import clusterlock + from storage import volume + from storage import blockVolume + from storage import storage_exception as se +@@ -115,8 +115,8 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): + domain.setMetadataPermissions() + + log.debug("Initializing the new cluster lock for domain %s", domain.sdUUID) +- newClusterLock = safelease.SANLock(domain.sdUUID, domain.getIdsFilePath(), +- domain.getLeasesFilePath()) ++ newClusterLock = clusterlock.SANLock( ++ domain.sdUUID, domain.getIdsFilePath(), domain.getLeasesFilePath()) + newClusterLock.initLock() + + log.debug("Acquiring the host id %s for domain %s", hostId, domain.sdUUID) +diff --git a/vdsm/storage/safelease.py b/vdsm/storage/safelease.py +deleted file mode 100644 +index 88a4eae..0000000 +--- a/vdsm/storage/safelease.py ++++ /dev/null +@@ -1,250 +0,0 @@ +-# +-# Copyright 2011 Red Hat, Inc. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +-# +-# Refer to the README and COPYING files for full details of the license +-# +- +-import os +-from vdsm.config import config +-import misc +-import subprocess +-import sanlock +-from contextlib import nested +-from vdsm import constants +-import storage_exception as se +-import threading +-import logging +- +- +-MAX_HOST_ID = 250 +- +-# The LEASE_OFFSET is used by SANLock to not overlap with safelease in +-# orfer to preserve the ability to acquire both locks (e.g.: during the +-# domain upgrade) +-SDM_LEASE_NAME = 'SDM' +-SDM_LEASE_OFFSET = 512 * 2048 +- +- +-class ClusterLock(object): +- log = logging.getLogger("ClusterLock") +- lockUtilPath = config.get('irs', 'lock_util_path') +- lockCmd = config.get('irs', 'lock_cmd') +- freeLockCmd = config.get('irs', 'free_lock_cmd') +- +- def __init__(self, sdUUID, idFile, leaseFile, +- lockRenewalIntervalSec, +- leaseTimeSec, +- leaseFailRetry, +- ioOpTimeoutSec): +- self._lock = threading.RLock() +- self._sdUUID = sdUUID +- self._leaseFile = leaseFile +- self.setParams(lockRenewalIntervalSec, leaseTimeSec, +- leaseFailRetry, ioOpTimeoutSec) +- +- def initLock(self): +- lockUtil = os.path.join(self.lockUtilPath, "safelease") +- initCommand = [lockUtil, "release", "-f", self._leaseFile, "0"] +- rc, out, err = misc.execCmd(initCommand, sudo=False, +- cwd=self.lockUtilPath) +- if rc != 0: +- self.log.warn("could not initialise spm lease (%s): %s", rc, out) +- raise se.ClusterLockInitError() +- +- def setParams(self, lockRenewalIntervalSec, +- leaseTimeSec, +- leaseFailRetry, +- ioOpTimeoutSec): +- self._lockRenewalIntervalSec = lockRenewalIntervalSec +- self._leaseTimeSec = leaseTimeSec +- self._leaseFailRetry = leaseFailRetry +- self._ioOpTimeoutSec = ioOpTimeoutSec +- +- def getReservedId(self): +- return 1000 +- +- def acquireHostId(self, hostId, async): +- pass +- +- def releaseHostId(self, hostId, async, unused): +- pass +- +- def hasHostId(self, hostId): +- return True +- +- def acquire(self, hostID): +- leaseTimeMs = self._leaseTimeSec * 1000 +- ioOpTimeoutMs = self._ioOpTimeoutSec * 1000 +- with self._lock: +- self.log.debug("Acquiring cluster lock for domain %s" % +- self._sdUUID) +- +- lockUtil = self.getLockUtilFullPath() +- acquireLockCommand = subprocess.list2cmdline([lockUtil, "start", +- self._sdUUID, str(hostID), str(self._lockRenewalIntervalSec), +- str(self._leaseFile), str(leaseTimeMs), str(ioOpTimeoutMs), +- str(self._leaseFailRetry)]) +- +- cmd = [constants.EXT_SETSID, constants.EXT_IONICE, '-c1', '-n0', +- constants.EXT_SU, misc.IOUSER, '-s', constants.EXT_SH, '-c', +- acquireLockCommand] +- (rc, out, err) = misc.execCmd(cmd, cwd=self.lockUtilPath, +- sudo=True) +- if rc != 0: +- raise se.AcquireLockFailure(self._sdUUID, rc, out, err) +- self.log.debug("Clustered lock acquired successfully") +- +- def getLockUtilFullPath(self): +- return os.path.join(self.lockUtilPath, self.lockCmd) +- +- def release(self): +- with self._lock: +- freeLockUtil = os.path.join(self.lockUtilPath, self.freeLockCmd) +- releaseLockCommand = [freeLockUtil, self._sdUUID] +- self.log.info("Releasing cluster lock for domain %s" % +- self._sdUUID) +- (rc, out, err) = misc.execCmd(releaseLockCommand, sudo=False, +- cwd=self.lockUtilPath) +- if rc != 0: +- self.log.error("Could not release cluster lock " +- "rc=%s out=%s, err=%s" % (str(rc), out, err)) +- +- self.log.debug("Cluster lock released successfully") +- +- +-class SANLock(object): +- log = logging.getLogger("SANLock") +- +- _sanlock_fd = None +- _sanlock_lock = threading.Lock() +- +- def __init__(self, sdUUID, idsPath, leasesPath, *args): +- self._lock = threading.Lock() +- self._sdUUID = sdUUID +- self._idsPath = idsPath +- self._leasesPath = leasesPath +- self._sanlockfd = None +- +- def initLock(self): +- try: +- sanlock.init_lockspace(self._sdUUID, self._idsPath) +- sanlock.init_resource(self._sdUUID, SDM_LEASE_NAME, +- [(self._leasesPath, SDM_LEASE_OFFSET)]) +- except sanlock.SanlockException: +- self.log.warn("Cannot initialize clusterlock", exc_info=True) +- raise se.ClusterLockInitError() +- +- def setParams(self, *args): +- pass +- +- def getReservedId(self): +- return MAX_HOST_ID +- +- def acquireHostId(self, hostId, async): +- with self._lock: +- self.log.info("Acquiring host id for domain %s (id: %s)", +- self._sdUUID, hostId) +- +- try: +- sanlock.add_lockspace(self._sdUUID, hostId, self._idsPath, +- async=async) +- except sanlock.SanlockException, e: +- if e.errno == os.errno.EINPROGRESS: +- # if the request is not asynchronous wait for the ongoing +- # lockspace operation to complete +- if not async and not sanlock.inq_lockspace( +- self._sdUUID, hostId, self._idsPath, wait=True): +- raise se.AcquireHostIdFailure(self._sdUUID, e) +- # else silently continue, the host id has been acquired +- # or it's in the process of being acquired (async) +- elif e.errno != os.errno.EEXIST: +- raise se.AcquireHostIdFailure(self._sdUUID, e) +- +- self.log.debug("Host id for domain %s successfully acquired " +- "(id: %s)", self._sdUUID, hostId) +- +- def releaseHostId(self, hostId, async, unused): +- with self._lock: +- self.log.info("Releasing host id for domain %s (id: %s)", +- self._sdUUID, hostId) +- +- try: +- sanlock.rem_lockspace(self._sdUUID, hostId, self._idsPath, +- async=async, unused=unused) +- except sanlock.SanlockException, e: +- if e.errno != os.errno.ENOENT: +- raise se.ReleaseHostIdFailure(self._sdUUID, e) +- +- self.log.debug("Host id for domain %s released successfully " +- "(id: %s)", self._sdUUID, hostId) +- +- def hasHostId(self, hostId): +- with self._lock: +- try: +- return sanlock.inq_lockspace(self._sdUUID, +- hostId, self._idsPath) +- except sanlock.SanlockException: +- self.log.debug("Unable to inquire sanlock lockspace " +- "status, returning False", exc_info=True) +- return False +- +- # The hostId parameter is maintained here only for compatibility with +- # ClusterLock. We could consider to remove it in the future but keeping it +- # for logging purpose is desirable. +- def acquire(self, hostId): +- with nested(self._lock, SANLock._sanlock_lock): +- self.log.info("Acquiring cluster lock for domain %s (id: %s)", +- self._sdUUID, hostId) +- +- while True: +- if SANLock._sanlock_fd is None: +- try: +- SANLock._sanlock_fd = sanlock.register() +- except sanlock.SanlockException, e: +- raise se.AcquireLockFailure(self._sdUUID, e.errno, +- "Cannot register to sanlock", str(e)) +- +- try: +- sanlock.acquire(self._sdUUID, SDM_LEASE_NAME, +- [(self._leasesPath, SDM_LEASE_OFFSET)], +- slkfd=SANLock._sanlock_fd) +- except sanlock.SanlockException, e: +- if e.errno != os.errno.EPIPE: +- raise se.AcquireLockFailure(self._sdUUID, e.errno, +- "Cannot acquire cluster lock", str(e)) +- SANLock._sanlock_fd = None +- continue +- +- break +- +- self.log.debug("Cluster lock for domain %s successfully acquired " +- "(id: %s)", self._sdUUID, hostId) +- +- def release(self): +- with self._lock: +- self.log.info("Releasing cluster lock for domain %s", self._sdUUID) +- +- try: +- sanlock.release(self._sdUUID, SDM_LEASE_NAME, +- [(self._leasesPath, SDM_LEASE_OFFSET)], +- slkfd=SANLock._sanlock_fd) +- except sanlock.SanlockException, e: +- raise se.ReleaseLockFailure(self._sdUUID, e) +- +- self._sanlockfd = None +- self.log.debug("Cluster lock for domain %s successfully released", +- self._sdUUID) +diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py +index 1b11017..dbc1beb 100644 +--- a/vdsm/storage/sd.py ++++ b/vdsm/storage/sd.py +@@ -31,7 +31,7 @@ import resourceFactories + from resourceFactories import IMAGE_NAMESPACE, VOLUME_NAMESPACE + import resourceManager as rm + from vdsm import constants +-import safelease ++import clusterlock + import outOfProcess as oop + from persistentDict import unicodeEncoder, unicodeDecoder + +@@ -307,12 +307,12 @@ class StorageDomain: + DEFAULT_LEASE_PARAMS[DMDK_LEASE_TIME_SEC], + DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], + DEFAULT_LEASE_PARAMS[DMDK_IO_OP_TIMEOUT_SEC]) +- self._clusterLock = safelease.ClusterLock(self.sdUUID, +- self.getIdsFilePath(), self.getLeasesFilePath(), +- *leaseParams) ++ self._clusterLock = clusterlock.SafeLease( ++ self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath(), ++ *leaseParams) + elif domversion in DOM_SANLOCK_VERS: +- self._clusterLock = safelease.SANLock(self.sdUUID, +- self.getIdsFilePath(), self.getLeasesFilePath()) ++ self._clusterLock = clusterlock.SANLock( ++ self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath()) + else: + raise se.UnsupportedDomainVersion(domversion) + +diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py +index 40d15b3..e13d088 100644 +--- a/vdsm/storage/sp.py ++++ b/vdsm/storage/sp.py +@@ -494,7 +494,7 @@ class StoragePool(Securable): + return config.getint("irs", "maximum_domains_in_pool") + + @unsecured +- def _acquireTemporaryClusterLock(self, msdUUID, safeLease): ++ def _acquireTemporaryClusterLock(self, msdUUID, leaseParams): + try: + # Master domain is unattached and all changes to unattached domains + # must be performed under storage lock +@@ -504,7 +504,7 @@ class StoragePool(Securable): + # assigned id for this pool + self.id = msd.getReservedId() + +- msd.changeLeaseParams(safeLease) ++ msd.changeLeaseParams(leaseParams) + + msd.acquireHostId(self.id) + +@@ -527,7 +527,7 @@ class StoragePool(Securable): + self.id = SPM_ID_FREE + + @unsecured +- def create(self, poolName, msdUUID, domList, masterVersion, safeLease): ++ def create(self, poolName, msdUUID, domList, masterVersion, leaseParams): + """ + Create new storage pool with single/multiple image data domain. + The command will create new storage pool meta-data attach each +@@ -537,10 +537,9 @@ class StoragePool(Securable): + 'msdUUID' - master domain of this pool (one of domList) + 'domList' - list of domains (i.e sdUUID,sdUUID,...,sdUUID) + """ +- self.log.info("spUUID=%s poolName=%s master_sd=%s " +- "domList=%s masterVersion=%s %s", +- self.spUUID, poolName, msdUUID, +- domList, masterVersion, str(safeLease)) ++ self.log.info("spUUID=%s poolName=%s master_sd=%s domList=%s " ++ "masterVersion=%s %s", self.spUUID, poolName, msdUUID, ++ domList, masterVersion, leaseParams) + + if msdUUID not in domList: + raise se.InvalidParameterException("masterDomain", msdUUID) +@@ -565,7 +564,7 @@ class StoragePool(Securable): + raise se.StorageDomainAlreadyAttached(spUUIDs[0], sdUUID) + + fileUtils.createdir(self.poolPath) +- self._acquireTemporaryClusterLock(msdUUID, safeLease) ++ self._acquireTemporaryClusterLock(msdUUID, leaseParams) + + try: + self._setSafe() +@@ -573,7 +572,7 @@ class StoragePool(Securable): + # We should do it before actually attaching this domain to the pool. + # During 'master' marking we create pool metadata and each attached + # domain should register there +- self.createMaster(poolName, msd, masterVersion, safeLease) ++ self.createMaster(poolName, msd, masterVersion, leaseParams) + self.__rebuild(msdUUID=msdUUID, masterVersion=masterVersion) + # Attach storage domains to the storage pool + # Since we are creating the pool then attach is done from the hsm and not the spm +@@ -722,10 +721,10 @@ class StoragePool(Securable): + + @unsecured + def reconstructMaster(self, hostId, poolName, msdUUID, domDict, +- masterVersion, safeLease): ++ masterVersion, leaseParams): + self.log.info("spUUID=%s hostId=%s poolName=%s msdUUID=%s domDict=%s " + "masterVersion=%s leaseparams=(%s)", self.spUUID, hostId, +- poolName, msdUUID, domDict, masterVersion, str(safeLease)) ++ poolName, msdUUID, domDict, masterVersion, leaseParams) + + if msdUUID not in domDict: + raise se.InvalidParameterException("masterDomain", msdUUID) +@@ -736,7 +735,7 @@ class StoragePool(Securable): + # For backward compatibility we must support a reconstructMaster + # that doesn't specify an hostId. + if not hostId: +- self._acquireTemporaryClusterLock(msdUUID, safeLease) ++ self._acquireTemporaryClusterLock(msdUUID, leaseParams) + temporaryLock = True + else: + # Forcing to acquire the host id (if it's not acquired already). +@@ -749,7 +748,7 @@ class StoragePool(Securable): + + try: + self.createMaster(poolName, futureMaster, masterVersion, +- safeLease) ++ leaseParams) + + for sdUUID in domDict: + domDict[sdUUID] = domDict[sdUUID].capitalize() +-- +1.8.1 + diff --git a/0021-domain-select-the-cluster-lock-using-makeClusterLock.patch b/0021-domain-select-the-cluster-lock-using-makeClusterLock.patch new file mode 100644 index 0000000..3d0666c --- /dev/null +++ b/0021-domain-select-the-cluster-lock-using-makeClusterLock.patch @@ -0,0 +1,151 @@ +From 5da363f0412d2b709fb1460324ee04b5905e492b Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Thu, 20 Dec 2012 06:12:52 -0500 +Subject: [PATCH 21/22] domain: select the cluster lock using makeClusterLock + +In order to support different locking mechanisms (not only per-domain +format but also per-domain type) a new makeClusterLock method has been +introduced to select the appropriate cluster lock. + +Change-Id: I78072254441335a420292af642985840e9b2ac68 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/10281 +Reviewed-by: Allon Mureinik +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11464 +--- + vdsm/storage/imageRepository/formatConverter.py | 11 +++-- + vdsm/storage/sd.py | 54 +++++++++++++++---------- + 2 files changed, 39 insertions(+), 26 deletions(-) + +diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py +index 0742560..95a77d1 100644 +--- a/vdsm/storage/imageRepository/formatConverter.py ++++ b/vdsm/storage/imageRepository/formatConverter.py +@@ -26,7 +26,6 @@ from vdsm import qemuImg + from storage import sd + from storage import blockSD + from storage import image +-from storage import clusterlock + from storage import volume + from storage import blockVolume + from storage import storage_exception as se +@@ -91,7 +90,12 @@ def v2DomainConverter(repoPath, hostId, domain, isMsd): + + def v3DomainConverter(repoPath, hostId, domain, isMsd): + log = logging.getLogger('Storage.v3DomainConverter') +- log.debug("Starting conversion for domain %s", domain.sdUUID) ++ ++ targetVersion = 3 ++ currentVersion = domain.getVersion() ++ ++ log.debug("Starting conversion for domain %s from version %s " ++ "to version %s", domain.sdUUID, currentVersion, targetVersion) + + targetVersion = 3 + currentVersion = domain.getVersion() +@@ -115,8 +119,7 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): + domain.setMetadataPermissions() + + log.debug("Initializing the new cluster lock for domain %s", domain.sdUUID) +- newClusterLock = clusterlock.SANLock( +- domain.sdUUID, domain.getIdsFilePath(), domain.getLeasesFilePath()) ++ newClusterLock = domain._makeClusterLock(targetVersion) + newClusterLock.initLock() + + log.debug("Acquiring the host id %s for domain %s", hostId, domain.sdUUID) +diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py +index dbc1beb..a55ce06 100644 +--- a/vdsm/storage/sd.py ++++ b/vdsm/storage/sd.py +@@ -101,10 +101,6 @@ BACKUP_DOMAIN = 3 + DOMAIN_CLASSES = {DATA_DOMAIN: 'Data', ISO_DOMAIN: 'Iso', + BACKUP_DOMAIN: 'Backup'} + +-# Lock Version +-DOM_SAFELEASE_VERS = (0, 2) +-DOM_SANLOCK_VERS = (3,) +- + # Metadata keys + DMDK_VERSION = "VERSION" + DMDK_SDUUID = "SDUUID" +@@ -292,29 +288,20 @@ class StorageDomain: + mdBackupVersions = config.get('irs', 'md_backup_versions') + mdBackupDir = config.get('irs', 'md_backup_dir') + ++ # version: (clusterLockClass, hasVolumeLeases) ++ _clusterLockTable = { ++ 0: (clusterlock.SafeLease, False), ++ 2: (clusterlock.SafeLease, False), ++ 3: (clusterlock.SANLock, True), ++ } ++ + def __init__(self, sdUUID, domaindir, metadata): + self.sdUUID = sdUUID + self.domaindir = domaindir + self._metadata = metadata + self._lock = threading.Lock() + self.stat = None +- +- domversion = self.getVersion() +- +- if domversion in DOM_SAFELEASE_VERS: +- leaseParams = ( +- DEFAULT_LEASE_PARAMS[DMDK_LOCK_RENEWAL_INTERVAL_SEC], +- DEFAULT_LEASE_PARAMS[DMDK_LEASE_TIME_SEC], +- DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], +- DEFAULT_LEASE_PARAMS[DMDK_IO_OP_TIMEOUT_SEC]) +- self._clusterLock = clusterlock.SafeLease( +- self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath(), +- *leaseParams) +- elif domversion in DOM_SANLOCK_VERS: +- self._clusterLock = clusterlock.SANLock( +- self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath()) +- else: +- raise se.UnsupportedDomainVersion(domversion) ++ self._clusterLock = self._makeClusterLock() + + def __del__(self): + if self.stat: +@@ -328,6 +315,25 @@ class StorageDomain: + def oop(self): + return oop.getProcessPool(self.sdUUID) + ++ def _makeClusterLock(self, domVersion=None): ++ if not domVersion: ++ domVersion = self.getVersion() ++ ++ leaseParams = ( ++ DEFAULT_LEASE_PARAMS[DMDK_LOCK_RENEWAL_INTERVAL_SEC], ++ DEFAULT_LEASE_PARAMS[DMDK_LEASE_TIME_SEC], ++ DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], ++ DEFAULT_LEASE_PARAMS[DMDK_IO_OP_TIMEOUT_SEC], ++ ) ++ ++ try: ++ clusterLockClass = self._clusterLockTable[domVersion][0] ++ except KeyError: ++ raise se.UnsupportedDomainVersion(domVersion) ++ ++ return clusterLockClass(self.sdUUID, self.getIdsFilePath(), ++ self.getLeasesFilePath(), *leaseParams) ++ + @classmethod + def create(cls, sdUUID, domainName, domClass, typeSpecificArg, version): + """ +@@ -436,7 +442,11 @@ class StorageDomain: + return self._clusterLock.hasHostId(hostId) + + def hasVolumeLeases(self): +- return self.getVersion() in DOM_SANLOCK_VERS ++ domVersion = self.getVersion() ++ try: ++ return self._clusterLockTable[domVersion][1] ++ except KeyError: ++ raise se.UnsupportedDomainVersion(domVersion) + + def getVolumeLease(self, volUUID): + """ +-- +1.8.1 + diff --git a/0022-clusterlock-add-the-local-locking-implementation.patch b/0022-clusterlock-add-the-local-locking-implementation.patch new file mode 100644 index 0000000..d496718 --- /dev/null +++ b/0022-clusterlock-add-the-local-locking-implementation.patch @@ -0,0 +1,225 @@ +From e73c5bc586d1e689fc33ba77082488d755e3a621 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Thu, 20 Dec 2012 08:08:21 -0500 +Subject: [PATCH 22/22] clusterlock: add the local locking implementation + +In order to have a faster and more lightweight locking mechanism on +local storage domains a new cluster lock (based on flock) has been +introduced. + +Change-Id: I106618a9a61cc96727edaf2e3ab043b2ec28ebe1 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/10282 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11465 +--- + vdsm/storage/clusterlock.py | 122 +++++++++++++++++++++++++++++++++++++++++--- + vdsm/storage/localFsSD.py | 7 +++ + vdsm/storage/misc.py | 19 +++++++ + 3 files changed, 141 insertions(+), 7 deletions(-) + +diff --git a/vdsm/storage/clusterlock.py b/vdsm/storage/clusterlock.py +index 4525b2f..cabf174 100644 +--- a/vdsm/storage/clusterlock.py ++++ b/vdsm/storage/clusterlock.py +@@ -19,6 +19,7 @@ + # + + import os ++import fcntl + import threading + import logging + import subprocess +@@ -127,6 +128,22 @@ class SafeLease(object): + self.log.debug("Cluster lock released successfully") + + ++initSANLockLog = logging.getLogger("initSANLock") ++ ++ ++def initSANLock(sdUUID, idsPath, leasesPath): ++ initSANLockLog.debug("Initializing SANLock for domain %s", sdUUID) ++ ++ try: ++ sanlock.init_lockspace(sdUUID, idsPath) ++ sanlock.init_resource(sdUUID, SDM_LEASE_NAME, ++ [(leasesPath, SDM_LEASE_OFFSET)]) ++ except sanlock.SanlockException: ++ initSANLockLog.error("Cannot initialize SANLock for domain %s", ++ sdUUID, exc_info=True) ++ raise se.ClusterLockInitError() ++ ++ + class SANLock(object): + log = logging.getLogger("SANLock") + +@@ -141,13 +158,7 @@ class SANLock(object): + self._sanlockfd = None + + def initLock(self): +- try: +- sanlock.init_lockspace(self._sdUUID, self._idsPath) +- sanlock.init_resource(self._sdUUID, SDM_LEASE_NAME, +- [(self._leasesPath, SDM_LEASE_OFFSET)]) +- except sanlock.SanlockException: +- self.log.warn("Cannot initialize clusterlock", exc_info=True) +- raise se.ClusterLockInitError() ++ initSANLock(self._sdUUID, self._idsPath, self._leasesPath) + + def setParams(self, *args): + pass +@@ -249,3 +260,100 @@ class SANLock(object): + self._sanlockfd = None + self.log.debug("Cluster lock for domain %s successfully released", + self._sdUUID) ++ ++ ++class LocalLock(object): ++ log = logging.getLogger("LocalLock") ++ ++ _globalLockMap = {} ++ _globalLockMapSync = threading.Lock() ++ ++ def __init__(self, sdUUID, idsPath, leasesPath, *args): ++ self._sdUUID = sdUUID ++ self._idsPath = idsPath ++ self._leasesPath = leasesPath ++ ++ def initLock(self): ++ # The LocalLock initialization is based on SANLock to maintain on-disk ++ # domain format consistent across all the V3 types. ++ # The advantage is that the domain can be exposed as an NFS/GlusterFS ++ # domain later on without any modification. ++ # XXX: Keep in mind that LocalLock and SANLock cannot detect each other ++ # and therefore concurrently using the same domain as local domain and ++ # NFS domain (or any other shared file-based domain) will certainly ++ # lead to disastrous consequences. ++ initSANLock(self._sdUUID, self._idsPath, self._leasesPath) ++ ++ def setParams(self, *args): ++ pass ++ ++ def getReservedId(self): ++ return MAX_HOST_ID ++ ++ def acquireHostId(self, hostId, async): ++ self.log.debug("Host id for domain %s successfully acquired (id: %s)", ++ self._sdUUID, hostId) ++ ++ def releaseHostId(self, hostId, async, unused): ++ self.log.debug("Host id for domain %s released successfully (id: %s)", ++ self._sdUUID, hostId) ++ ++ def hasHostId(self, hostId): ++ return True ++ ++ def acquire(self, hostId): ++ with self._globalLockMapSync: ++ self.log.info("Acquiring local lock for domain %s (id: %s)", ++ self._sdUUID, hostId) ++ ++ lockFile = self._globalLockMap.get(self._sdUUID, None) ++ ++ if lockFile: ++ try: ++ misc.NoIntrCall(fcntl.fcntl, lockFile, fcntl.F_GETFD) ++ except IOError as e: ++ # We found a stale file descriptor, removing. ++ del self._globalLockMap[self._sdUUID] ++ ++ # Raise any other unkown error. ++ if e.errno != os.errno.EBADF: ++ raise ++ else: ++ self.log.debug("Local lock already acquired for domain " ++ "%s (id: %s)", self._sdUUID, hostId) ++ return # success, the lock was already acquired ++ ++ lockFile = misc.NoIntrCall(os.open, self._idsPath, os.O_RDONLY) ++ ++ try: ++ misc.NoIntrCall(fcntl.flock, lockFile, ++ fcntl.LOCK_EX | fcntl.LOCK_NB) ++ except IOError as e: ++ misc.NoIntrCall(os.close, lockFile) ++ if e.errno in (os.errno.EACCES, os.errno.EAGAIN): ++ raise se.AcquireLockFailure( ++ self._sdUUID, e.errno, "Cannot acquire local lock", ++ str(e)) ++ raise ++ else: ++ self._globalLockMap[self._sdUUID] = lockFile ++ ++ self.log.debug("Local lock for domain %s successfully acquired " ++ "(id: %s)", self._sdUUID, hostId) ++ ++ def release(self): ++ with self._globalLockMapSync: ++ self.log.info("Releasing local lock for domain %s", self._sdUUID) ++ ++ lockFile = self._globalLockMap.get(self._sdUUID, None) ++ ++ if not lockFile: ++ self.log.debug("Local lock already released for domain %s", ++ self._sdUUID) ++ return ++ ++ misc.NoIntrCall(os.close, lockFile) ++ del self._globalLockMap[self._sdUUID] ++ ++ self.log.debug("Local lock for domain %s successfully released", ++ self._sdUUID) +diff --git a/vdsm/storage/localFsSD.py b/vdsm/storage/localFsSD.py +index 198c073..7d59894 100644 +--- a/vdsm/storage/localFsSD.py ++++ b/vdsm/storage/localFsSD.py +@@ -26,9 +26,16 @@ import fileSD + import fileUtils + import storage_exception as se + import misc ++import clusterlock + + + class LocalFsStorageDomain(fileSD.FileStorageDomain): ++ # version: (clusterLockClass, hasVolumeLeases) ++ _clusterLockTable = { ++ 0: (clusterlock.SafeLease, False), ++ 2: (clusterlock.SafeLease, False), ++ 3: (clusterlock.LocalLock, True), ++ } + + @classmethod + def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg, version): +diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py +index 17d38ee..b26a317 100644 +--- a/vdsm/storage/misc.py ++++ b/vdsm/storage/misc.py +@@ -1344,6 +1344,25 @@ def itmap(func, iterable, maxthreads=UNLIMITED_THREADS): + yield respQueue.get() + + ++def NoIntrCall(fun, *args, **kwargs): ++ """ ++ This wrapper is used to handle the interrupt exceptions that might ++ occur during a system call. ++ """ ++ while True: ++ try: ++ return fun(*args, **kwargs) ++ except (IOError, select.error) as e: ++ if e.args[0] == os.errno.EINTR: ++ continue ++ raise ++ break ++ ++ ++# NOTE: it would be best to try and unify NoIntrCall and NoIntrPoll. ++# We could do so defining a new object that can be used as a placeholer ++# for the changing timeout value in the *args/**kwargs. This would ++# lead us to rebuilding the function arguments at each loop. + def NoIntrPoll(pollfun, timeout=-1): + """ + This wrapper is used to handle the interrupt exceptions that might occur +-- +1.8.1 + diff --git a/0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch b/0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch new file mode 100644 index 0000000..cda48c4 --- /dev/null +++ b/0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch @@ -0,0 +1,38 @@ +From 94a3b6b63449ac4a16c76c1d5c52d58f5c895ecc Mon Sep 17 00:00:00 2001 +From: Lee Yarwood +Date: Tue, 22 Jan 2013 14:09:28 +0000 +Subject: [PATCH 23/27] upgrade: catch MetaDataKeyNotFoundError when preparing + images + +Ensure that we catch and continue past any MetaDataKeyNotFoundError +exception when preparing images that may contain partially removed +volumes. For example where the LV is still present but the metadata +block has been blanked out. + +Change-Id: I92f7a61bf6d1e24e84711486fd4f8ba67e2a0077 +Signed-off-by: Lee Yarwood +Reviewed-on: http://gerrit.ovirt.org/11485 +Reviewed-by: Federico Simoncelli +--- + vdsm/storage/imageRepository/formatConverter.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py +index 95a77d1..cbf64f5 100644 +--- a/vdsm/storage/imageRepository/formatConverter.py ++++ b/vdsm/storage/imageRepository/formatConverter.py +@@ -280,6 +280,11 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): + log.error("It is not possible to prepare the image %s, the " + "volume chain looks damaged", imgUUID, exc_info=True) + ++ except se.MetaDataKeyNotFoundError: ++ log.error("It is not possible to prepare the image %s, the " ++ "volume metadata looks damaged", imgUUID, ++ exc_info=True) ++ + finally: + try: + img.teardown(domain.sdUUID, imgUUID) +-- +1.8.1 + diff --git a/0024-vdsm.spec-Require-openssl.patch b/0024-vdsm.spec-Require-openssl.patch new file mode 100644 index 0000000..ab86511 --- /dev/null +++ b/0024-vdsm.spec-Require-openssl.patch @@ -0,0 +1,31 @@ +From 53e8505e34f1e7a76adfa0de74d5eb9d27efd586 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Wed, 30 Jan 2013 09:27:38 -0500 +Subject: [PATCH 24/27] vdsm.spec: Require openssl + +deployUtil uses openssl command, we should Require it. + +Change-Id: Ib53aa66bad94e9c4046f3430b892a60cbc80c520 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=905728 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/11543 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 8ad4dce..e898c59 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -207,6 +207,7 @@ BuildArch: noarch + + Requires: %{name} = %{version}-%{release} + Requires: m2crypto ++Requires: openssl + + %description reg + VDSM registration package. Used to register a Linux host to a Virtualization +-- +1.8.1 + diff --git a/0025-Fedora-18-require-a-newer-udev.patch b/0025-Fedora-18-require-a-newer-udev.patch new file mode 100644 index 0000000..6464c3f --- /dev/null +++ b/0025-Fedora-18-require-a-newer-udev.patch @@ -0,0 +1,36 @@ +From 674f1003f05d84609e4555c1509b1409475e1c97 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 29 Jan 2013 10:44:01 +0200 +Subject: [PATCH 25/27] Fedora 18: require a newer udev + +Due to https://bugzilla.redhat.com/903716 `udev: device node permissions +not applied with "change" event' we could not use block storage in +Fedora. Let us explicitly require a newerer systemd that fixes this +issue, to avoid users' dismay. + +Change-Id: Ie17abb2af146c492efafc94bfbb533c7f6c8025c +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11489 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/11534 +Tested-by: Federico Simoncelli +--- + vdsm.spec.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index e898c59..00c1259 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -136,6 +136,7 @@ Requires: selinux-policy-targeted >= 3.11.1-71 + # In order to avoid a policycoreutils bug (rhbz 883355) when selinux is + # disabled we now require the version 2.1.13-44 (or newer) of Fedora. + Requires: policycoreutils >= 2.1.13-44 ++Requires: systemd >= 197-1.fc18.2 + %endif + + Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client +-- +1.8.1 + diff --git a/0026-fix-sloppy-backport-of-safelease-rename.patch b/0026-fix-sloppy-backport-of-safelease-rename.patch new file mode 100644 index 0000000..8ae6b1e --- /dev/null +++ b/0026-fix-sloppy-backport-of-safelease-rename.patch @@ -0,0 +1,40 @@ +From 7904843648c7dd368f832d8f2b652290ca717424 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Wed, 30 Jan 2013 13:43:33 +0200 +Subject: [PATCH 26/27] fix sloppy backport of safelease rename + +Somehow, this sloppy backport of I74070ebb43dd726362900a0746c +was not caught by Jenkins. Any idea why? + +Change-Id: Iaf1dc264d17b59934b78877a11f37b21614b268e +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11544 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Federico Simoncelli +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 80d6f52..06ffbf9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,6 +54,7 @@ PEP8_WHITELIST = \ + vdsm/*.py.in \ + vdsm/storage/__init__.py \ + vdsm/storage/blockVolume.py \ ++ vdsm/storage/clusterlock.py \ + vdsm/storage/devicemapper.py \ + vdsm/storage/domainMonitor.py \ + vdsm/storage/fileSD.py \ +@@ -74,7 +75,6 @@ PEP8_WHITELIST = \ + vdsm/storage/persistentDict.py \ + vdsm/storage/remoteFileHandler.py \ + vdsm/storage/resourceFactories.py \ +- vdsm/storage/safelease.py \ + vdsm/storage/sd.py \ + vdsm/storage/sdc.py \ + vdsm/storage/securable.py \ +-- +1.8.1 + diff --git a/0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch b/0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch new file mode 100644 index 0000000..14ce5fd --- /dev/null +++ b/0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch @@ -0,0 +1,52 @@ +From 18c24f7c7c27ac732c4a760caa9524e7319cd47e Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Tue, 29 Jan 2013 13:49:46 +0200 +Subject: [PATCH 27/27] removing the use of zombie reaper from supervdsm + +This may solve validateAccess errors, but can cause defuct subprocesses. +This patch is signed as WIP until we'll find better solution, until then +this patch helps to verify if the previous errors that was caused thanks +to zombie reaper handling don't occur. + +Change-Id: If3f9bae47f2894cc95785de8f19f6ec388ea58da +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/11491 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/supervdsmServer.py | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py +index 833e91f..21e7c94 100755 +--- a/vdsm/supervdsmServer.py ++++ b/vdsm/supervdsmServer.py +@@ -56,7 +56,6 @@ import tc + import ksm + import mkimage + from storage.multipath import MPATH_CONF +-import zombieReaper + + _UDEV_RULE_FILE_DIR = "/etc/udev/rules.d/" + _UDEV_RULE_FILE_PREFIX = "99-vdsm-" +@@ -199,7 +198,6 @@ class _SuperVdsm(object): + pipe, hisPipe = Pipe() + proc = Process(target=child, args=(hisPipe,)) + proc.start() +- zombieReaper.autoReapPID(proc.pid) + + if not pipe.poll(RUN_AS_TIMEOUT): + try: +@@ -391,8 +389,6 @@ def main(): + if os.path.exists(address): + os.unlink(address) + +- zombieReaper.registerSignalHandler() +- + log.debug("Setting up keep alive thread") + + monThread = threading.Thread(target=__pokeParent, +-- +1.8.1 + diff --git a/0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch b/0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch new file mode 100644 index 0000000..a85b5fc --- /dev/null +++ b/0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch @@ -0,0 +1,63 @@ +From c1465ed861233cf90a1cace4c41560cbd48a61b3 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Fri, 1 Feb 2013 23:04:50 +0200 +Subject: [PATCH 28/30] configNet: allow delete/update of devices with no ifcfg + +In Fedora 18, ifcfg files are missing by default. This patch assumes +that there are no custom MTU setting for a device with no ifcfg file. + +This version of the patch owes a lot to Mark Wu's +http://gerrit.ovirt.org/11357 and to Toni who convinced me that it is +better to read the MTU directly from kernel. + +Change-Id: Icb3a623ca3d3b560288cbe4141eea6bd060ac798 +Bug-Url: https://bugzilla.redhat.com/906383 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/11621 +Reviewed-by: Antoni Segura Puimedon +Tested-by: Mike Kolesnik +Reviewed-on: http://gerrit.ovirt.org/11680 +Tested-by: Antoni Segura Puimedon +--- + vdsm/configNetwork.py | 18 +++++------------- + 1 file changed, 5 insertions(+), 13 deletions(-) + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 53debfa..041e1a4 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -600,12 +600,10 @@ class ConfigWriter(object): + it check if a vlan, bond that have a higher mtu value + """ + for nic in nics: +- cf = self.NET_CONF_PREF + nic +- mtuval = self._getConfigValue(cf, 'MTU') +- if not mtuval is None: +- mtuval = int(mtuval) +- if mtuval > mtu: +- mtu = mtuval ++ mtuval = int(netinfo.getMtu(nic)) ++ ++ if mtuval > mtu: ++ mtu = mtuval + return mtu + + def setNewMtu(self, network, bridged): +@@ -623,13 +621,7 @@ class ConfigWriter(object): + _netinfo = netinfo.NetInfo() + currmtu = None + if bridged: +- cf = self.NET_CONF_PREF + network +- currmtu = self._getConfigValue(cf, 'MTU') +- if currmtu: +- currmtu = int(currmtu) +- else: +- # Optimization: if network hasn't custom MTU, do nothing +- return ++ currmtu = int(netinfo.getMtu(network)) + + nics, delvlan, bonding = \ + _netinfo.getNicsVlanAndBondingForNetwork(network) +-- +1.8.1.2 + diff --git a/0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch b/0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch new file mode 100644 index 0000000..83a40f6 --- /dev/null +++ b/0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch @@ -0,0 +1,41 @@ +From 6c021fc54d446f944acd497fb7e2110428ac289c Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 5 Feb 2013 14:30:49 -0500 +Subject: [PATCH 29/30] Requires policycoreutils-2.1.13-55 to avoid another + break on selinux disabled. + +When selinux is disabled on f18, it fails to import module sepolicy +with an exception. It causes the the vdsm-tool unavailable, and therefore +the bonding module can't be loaded when vdsm starts up. For details, +please see https://bugzilla.redhat.com/show_bug.cgi?id=889698 + +Change-Id: I09387167ceeffdc104910103b8381954296cdbe9 +Signed-off-by: Mark Wu +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/11731 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm.spec.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 00c1259..0aad124 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -133,9 +133,9 @@ Requires: lvm2 >= 2.02.95 + + %if 0%{?fedora} >= 18 + Requires: selinux-policy-targeted >= 3.11.1-71 +-# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is +-# disabled we now require the version 2.1.13-44 (or newer) of Fedora. +-Requires: policycoreutils >= 2.1.13-44 ++# In order to avoid a policycoreutils bug (rhbz 889698) when selinux is ++# disabled we now require the version 2.1.13-55 (or newer) of Fedora. ++Requires: policycoreutils >= 2.1.13-55 + Requires: systemd >= 197-1.fc18.2 + %endif + +-- +1.8.1.2 + diff --git a/0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch b/0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch new file mode 100644 index 0000000..6f21182 --- /dev/null +++ b/0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch @@ -0,0 +1,50 @@ +From 73b120fd6d0cd8215f3857c034cc7d4584c8ee05 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Thu, 14 Feb 2013 13:46:06 +0200 +Subject: [PATCH 30/30] After fail to connect to supervdsm more than 3 time + vdsm gets into panic + +Due to race between old supervdsm instance to the new instance after +prepareForShutdown, sometimes the socket is removed after +new supervdsm started to listen on it. +_pokeParent thread unlink the socket when distinguish that vdsm is dead. +This can take more time than the time that takes to vdsm to startup and +start the new instance of supervdsm. The unlink removes the socket file +and vdsm cannot communicate with supervdsm. +When the communication fails, vdsm calls panic and restart itself, this +will start supervdsm again as needed. + +Change-Id: Iafe112893a76686edd2949d4f40b734646fd74df +Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=910005 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/11932 +Reviewed-by: Saggi Mizrahi +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/12053 +--- + vdsm/supervdsm.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py +index 6a38076..1b6402d 100644 +--- a/vdsm/supervdsm.py ++++ b/vdsm/supervdsm.py +@@ -194,7 +194,14 @@ class SuperVdsmProxy(object): + def launch(self): + self._firstLaunch = False + self._start() +- utils.retry(self._connect, Exception, timeout=60) ++ try: ++ # We retry 3 times to connect to avoid exceptions that are raised ++ # due to the process initializing. It might takes time to create ++ # the communication socket or other initialization methods take ++ # more time than expected. ++ utils.retry(self._connect, Exception, timeout=60) ++ except: ++ misc.panic("Couldn't connect to supervdsm") + + def __getattr__(self, name): + return ProxyCaller(self, name) +-- +1.8.1.2 + diff --git a/0031-packaging-add-load_needed_modules.py.in.patch b/0031-packaging-add-load_needed_modules.py.in.patch new file mode 100644 index 0000000..25fc677 --- /dev/null +++ b/0031-packaging-add-load_needed_modules.py.in.patch @@ -0,0 +1,81 @@ +From 45fec93749f8474db30cb0b518ca9b2f7b80f142 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Thu, 28 Feb 2013 10:44:49 +0100 +Subject: [PATCH 31/32] packaging: add load_needed_modules.py.in + +Signed-off-by: Federico Simoncelli +--- + vdsm-tool/load_needed_modules.py.in | 61 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 61 insertions(+) + create mode 100644 vdsm-tool/load_needed_modules.py.in + +diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in +new file mode 100644 +index 0000000..675a172 +--- /dev/null ++++ b/vdsm-tool/load_needed_modules.py.in +@@ -0,0 +1,61 @@ ++# Copyright IBM, Corp. 2012 ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Refer to the README and COPYING files for full details of the license ++# ++ ++ ++import subprocess ++ ++from vdsm.tool import expose ++ ++ ++EX_MODPROBE = '@MODPROBE_PATH@' ++ ++ ++def _exec_command(argv): ++ """ ++ This function executes a given shell command. ++ """ ++ ++ p = subprocess.Popen(argv, stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE) ++ out, err = p.communicate() ++ rc = p.returncode ++ if rc != 0: ++ raise Exception("Execute command %s failed: %s" % (argv, err)) ++ ++ ++def _enable_bond_dev(): ++ REQUIRED = set(['bond0', 'bond1', 'bond2', 'bond3', 'bond4']) ++ MASTER_FILE = '/sys/class/net/bonding_masters' ++ ++ # @ENGINENAME@ currently assumes that all bonding devices pre-exist ++ existing = set(file(MASTER_FILE).read().split()) ++ with open(MASTER_FILE, 'w') as f: ++ for bond in REQUIRED - existing: ++ f.write('+%s\n' % bond) ++ ++ ++@expose('load-needed-modules') ++def load_needed_modules(): ++ """ ++ Load needed modules ++ """ ++ ++ for mod in ['tun', 'bonding', '8021q']: ++ _exec_command([EX_MODPROBE, mod]) ++ _enable_bond_dev() +-- +1.8.1.2 + diff --git a/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch b/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch new file mode 100644 index 0000000..b73ce8b --- /dev/null +++ b/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch @@ -0,0 +1,38 @@ +From 8cca94da272babb5eef7a81a7a05d178070efe69 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Mon, 25 Feb 2013 16:06:56 +0200 +Subject: [PATCH 32/32] tool: _enable_bond_dev: reopen bonding_masters per bond + +Writing multiple +bondnames into /sys/class/net/bonding_masters is not +enough to add new bonding devices. One has to reopen that file for each +added bond. + +Change-Id: I4693a3d2cc3beba0b5961d16fb1ef25170f99f9e +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/12409 +Reviewed-by: Antoni Segura Puimedon +Tested-by: gena cher +Reviewed-on: http://gerrit.ovirt.org/12447 +Reviewed-by: Igor Lvovsky +--- + vdsm-tool/load_needed_modules.py.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in +index 675a172..89c2b3f 100644 +--- a/vdsm-tool/load_needed_modules.py.in ++++ b/vdsm-tool/load_needed_modules.py.in +@@ -45,8 +45,8 @@ def _enable_bond_dev(): + + # @ENGINENAME@ currently assumes that all bonding devices pre-exist + existing = set(file(MASTER_FILE).read().split()) +- with open(MASTER_FILE, 'w') as f: +- for bond in REQUIRED - existing: ++ for bond in REQUIRED - existing: ++ with open(MASTER_FILE, 'w') as f: + f.write('+%s\n' % bond) + + +-- +1.8.1.2 + diff --git a/0033-gluster-Handling-Attribute-error-in-Python-2.6.patch b/0033-gluster-Handling-Attribute-error-in-Python-2.6.patch new file mode 100644 index 0000000..52909b2 --- /dev/null +++ b/0033-gluster-Handling-Attribute-error-in-Python-2.6.patch @@ -0,0 +1,91 @@ +From 345374cfd88cc5bd1295d8e72c579edf3669ab1a Mon Sep 17 00:00:00 2001 +From: Aravinda VK +Date: Wed, 6 Mar 2013 14:34:12 +0530 +Subject: [PATCH 33/36] gluster: Handling Attribute error in Python 2.6 + +xml.etree.cElementTree in Python 2.6 doesn't have the attribute +ParseError(Introduced in Python 2.7). VDSM gluster/cli.py tries +to capture etree.ParseError when gluster cli returns incompatible +xml output. + +Change-Id: I63c33b34ce11473636365ea094e267c5424c7255 +Signed-off-by: Aravinda VK +(cherry picked from commit 5759c876e414b433b1a42e50e1817d5841ec2ef2) +Reviewed-on: http://gerrit.ovirt.org/12829 +Reviewed-by: Dan Kenigsberg +--- + vdsm/gluster/cli.py | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py +index 7136281..d4f65ab 100644 +--- a/vdsm/gluster/cli.py ++++ b/vdsm/gluster/cli.py +@@ -31,6 +31,12 @@ _glusterCommandPath = utils.CommandPath("gluster", + ) + + ++if hasattr(etree, 'ParseError'): ++ _etreeExceptions = (etree.ParseError, AttributeError, ValueError) ++else: ++ _etreeExceptions = (SyntaxError, AttributeError, ValueError) ++ ++ + def _getGlusterVolCmd(): + return [_glusterCommandPath.cmd, "--mode=script", "volume"] + +@@ -85,7 +91,7 @@ def _execGlusterXml(cmd): + tree = etree.fromstring('\n'.join(out)) + rv = int(tree.find('opRet').text) + msg = tree.find('opErrstr').text +- except (etree.ParseError, AttributeError, ValueError): ++ except _etreeExceptions: + raise ge.GlusterXmlErrorException(err=out) + if rv == 0: + return tree +@@ -303,7 +309,7 @@ def volumeStatus(volumeName, brick=None, option=None): + return _parseVolumeStatusMem(xmltree) + else: + return _parseVolumeStatus(xmltree) +- except (etree.ParseError, AttributeError, ValueError): ++ except _etreeExceptions: + raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) + + +@@ -427,7 +433,7 @@ def volumeInfo(volumeName=None): + raise ge.GlusterVolumesListFailedException(rc=e.rc, err=e.err) + try: + return _parseVolumeInfo(xmltree) +- except (etree.ParseError, AttributeError, ValueError): ++ except _etreeExceptions: + raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) + + +@@ -448,7 +454,7 @@ def volumeCreate(volumeName, brickList, replicaCount=0, stripeCount=0, + raise ge.GlusterVolumeCreateFailedException(rc=e.rc, err=e.err) + try: + return {'uuid': xmltree.find('volCreate/volume/id').text} +- except (etree.ParseError, AttributeError, ValueError): ++ except _etreeExceptions: + raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) + + +@@ -787,7 +793,7 @@ def peerStatus(): + return _parsePeerStatus(xmltree, + _getLocalIpAddress() or _getGlusterHostName(), + _getGlusterUuid(), HostStatus.CONNECTED) +- except (etree.ParseError, AttributeError, ValueError): ++ except _etreeExceptions: + raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) + + +@@ -878,5 +884,5 @@ def volumeProfileInfo(volumeName, nfs=False): + raise ge.GlusterVolumeProfileInfoFailedException(rc=e.rc, err=e.err) + try: + return _parseVolumeProfileInfo(xmltree, nfs) +- except (etree.ParseError, AttributeError, ValueError): ++ except _etreeExceptions: + raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) +-- +1.8.1.4 + diff --git a/0034-bootstrap-remove-glusterfs-packages.patch b/0034-bootstrap-remove-glusterfs-packages.patch new file mode 100644 index 0000000..8351336 --- /dev/null +++ b/0034-bootstrap-remove-glusterfs-packages.patch @@ -0,0 +1,52 @@ +From f2277d595e06d86791abffabe52f4e397f26cb0f Mon Sep 17 00:00:00 2001 +From: "Bala.FA" +Date: Tue, 6 Nov 2012 16:09:49 +0530 +Subject: [PATCH 34/36] bootstrap: remove glusterfs packages + +As glusterfs packages are dependencies for vdsm-gluster package, +having these in bootstrap is redundant + +Change-Id: I5bdde338599155df43af3a0fd0d14a02e3bddda8 +Signed-off-by: Bala.FA +Reviewed-on: http://gerrit.ovirt.org/12959 +Reviewed-by: Timothy Asir +Reviewed-by: Dan Kenigsberg +Reviewed-by: Douglas Schilling Landgraf +--- + vds_bootstrap/vds_bootstrap.py | 3 +-- + vdsm.spec.in | 5 ++++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py +index 61e0f6f..219e6e4 100755 +--- a/vds_bootstrap/vds_bootstrap.py ++++ b/vds_bootstrap/vds_bootstrap.py +@@ -159,8 +159,7 @@ if rhel6based: + 'seabios', 'qemu-img', 'fence-agents', + 'libselinux-python', 'sanlock', 'sanlock-python') + # Gluster packages +- GLUSTER_PACK = ('vdsm-gluster', 'glusterfs-server', 'glusterfs-rdma', +- 'glusterfs-geo-replication') ++ GLUSTER_PACK = (VDSM_NAME + '-gluster', ) + else: + # Devel packages + DEVEL_PACK = ('gdb', 'tcpdump', 'strace', 'ltrace', 'sysstat', 'ntp', +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 0aad124..1cb189e 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -402,7 +402,10 @@ Summary: Gluster Plugin for VDSM + BuildArch: noarch + + Requires: %{name} = %{version}-%{release} +-Requires: glusterfs glusterfs-server glusterfs-fuse ++Requires: glusterfs ++Requires: glusterfs-server ++Requires: glusterfs-fuse ++Requires: glusterfs-rdma + + %description gluster + Gluster plugin enables VDSM to serve Gluster functionalities. +-- +1.8.1.4 + diff --git a/0035-gluster-set-glusterfs-dependency-version.patch b/0035-gluster-set-glusterfs-dependency-version.patch new file mode 100644 index 0000000..97bf1a0 --- /dev/null +++ b/0035-gluster-set-glusterfs-dependency-version.patch @@ -0,0 +1,33 @@ +From 8ad23d1cbc02d2a923fcdcf050d8a4faf26948b2 Mon Sep 17 00:00:00 2001 +From: "Bala.FA" +Date: Tue, 12 Mar 2013 14:28:08 +0530 +Subject: [PATCH 35/36] gluster: set glusterfs dependency version + +Now vdsm-gluster depends on glusterfs version 3.4.0 or higher. + +Change-Id: Icb42bf4dec26b118f52cc51701faa5e611f63c00 +Signed-off-by: Bala.FA +Reviewed-on: http://gerrit.ovirt.org/12960 +Reviewed-by: Aravinda VK +Tested-by: Aravinda VK +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 1cb189e..60e76e5 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -402,7 +402,7 @@ Summary: Gluster Plugin for VDSM + BuildArch: noarch + + Requires: %{name} = %{version}-%{release} +-Requires: glusterfs ++Requires: glusterfs >= 3.4.0 + Requires: glusterfs-server + Requires: glusterfs-fuse + Requires: glusterfs-rdma +-- +1.8.1.4 + diff --git a/0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch b/0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch new file mode 100644 index 0000000..dc34ce0 --- /dev/null +++ b/0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch @@ -0,0 +1,65 @@ +From 37334a9b538fdb7af6e2d49eea5f7bd7bedd82b4 Mon Sep 17 00:00:00 2001 +From: Eduardo Warszawski +Date: Mon, 18 Feb 2013 18:14:31 +0200 +Subject: [PATCH 36/36] Do not delete the template when zeroing a dependant + image. + +Change-Id: I9e472334efa9dadb5389db70b0953f88b9be858a +Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=910013 +Signed-off-by: Eduardo +Reviewed-on: http://gerrit.ovirt.org/12178 +Tested-by: Haim Ateya +Reviewed-by: Dan Kenigsberg +Reviewed-by: Yeela Kaplan +Reviewed-by: Ayal Baron +Reviewed-on: http://gerrit.ovirt.org/13028 +Tested-by: Federico Simoncelli +--- + vdsm/storage/blockSD.py | 12 +++++++++--- + vdsm/storage/hsm.py | 2 +- + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py +index 862e413..e66256d 100644 +--- a/vdsm/storage/blockSD.py ++++ b/vdsm/storage/blockSD.py +@@ -945,14 +945,20 @@ class BlockStorageDomain(sd.StorageDomain): + self.log.debug("removed image dir: %s", imgPath) + return imgPath + ++ def _getImgExclusiveVols(self, imgUUID, volsImgs): ++ """Filter vols belonging to imgUUID only.""" ++ exclusives = dict((vName, v) for vName, v in volsImgs.iteritems() ++ if v.imgs[0] == imgUUID) ++ return exclusives ++ + def deleteImage(self, sdUUID, imgUUID, volsImgs): +- toDel = tuple(vName for vName, v in volsImgs.iteritems() +- if v.imgs[0] == imgUUID) ++ toDel = self._getImgExclusiveVols(imgUUID, volsImgs) + deleteVolumes(sdUUID, toDel) + self.rmDCImgDir(imgUUID, volsImgs) + + def zeroImage(self, sdUUID, imgUUID, volsImgs): +- zeroImgVolumes(sdUUID, imgUUID, volsImgs) ++ toZero = self._getImgExclusiveVols(imgUUID, volsImgs) ++ zeroImgVolumes(sdUUID, imgUUID, toZero) + self.rmDCImgDir(imgUUID, volsImgs) + + def getAllVolumes(self): +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index 8bbe3b8..32a32c9 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -1455,7 +1455,7 @@ class HSM: + # postZero implies block domain. Backup domains are always NFS + # hence no need to create fake template if postZero is true. + self._spmSchedule(spUUID, "zeroImage_%s" % imgUUID, dom.zeroImage, +- sdUUID, imgUUID, volsByImg.keys()) ++ sdUUID, imgUUID, volsByImg) + else: + dom.deleteImage(sdUUID, imgUUID, volsByImg) + # This is a hack to keep the interface consistent +-- +1.8.1.4 + diff --git a/0037-vdsm.spec-fence-agents-all.patch b/0037-vdsm.spec-fence-agents-all.patch new file mode 100644 index 0000000..398c464 --- /dev/null +++ b/0037-vdsm.spec-fence-agents-all.patch @@ -0,0 +1,59 @@ +From ed7c81971e539e0940d3ffdfe3f913ca99cde14d Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Fri, 22 Mar 2013 21:46:34 -0400 +Subject: [PATCH] vdsm.spec: fence-agents-all + +fence-agents package in version 4 replaced the package name +to fence-agents-all. This patch will adapt vdsm spec to this change. + +Change-Id: Ie4e92fda50aadb8223e721d72d43ea03b9b24f2d +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/13249 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index abfdbf9..3f7397a 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -101,6 +101,7 @@ Requires: dmidecode + ExclusiveArch: x86_64 + Requires: device-mapper-multipath + Requires: e2fsprogs ++Requires: fence-agents-all + Requires: iscsi-initiator-utils + Requires: libvirt + Requires: lvm2 +@@ -118,6 +119,7 @@ Requires: libvirt >= 0.10.2-18.el6_4.2 + Requires: iscsi-initiator-utils >= 6.2.0.872-15 + Requires: device-mapper-multipath >= 0.4.9-52 + Requires: e2fsprogs >= 1.41.12-11 ++Requires: fence-agents + Requires: kernel >= 2.6.32-279.9.1 + Requires: sanlock >= 2.3-4, sanlock-python + Requires: initscripts >= 9.03.31-2.el6_3.1 +@@ -127,6 +129,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 + Requires: logrotate < 3.8.0 + %endif + %else ++%if 0%{?fedora} >= 19 ++Requires: fence-agents-all ++%else ++Requires: fence-agents ++%endif + # Subprocess and thread bug was found on python 2.7.2 + Requires: python >= 2.7.3 + Requires: qemu-kvm >= 2:0.15.0-4 +@@ -156,7 +163,6 @@ Requires: systemd >= 197-1.fc18.2 + + Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client + Requires: psmisc >= 22.6-15 +-Requires: fence-agents + Requires: bridge-utils + Requires: sos + Requires: tree +-- +1.8.1.4 + diff --git a/sources b/sources index 0027272..d373508 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -55dae854f0d9d71ee791c0d7373ca7e9 vdsm-4.10.3-b005b54.tar.gz +6e181a25b2b4fc9e5f85faafc9d73aa1 vdsm-4.10.3.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 2d72259..2ff3e87 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -4,9 +4,9 @@ %global vdsm_reg vdsm-reg # Upstream git release -%global vdsm_release b005b54 -%global vdsm_relvtag .git%{vdsm_release} -%global vdsm_relttag -%{vdsm_release} +# % global vdsm_release gf2f6683 +# % global vdsm_relvtag .git%{vdsm_release} +# % global vdsm_relttag -%{vdsm_release} # Required users and groups %global vdsm_user vdsm @@ -32,7 +32,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 11%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -47,6 +47,48 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz +# ovirt-3.2 patches +Patch0: 0001-schema-Fix-schema-for-VM.updateDevice.patch +Patch1: 0002-schema-Missing-comment-for-new-VmDeviceType.patch +Patch2: 0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch +Patch3: 0004-caps.py-osversion-validate-OVIRT.patch +Patch4: 0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch +Patch5: 0006-Integrate-Smartcard-support.patch +Patch6: 0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch +Patch7: 0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch +Patch8: 0009-vdsm.spec-BuildRequires-python-pthreading.patch +Patch9: 0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch +Patch10: 0011-adding-getHardwareInfo-API-to-vdsm.patch +Patch11: 0012-Explicitly-shutdown-m2crypto-socket.patch +Patch12: 0013-spec-require-policycoreutils-and-skip-sebool-errors.patch +Patch13: 0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch +Patch14: 0015-vdsmd.service-require-either-ntpd-or-chronyd.patch +Patch15: 0016-isRunning-didn-t-check-local-variable-before-reading.patch +Patch16: 0017-udev-Race-fix-load-and-trigger-dev-rule.patch +Patch17: 0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch +Patch18: 0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch +Patch19: 0020-misc-rename-safelease-to-clusterlock.patch +Patch20: 0021-domain-select-the-cluster-lock-using-makeClusterLock.patch +Patch21: 0022-clusterlock-add-the-local-locking-implementation.patch +Patch22: 0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch +Patch23: 0024-vdsm.spec-Require-openssl.patch +Patch24: 0025-Fedora-18-require-a-newer-udev.patch +Patch25: 0026-fix-sloppy-backport-of-safelease-rename.patch +Patch26: 0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch +Patch27: 0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch +Patch28: 0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch +Patch29: 0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch +# This patch is not present in the upstream ovirt-3.2 branch and it was added to +# add a missing file in the base vdsm tar.gz +Patch30: 0031-packaging-add-load_needed_modules.py.in.patch +Patch31: 0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch +Patch32: 0033-gluster-Handling-Attribute-error-in-Python-2.6.patch +Patch33: 0034-bootstrap-remove-glusterfs-packages.patch +Patch34: 0035-gluster-set-glusterfs-dependency-version.patch +Patch35: 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch +Patch36: 0037-vdsm.spec-fence-agents-all.patch + + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -88,7 +130,7 @@ Requires: logrotate Requires: xz Requires: ntp Requires: iproute -Requires: python-ethtool >= 0.6-3 +Requires: python-ethtool Requires: rpm-python Requires: nfs-utils Requires: python-pthreading @@ -118,7 +160,7 @@ Requires: python # Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 -Requires: libvirt >= 0.9.10-21.el6_3.6 +Requires: libvirt >= 0.9.10-21.el6_3.5 Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 @@ -126,7 +168,7 @@ Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: mom >= 0.3.0 -Requires: selinux-policy-targeted >= 3.7.19-155 +Requires: selinux-policy-targeted >= 3.7.19-80 Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif @@ -147,10 +189,12 @@ Requires: selinux-policy-targeted >= 3.10.0-149 Requires: lvm2 >= 2.02.95 %endif -# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is -# disabled we now require the version 2.1.13-44 (or newer) of Fedora. %if 0%{?fedora} >= 18 -Requires: policycoreutils >= 2.1.13-44 +Requires: selinux-policy-targeted >= 3.11.1-71 +# In order to avoid a policycoreutils bug (rhbz 889698) when selinux is +# disabled we now require the version 2.1.13-55 (or newer) of Fedora. +Requires: policycoreutils >= 2.1.13-55 +Requires: systemd >= 197-1.fc18.2 %endif Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client @@ -223,6 +267,7 @@ BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: m2crypto +Requires: openssl %description reg VDSM registration package. Used to register a Linux host to a Virtualization @@ -331,11 +376,11 @@ If the nested virtualization is enabled in your kvm module this hook will expose it to the guests. %package hook-numa -Summary: NUMA support for VDSM +Summary: numa sopport for VDSM BuildArch: noarch %description hook-numa -Hooks is getting number/rage of NUMA nodes and NUMA mode, +Hooks is getting number/rage of numa nodes and numa mode, and update the VM xml. %package hook-pincpu @@ -416,7 +461,10 @@ Summary: Gluster Plugin for VDSM BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: glusterfs glusterfs-server glusterfs-fuse +Requires: glusterfs >= 3.4.0 +Requires: glusterfs-server +Requires: glusterfs-fuse +Requires: glusterfs-rdma %description gluster Gluster plugin enables VDSM to serve Gluster functionalities. @@ -424,6 +472,45 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +# ovirt-3.2 patches +%patch0 -p1 -b .patch0 +%patch1 -p1 -b .patch1 +%patch2 -p1 -b .patch2 +%patch3 -p1 -b .patch3 +%patch4 -p1 -b .patch4 +%patch5 -p1 -b .patch5 +%patch6 -p1 -b .patch6 +%patch7 -p1 -b .patch7 +%patch8 -p1 -b .patch8 +%patch9 -p1 -b .patch9 +%patch10 -p1 -b .patch10 +%patch11 -p1 -b .patch11 +%patch12 -p1 -b .patch12 +%patch13 -p1 -b .patch13 +%patch14 -p1 -b .patch14 +%patch15 -p1 -b .patch15 +%patch16 -p1 -b .patch16 +%patch17 -p1 -b .patch17 +%patch18 -p1 -b .patch18 +%patch19 -p1 -b .patch19 +%patch20 -p1 -b .patch20 +%patch21 -p1 -b .patch21 +%patch22 -p1 -b .patch22 +%patch23 -p1 -b .patch23 +%patch24 -p1 -b .patch24 +%patch25 -p1 -b .patch25 +%patch26 -p1 -b .patch26 +%patch27 -p1 -b .patch27 +%patch28 -p1 -b .patch28 +%patch29 -p1 -b .patch29 +%patch30 -p1 -b .patch30 +%patch31 -p1 -b .patch31 +%patch32 -p1 -b .patch32 +%patch33 -p1 -b .patch33 +%patch34 -p1 -b .patch34 +%patch35 -p1 -b .patch35 +%patch36 -p1 -b .patch36 + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -622,7 +709,7 @@ exit 0 %files %defattr(-, root, root, -) -%doc COPYING README vdsm/vdsm.conf.sample vdsm_api/vdsm-api.html +%doc COPYING README vdsm/vdsm.conf.sample %if 0%{?rhel} %{_initrddir}/vdsmd %else @@ -704,7 +791,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/resourceFactories.py* %{_datadir}/%{vdsm_name}/storage/remoteFileHandler.py* %{_datadir}/%{vdsm_name}/storage/resourceManager.py* -%{_datadir}/%{vdsm_name}/storage/safelease.py* +%{_datadir}/%{vdsm_name}/storage/clusterlock.py* %{_datadir}/%{vdsm_name}/storage/sdc.py* %{_datadir}/%{vdsm_name}/storage/sd.py* %{_datadir}/%{vdsm_name}/storage/securable.py* @@ -761,11 +848,6 @@ exit 0 %{_datadir}/%{vdsm_name}/neterrors.py* %{_datadir}/%{vdsm_name}/respawn %{_datadir}/%{vdsm_name}/set-conf-item -%dir %{_datadir}/%{vdsm_name}/gluster -%{_datadir}/%{vdsm_name}/gluster/__init__.py* -%{_datadir}/%{vdsm_name}/gluster/cli.py* -%{_datadir}/%{vdsm_name}/gluster/exception.py* -%{_datadir}/%{vdsm_name}/gluster/hostname.py* %{python_sitelib}/sos/plugins/vdsm.py* /lib/udev/rules.d/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -832,7 +914,6 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/route_info.out -%{_datadir}/%{vdsm_name}/tests/route_info_ppc64.out %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml @@ -1012,14 +1093,60 @@ exit 0 %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name}/gluster %doc COPYING +%{_datadir}/%{vdsm_name}/gluster/__init__.py* %{_datadir}/%{vdsm_name}/gluster/api.py* +%{_datadir}/%{vdsm_name}/gluster/cli.py* +%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog -* Fri Feb 15 2013 Fedora Release Engineering - 4.10.3-5.gitb005b54 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild +* Mon Mar 25 2013 Douglas Schilling Landgraf 4.10.3-11 +- adapt vdsm.spec to new fence-agents package name. -* Sun Jan 13 2013 Douglas Schilling Landgraf v4.10.3-78-gb005b54 -* v4.10.3-78-gb005b54 +* Thu Mar 14 2013 Federico Simoncelli 4.10.3-10 +- gluster: Handling Attribute error in Python 2.6 +- bootstrap: remove glusterfs packages +- gluster: set glusterfs dependency version +- Do not delete the template when zeroing a dependant + +* Wed Feb 27 2013 Federico Simoncelli 4.10.3-9 +- packaging: add load_needed_modules.py.in +- tool: _enable_bond_dev: reopen bonding_masters per bond + +* Tue Feb 19 2013 Federico Simoncelli 4.10.3-8 +- configNet: allow delete/update of devices with no ifcfg (#906383) +- Requires policycoreutils-2.1.13-55 to avoid another +- After fail to connect to supervdsm more than 3 time + +* Thu Feb 14 2013 Federico Simoncelli 4.10.3-7 +- Fedora 18: require a newer udev (applied properly to the fedora specfile) + +* Wed Jan 30 2013 Federico Simoncelli 4.10.3-6 +- Explicitly shutdown m2crypto socket +- spec: require policycoreutils and skip sebool errors +- spec: requires selinux-policy to avoid selinux failure +- vdsmd.service: require either ntpd or chronyd +- isRunning didn't check local variable before reading +- udev: Race fix- load and trigger dev rule (#891300) +- Change scsi_id command path to be configured at runtime (#886087) +- upgrade: force upgrade to v2 before upgrading to v3 (#893184) +- misc: rename safelease to clusterlock +- domain: select the cluster lock using makeClusterLock +- clusterlock: add the local locking implementation (#877715) +- upgrade: catch MetaDataKeyNotFoundError when preparing +- vdsm.spec: Require openssl (#905728) +- Fedora 18: require a newer udev +- fix sloppy backport of safelease rename +- removing the use of zombie reaper from supervdsm + +* Fri Jan 18 2013 Douglas Schilling Landgraf 4.10.3-5 +- Searching for both py and pyc file to start super vdsm +- adding getHardwareInfo API to vdsm + +* Tue Jan 15 2013 Douglas Schilling Landgraf 4.10.3-4 +- python-ordereddict only for rhel more then 7 +- dont require python ordereddict on fedora +- BuildRequires python-pthreading * Wed Jan 02 2013 Federico Simoncelli 4.10.3-3 - caps.py: osversion() validate OVIRT From b68c53f9ea0b62e170f0feb15152da710ff44a16 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 26 Mar 2013 09:44:30 -0400 Subject: [PATCH 036/126] Applying direct to spec the fence-agents change and removing the patch. --- 0037-vdsm.spec-fence-agents-all.patch | 59 --------------------------- vdsm.spec | 16 +++++--- 2 files changed, 11 insertions(+), 64 deletions(-) delete mode 100644 0037-vdsm.spec-fence-agents-all.patch diff --git a/0037-vdsm.spec-fence-agents-all.patch b/0037-vdsm.spec-fence-agents-all.patch deleted file mode 100644 index 398c464..0000000 --- a/0037-vdsm.spec-fence-agents-all.patch +++ /dev/null @@ -1,59 +0,0 @@ -From ed7c81971e539e0940d3ffdfe3f913ca99cde14d Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Fri, 22 Mar 2013 21:46:34 -0400 -Subject: [PATCH] vdsm.spec: fence-agents-all - -fence-agents package in version 4 replaced the package name -to fence-agents-all. This patch will adapt vdsm spec to this change. - -Change-Id: Ie4e92fda50aadb8223e721d72d43ea03b9b24f2d -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/13249 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index abfdbf9..3f7397a 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -101,6 +101,7 @@ Requires: dmidecode - ExclusiveArch: x86_64 - Requires: device-mapper-multipath - Requires: e2fsprogs -+Requires: fence-agents-all - Requires: iscsi-initiator-utils - Requires: libvirt - Requires: lvm2 -@@ -118,6 +119,7 @@ Requires: libvirt >= 0.10.2-18.el6_4.2 - Requires: iscsi-initiator-utils >= 6.2.0.872-15 - Requires: device-mapper-multipath >= 0.4.9-52 - Requires: e2fsprogs >= 1.41.12-11 -+Requires: fence-agents - Requires: kernel >= 2.6.32-279.9.1 - Requires: sanlock >= 2.3-4, sanlock-python - Requires: initscripts >= 9.03.31-2.el6_3.1 -@@ -127,6 +129,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 - Requires: logrotate < 3.8.0 - %endif - %else -+%if 0%{?fedora} >= 19 -+Requires: fence-agents-all -+%else -+Requires: fence-agents -+%endif - # Subprocess and thread bug was found on python 2.7.2 - Requires: python >= 2.7.3 - Requires: qemu-kvm >= 2:0.15.0-4 -@@ -156,7 +163,6 @@ Requires: systemd >= 197-1.fc18.2 - - Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client - Requires: psmisc >= 22.6-15 --Requires: fence-agents - Requires: bridge-utils - Requires: sos - Requires: tree --- -1.8.1.4 - diff --git a/vdsm.spec b/vdsm.spec index 2ff3e87..130bbde 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -32,7 +32,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 11%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 12%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -86,8 +86,6 @@ Patch32: 0033-gluster-Handling-Attribute-error-in-Python-2.6.patch Patch33: 0034-bootstrap-remove-glusterfs-packages.patch Patch34: 0035-gluster-set-glusterfs-dependency-version.patch Patch35: 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch -Patch36: 0037-vdsm.spec-fence-agents-all.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -147,6 +145,7 @@ Requires: dmidecode ExclusiveArch: x86_64 Requires: device-mapper-multipath Requires: e2fsprogs +Requires: fence-agents-all Requires: iscsi-initiator-utils Requires: libvirt Requires: lvm2 @@ -164,6 +163,7 @@ Requires: libvirt >= 0.9.10-21.el6_3.5 Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 +Requires: fence-agents Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 @@ -173,6 +173,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif %else +%if 0%{?fedora} >= 19 +Requires: fence-agents-all +%else +Requires: fence-agents +%endif # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 @@ -199,7 +204,6 @@ Requires: systemd >= 197-1.fc18.2 Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: psmisc >= 22.6-15 -Requires: fence-agents Requires: bridge-utils Requires: sos Requires: tree @@ -509,7 +513,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch33 -p1 -b .patch33 %patch34 -p1 -b .patch34 %patch35 -p1 -b .patch35 -%patch36 -p1 -b .patch36 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1100,6 +1103,9 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/hostname.py* %changelog +* Mon Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 +- Applying direct to spec the fence-agents changes and removing the patch. + * Mon Mar 25 2013 Douglas Schilling Landgraf 4.10.3-11 - adapt vdsm.spec to new fence-agents package name. From 775dac590ea3caba4ec51f961f1aa5b086e7625b Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 26 Mar 2013 10:27:24 -0400 Subject: [PATCH 037/126] Adding patch 037 to keep sources updated with Fedora spec during the build --- 0037-vdsm.spec-fence-agents-all.patch | 59 +++++++++++++++++++++++++++ vdsm.spec | 2 + 2 files changed, 61 insertions(+) create mode 100644 0037-vdsm.spec-fence-agents-all.patch diff --git a/0037-vdsm.spec-fence-agents-all.patch b/0037-vdsm.spec-fence-agents-all.patch new file mode 100644 index 0000000..e289335 --- /dev/null +++ b/0037-vdsm.spec-fence-agents-all.patch @@ -0,0 +1,59 @@ +From ed7c81971e539e0940d3ffdfe3f913ca99cde14d Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Fri, 22 Mar 2013 21:46:34 -0400 +Subject: [PATCH] vdsm.spec: fence-agents-all + +fence-agents package in version 4 replaced the package name +to fence-agents-all. This patch will adapt vdsm spec to this change. + +Change-Id: Ie4e92fda50aadb8223e721d72d43ea03b9b24f2d +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/13249 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index abfdbf9..3f7397a 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -101,6 +101,7 @@ Requires: dmidecode + ExclusiveArch: x86_64 + Requires: device-mapper-multipath + Requires: e2fsprogs ++Requires: fence-agents-all + Requires: iscsi-initiator-utils + Requires: libvirt + Requires: lvm2 +@@ -118,6 +119,7 @@ Requires: libvirt >= 0.10.2-18.el6_4.2 + Requires: iscsi-initiator-utils >= 6.2.0.872-15 + Requires: device-mapper-multipath >= 0.4.9-52 + Requires: e2fsprogs >= 1.41.12-11 ++Requires: fence-agents + Requires: kernel >= 2.6.32-279.9.1 + Requires: sanlock >= 2.3-4, sanlock-python + Requires: initscripts >= 9.03.31-2.el6_3.1 +@@ -127,6 +129,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 + Requires: logrotate < 3.8.0 + %endif + %else ++%if 0%{?fedora} >= 19 ++Requires: fence-agents-all ++%else ++Requires: fence-agents ++%endif + # Subprocess and thread bug was found on python 2.7.2 + Requires: python >= 2.7.3 + Requires: qemu-kvm >= 2:0.15.0-4 +@@ -156,7 +163,6 @@ Requires: systemd >= 197-1.fc18.2 + + Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client + Requires: psmisc >= 22.6-15 +-Requires: fence-agents + Requires: bridge-utils + Requires: sos + Requires: tree +-- +1.7.1 + diff --git a/vdsm.spec b/vdsm.spec index 130bbde..3137936 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -86,6 +86,7 @@ Patch32: 0033-gluster-Handling-Attribute-error-in-Python-2.6.patch Patch33: 0034-bootstrap-remove-glusterfs-packages.patch Patch34: 0035-gluster-set-glusterfs-dependency-version.patch Patch35: 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch +Patch36: 0037-vdsm.spec-fence-agents-all.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -513,6 +514,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch33 -p1 -b .patch33 %patch34 -p1 -b .patch34 %patch35 -p1 -b .patch35 +%patch36 -p1 -b .patch36 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in From fe637cd146340598157812e77f4efc4a7ca3a58c Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 3 Apr 2013 08:51:18 -0300 Subject: [PATCH 038/126] Temporarily deactivate Gluster sub-package. --- vdsm.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 3137936..722f49b 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -8,6 +8,9 @@ # % global vdsm_relvtag .git%{vdsm_release} # % global vdsm_relttag -%{vdsm_release} +# Gluster +%global with_gluster 0 + # Required users and groups %global vdsm_user vdsm %global vdsm_group kvm @@ -32,7 +35,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 12%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 13%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -461,6 +464,7 @@ BuildArch: noarch %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) +%if 0%{?with_gluster} %package gluster Summary: Gluster Plugin for VDSM BuildArch: noarch @@ -473,6 +477,7 @@ Requires: glusterfs-rdma %description gluster Gluster plugin enables VDSM to serve Gluster functionalities. +%endif %prep %setup -q @@ -920,8 +925,12 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/route_info.out %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out +%if 0%{?with_gluster} %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml +%else +%exclude %{_datadir}/%{vdsm_name}/tests/gluster* +%endif %{_datadir}/%{vdsm_name}/tests/functional/*.py* %files hook-vhostmd @@ -1094,6 +1103,7 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop/10_faqemu %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu +%if 0%{?with_gluster} %files gluster %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name}/gluster @@ -1103,8 +1113,14 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/cli.py* %{_datadir}/%{vdsm_name}/gluster/exception.py* %{_datadir}/%{vdsm_name}/gluster/hostname.py* +%else +%exclude %{_datadir}/%{vdsm_name}/gluster/* +%endif %changelog +* Wed Apr 3 2013 Douglas Schilling Landgraf 4.10.3-13 +- Temporarily deactivate Gluster sub-package. + * Mon Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 - Applying direct to spec the fence-agents changes and removing the patch. From 7fe9c509657955aafd9f82e65e65bb3c4afc6437 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 8 Apr 2013 17:59:00 +0200 Subject: [PATCH 039/126] update to vdsm-4.10.3-14 - fix storage.fuser - Bump up libvirt version to fix network linking. --- 0038-fix-storage.fuser.patch | 85 +++++++++++++++++++ ...bvirt-version-to-fix-network-linking.patch | 36 ++++++++ vdsm.spec | 12 ++- 3 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 0038-fix-storage.fuser.patch create mode 100644 0039-Bump-up-libvirt-version-to-fix-network-linking.patch diff --git a/0038-fix-storage.fuser.patch b/0038-fix-storage.fuser.patch new file mode 100644 index 0000000..7d2989e --- /dev/null +++ b/0038-fix-storage.fuser.patch @@ -0,0 +1,85 @@ +From af3c0b0472f443c5c21a169b166cc1ee294d1606 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Sun, 24 Mar 2013 12:05:23 +0200 +Subject: [PATCH 38/39] fix storage.fuser + +Bug-Url: https://bugzilla.redhat.com/922515 +Change-Id: Iabd58847db7090f83106d30a763d09c0a7b78741 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13302 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/13303 +Reviewed-by: Federico Simoncelli +--- + tests/Makefile.am | 1 + + tests/fuserTests.py | 31 +++++++++++++++++++++++++++++++ + vdsm/storage/fuser.py | 2 +- + 3 files changed, 33 insertions(+), 1 deletion(-) + create mode 100644 tests/fuserTests.py + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 8ad34e2..9aec750 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -27,6 +27,7 @@ test_modules = \ + capsTests.py \ + configNetworkTests.py \ + fileUtilTests.py \ ++ fuserTests.py \ + getAllVolumesTests.py \ + glusterTestData.py \ + gluster_cli_tests.py \ +diff --git a/tests/fuserTests.py b/tests/fuserTests.py +new file mode 100644 +index 0000000..7473dde +--- /dev/null ++++ b/tests/fuserTests.py +@@ -0,0 +1,31 @@ ++# ++# Copyright 2013 Red Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Refer to the README and COPYING files for full details of the license ++# ++ ++import os ++from storage import fuser ++ ++from testrunner import VdsmTestCase ++ ++ ++class TestFuser(VdsmTestCase): ++ ++ def testSelfExe(self): ++ pid = os.getpid() ++ self.assertTrue(pid in fuser.fuser('/proc/%s/exe' % pid)) +diff --git a/vdsm/storage/fuser.py b/vdsm/storage/fuser.py +index d9becbc..135dad6 100644 +--- a/vdsm/storage/fuser.py ++++ b/vdsm/storage/fuser.py +@@ -27,7 +27,7 @@ def fuser(path, mountPoint=False): + cmd.append("-m") + + cmd.append(path) +- (rc, out, err) = misc.execCmd(cmd, sudo=True) ++ (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=True) + if rc != 0: + return [] + +-- +1.8.1.4 + diff --git a/0039-Bump-up-libvirt-version-to-fix-network-linking.patch b/0039-Bump-up-libvirt-version-to-fix-network-linking.patch new file mode 100644 index 0000000..455971f --- /dev/null +++ b/0039-Bump-up-libvirt-version-to-fix-network-linking.patch @@ -0,0 +1,36 @@ +From 3a99d6d89d9f978052baee3c27fb58316f12b863 Mon Sep 17 00:00:00 2001 +From: "Antoni S. Puimedon" +Date: Thu, 31 Jan 2013 17:32:07 +0100 +Subject: [PATCH 39/39] Bump up libvirt version to fix network linking. + +The libvirt feature leveraged for the Network linking feature had +a bug that made it fail when the vnic had a bootorder set. See +https://bugzilla.redhat.com/906446 . This was solved and has been marked +for backport (which did not yet happen) for the version this patch +sets). + +Change-Id: Ib9e96eb0192fbea35d2723cafbec145b629371fa +Signed-off-by: Antoni S. Puimedon +Reviewed-on: http://gerrit.ovirt.org/11600 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm.spec.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 60e76e5..14922e0 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -119,7 +119,7 @@ Requires: logrotate < 3.8.0 + Requires: python >= 2.7.3 + Requires: qemu-kvm >= 2:0.15.0-4 + Requires: qemu-img >= 2:0.15.0-4 +-Requires: libvirt >= 0.10.1-1 ++Requires: libvirt >= 0.10.2.4-1 + Requires: iscsi-initiator-utils >= 6.2.0.872-14 + Requires: device-mapper-multipath >= 0.4.9-18 + Requires: e2fsprogs >= 1.41.14 +-- +1.8.1.4 + diff --git a/vdsm.spec b/vdsm.spec index 722f49b..473729a 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -35,7 +35,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 13%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 14%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -90,6 +90,8 @@ Patch33: 0034-bootstrap-remove-glusterfs-packages.patch Patch34: 0035-gluster-set-glusterfs-dependency-version.patch Patch35: 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch Patch36: 0037-vdsm.spec-fence-agents-all.patch +Patch37: 0038-fix-storage.fuser.patch +Patch38: 0039-Bump-up-libvirt-version-to-fix-network-linking.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -186,7 +188,7 @@ Requires: fence-agents Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 -Requires: libvirt >= 0.10.1-1 +Requires: libvirt >= 0.10.2.4-1 Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 @@ -520,6 +522,8 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch34 -p1 -b .patch34 %patch35 -p1 -b .patch35 %patch36 -p1 -b .patch36 +%patch37 -p1 -b .patch37 +%patch38 -p1 -b .patch38 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1118,6 +1122,10 @@ exit 0 %endif %changelog +* Mon Apr 8 2013 Federico Simoncelli 4.10.3-14 +- fix storage.fuser +- Bump up libvirt version to fix network linking. + * Wed Apr 3 2013 Douglas Schilling Landgraf 4.10.3-13 - Temporarily deactivate Gluster sub-package. From e80a7f26a803609f15a5a488552cd0e8293e51db Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 9 Apr 2013 14:26:02 +0200 Subject: [PATCH 040/126] update to vdsm-4.10.3-15 - fix the patches backported to ovirt-3.2 - resync the fedora spec file with the upstream one --- 0037-vdsm.spec-fence-agents-all.patch | 28 +++++----- 0040-vdsm.spec.in-with_gluster.patch | 80 +++++++++++++++++++++++++++ vdsm.spec | 8 ++- 3 files changed, 101 insertions(+), 15 deletions(-) create mode 100644 0040-vdsm.spec.in-with_gluster.patch diff --git a/0037-vdsm.spec-fence-agents-all.patch b/0037-vdsm.spec-fence-agents-all.patch index e289335..3229616 100644 --- a/0037-vdsm.spec-fence-agents-all.patch +++ b/0037-vdsm.spec-fence-agents-all.patch @@ -1,24 +1,24 @@ -From ed7c81971e539e0940d3ffdfe3f913ca99cde14d Mon Sep 17 00:00:00 2001 +From b5cba4b364912710ab5718b2a8370305dcc90016 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf -Date: Fri, 22 Mar 2013 21:46:34 -0400 -Subject: [PATCH] vdsm.spec: fence-agents-all +Date: Mon, 8 Apr 2013 16:09:55 -0400 +Subject: [PATCH 37/38] vdsm.spec: fence-agents-all fence-agents package in version 4 replaced the package name to fence-agents-all. This patch will adapt vdsm spec to this change. -Change-Id: Ie4e92fda50aadb8223e721d72d43ea03b9b24f2d +Change-Id: Ia7933fd043e535b568ce368e8e61f44e330b25ae Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/13249 -Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13729 +Reviewed-by: Federico Simoncelli --- - vdsm.spec.in | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + vdsm.spec.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vdsm.spec.in b/vdsm.spec.in -index abfdbf9..3f7397a 100644 +index 14922e0..a00e989 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in -@@ -101,6 +101,7 @@ Requires: dmidecode +@@ -89,6 +89,7 @@ Requires: dmidecode ExclusiveArch: x86_64 Requires: device-mapper-multipath Requires: e2fsprogs @@ -26,7 +26,7 @@ index abfdbf9..3f7397a 100644 Requires: iscsi-initiator-utils Requires: libvirt Requires: lvm2 -@@ -118,6 +119,7 @@ Requires: libvirt >= 0.10.2-18.el6_4.2 +@@ -106,6 +107,7 @@ Requires: libvirt >= 0.9.10-21.el6_3.5 Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 @@ -34,7 +34,7 @@ index abfdbf9..3f7397a 100644 Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 -@@ -127,6 +129,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 +@@ -115,6 +117,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif %else @@ -46,7 +46,7 @@ index abfdbf9..3f7397a 100644 # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 -@@ -156,7 +163,6 @@ Requires: systemd >= 197-1.fc18.2 +@@ -141,7 +148,6 @@ Requires: systemd >= 197-1.fc18.2 Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: psmisc >= 22.6-15 @@ -55,5 +55,5 @@ index abfdbf9..3f7397a 100644 Requires: sos Requires: tree -- -1.7.1 +1.8.1.4 diff --git a/0040-vdsm.spec.in-with_gluster.patch b/0040-vdsm.spec.in-with_gluster.patch new file mode 100644 index 0000000..6e19f2a --- /dev/null +++ b/0040-vdsm.spec.in-with_gluster.patch @@ -0,0 +1,80 @@ +From 529d7816dc1b5959a446ebef393dca154d6e4364 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 8 Apr 2013 18:17:13 -0400 +Subject: [PATCH] vdsm.spec.in: with_gluster + +Option to manage Gluster sub-package. + +Change-Id: I925c1b12f0447798eaae6da72d726bc007511e1c +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/13731 +Reviewed-by: Federico Simoncelli +--- + vdsm.spec.in | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index a00e989..4bc4c6e 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -3,6 +3,9 @@ + %global vdsm_bootstrap vdsm-bootstrap + %global vdsm_reg vdsm-reg + ++# Gluster ++%global with_gluster 1 ++ + # Required users and groups + %global vdsm_user @VDSMUSER@ + %global vdsm_group @VDSMGROUP@ +@@ -403,6 +406,7 @@ BuildArch: noarch + %description hook-vmdisk + Hook adds additional disk image for a VM (raw or qcow2) + ++%if 0%{?with_gluster} + %package gluster + Summary: Gluster Plugin for VDSM + BuildArch: noarch +@@ -415,6 +419,7 @@ Requires: glusterfs-rdma + + %description gluster + Gluster plugin enables VDSM to serve Gluster functionalities. ++%endif + + %prep + %setup -q +@@ -820,8 +825,12 @@ exit 0 + %{_datadir}/%{vdsm_name}/tests/run_tests.sh + %{_datadir}/%{vdsm_name}/tests/route_info.out + %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out ++%if 0%{?with_gluster} + %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml + %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml ++%else ++%exclude %{_datadir}/%{vdsm_name}/tests/gluster* ++%endif + %{_datadir}/%{vdsm_name}/tests/functional/*.py* + + %files hook-vhostmd +@@ -994,6 +1003,7 @@ exit 0 + %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop/10_faqemu + %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu + ++%if 0%{?with_gluster} + %files gluster + %defattr(-, root, root, -) + %dir %{_datadir}/%{vdsm_name}/gluster +@@ -1003,6 +1013,10 @@ exit 0 + %{_datadir}/%{vdsm_name}/gluster/cli.py* + %{_datadir}/%{vdsm_name}/gluster/exception.py* + %{_datadir}/%{vdsm_name}/gluster/hostname.py* ++%else ++%exclude %{_datadir}/%{vdsm_name}/gluster/* ++%endif ++ + + %changelog + * Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 +-- +1.8.1.4 + diff --git a/vdsm.spec b/vdsm.spec index 473729a..3821c03 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -35,7 +35,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 14%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 15%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -92,6 +92,7 @@ Patch35: 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch Patch36: 0037-vdsm.spec-fence-agents-all.patch Patch37: 0038-fix-storage.fuser.patch Patch38: 0039-Bump-up-libvirt-version-to-fix-network-linking.patch +Patch39: 0040-vdsm.spec.in-with_gluster.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -524,6 +525,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch36 -p1 -b .patch36 %patch37 -p1 -b .patch37 %patch38 -p1 -b .patch38 +%patch39 -p1 -b .patch39 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1122,6 +1124,10 @@ exit 0 %endif %changelog +* Tue Apr 9 2013 Federico Simoncelli 4.10.3-15 +- fix the patches backported to ovirt-3.2 +- resync the fedora spec file with the upstream one + * Mon Apr 8 2013 Federico Simoncelli 4.10.3-14 - fix storage.fuser - Bump up libvirt version to fix network linking. From 205ef3f211be1cffe0120f0efef9c8a2e633fbdb Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Wed, 24 Apr 2013 18:07:06 +0200 Subject: [PATCH 041/126] update to vdsm-4.10.3-16 - Don't user sudo in fuser - svdsm: fix fuser import in supervdsmServer - Removing vdsm configuration when removing vdsm service - Seperating supervdsm log to supervdsm.log file - vdsm.spec: Adding with_systemd macro - spec: use the fedora systemd macros - spec: enable gluster upstream and on fedora 19 --- 0041-Don-t-user-sudo-in-fuser.patch | 94 ++++++++ ...-fix-fuser-import-in-supervdsmServer.patch | 31 +++ ...nfiguration-when-removing-vdsm-servi.patch | 62 +++++ ...-supervdsm-log-to-supervdsm.log-file.patch | 144 +++++++++++ ...-vdsm.spec-Adding-with_systemd-macro.patch | 124 ++++++++++ 0046-spec-use-the-fedora-systemd-macros.patch | 140 +++++++++++ ...le-gluster-upstream-and-on-fedora-19.patch | 64 +++++ vdsm.spec | 227 ++++++++++++------ 8 files changed, 807 insertions(+), 79 deletions(-) create mode 100644 0041-Don-t-user-sudo-in-fuser.patch create mode 100644 0042-svdsm-fix-fuser-import-in-supervdsmServer.patch create mode 100644 0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch create mode 100644 0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch create mode 100644 0045-vdsm.spec-Adding-with_systemd-macro.patch create mode 100644 0046-spec-use-the-fedora-systemd-macros.patch create mode 100644 0047-spec-enable-gluster-upstream-and-on-fedora-19.patch diff --git a/0041-Don-t-user-sudo-in-fuser.patch b/0041-Don-t-user-sudo-in-fuser.patch new file mode 100644 index 0000000..7dc6d32 --- /dev/null +++ b/0041-Don-t-user-sudo-in-fuser.patch @@ -0,0 +1,94 @@ +From 1576791841cdb21c95bea65f214c333cb4c188ac Mon Sep 17 00:00:00 2001 +From: Saggi Mizrahi +Date: Wed, 10 Apr 2013 10:56:01 +0300 +Subject: [PATCH 41/47] Don't user sudo in fuser + +Change-Id: I74842ffda1bc1d5ebb54de5e1933fedd851e745b +Signed-off-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/13779 +Reviewed-by: Dan Kenigsberg +Tested-by: Antoni Segura Puimedon +Reviewed-on: http://gerrit.ovirt.org/13810 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/storage/blockSD.py | 5 +++-- + vdsm/storage/fuser.py | 2 +- + vdsm/sudoers.vdsm.in | 1 - + vdsm/supervdsmServer.py | 5 +++++ + 4 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py +index e66256d..e22a1e2 100644 +--- a/vdsm/storage/blockSD.py ++++ b/vdsm/storage/blockSD.py +@@ -48,7 +48,7 @@ import storage_exception as se + from storage_mailbox import MAILBOX_SIZE + import resourceManager as rm + import mount +-from fuser import fuser ++import supervdsm as svdsm + + STORAGE_DOMAIN_TAG = "RHAT_storage_domain" + STORAGE_UNREADY_DOMAIN_TAG = STORAGE_DOMAIN_TAG + "_UNREADY" +@@ -1122,7 +1122,8 @@ class BlockStorageDomain(sd.StorageDomain): + masterMount.umount() + except mount.MountError: + # umount failed, try to kill that processes holding mount point +- pids = fuser(masterMount.fs_file, mountPoint=True) ++ svdsmp = svdsm.getProxy() ++ pids = svdsmp.fuser(masterMount.fs_file, mountPoint=True) + + # It was unmounted while I was checking no need to do anything + if not masterMount.isMounted(): +diff --git a/vdsm/storage/fuser.py b/vdsm/storage/fuser.py +index 135dad6..0f235ee 100644 +--- a/vdsm/storage/fuser.py ++++ b/vdsm/storage/fuser.py +@@ -27,7 +27,7 @@ def fuser(path, mountPoint=False): + cmd.append("-m") + + cmd.append(path) +- (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=True) ++ (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=False) + if rc != 0: + return [] + +diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in +index 4fc75f9..70628f8 100644 +--- a/vdsm/sudoers.vdsm.in ++++ b/vdsm/sudoers.vdsm.in +@@ -12,7 +12,6 @@ Cmnd_Alias VDSM_STORAGE = @MOUNT_PATH@, @UMOUNT_PATH@, \ + @FSCK_PATH@ -p *, \ + @TUNE2FS_PATH@ -j *, \ + @MKFS_PATH@ -q -j *, \ +- @FUSER_PATH@ -m *, \ + @KILL_PATH@, \ + @CHOWN_PATH@ @VDSMUSER@\:@QEMUGROUP@ *, \ + @CHOWN_PATH@ @METADATAUSER@\:@METADATAGROUP@ *, \ +diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py +index 21e7c94..3f7ce1c 100755 +--- a/vdsm/supervdsmServer.py ++++ b/vdsm/supervdsmServer.py +@@ -26,6 +26,7 @@ import stat + import errno + import threading + import re ++import fuser + from time import sleep + import signal + from multiprocessing import Pipe, Process +@@ -307,6 +308,10 @@ class _SuperVdsm(object): + def removeFs(self, path): + return mkimage.removeFs(path) + ++ @logDecorator ++ def fuser(self, *args): ++ return fuser.fuser(*args) ++ + def __udevReloadRules(self, guid): + if self.__udevOperationReload(): + reload = "--reload" +-- +1.8.1.4 + diff --git a/0042-svdsm-fix-fuser-import-in-supervdsmServer.patch b/0042-svdsm-fix-fuser-import-in-supervdsmServer.patch new file mode 100644 index 0000000..06dd3c4 --- /dev/null +++ b/0042-svdsm-fix-fuser-import-in-supervdsmServer.patch @@ -0,0 +1,31 @@ +From acd99086f6f7d0b2f94065806be6faaee0f41f46 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Thu, 11 Apr 2013 05:15:56 -0400 +Subject: [PATCH 42/47] svdsm: fix fuser import in supervdsmServer + +Change-Id: I319a96e1357b5ed47ef5b6bcf3dec0ce678b9748 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/13804 +Reviewed-by: Yaniv Bronhaim +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13811 +--- + vdsm/supervdsmServer.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py +index 3f7ce1c..949a7cc 100755 +--- a/vdsm/supervdsmServer.py ++++ b/vdsm/supervdsmServer.py +@@ -26,7 +26,7 @@ import stat + import errno + import threading + import re +-import fuser ++from storage import fuser + from time import sleep + import signal + from multiprocessing import Pipe, Process +-- +1.8.1.4 + diff --git a/0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch b/0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch new file mode 100644 index 0000000..0536202 --- /dev/null +++ b/0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch @@ -0,0 +1,62 @@ +From b7743c5593b72d1e669a8ace7a5a657fb9eb8643 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Thu, 7 Feb 2013 11:00:03 +0200 +Subject: [PATCH 43/47] Removing vdsm configuration when removing vdsm service + +Before we removed that section only over rhel and we looked for the +wrong string. This patch adds sed command for both dist with the current +string that is written by vdsmd init script. + +Change-Id: Ia8f59375e20efa6b5de8483a12a772f5f0ce3749 +Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=902346 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/11295 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/13812 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm.spec.in | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 4bc4c6e..f8a2924 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -529,18 +529,26 @@ exit 0 + %endif + + %preun ++if [ "$1" -eq 0 ]; then ++ start_conf_section="## beginning of configuration section by vdsm" ++ end_conf_section="## end of configuration section by vdsm" ++ by_vdsm="by vdsm" ++ ++ /bin/sed -i -e "/${start_conf_section}/,/${end_conf_section}/d" \ ++ -e "/${by_vdsm}/d" \ ++ %{_sysconfdir}/libvirt/libvirtd.conf \ ++ %{_sysconfdir}/libvirt/qemu.conf \ ++ %{_sysconfdir}/sysconfig/libvirtd \ ++ %{_sysconfdir}/sysctl.conf \ ++ %{_sysconfdir}/libvirt/qemu-sanlock.conf ++fi ++ + %if 0%{?rhel} + if [ "$1" -eq 0 ] + then + /sbin/service vdsmd stop > /dev/null 2>&1 || : + /sbin/chkconfig --del vdsmd + +- /bin/sed -i '/# by vdsm$/d' \ +- /etc/libvirt/libvirtd.conf \ +- /etc/libvirt/qemu.conf \ +- /etc/sysconfig/libvirtd \ +- /etc/sysctl.conf +- + /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ + /etc/sysctl.conf + +-- +1.8.1.4 + diff --git a/0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch b/0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch new file mode 100644 index 0000000..6dd59f7 --- /dev/null +++ b/0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch @@ -0,0 +1,144 @@ +From baf505e8698f38fdeeb152ffe1d4377f94a39231 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Wed, 17 Apr 2013 09:44:40 +0300 +Subject: [PATCH 44/47] Seperating supervdsm log to supervdsm.log file + +Supervdsm as root process can change the logfile ownership +to root when creating the file. Manual deletion of vdsm.log can cause +this scenario. + +Change-Id: I2e5fb4a2cd5421671f942120b6718c1bb20b9e60 +Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=912308 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: https://gerrit.eng.lab.tlv.redhat.com/7190 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13964 +--- + vdsm.spec.in | 1 + + vdsm/Makefile.am | 5 +++++ + vdsm/logger.conf.in | 8 +------- + vdsm/supervdsmServer.py | 2 +- + vdsm/svdsm.logger.conf.in | 29 +++++++++++++++++++++++++++++ + 6 files changed, 38 insertions(+), 8 deletions(-) + create mode 100644 vdsm/svdsm.logger.conf.in + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index f8a2924..0120c3e 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -668,6 +668,7 @@ exit 0 + %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/dummybr.py* + %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py* + %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf ++%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf + %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf + %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.policy + %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm +diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am +index 88b3287..382eaf5 100644 +--- a/vdsm/Makefile.am ++++ b/vdsm/Makefile.am +@@ -86,6 +86,7 @@ nodist_vdsm_SCRIPTS = \ + + nodist_noinst_DATA = \ + logger.conf \ ++ svdsm.logger.conf \ + mom.conf \ + sudoers.vdsm \ + vdsm-logrotate.conf \ +@@ -124,6 +125,7 @@ EXTRA_DIST = \ + libvirt_password \ + limits.conf \ + logger.conf.in \ ++ svdsm.logger.conf.in \ + mk_sysprep_floppy.in \ + mom.conf.in \ + mom.policy \ +@@ -188,9 +190,12 @@ uninstall-local: \ + install-data-logger: + $(MKDIR_P) $(DESTDIR)$(vdsmconfdir) + $(INSTALL_DATA) logger.conf $(DESTDIR)$(vdsmconfdir)/logger.conf ++ $(INSTALL_DATA) svdsm.logger.conf \ ++ $(DESTDIR)$(vdsmconfdir)/svdsm.logger.conf + + uninstall-data-logger: + $(RM) $(DESTDIR)$(vdsmconfdir)/logger.conf ++ $(RM) $(DESTDIR)$(vdsmconfdir)/svdsm.logger.conf + + install-data-libvirtpass: + $(MKDIR_P) $(DESTDIR)$(vdsmtsdir)/keys +diff --git a/vdsm/logger.conf.in b/vdsm/logger.conf.in +index edd4616..0a4622f 100644 +--- a/vdsm/logger.conf.in ++++ b/vdsm/logger.conf.in +@@ -1,5 +1,5 @@ + [loggers] +-keys=root,vds,Storage,metadata,SuperVdsm ++keys=root,vds,Storage,metadata + + [handlers] + keys=console,syslog,logfile,metadata +@@ -24,12 +24,6 @@ handlers=syslog,logfile + qualname=Storage + propagate=0 + +-[logger_SuperVdsm] +-level=DEBUG +-handlers=syslog,logfile +-qualname=SuperVdsm +-propagate=0 +- + [logger_metadata] + level=WARNING + handlers=metadata +diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py +index 949a7cc..db6b778 100755 +--- a/vdsm/supervdsmServer.py ++++ b/vdsm/supervdsmServer.py +@@ -84,7 +84,7 @@ def logDecorator(func): + + KB = 2 ** 10 + TEST_BUFF_LEN = 4 * KB +-LOG_CONF_PATH = "/etc/vdsm/logger.conf" ++LOG_CONF_PATH = "/etc/vdsm/svdsm.logger.conf" + + + class _SuperVdsm(object): +diff --git a/vdsm/svdsm.logger.conf.in b/vdsm/svdsm.logger.conf.in +new file mode 100644 +index 0000000..3728170 +--- /dev/null ++++ b/vdsm/svdsm.logger.conf.in +@@ -0,0 +1,29 @@ ++[loggers] ++keys=root,SuperVdsm ++ ++[handlers] ++keys=logfile ++ ++[formatters] ++keys=long ++ ++[logger_root] ++level=DEBUG ++handlers=logfile ++propagate=0 ++ ++[logger_SuperVdsm] ++level=DEBUG ++handlers=logfile ++qualname=SuperVdsm ++propagate=0 ++ ++[handler_logfile] ++class=logging.handlers.WatchedFileHandler ++args=('@VDSMLOGDIR@/supervdsm.log',) ++filters=storage.misc.TracebackRepeatFilter ++level=DEBUG ++formatter=long ++ ++[formatter_long] ++format: %(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s) %(message)s +-- +1.8.1.4 + diff --git a/0045-vdsm.spec-Adding-with_systemd-macro.patch b/0045-vdsm.spec-Adding-with_systemd-macro.patch new file mode 100644 index 0000000..059adcc --- /dev/null +++ b/0045-vdsm.spec-Adding-with_systemd-macro.patch @@ -0,0 +1,124 @@ +From 20becc2c3174ab500f4bce4f75a9604de30c9c35 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 4 Mar 2013 16:18:24 -0500 +Subject: [PATCH 45/47] vdsm.spec: Adding with_systemd macro + +This patch adds the macro with_systemd which can be used +to validate if the system uses Systemd. + +Change-Id: Ibcd8567868e16453ed6633f143a6b1fff8e9c454 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/12086 +Tested-by: oVirt Jenkins CI Server +Reviewed-by: Vinzenz Feenstra +Reviewed-by: Yaniv Bronhaim +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13814 +Reviewed-by: Federico Simoncelli +--- + vdsm.spec.in | 45 ++++++++++++++++++++++++++++++--------------- + 1 file changed, 30 insertions(+), 15 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 0120c3e..d7944cb 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -20,6 +20,15 @@ + %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d + %endif + ++# Systemd macro ++%if 0%{?fedora} >= 15 ++%global with_systemd 1 ++%endif ++ ++%if 0%{?rhel} >= 7 ++%global with_systemd 1 ++%endif ++ + # Default to skipping autoreconf. Distros can change just this one line + # (or provide a command-line override) if they backport any patches that + # touch configure.ac or Makefile.am. +@@ -66,6 +75,9 @@ BuildRequires: libtool + %if !0%{?rhel} + BuildRequires: pyflakes + BuildRequires: python-pep8 ++%endif ++ ++%if 0%{?with_systemd} + BuildRequires: systemd-units + %endif + +@@ -454,11 +466,21 @@ install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ + install -Dm 0644 vdsm/limits.conf \ + %{buildroot}/etc/security/limits.d/99-vdsm.conf + +-%if 0%{?rhel} ++%if 0%{?with_systemd} ++# Install the systemd scripts ++install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd ++install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service ++install -Dm 0755 vdsm_reg/vdsm-reg.init \ ++ %{buildroot}/lib/systemd/systemd-vdsm-reg ++install -Dm 0644 vdsm_reg/vdsm-reg.service \ ++ %{buildroot}%{_unitdir}/vdsm-reg.service ++%else + # Install the SysV init scripts + install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd + install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg ++%endif + ++%if 0%{?rhel} + # This is not commonplace, but we want /var/log/core to be a world-writable + # dropbox for core dumps + install -dDm 1777 %{buildroot}%{_localstatedir}/log/core +@@ -467,14 +489,6 @@ install -dDm 1777 %{buildroot}%{_localstatedir}/log/core + install -Dm 0644 vdsm/vdsm.conf.sample \ + %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf + +-# Install the systemd scripts +-install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd +-install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +-install -Dm 0755 vdsm_reg/vdsm-reg.init \ +- %{buildroot}/lib/systemd/systemd-vdsm-reg +-install -Dm 0644 vdsm_reg/vdsm-reg.service \ +- %{buildroot}%{_unitdir}/vdsm-reg.service +- + # Install the polkit for libvirt + %if 0%{?fedora} >= 18 + install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ +@@ -628,12 +642,13 @@ exit 0 + %files + %defattr(-, root, root, -) + %doc COPYING README vdsm/vdsm.conf.sample +-%if 0%{?rhel} +-%{_initrddir}/vdsmd +-%else ++%if 0%{?with_systemd} + /lib/systemd/systemd-vdsmd + %{_unitdir}/vdsmd.service ++%else ++%{_initrddir}/vdsmd + %endif ++ + %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ + %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks + %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt +@@ -981,11 +996,11 @@ exit 0 + %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf + %ghost %dir /data + %ghost %dir %attr(0775, root, root) /data/updates +-%if 0%{?rhel} +-%{_initrddir}/vdsm-reg +-%else ++%if 0%{?with_systemd} + /lib/systemd/systemd-vdsm-reg + %{_unitdir}/vdsm-reg.service ++%else ++%{_initrddir}/vdsm-reg + %endif + %{_datadir}/%{vdsm_reg}/vdsm-reg-setup + %{_datadir}/%{vdsm_reg}/vdsm-complete +-- +1.8.1.4 + diff --git a/0046-spec-use-the-fedora-systemd-macros.patch b/0046-spec-use-the-fedora-systemd-macros.patch new file mode 100644 index 0000000..b130923 --- /dev/null +++ b/0046-spec-use-the-fedora-systemd-macros.patch @@ -0,0 +1,140 @@ +From d848def9d4e011c234675130c9588c86e6f6a411 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Thu, 21 Feb 2013 09:22:01 -0500 +Subject: [PATCH 46/47] spec: use the fedora systemd macros + +Add the support for the fedora systemd macros introduced in fedora 18. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=850412 +Change-Id: I76857a6b9ae1a945511f359333735b9497c5e2b0 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/12285 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13815 +Tested-by: Douglas Schilling Landgraf +Reviewed-by: Yaniv Bronhaim +--- + vdsm.spec.in | 33 ++++++++++++++++++++++++++------- + 1 file changed, 26 insertions(+), 7 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index d7944cb..e8f4876 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -3,9 +3,6 @@ + %global vdsm_bootstrap vdsm-bootstrap + %global vdsm_reg vdsm-reg + +-# Gluster +-%global with_gluster 1 +- + # Required users and groups + %global vdsm_user @VDSMUSER@ + %global vdsm_group @VDSMGROUP@ +@@ -20,13 +17,15 @@ + %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d + %endif + +-# Systemd macro +-%if 0%{?fedora} >= 15 ++# Gluster ++%global with_gluster 1 ++ ++%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 + %global with_systemd 1 + %endif + +-%if 0%{?rhel} >= 7 +-%global with_systemd 1 ++%if 0%{?fedora} >= 18 ++%global with_systemd_macros 1 + %endif + + # Default to skipping autoreconf. Distros can change just this one line +@@ -535,12 +534,16 @@ if [ "$1" -eq 1 ] ; then + /sbin/chkconfig --add vdsmd + fi + %else ++%if 0%{?with_systemd_macros} ++%systemd_post vdsmd.service ++%else + if [ "$1" -eq 1 ] ; then + /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + fi + exit 0 + %endif ++%endif + + %preun + if [ "$1" -eq 0 ]; then +@@ -579,12 +582,16 @@ then + fi + fi + %else ++%if 0%{?with_systemd_macros} ++%systemd_preun vdsmd.service ++%else + if [ "$1" -eq 0 ]; then + /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : + /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : + fi + exit 0 + %endif ++%endif + + %postun + %if 0%{?rhel} +@@ -593,11 +600,15 @@ if [ "$1" -ge 1 ]; then + fi + exit 0 + %else ++%if 0%{?with_systemd_macros} ++%systemd_postun_with_restart vdsmd.service ++%else + if [ "$1" -ge 1 ] ; then + /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : + fi + exit 0 + %endif ++%endif + + %if 0%{?rhel} + %triggerun -- libvirt +@@ -617,12 +628,16 @@ if [ "$1" -eq 1 ] ; then + /sbin/chkconfig --add vdsm-reg + fi + %else ++%if 0%{?with_systemd_macros} ++%systemd_post vdsm-reg.service ++%else + if [ "$1" -eq 1 ] ; then + /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || : + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + fi + exit 0 + %endif ++%endif + + %preun reg + %if 0%{?rhel} +@@ -632,12 +647,16 @@ then + /sbin/chkconfig --del vdsm-reg + fi + %else ++%if 0%{?with_systemd_macros} ++%systemd_preun vdsm-reg.service ++%else + if [ "$1" -eq 0 ]; then + /bin/systemctl --no-reload disable vdsm-reg.service > /dev/null 2>&1 || : + /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1 || : + fi + exit 0 + %endif ++%endif + + %files + %defattr(-, root, root, -) +-- +1.8.1.4 + diff --git a/0047-spec-enable-gluster-upstream-and-on-fedora-19.patch b/0047-spec-enable-gluster-upstream-and-on-fedora-19.patch new file mode 100644 index 0000000..258f1f5 --- /dev/null +++ b/0047-spec-enable-gluster-upstream-and-on-fedora-19.patch @@ -0,0 +1,64 @@ +From 7fd5b70e91f59d396da79b44ae1dc6edba2c7d49 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Wed, 10 Apr 2013 11:41:06 -0400 +Subject: [PATCH 47/47] spec: enable gluster upstream and on fedora 19 + +The gluster package should be always enabled upstream or since fedora 19 +in koji builds. + +Change-Id: I68436bf10cecdaea8b3ce6c95797aac4895ec482 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/13791 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/13816 +Reviewed-by: Yaniv Bronhaim +Tested-by: Douglas Schilling Landgraf +--- + vdsm.spec.in | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index e8f4876..9a44260 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -10,6 +10,14 @@ + %global snlk_group @SNLKGROUP@ + %global snlk_user @SNLKUSER@ + ++# Fedora official build ++%global fedora_koji_build 0 ++ ++# Default to skipping autoreconf. Distros can change just this one line ++# (or provide a command-line override) if they backport any patches that ++# touch configure.ac or Makefile.am. ++%{!?enable_autotools:%define enable_autotools 0} ++ + # Required paths + %if 0%{?fedora} >= 18 + %global _polkitdir %{_datadir}/polkit-1/rules.d +@@ -17,8 +25,9 @@ + %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d + %endif + +-# Gluster ++%if !0%{fedora_koji_build} || 0%{?fedora} >= 19 + %global with_gluster 1 ++%endif + + %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 + %global with_systemd 1 +@@ -28,11 +37,6 @@ + %global with_systemd_macros 1 + %endif + +-# Default to skipping autoreconf. Distros can change just this one line +-# (or provide a command-line override) if they backport any patches that +-# touch configure.ac or Makefile.am. +-%{!?enable_autotools:%define enable_autotools 0} +- + Name: %{vdsm_name} + Version: @PACKAGE_VERSION@ + Release: @PACKAGE_RELEASE@%{?dist}%{?extra_release} +-- +1.8.1.4 + diff --git a/vdsm.spec b/vdsm.spec index 3821c03..7a37557 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -3,14 +3,6 @@ %global vdsm_bootstrap vdsm-bootstrap %global vdsm_reg vdsm-reg -# Upstream git release -# % global vdsm_release gf2f6683 -# % global vdsm_relvtag .git%{vdsm_release} -# % global vdsm_relttag -%{vdsm_release} - -# Gluster -%global with_gluster 0 - # Required users and groups %global vdsm_user vdsm %global vdsm_group kvm @@ -18,9 +10,20 @@ %global snlk_group sanlock %global snlk_user sanlock -# Fedora specific configuration +# Upstream git release +# % global vdsm_release gf2f6683 +# % global vdsm_relvtag .git%{vdsm_release} +# % global vdsm_relttag -%{vdsm_release} + +# Fedora official build +%global fedora_koji_build 1 %global with_hooks 1 +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%{!?enable_autotools:%define enable_autotools 1} + # Required paths %if 0%{?fedora} >= 18 %global _polkitdir %{_datadir}/polkit-1/rules.d @@ -28,14 +31,21 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 1} +%if !0%{fedora_koji_build} || 0%{?fedora} >= 19 +%global with_gluster 1 +%endif + +%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 +%global with_systemd 1 +%endif + +%if 0%{?fedora} >= 18 +%global with_systemd_macros 1 +%endif Name: %{vdsm_name} Version: 4.10.3 -Release: 15%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 16%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -93,6 +103,13 @@ Patch36: 0037-vdsm.spec-fence-agents-all.patch Patch37: 0038-fix-storage.fuser.patch Patch38: 0039-Bump-up-libvirt-version-to-fix-network-linking.patch Patch39: 0040-vdsm.spec.in-with_gluster.patch +Patch40: 0041-Don-t-user-sudo-in-fuser.patch +Patch41: 0042-svdsm-fix-fuser-import-in-supervdsmServer.patch +Patch42: 0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch +Patch43: 0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch +Patch44: 0045-vdsm.spec-Adding-with_systemd-macro.patch +Patch45: 0046-spec-use-the-fedora-systemd-macros.patch +Patch46: 0047-spec-enable-gluster-upstream-and-on-fedora-19.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -126,6 +143,9 @@ BuildRequires: libtool %if !0%{?rhel} BuildRequires: pyflakes BuildRequires: python-pep8 +%endif + +%if 0%{?with_systemd} BuildRequires: systemd-units %endif @@ -486,46 +506,53 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %setup -q # ovirt-3.2 patches -%patch0 -p1 -b .patch0 -%patch1 -p1 -b .patch1 -%patch2 -p1 -b .patch2 -%patch3 -p1 -b .patch3 -%patch4 -p1 -b .patch4 -%patch5 -p1 -b .patch5 -%patch6 -p1 -b .patch6 -%patch7 -p1 -b .patch7 -%patch8 -p1 -b .patch8 -%patch9 -p1 -b .patch9 -%patch10 -p1 -b .patch10 -%patch11 -p1 -b .patch11 -%patch12 -p1 -b .patch12 -%patch13 -p1 -b .patch13 -%patch14 -p1 -b .patch14 -%patch15 -p1 -b .patch15 -%patch16 -p1 -b .patch16 -%patch17 -p1 -b .patch17 -%patch18 -p1 -b .patch18 -%patch19 -p1 -b .patch19 -%patch20 -p1 -b .patch20 -%patch21 -p1 -b .patch21 -%patch22 -p1 -b .patch22 -%patch23 -p1 -b .patch23 -%patch24 -p1 -b .patch24 -%patch25 -p1 -b .patch25 -%patch26 -p1 -b .patch26 -%patch27 -p1 -b .patch27 -%patch28 -p1 -b .patch28 -%patch29 -p1 -b .patch29 -%patch30 -p1 -b .patch30 -%patch31 -p1 -b .patch31 -%patch32 -p1 -b .patch32 -%patch33 -p1 -b .patch33 -%patch34 -p1 -b .patch34 -%patch35 -p1 -b .patch35 -%patch36 -p1 -b .patch36 -%patch37 -p1 -b .patch37 -%patch38 -p1 -b .patch38 -%patch39 -p1 -b .patch39 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -558,19 +585,7 @@ install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf -%if 0%{?rhel} -# Install the SysV init scripts -install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd -install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg - -# This is not commonplace, but we want /var/log/core to be a world-writable -# dropbox for core dumps -install -dDm 1777 %{buildroot}%{_localstatedir}/log/core -%else -# Install the configuration sample -install -Dm 0644 vdsm/vdsm.conf.sample \ - %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf - +%if 0%{?with_systemd} # Install the systemd scripts install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service @@ -578,6 +593,20 @@ install -Dm 0755 vdsm_reg/vdsm-reg.init \ %{buildroot}/lib/systemd/systemd-vdsm-reg install -Dm 0644 vdsm_reg/vdsm-reg.service \ %{buildroot}%{_unitdir}/vdsm-reg.service +%else +# Install the SysV init scripts +install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd +install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg +%endif + +%if 0%{?rhel} +# This is not commonplace, but we want /var/log/core to be a world-writable +# dropbox for core dumps +install -dDm 1777 %{buildroot}%{_localstatedir}/log/core +%else +# Install the configuration sample +install -Dm 0644 vdsm/vdsm.conf.sample \ + %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf # Install the polkit for libvirt %if 0%{?fedora} >= 18 @@ -627,26 +656,38 @@ if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd fi %else +%if 0%{?with_systemd_macros} +%systemd_post vdsmd.service +%else if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi exit 0 %endif +%endif %preun +if [ "$1" -eq 0 ]; then + start_conf_section="## beginning of configuration section by vdsm" + end_conf_section="## end of configuration section by vdsm" + by_vdsm="by vdsm" + + /bin/sed -i -e "/${start_conf_section}/,/${end_conf_section}/d" \ + -e "/${by_vdsm}/d" \ + %{_sysconfdir}/libvirt/libvirtd.conf \ + %{_sysconfdir}/libvirt/qemu.conf \ + %{_sysconfdir}/sysconfig/libvirtd \ + %{_sysconfdir}/sysctl.conf \ + %{_sysconfdir}/libvirt/qemu-sanlock.conf +fi + %if 0%{?rhel} if [ "$1" -eq 0 ] then /sbin/service vdsmd stop > /dev/null 2>&1 || : /sbin/chkconfig --del vdsmd - /bin/sed -i '/# by vdsm$/d' \ - /etc/libvirt/libvirtd.conf \ - /etc/libvirt/qemu.conf \ - /etc/sysconfig/libvirtd \ - /etc/sysctl.conf - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf @@ -663,12 +704,16 @@ then fi fi %else +%if 0%{?with_systemd_macros} +%systemd_preun vdsmd.service +%else if [ "$1" -eq 0 ]; then /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : fi exit 0 %endif +%endif %postun %if 0%{?rhel} @@ -677,11 +722,15 @@ if [ "$1" -ge 1 ]; then fi exit 0 %else +%if 0%{?with_systemd_macros} +%systemd_postun_with_restart vdsmd.service +%else if [ "$1" -ge 1 ] ; then /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : fi exit 0 %endif +%endif %if 0%{?rhel} %triggerun -- libvirt @@ -701,12 +750,16 @@ if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsm-reg fi %else +%if 0%{?with_systemd_macros} +%systemd_post vdsm-reg.service +%else if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi exit 0 %endif +%endif %preun reg %if 0%{?rhel} @@ -716,22 +769,27 @@ then /sbin/chkconfig --del vdsm-reg fi %else +%if 0%{?with_systemd_macros} +%systemd_preun vdsm-reg.service +%else if [ "$1" -eq 0 ]; then /bin/systemctl --no-reload disable vdsm-reg.service > /dev/null 2>&1 || : /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1 || : fi exit 0 %endif +%endif %files %defattr(-, root, root, -) %doc COPYING README vdsm/vdsm.conf.sample -%if 0%{?rhel} -%{_initrddir}/vdsmd -%else +%if 0%{?with_systemd} /lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service +%else +%{_initrddir}/vdsmd %endif + %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt @@ -766,6 +824,7 @@ exit 0 %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/dummybr.py* %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py* %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.policy %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm @@ -1078,11 +1137,11 @@ exit 0 %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf %ghost %dir /data %ghost %dir %attr(0775, root, root) /data/updates -%if 0%{?rhel} -%{_initrddir}/vdsm-reg -%else +%if 0%{?with_systemd} /lib/systemd/systemd-vdsm-reg %{_unitdir}/vdsm-reg.service +%else +%{_initrddir}/vdsm-reg %endif %{_datadir}/%{vdsm_reg}/vdsm-reg-setup %{_datadir}/%{vdsm_reg}/vdsm-complete @@ -1123,7 +1182,17 @@ exit 0 %exclude %{_datadir}/%{vdsm_name}/gluster/* %endif + %changelog +* Tue Apr 23 2013 Federico Simoncelli 4.10.3-16 +- Don't user sudo in fuser +- svdsm: fix fuser import in supervdsmServer +- Removing vdsm configuration when removing vdsm service +- Seperating supervdsm log to supervdsm.log file +- vdsm.spec: Adding with_systemd macro +- spec: use the fedora systemd macros +- spec: enable gluster upstream and on fedora 19 + * Tue Apr 9 2013 Federico Simoncelli 4.10.3-15 - fix the patches backported to ovirt-3.2 - resync the fedora spec file with the upstream one From 7932a53214596e41990dd485890072d4fe19849e Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 4 Jun 2013 23:43:01 -0300 Subject: [PATCH 042/126] vdsm-4.10.3-17 - Makefile.am: ignore false positive pyflakes lvm.py - Deactivate libvirtVM.Drives() - vdsm: fix Vm cleanup routine - Support teardownVolumePath(None) --- ...gnore-false-positive-pyflakes-lvm.py.patch | 38 +++++++ 0049-Deactivate-libvirtVM.Drives.patch | 79 +++++++++++++ 0050-vdsm-fix-Vm-cleanup-routine.patch | 106 ++++++++++++++++++ 0051-Support-teardownVolumePath-None.patch | 45 ++++++++ vdsm.spec | 12 +- 5 files changed, 279 insertions(+), 1 deletion(-) create mode 100644 0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch create mode 100644 0049-Deactivate-libvirtVM.Drives.patch create mode 100644 0050-vdsm-fix-Vm-cleanup-routine.patch create mode 100644 0051-Support-teardownVolumePath-None.patch diff --git a/0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch b/0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch new file mode 100644 index 0000000..41735b7 --- /dev/null +++ b/0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch @@ -0,0 +1,38 @@ +From 96c4ae5b46a83cd7099fd2a0558e2be7e8831d3a Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 23 Apr 2013 15:24:13 -0400 +Subject: [PATCH] Makefile.am: ignore false positive pyflakes lvm.py + +Temporary workaround. + +Change-Id: Id8cdeb0c28c1ee5dc3a18a7688ae60fe641f9a6c +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/14184 +Reviewed-by: Dan Kenigsberg +--- + Makefile.am | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 06ffbf9..7b0d161 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -99,9 +99,14 @@ PEP8_WHITELIST = \ + + PEP8_BLACKLIST = apiData.py,config.py,constants.py + ++SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \ ++ 'lv' from line .*" ++ + check-local: + find . -path './.git' -prune -type f -o \ +- -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) ++ -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \ ++ grep -w -v $(SKIP_PYFLAKES_ERR) | \ ++ while read LINE; do echo "$$LINE"; false; done + $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' \ + --ignore=E126,E127,E128 \ + $(PEP8_WHITELIST) +-- +1.7.1 + diff --git a/0049-Deactivate-libvirtVM.Drives.patch b/0049-Deactivate-libvirtVM.Drives.patch new file mode 100644 index 0000000..24aa19b --- /dev/null +++ b/0049-Deactivate-libvirtVM.Drives.patch @@ -0,0 +1,79 @@ +From b94d0a6c37303a977a46fe95ee77a2dd287d862c Mon Sep 17 00:00:00 2001 +From: Eduardo Warszawski +Date: Sun, 19 May 2013 20:20:07 +0300 +Subject: [PATCH] Deactivate libvirtVM.Drives() + +Change I8d310f216987b7 has introduced teardownVolumePath() calls with a +Drive object instead of a drive dictionary from self.conf. +In its previous form, teardownVolumePath() has silently ignored such +input, keeping the volume active. + +This patch makes teardownVolumePath() handle such inputs properly. This +is one baby step in the process of getting rid of self.conf: we would +like to use the objects everywhere within vdsm. + +Note that this patch introduces an ugly log line when pointlessly trying +to tear down a cdrom device. This would be fixed in a subsequent patch. + +Change-Id: I8ba965f0987037fa5dafc6b3ea6eeb6f01a82436 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=962549 +Signed-off-by: Eduardo +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/14869 +Reviewed-on: http://gerrit.ovirt.org/14953 +Tested-by: Federico Simoncelli +--- + vdsm/clientIF.py | 17 ++++++++++------- + vdsm/libvirtvm.py | 8 ++++++++ + 2 files changed, 18 insertions(+), 7 deletions(-) + +diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py +index 65b4e72..fabd494 100644 +--- a/vdsm/clientIF.py ++++ b/vdsm/clientIF.py +@@ -318,13 +318,16 @@ class clientIF: + + def teardownVolumePath(self, drive): + res = {'status': doneCode} +- if type(drive) == dict: +- try: +- res = self.irs.teardownImage(drive['domainID'], +- drive['poolID'], drive['imageID']) +- except KeyError: +- #This drive is not a vdsm image (quartet) +- self.log.info("Avoiding tear down drive %s", str(drive)) ++ try: ++ res = self.irs.teardownImage(drive['domainID'], ++ drive['poolID'], drive['imageID']) ++ except KeyError: ++ self.log.warning("Drive is not a vdsm image: %s", ++ drive, exc_info=True) ++ except TypeError: ++ if not isinstance(drive, basestring): ++ raise ++ # paths (strings) are not deactivated + + return res['status']['code'] + +diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py +index 19c5547..91f7a56 100644 +--- a/vdsm/libvirtvm.py ++++ b/vdsm/libvirtvm.py +@@ -1071,6 +1071,14 @@ class Drive(LibvirtVmDevice): + + self._customize() + ++ def __getitem__(self, key): ++ try: ++ value = getattr(self, str(key)) ++ except AttributeError: ++ raise KeyError(key) ++ else: ++ return value ++ + @property + def volExtensionChunk(self): + """ +-- +1.7.1 + diff --git a/0050-vdsm-fix-Vm-cleanup-routine.patch b/0050-vdsm-fix-Vm-cleanup-routine.patch new file mode 100644 index 0000000..a13a6a6 --- /dev/null +++ b/0050-vdsm-fix-Vm-cleanup-routine.patch @@ -0,0 +1,106 @@ +From 0939dd0d8c23067f6c74d722a07c46623f57a6da Mon Sep 17 00:00:00 2001 +From: Peter V. Saveliev +Date: Thu, 4 Apr 2013 15:28:29 +0200 +Subject: [PATCH] vdsm: fix Vm cleanup routine + +The issue was that on Vm disk hot unplug the general clean up routine +was called, that wiped out also qemu and ovirt guest agent's sockets. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=927143 +Signed-off-by: Peter V. Saveliev +Change-Id: Ie355022866d008a83257b1b6e3a4226a07d34c2f +Reviewed-on: http://gerrit.ovirt.org/13610 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Vered Volansky +Reviewed-on: http://gerrit.ovirt.org/15055 +Tested-by: Federico Simoncelli +--- + vdsm/libvirtvm.py | 10 ++++++++-- + vdsm/vm.py | 23 ++++++++++++++++++++--- + 2 files changed, 28 insertions(+), 5 deletions(-) + +diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py +index fe140ec..19c5547 100644 +--- a/vdsm/libvirtvm.py ++++ b/vdsm/libvirtvm.py +@@ -1391,7 +1391,13 @@ class LibvirtVm(vm.Vm): + self._guestEventTime = self._startTime + + def _cleanup(self): +- vm.Vm._cleanup(self) ++ """ ++ General clean up routine ++ """ ++ self._cleanupDrives() ++ self._cleanupFloppy() ++ self._cleanupGuestAgent() ++ utils.rmFile(self._recoveryFile) + utils.rmFile(self._qemuguestSocketFile) + + def updateGuestCpuRunning(self): +@@ -1874,7 +1880,7 @@ class LibvirtVm(vm.Vm): + 'status': {'code': errCode['hotunplugDisk']['status']['code'], + 'message': e.message}} + else: +- self._cleanup() ++ self._cleanupDrives(drive) + + return {'status': doneCode, 'vmList': self.status()} + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 9610644..c0d98ad 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -1030,15 +1030,29 @@ class Vm(object): + except: + self.log.error("_timedShutdown failed", exc_info=True) + +- def _cleanup(self): ++ def _cleanupDrives(self, *drives): ++ """ ++ Clean up drives related stuff. Sample usage: ++ ++ self._cleanupDrives() ++ self._cleanupDrives(drive) ++ self._cleanupDrives(drive1, drive2, drive3) ++ self._cleanupDrives(*drives_list) ++ """ ++ drives = drives or self._devices[DISK_DEVICES] ++ # clean them up + with self._volPrepareLock: +- for drive in self._devices[DISK_DEVICES]: ++ for drive in drives: + try: + self.cif.teardownVolumePath(drive) + except: + self.log.error("Drive teardown failure for %s", + drive, exc_info=True) + ++ def _cleanupFloppy(self): ++ """ ++ Clean up floppy drive ++ """ + if self.conf.get('volatileFloppy'): + try: + self.log.debug("Floppy %s cleanup" % self.conf['floppy']) +@@ -1046,13 +1060,16 @@ class Vm(object): + except: + pass + ++ def _cleanupGuestAgent(self): ++ """ ++ Try to stop the guest agent and clean up its socket ++ """ + try: + self.guestAgent.stop() + except: + pass + + utils.rmFile(self._guestSocketFile) +- utils.rmFile(self._recoveryFile) + + def setDownStatus(self, code, reason): + try: +-- +1.7.1 + diff --git a/0051-Support-teardownVolumePath-None.patch b/0051-Support-teardownVolumePath-None.patch new file mode 100644 index 0000000..421d1a5 --- /dev/null +++ b/0051-Support-teardownVolumePath-None.patch @@ -0,0 +1,45 @@ +From 617ff7d9e577c0c09bbe277543a0cf28120b6f4f Mon Sep 17 00:00:00 2001 +From: Eduardo Warszawski +Date: Wed, 22 May 2013 12:40:54 +0300 +Subject: [PATCH] Support teardownVolumePath(None) + +Change-Id: I68bc4996ec1789e090111e8aeadaf733e163543b +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=962549 +Signed-off-by: Eduardo +Reviewed-on: http://gerrit.ovirt.org/15316 +Reviewed-by: Federico Simoncelli +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Vinzenz Feenstra +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/15353 +Tested-by: Federico Simoncelli +--- + vdsm/clientIF.py | 10 ++++------ + 1 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py +index fabd494..fec7d39 100644 +--- a/vdsm/clientIF.py ++++ b/vdsm/clientIF.py +@@ -321,13 +321,11 @@ class clientIF: + try: + res = self.irs.teardownImage(drive['domainID'], + drive['poolID'], drive['imageID']) +- except KeyError: +- self.log.warning("Drive is not a vdsm image: %s", +- drive, exc_info=True) +- except TypeError: +- if not isinstance(drive, basestring): +- raise ++ except (KeyError, TypeError): + # paths (strings) are not deactivated ++ if not isinstance(drive, basestring): ++ self.log.warning("Drive is not a vdsm image: %s", ++ drive, exc_info=True) + + return res['status']['code'] + +-- +1.7.1 + diff --git a/vdsm.spec b/vdsm.spec index 7a37557..26054a2 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,7 +45,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 16%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 17%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -110,6 +110,10 @@ Patch43: 0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch Patch44: 0045-vdsm.spec-Adding-with_systemd-macro.patch Patch45: 0046-spec-use-the-fedora-systemd-macros.patch Patch46: 0047-spec-enable-gluster-upstream-and-on-fedora-19.patch +Patch47: 0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch +Patch48: 0049-Deactivate-libvirtVM.Drives.patch +Patch49: 0050-vdsm-fix-Vm-cleanup-routine.patch +Patch50: 0051-Support-teardownVolumePath-None.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -1184,6 +1188,12 @@ exit 0 %changelog +* Tue Jun 4 2013 Douglas Schilling Landgraf 4.10.3-17 +- Makefile.am: ignore false positive pyflakes lvm.py +- Deactivate libvirtVM.Drives() +- vdsm: fix Vm cleanup routine +- Support teardownVolumePath(None) + * Tue Apr 23 2013 Federico Simoncelli 4.10.3-16 - Don't user sudo in fuser - svdsm: fix fuser import in supervdsmServer From e8edc30cedd9884322c5c49d7f3213cfc4045846 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 10 Jul 2013 16:15:27 -0300 Subject: [PATCH 043/126] vdsm-4.10.3-18 - vdsm.spec: update python-pthreading - service: make iscsid a systemd dependency - spec update --- 0052-vdsm.spec-update-python-pthreading.patch | 56 +++++++++++++++++++ ...ice-make-iscsid-a-systemd-dependency.patch | 47 ++++++++++++++++ vdsm.spec | 21 ++++++- 3 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 0052-vdsm.spec-update-python-pthreading.patch create mode 100644 0053-service-make-iscsid-a-systemd-dependency.patch diff --git a/0052-vdsm.spec-update-python-pthreading.patch b/0052-vdsm.spec-update-python-pthreading.patch new file mode 100644 index 0000000..9c6d373 --- /dev/null +++ b/0052-vdsm.spec-update-python-pthreading.patch @@ -0,0 +1,56 @@ +From 3f66bb373d43072de4a3e39019e0d7df9791f274 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Fri, 14 Jun 2013 02:47:26 -0400 +Subject: [PATCH] vdsm.spec: update python-pthreading + +F19 and EL7 should require python-pthreading >= 1.0.2 + +Change-Id: Ie50a5b7a794b9df135478f3adace7501893d992c +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/15705 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 9a44260..8c00001 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -93,7 +93,6 @@ Requires: iproute + Requires: python-ethtool + Requires: rpm-python + Requires: nfs-utils +-Requires: python-pthreading + Requires: m2crypto + Requires: %{name}-xmlrpc = %{version}-%{release} + +@@ -112,6 +111,7 @@ Requires: iscsi-initiator-utils + Requires: libvirt + Requires: lvm2 + Requires: python ++Requires: python-pthreading >= 0.1.2 + Requires: qemu-kvm + Requires: qemu-kvm-img + Requires: sanlock, sanlock-python +@@ -130,14 +130,17 @@ Requires: kernel >= 2.6.32-279.9.1 + Requires: sanlock >= 2.3-4, sanlock-python + Requires: initscripts >= 9.03.31-2.el6_3.1 + Requires: mom >= 0.3.0 ++Requires: python-pthreading + Requires: selinux-policy-targeted >= 3.7.19-80 + Requires: lvm2 >= 2.02.95-10.el6_3.2 + Requires: logrotate < 3.8.0 + %endif + %else + %if 0%{?fedora} >= 19 ++Requires: python-pthreading >= 0.1.2 + Requires: fence-agents-all + %else ++Requires: python-pthreading + Requires: fence-agents + %endif + # Subprocess and thread bug was found on python 2.7.2 +-- +1.8.2.1 + diff --git a/0053-service-make-iscsid-a-systemd-dependency.patch b/0053-service-make-iscsid-a-systemd-dependency.patch new file mode 100644 index 0000000..2349dc8 --- /dev/null +++ b/0053-service-make-iscsid-a-systemd-dependency.patch @@ -0,0 +1,47 @@ +From 73463217963c3c138fdac822a092fc68b8541b8a Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Mon, 8 Jul 2013 20:50:50 -0400 +Subject: [PATCH] service: make iscsid a systemd dependency + +Also remove starting iscsid with force-start as it is no longer +supported + +master commit 3c0adf791e790c820d44317204f275aa09513318 + +Change-Id: I461cf35763c495b0630acf9d4a7c8716036ad41e +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=981906 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/16527 +Reviewed-by: Federico Simoncelli +--- + vdsm/vdsmd.init.in | 1 - + vdsm/vdsmd.service | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in +index c8223d3..9789437 100755 +--- a/vdsm/vdsmd.init.in ++++ b/vdsm/vdsmd.init.in +@@ -158,7 +158,6 @@ start_needed_srv() { + fi + done + +- /sbin/service iscsid force-start + } + + test_lo() { +diff --git a/vdsm/vdsmd.service b/vdsm/vdsmd.service +index 9823b34..9ed69ba 100644 +--- a/vdsm/vdsmd.service ++++ b/vdsm/vdsmd.service +@@ -1,6 +1,6 @@ + [Unit] + Description=Virtual Desktop Server Manager +-Requires=multipathd.service libvirtd.service time-sync.target ++Requires=multipathd.service libvirtd.service time-sync.target iscsid.service + Conflicts=libvirt-guests.service + + [Service] +-- +1.8.2.1 + diff --git a/vdsm.spec b/vdsm.spec index 26054a2..0acce9f 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,7 +45,7 @@ Name: %{vdsm_name} Version: 4.10.3 -Release: 17%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 18%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -114,6 +114,8 @@ Patch47: 0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch Patch48: 0049-Deactivate-libvirtVM.Drives.patch Patch49: 0050-vdsm-fix-Vm-cleanup-routine.patch Patch50: 0051-Support-teardownVolumePath-None.patch +Patch51: 0052-vdsm.spec-update-python-pthreading.patch +Patch52: 0053-service-make-iscsid-a-systemd-dependency.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -162,7 +164,6 @@ Requires: iproute Requires: python-ethtool Requires: rpm-python Requires: nfs-utils -Requires: python-pthreading Requires: m2crypto Requires: %{name}-xmlrpc = %{version}-%{release} @@ -181,6 +182,7 @@ Requires: iscsi-initiator-utils Requires: libvirt Requires: lvm2 Requires: python +Requires: python-pthreading >= 0.1.2 Requires: qemu-kvm Requires: qemu-kvm-img Requires: sanlock, sanlock-python @@ -199,14 +201,17 @@ Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: mom >= 0.3.0 +Requires: python-pthreading Requires: selinux-policy-targeted >= 3.7.19-80 Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif %else %if 0%{?fedora} >= 19 +Requires: python-pthreading >= 0.1.2 Requires: fence-agents-all %else +Requires: python-pthreading Requires: fence-agents %endif # Subprocess and thread bug was found on python 2.7.2 @@ -557,6 +562,12 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch44 -p1 %patch45 -p1 %patch46 -p1 +%patch47 -p1 +%patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1188,6 +1199,10 @@ exit 0 %changelog +* Wed Jul 10 2013 Douglas Schilling Landgraf 4.10.3-18 +- vdsm.spec: update python-pthreading +- service: make iscsid a systemd dependency + * Tue Jun 4 2013 Douglas Schilling Landgraf 4.10.3-17 - Makefile.am: ignore false positive pyflakes lvm.py - Deactivate libvirtVM.Drives() @@ -1214,7 +1229,7 @@ exit 0 * Wed Apr 3 2013 Douglas Schilling Landgraf 4.10.3-13 - Temporarily deactivate Gluster sub-package. -* Mon Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 +* Tue Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 - Applying direct to spec the fence-agents changes and removing the patch. * Mon Mar 25 2013 Douglas Schilling Landgraf 4.10.3-11 From fe5111499f0f7c07add19ac7fdb1fd80045865b1 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Thu, 25 Jul 2013 09:39:17 +0200 Subject: [PATCH 044/126] update to vdsm-4.12.0-rc3 --- 0001-build-use-pythondir-for-vdsmapi.patch | 41 + ...chema-Fix-schema-for-VM.updateDevice.patch | 65 -- ...Missing-comment-for-new-VmDeviceType.patch | 36 - ...PU-thread-info-in-getVdsCapabilities.patch | 53 -- 0004-caps.py-osversion-validate-OVIRT.patch | 35 - ...irtd-didn-t-work-over-allinone-setup.patch | 37 - 0006-Integrate-Smartcard-support.patch | 421 --------- ...c-python-ordereddict-only-for-rhel-7.patch | 42 - ...require-python-ordereddict-on-fedora.patch | 42 - ...spec-BuildRequires-python-pthreading.patch | 31 - ...th-py-and-pyc-file-to-start-super-vd.patch | 54 -- 0011-adding-getHardwareInfo-API-to-vdsm.patch | 334 ------- ...-Explicitly-shutdown-m2crypto-socket.patch | 55 -- ...licycoreutils-and-skip-sebool-errors.patch | 59 -- ...linux-policy-to-avoid-selinux-failur.patch | 42 - ...rvice-require-either-ntpd-or-chronyd.patch | 36 - ...-check-local-variable-before-reading.patch | 44 - ...v-Race-fix-load-and-trigger-dev-rule.patch | 115 --- ...ommand-path-to-be-configured-at-runt.patch | 171 ---- ...upgrade-to-v2-before-upgrading-to-v3.patch | 91 -- ...misc-rename-safelease-to-clusterlock.patch | 866 ------------------ ...e-cluster-lock-using-makeClusterLock.patch | 151 --- ...add-the-local-locking-implementation.patch | 225 ----- ...taDataKeyNotFoundError-when-preparin.patch | 38 - 0024-vdsm.spec-Require-openssl.patch | 31 - 0025-Fedora-18-require-a-newer-udev.patch | 36 - ...-sloppy-backport-of-safelease-rename.patch | 40 - ...-use-of-zombie-reaper-from-supervdsm.patch | 52 -- ...delete-update-of-devices-with-no-ifc.patch | 63 -- ...oreutils-2.1.13-55-to-avoid-another-.patch | 41 - ...nnect-to-supervdsm-more-than-3-time-.patch | 50 - ...kaging-add-load_needed_modules.py.in.patch | 81 -- ...d_dev-reopen-bonding_masters-per-bon.patch | 38 - ...ndling-Attribute-error-in-Python-2.6.patch | 91 -- ...-bootstrap-remove-glusterfs-packages.patch | 52 -- ...ter-set-glusterfs-dependency-version.patch | 33 - ...e-template-when-zeroing-a-dependant-.patch | 65 -- 0037-vdsm.spec-fence-agents-all.patch | 59 -- 0038-fix-storage.fuser.patch | 85 -- ...bvirt-version-to-fix-network-linking.patch | 36 - 0040-vdsm.spec.in-with_gluster.patch | 80 -- 0041-Don-t-user-sudo-in-fuser.patch | 94 -- ...-fix-fuser-import-in-supervdsmServer.patch | 31 - ...nfiguration-when-removing-vdsm-servi.patch | 62 -- ...-supervdsm-log-to-supervdsm.log-file.patch | 144 --- ...-vdsm.spec-Adding-with_systemd-macro.patch | 124 --- 0046-spec-use-the-fedora-systemd-macros.patch | 140 --- ...le-gluster-upstream-and-on-fedora-19.patch | 64 -- ...gnore-false-positive-pyflakes-lvm.py.patch | 38 - 0049-Deactivate-libvirtVM.Drives.patch | 79 -- 0050-vdsm-fix-Vm-cleanup-routine.patch | 106 --- 0051-Support-teardownVolumePath-None.patch | 45 - 0052-vdsm.spec-update-python-pthreading.patch | 56 -- ...ice-make-iscsid-a-systemd-dependency.patch | 47 - sources | 2 +- vdsm.spec | 405 +++++--- 56 files changed, 296 insertions(+), 5158 deletions(-) create mode 100644 0001-build-use-pythondir-for-vdsmapi.patch delete mode 100644 0001-schema-Fix-schema-for-VM.updateDevice.patch delete mode 100644 0002-schema-Missing-comment-for-new-VmDeviceType.patch delete mode 100644 0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch delete mode 100644 0004-caps.py-osversion-validate-OVIRT.patch delete mode 100644 0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch delete mode 100644 0006-Integrate-Smartcard-support.patch delete mode 100644 0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch delete mode 100644 0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch delete mode 100644 0009-vdsm.spec-BuildRequires-python-pthreading.patch delete mode 100644 0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch delete mode 100644 0011-adding-getHardwareInfo-API-to-vdsm.patch delete mode 100644 0012-Explicitly-shutdown-m2crypto-socket.patch delete mode 100644 0013-spec-require-policycoreutils-and-skip-sebool-errors.patch delete mode 100644 0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch delete mode 100644 0015-vdsmd.service-require-either-ntpd-or-chronyd.patch delete mode 100644 0016-isRunning-didn-t-check-local-variable-before-reading.patch delete mode 100644 0017-udev-Race-fix-load-and-trigger-dev-rule.patch delete mode 100644 0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch delete mode 100644 0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch delete mode 100644 0020-misc-rename-safelease-to-clusterlock.patch delete mode 100644 0021-domain-select-the-cluster-lock-using-makeClusterLock.patch delete mode 100644 0022-clusterlock-add-the-local-locking-implementation.patch delete mode 100644 0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch delete mode 100644 0024-vdsm.spec-Require-openssl.patch delete mode 100644 0025-Fedora-18-require-a-newer-udev.patch delete mode 100644 0026-fix-sloppy-backport-of-safelease-rename.patch delete mode 100644 0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch delete mode 100644 0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch delete mode 100644 0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch delete mode 100644 0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch delete mode 100644 0031-packaging-add-load_needed_modules.py.in.patch delete mode 100644 0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch delete mode 100644 0033-gluster-Handling-Attribute-error-in-Python-2.6.patch delete mode 100644 0034-bootstrap-remove-glusterfs-packages.patch delete mode 100644 0035-gluster-set-glusterfs-dependency-version.patch delete mode 100644 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch delete mode 100644 0037-vdsm.spec-fence-agents-all.patch delete mode 100644 0038-fix-storage.fuser.patch delete mode 100644 0039-Bump-up-libvirt-version-to-fix-network-linking.patch delete mode 100644 0040-vdsm.spec.in-with_gluster.patch delete mode 100644 0041-Don-t-user-sudo-in-fuser.patch delete mode 100644 0042-svdsm-fix-fuser-import-in-supervdsmServer.patch delete mode 100644 0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch delete mode 100644 0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch delete mode 100644 0045-vdsm.spec-Adding-with_systemd-macro.patch delete mode 100644 0046-spec-use-the-fedora-systemd-macros.patch delete mode 100644 0047-spec-enable-gluster-upstream-and-on-fedora-19.patch delete mode 100644 0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch delete mode 100644 0049-Deactivate-libvirtVM.Drives.patch delete mode 100644 0050-vdsm-fix-Vm-cleanup-routine.patch delete mode 100644 0051-Support-teardownVolumePath-None.patch delete mode 100644 0052-vdsm.spec-update-python-pthreading.patch delete mode 100644 0053-service-make-iscsid-a-systemd-dependency.patch diff --git a/0001-build-use-pythondir-for-vdsmapi.patch b/0001-build-use-pythondir-for-vdsmapi.patch new file mode 100644 index 0000000..392aac6 --- /dev/null +++ b/0001-build-use-pythondir-for-vdsmapi.patch @@ -0,0 +1,41 @@ +From 69c86e0adc6974d6170ab7297dc4ea1688bdfe8a Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Tue, 23 Jul 2013 08:36:23 -0400 +Subject: [PATCH] build: use pythondir for vdsmapi + +Change-Id: I8077efea03adb7d018c35cfd81b121b9e47d3e98 +Signed-off-by: Federico Simoncelli +--- + vdsm.spec.in | 2 +- + vdsm_api/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 9b02677..608735a 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -1208,7 +1208,7 @@ exit 0 + %files api + %doc vdsm_api/vdsm-api.html + %{_datadir}/%{vdsm_name}/vdsmapi-schema.json +-%{python_sitearch}/vdsmapi.py* ++%{python_sitelib}/vdsmapi.py* + + %files jsonrpc + %{_datadir}/%{vdsm_name}/BindingJsonRpc.py* +diff --git a/vdsm_api/Makefile.am b/vdsm_api/Makefile.am +index 0a9e610..8331dea 100644 +--- a/vdsm_api/Makefile.am ++++ b/vdsm_api/Makefile.am +@@ -16,7 +16,7 @@ dist_vdsm_DATA = \ + vdsmapi-schema.json \ + $(NULL) + +-dist_pyexec_PYTHON = \ ++dist_python_PYTHON = \ + vdsmapi.py \ + $(NULL) + +-- +1.7.1 + diff --git a/0001-schema-Fix-schema-for-VM.updateDevice.patch b/0001-schema-Fix-schema-for-VM.updateDevice.patch deleted file mode 100644 index 59cd4bc..0000000 --- a/0001-schema-Fix-schema-for-VM.updateDevice.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 844f10a9aafd55018e9966a61dece726d3e62511 Mon Sep 17 00:00:00 2001 -From: Adam Litke -Date: Wed, 12 Dec 2012 13:52:19 -0600 -Subject: [PATCH 1/3] schema: Fix schema for VM.updateDevice - -Another recent update broke the schema file. I'll take the blame for this one -since I approved the change :) Some missing and/or malformed data in comments -was causing the process-schema script to fail. Another reason for validating -the schema during the build. - -Change-Id: If88596050ace9511bcc7be65ee46645359e30532 -Signed-off-by: Adam Litke -Reviewed-on: http://gerrit.ovirt.org/10012 -Reviewed-by: Saggi Mizrahi -Tested-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/10019 -Reviewed-by: Dan Kenigsberg -Tested-by: Antoni Segura Puimedon ---- - vdsm_api/vdsmapi-schema.json | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json -index 9772e18..487e69a 100644 ---- a/vdsm_api/vdsmapi-schema.json -+++ b/vdsm_api/vdsmapi-schema.json -@@ -4894,10 +4894,12 @@ - ## - # @vmUpdateDeviceParams: - # -+# A discriminated record of update parameters for a VM device. -+# - # @deviceType: The VM device type to update. For example 'interface' for - # network devices or 'disk' for disk storage devices. - # --# Since 4.10.3 -+# Since: 4.10.3 - ## - {'type': 'vmUpdateDeviceParams', - 'data': {'deviceType': 'VmDeviceType'}, -@@ -4924,11 +4926,11 @@ - # by alias. If omitted, it keeps the current mirroring - # configuration. - # --# Since 4.10.3 -+# Since: 4.10.3 - ## - {'type': 'vmUpdateInterfaceDeviceParams', - 'data': {'*network': 'str', '*linkActive': 'bool', -- 'alias': 'str', '*portMirroring': '[str]'}} -+ 'alias': 'str', '*portMirroring': ['str']}} - - ## - # @VM.updateDevice: -@@ -4943,7 +4945,6 @@ - # The VM definition, as updated - # - # Since: 4.10.3 --# - ## - {'command': {'class': 'VM', 'name': 'updateDevice'}, - 'data': {'vmId': 'UUID', 'params': 'vmUpdateDeviceParams'}, --- -1.7.11.7 - diff --git a/0002-schema-Missing-comment-for-new-VmDeviceType.patch b/0002-schema-Missing-comment-for-new-VmDeviceType.patch deleted file mode 100644 index d44579b..0000000 --- a/0002-schema-Missing-comment-for-new-VmDeviceType.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 244713456b87d4ea1873c98cbaae52bffd3ce1ee Mon Sep 17 00:00:00 2001 -From: Adam Litke -Date: Wed, 12 Dec 2012 14:11:16 -0600 -Subject: [PATCH 2/3] schema: Missing comment for new VmDeviceType - -When adding a new 'console' VmDeviceType, the submitter forgot to include -documentation in the comment block. This caused process-schema.py to fail. - -Change-Id: Icd7db71a4cd1a2addd31815a73dcd5c1cda7af4f -Signed-off-by: Adam Litke -Reviewed-on: http://gerrit.ovirt.org/10013 -Reviewed-by: Saggi Mizrahi -Tested-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/10020 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm_api/vdsmapi-schema.json | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json -index 487e69a..58dd6e2 100644 ---- a/vdsm_api/vdsmapi-schema.json -+++ b/vdsm_api/vdsmapi-schema.json -@@ -1681,6 +1681,8 @@ - # - # @channel: A host-guest communication channel - # -+# @console: A console device -+# - # Since: 4.10.0 - ## - {'enum': 'VmDeviceType', --- -1.7.11.7 - diff --git a/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch b/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch deleted file mode 100644 index e502d73..0000000 --- a/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch +++ /dev/null @@ -1,53 +0,0 @@ -From b8c1c973d9767859d144042531f7a5ae76fce389 Mon Sep 17 00:00:00 2001 -From: Greg Padgett -Date: Thu, 20 Dec 2012 09:43:29 -0500 -Subject: [PATCH 3/3] api: Report CPU thread info in getVdsCapabilities - -Report CPU thread info in getVdsCapabilities - -Change-Id: I11f1e139a3f3d5bd18032713694bdebf9ab8c1d7 -Signed-off-by: Greg Padgett -Reviewed-on: http://gerrit.ovirt.org/10300 -Reviewed-by: Federico Simoncelli ---- - vdsm/caps.py | 1 + - vdsm_api/vdsmapi-schema.json | 4 +++- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/vdsm/caps.py b/vdsm/caps.py -index 0438fb4..6749227 100644 ---- a/vdsm/caps.py -+++ b/vdsm/caps.py -@@ -261,6 +261,7 @@ def get(): - else: - caps['cpuCores'] = str(cpuTopology.cores()) - -+ caps['cpuThreads'] = str(cpuTopology.threads()) - caps['cpuSockets'] = str(cpuTopology.sockets()) - caps['cpuSpeed'] = cpuInfo.mhz() - if config.getboolean('vars', 'fake_kvm_support'): -diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json -index 58dd6e2..c72ec4b 100644 ---- a/vdsm_api/vdsmapi-schema.json -+++ b/vdsm_api/vdsmapi-schema.json -@@ -848,6 +848,8 @@ - # - # @kvmEnabled: KVM is enabled on the host - # -+# @cpuThreads: The number of CPU threads present -+# - # @cpuCores: The number of CPU cores present - # - # @cpuSockets: The numbet of CPU sockets -@@ -909,7 +911,7 @@ - # the current API truncates @software_version to 'x.y'. - ## - {'type': 'VdsmCapabilities', -- 'data': {'kvmEnabled': 'bool', 'cpuCores': 'uint', -+ 'data': {'kvmEnabled': 'bool', 'cpuThreads': 'uint', 'cpuCores': 'uint', - 'cpuSockets': 'uint', 'cpuSpeed': 'float', 'cpuModel': 'str', - 'cpuFlags': 'str', 'version_name': 'str', 'software_version': 'str', - 'software_revision': 'str', 'supportedENGINEs': ['str'], --- -1.7.11.7 - diff --git a/0004-caps.py-osversion-validate-OVIRT.patch b/0004-caps.py-osversion-validate-OVIRT.patch deleted file mode 100644 index 9333042..0000000 --- a/0004-caps.py-osversion-validate-OVIRT.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 95be2057db1bea2730bc4b65058f5b1a42ab45bd Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 17 Dec 2012 19:23:21 -0500 -Subject: [PATCH 4/6] caps.py: osversion() validate OVIRT - -Currently we are only validating RHEV-H node. -This patch will validate oVirt node as well in osversion(). - -Change-Id: I58efd4660f94b2f68ead470a54f0f301a1b9b4ba -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=873917 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/10177 -Reviewed-by: Alon Bar-Lev -Tested-by: Alon Bar-Lev -Reviewed-by: Dan Kenigsberg ---- - vdsm/caps.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/caps.py b/vdsm/caps.py -index 6749227..e9a1476 100644 ---- a/vdsm/caps.py -+++ b/vdsm/caps.py -@@ -229,7 +229,7 @@ def osversion(): - - osname = getos() - try: -- if osname == OSName.RHEVH: -+ if osname == OSName.RHEVH or osname == OSName.OVIRT: - d = _parseKeyVal(file('/etc/default/version')) - version = d.get('VERSION', '') - release = d.get('RELEASE', '') --- -1.7.11.7 - diff --git a/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch b/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch deleted file mode 100644 index bc7af92..0000000 --- a/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 87dfb384debe7c171c3df27f13dc95ba3f0f0d5b Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Sun, 23 Dec 2012 10:40:29 +0200 -Subject: [PATCH 5/6] restarting libvirtd didn't work over allinone setup - -Change-Id: I300adc5ac3d9b12fee49023a54e5ffb4dee98da1 -Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=888258 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/10237 -Tested-by: Ohad Basan -Reviewed-by: Ohad Basan -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/10316 ---- - vdsm/vdsmd.init.in | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in -index 7a7ae84..c8223d3 100755 ---- a/vdsm/vdsmd.init.in -+++ b/vdsm/vdsmd.init.in -@@ -362,7 +362,11 @@ EOF - - ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr" - -- /sbin/initctl restart libvirtd 2>/dev/null || : -+ if libvirt_should_use_upstart; then -+ /sbin/initctl restart libvirtd 2>/dev/null || : -+ else -+ /bin/systemctl restart libvirtd.service -+ fi - - # - # finished reconfiguration, do not trigger --- -1.7.11.7 - diff --git a/0006-Integrate-Smartcard-support.patch b/0006-Integrate-Smartcard-support.patch deleted file mode 100644 index 7837b0e..0000000 --- a/0006-Integrate-Smartcard-support.patch +++ /dev/null @@ -1,421 +0,0 @@ -From d33da223da1160b1ad2a8d02316b6b435bee9c29 Mon Sep 17 00:00:00 2001 -From: Tomas Jelinek -Date: Wed, 10 Oct 2012 03:06:21 -0400 -Subject: [PATCH 6/6] Integrate Smartcard support - -This patch is a VDSM part of the integrating -the smartcard support to the ovirt: - -This VDSM part integrates the smartcard in -a supported way, not just as an unsupported custom hook. - -It also removes the smartcard hook itself. - -Change-Id: I7cdaef420c8381d588f6215e66e6a80dd9d2e44b -Signed-off-by: Tomas Jelinek -Signed-off-by: Peter V. Saveliev -Signed-off-by: Antoni S. Puimedon -Reviewed-on: http://gerrit.ovirt.org/10547 -Tested-by: Omer Frenkel -Reviewed-by: Dan Kenigsberg -Reviewed-by: Federico Simoncelli ---- - configure.ac | 1 - - tests/libvirtvmTests.py | 7 +++++ - vdsm.spec.in | 12 -------- - vdsm/libvirtvm.py | 44 ++++++++++++++++++++++++++++- - vdsm/vm.py | 19 +++++++++++-- - vdsm_api/vdsmapi-schema.json | 49 +++++++++++++++++++++++++++++++-- - vdsm_hooks/Makefile.am | 1 - - vdsm_hooks/README | 4 +-- - vdsm_hooks/smartcard/Makefile.am | 18 ------------ - vdsm_hooks/smartcard/README | 9 ------ - vdsm_hooks/smartcard/before_vm_start.py | 29 ------------------- - 11 files changed, 116 insertions(+), 77 deletions(-) - delete mode 100644 vdsm_hooks/smartcard/Makefile.am - delete mode 100644 vdsm_hooks/smartcard/README - delete mode 100755 vdsm_hooks/smartcard/before_vm_start.py - -diff --git a/configure.ac b/configure.ac -index a6265b5..3489e38 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -209,7 +209,6 @@ AC_OUTPUT([ - vdsm_hooks/qos/Makefile - vdsm_hooks/qemucmdline/Makefile - vdsm_hooks/scratchpad/Makefile -- vdsm_hooks/smartcard/Makefile - vdsm_hooks/smbios/Makefile - vdsm_hooks/sriov/Makefile - vdsm_hooks/vhostmd/Makefile -diff --git a/tests/libvirtvmTests.py b/tests/libvirtvmTests.py -index 4ed7318..bd68f2a 100644 ---- a/tests/libvirtvmTests.py -+++ b/tests/libvirtvmTests.py -@@ -91,6 +91,13 @@ class TestLibvirtvm(TestCaseBase): - domxml.appendOs() - self.assertXML(domxml.dom, xml, 'os') - -+ def testSmartcardXML(self): -+ smartcardXML = '' -+ dev = {'device': 'smartcard', -+ 'specParams': {'mode': 'passthrough', 'type': 'spicevmc'}} -+ smartcard = libvirtvm.SmartCardDevice(self.conf, self.log, **dev) -+ self.assertXML(smartcard.getXML(), smartcardXML) -+ - def testFeaturesXML(self): - featuresXML = """ - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 1978fa9..f9e238b 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -353,14 +353,6 @@ Hook creates a disk for a VM onetime usage, - the disk will be erased when the VM destroyed. - VM cannot be migrated when using scratchpad hook - --%package hook-smartcard --Summary: Smartcard support for Spice protocol in VDSM --BuildArch: noarch -- --%description hook-smartcard --Smartcard hook add support for spice in VDSM. --Smartcard hook enable user to use its smartcard inside virtual machines. -- - %package hook-smbios - Summary: Adding custom smbios entries to libvirt domain via VDSM - BuildArch: noarch -@@ -887,10 +879,6 @@ exit 0 - %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad - %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad - --%files hook-smartcard --%defattr(-, root, root, -) --%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard -- - %files hook-smbios - %defattr(-, root, root, -) - %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios -diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py -index 219e382..fe140ec 100644 ---- a/vdsm/libvirtvm.py -+++ b/vdsm/libvirtvm.py -@@ -1243,6 +1243,21 @@ class WatchdogDevice(LibvirtVmDevice): - return m - - -+class SmartCardDevice(LibvirtVmDevice): -+ def getXML(self): -+ """ -+ Add smartcard section to domain xml -+ -+ -+
-+ -+ """ -+ card = self.createXmlElem(self.device, None, ['address']) -+ card.setAttribute('mode', self.specParams['mode']) -+ card.setAttribute('type', self.specParams['type']) -+ return card -+ -+ - class RedirDevice(LibvirtVmDevice): - def getXML(self): - """ -@@ -1395,6 +1410,7 @@ class LibvirtVm(vm.Vm): - self._getUnderlyingControllerDeviceInfo() - self._getUnderlyingBalloonDeviceInfo() - self._getUnderlyingWatchdogDeviceInfo() -+ self._getUnderlyingSmartcardDeviceInfo() - # Obtain info of all unknown devices. Must be last! - self._getUnderlyingUnknownDeviceInfo() - -@@ -1486,7 +1502,8 @@ class LibvirtVm(vm.Vm): - vm.BALLOON_DEVICES: BalloonDevice, - vm.WATCHDOG_DEVICES: WatchdogDevice, - vm.REDIR_DEVICES: RedirDevice, -- vm.CONSOLE_DEVICES: ConsoleDevice} -+ vm.CONSOLE_DEVICES: ConsoleDevice, -+ vm.SMARTCARD_DEVICES: SmartCardDevice} - - for devType, devClass in devMap.items(): - for dev in devices[devType]: -@@ -2800,6 +2817,31 @@ class LibvirtVm(vm.Vm): - dev['address'] = address - dev['alias'] = alias - -+ def _getUnderlyingSmartcardDeviceInfo(self): -+ """ -+ Obtain smartcard device info from libvirt. -+ """ -+ smartcardxml = _domParseStr(self._lastXMLDesc).childNodes[0].\ -+ getElementsByTagName('devices')[0].\ -+ getElementsByTagName('smartcard') -+ for x in smartcardxml: -+ if not x.getElementsByTagName('address'): -+ continue -+ -+ address = self._getUnderlyingDeviceAddress(x) -+ alias = x.getElementsByTagName('alias')[0].getAttribute('name') -+ -+ for dev in self._devices[vm.SMARTCARD_DEVICES]: -+ if not hasattr(dev, 'address'): -+ dev.address = address -+ dev.alias = alias -+ -+ for dev in self.conf['devices']: -+ if dev['device'] == vm.SMARTCARD_DEVICES and \ -+ not dev.get('address'): -+ dev['address'] = address -+ dev['alias'] = alias -+ - def _getUnderlyingWatchdogDeviceInfo(self): - """ - Obtain watchdog device info from libvirt. -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 49fcb11..9610644 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -47,6 +47,7 @@ BALLOON_DEVICES = 'balloon' - REDIR_DEVICES = 'redir' - WATCHDOG_DEVICES = 'watchdog' - CONSOLE_DEVICES = 'console' -+SMARTCARD_DEVICES = 'smartcard' - - """ - A module containing classes needed for VM communication. -@@ -364,7 +365,8 @@ class Vm(object): - SOUND_DEVICES: [], VIDEO_DEVICES: [], - CONTROLLER_DEVICES: [], GENERAL_DEVICES: [], - BALLOON_DEVICES: [], REDIR_DEVICES: [], -- WATCHDOG_DEVICES: [], CONSOLE_DEVICES: []} -+ WATCHDOG_DEVICES: [], CONSOLE_DEVICES: [], -+ SMARTCARD_DEVICES: []} - - def _get_lastStatus(self): - PAUSED_STATES = ('Powering down', 'RebootInProgress', 'Up') -@@ -447,7 +449,8 @@ class Vm(object): - SOUND_DEVICES: [], VIDEO_DEVICES: [], - CONTROLLER_DEVICES: [], GENERAL_DEVICES: [], - BALLOON_DEVICES: [], REDIR_DEVICES: [], -- WATCHDOG_DEVICES: [], CONSOLE_DEVICES: []} -+ WATCHDOG_DEVICES: [], CONSOLE_DEVICES: [], -+ SMARTCARD_DEVICES: []} - for dev in self.conf.get('devices'): - try: - devices[dev['type']].append(dev) -@@ -485,6 +488,7 @@ class Vm(object): - devices[GENERAL_DEVICES] = [] - devices[BALLOON_DEVICES] = [] - devices[WATCHDOG_DEVICES] = [] -+ devices[SMARTCARD_DEVICES] = self.getConfSmartcard() - devices[REDIR_DEVICES] = [] - devices[CONSOLE_DEVICES] = [] - else: -@@ -549,6 +553,17 @@ class Vm(object): - - return vcards - -+ def getConfSmartcard(self): -+ """ -+ Normalize smartcard device (now there is only one) -+ """ -+ cards = [] -+ if self.conf.get('smartcard'): -+ cards.append({'device': SMARTCARD_DEVICES, -+ 'specParams': {'mode': 'passthrough', -+ 'type': 'spicevmc'}}) -+ return cards -+ - def getConfSound(self): - """ - Normalize sound device provided by conf. -diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json -index c72ec4b..7c9ef22 100644 ---- a/vdsm_api/vdsmapi-schema.json -+++ b/vdsm_api/vdsmapi-schema.json -@@ -1685,11 +1685,13 @@ - # - # @console: A console device - # -+# @smartcard: A smartcard device -+# - # Since: 4.10.0 - ## - {'enum': 'VmDeviceType', - 'data': ['disk', 'interface', 'video', 'sound', 'controller', 'balloon', -- 'channel', 'console']} -+ 'channel', 'console', 'smartcard']} - - ## - # @VmDiskDeviceType: -@@ -2356,6 +2358,48 @@ - 'address': 'VmDeviceAddress', 'alias': 'str', 'deviceId': 'UUID'}} - - ## -+# @VmSmartcardDeviceSpecParams: -+# -+# Additional VM smartcard device parameters. -+# -+# Since: 4.10.3 -+## -+{'type': 'VmSmartcardDeviceSpecParams', 'data': {}} -+ -+## -+# @VmSmartcardDeviceType: -+# -+# An enumeration of VM smartcard device types. -+# -+# @smartcard: A smartcard -+# -+# Since: 4.10.3 -+## -+{'enum': 'VmSmartcardDeviceType', 'data': ['smartcard']} -+ -+## -+# @VmSmartcardDevice: -+# -+# Properties of a VM smartcard device. -+# -+# @deviceType: The device type (always @smartcard) -+# -+# @device: The the type of smartcard device -+# -+# @address: Device hardware address -+# -+# @alias: Alias used to identify this device in commands -+# -+# @specParams: #optional Additional device parameters -+# -+# Since: 4.10.3 -+## -+{'type': 'VmSmartcardDevice', -+ 'data': {'deviceType': 'VmDeviceType', 'device': 'VmSmartcardDeviceType', -+ 'address': 'VmDeviceAddress', 'alias': 'str', -+ '*specParams': 'VmSmartcardDeviceSpecParams'}} -+ -+## - # @VmConsoleDevice: - # - # Properties of a VM console device. -@@ -2382,7 +2426,8 @@ - 'data': {'deviceType': 'VmDeviceType',}, - 'union': ['VmDiskDevice', 'VmInterfaceDevice', 'VmVideoDevice', - 'VmSoundDevice', 'VmControllerDevice', 'VmBalloonDevice', -- 'VmChannelDevice', 'VmWatchdogDevice', 'VmConsoleDevice']} -+ 'VmChannelDevice', 'VmWatchdogDevice', 'VmConsoleDevice', -+ 'VmSmartcardDevice']} - - ## - # @VmShortStatus: -diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am -index 9f00d4d..0e27a98 100644 ---- a/vdsm_hooks/Makefile.am -+++ b/vdsm_hooks/Makefile.am -@@ -37,7 +37,6 @@ SUBDIRS += \ - promisc \ - qos \ - scratchpad \ -- smartcard \ - smbios \ - sriov \ - vmdisk \ -diff --git a/vdsm_hooks/README b/vdsm_hooks/README -index b45b93e..1659610 100644 ---- a/vdsm_hooks/README -+++ b/vdsm_hooks/README -@@ -24,7 +24,7 @@ To work with VDSM hooks you need first to do the following: - - If you want to enable more then one custom hook use the semicolon as - a separator: -- # rhevm-config -s UserDefinedVMProperties='pincpu=^[0-9]+$;smartcard=^(true|false)$' --cver=3.0 -+ # rhevm-config -s UserDefinedVMProperties='pincpu=^[0-9]+$;sap_agent=^(true|false)$' --cver=3.0 - - The convention is [hook name]=[value], the value is evaluate with regular expression, - If you find regular expression too complex, you can always use the following command: -@@ -47,7 +47,7 @@ To work with VDSM hooks you need first to do the following: - pincpu=1 - if you want to use more then on hook and you did enable it with the rhevm-config - tool, you can use the semicolon as a separator: -- pincpu=1;smartcard=true -+ pincpu=1;sap_agent=true - b. Another option is to use "Run Once" dialog which mean that you add a custom property - only this time to the VM, next time that you run the VM it will run without the - custom property that you provided. -diff --git a/vdsm_hooks/smartcard/Makefile.am b/vdsm_hooks/smartcard/Makefile.am -deleted file mode 100644 -index dfefff5..0000000 ---- a/vdsm_hooks/smartcard/Makefile.am -+++ /dev/null -@@ -1,18 +0,0 @@ --# Copyright 2008 Red Hat, Inc. and/or its affiliates. --# --# Licensed to you under the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. See the files README and --# LICENSE_GPL_v2 which accompany this distribution. --# -- --EXTRA_DIST = \ -- before_vm_start.py -- --install-data-local: -- $(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_vm_start -- $(INSTALL_SCRIPT) $(srcdir)/before_vm_start.py \ -- $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_smartcard -- --uninstall-local: -- $(RM) $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_smartcard -diff --git a/vdsm_hooks/smartcard/README b/vdsm_hooks/smartcard/README -deleted file mode 100644 -index bd376bf..0000000 ---- a/vdsm_hooks/smartcard/README -+++ /dev/null -@@ -1,9 +0,0 @@ --smartcard hook: --=============== --add smartcard support for spice -- --syntax: --smartcard: smartcard=true -- --libvirt xml: -- -diff --git a/vdsm_hooks/smartcard/before_vm_start.py b/vdsm_hooks/smartcard/before_vm_start.py -deleted file mode 100755 -index 1944978..0000000 ---- a/vdsm_hooks/smartcard/before_vm_start.py -+++ /dev/null -@@ -1,29 +0,0 @@ --#!/usr/bin/python -- --import os --import sys --import hooking --import traceback -- --''' --smartcard vdsm hook --adding to domain xml -- --''' -- --if 'smartcard' in os.environ: -- try: -- sys.stderr.write('smartcard: adding smartcard support\n') -- domxml = hooking.read_domxml() -- -- devices = domxml.getElementsByTagName('devices')[0] -- card = domxml.createElement('smartcard') -- card.setAttribute('mode', 'passthrough') -- card.setAttribute('type', 'spicevmc') -- -- devices.appendChild(card) -- -- hooking.write_domxml(domxml) -- except: -- sys.stderr.write('smartcard: [unexpected error]: %s\n' % traceback.format_exc()) -- sys.exit(2) --- -1.7.11.7 - diff --git a/0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch b/0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch deleted file mode 100644 index d20a3c9..0000000 --- a/0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 03389bcfa0808927ad7e8115073f89f05ce7fe5b Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 15 Jan 2013 13:12:08 -0500 -Subject: [PATCH 07/22] vdsm.spec: python-ordereddict only for rhel < 7 - -rhel7 contains python 2.7 which already includes ordereddict module, -no need extra python package. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891542 -Change-Id: I784d82a7fb5a1c6a13f015747f077020b91c19cb -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/11056 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index f9e238b..c01d29f 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -44,7 +44,7 @@ BuildRequires: libvirt-python - BuildRequires: genisoimage - BuildRequires: openssl - BuildRequires: m2crypto --%if 0%{?rhel} -+%if 0%{?rhel} < 7 - BuildRequires: python-ordereddict - %endif - -@@ -174,7 +174,7 @@ Summary: VDSM API Server - BuildArch: noarch - - Requires: %{name}-python = %{version}-%{release} --%if 0%{?rhel} -+%if 0%{?rhel} < 7 - Requires: python-ordereddict - %endif - --- -1.8.1 - diff --git a/0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch b/0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch deleted file mode 100644 index 20dcf5b..0000000 --- a/0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 95765433ada7074f49fb33bb2f2ea59799022e98 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 15 Jan 2013 13:16:06 -0500 -Subject: [PATCH 08/22] vdsm.spec: Don't require python-ordereddict on fedora - -It is a regression introduced by commit bb0620f. The condition "0%{?rhel} < 7" -also holds true on fedora, so it causes to require python-ordereddict on fedora - -Change-Id: I87e167f207669f4dda5bb71d7809fe301ea7e905 -Signed-off-by: Mark Wu -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/11057 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index c01d29f..b518045 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -44,7 +44,7 @@ BuildRequires: libvirt-python - BuildRequires: genisoimage - BuildRequires: openssl - BuildRequires: m2crypto --%if 0%{?rhel} < 7 -+%if 0%{?rhel} == 6 - BuildRequires: python-ordereddict - %endif - -@@ -174,7 +174,7 @@ Summary: VDSM API Server - BuildArch: noarch - - Requires: %{name}-python = %{version}-%{release} --%if 0%{?rhel} < 7 -+%if 0%{?rhel} == 6 - Requires: python-ordereddict - %endif - --- -1.8.1 - diff --git a/0009-vdsm.spec-BuildRequires-python-pthreading.patch b/0009-vdsm.spec-BuildRequires-python-pthreading.patch deleted file mode 100644 index 1aff2c9..0000000 --- a/0009-vdsm.spec-BuildRequires-python-pthreading.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bed07103fc279eefd3f879f7f47e7d3b3c2cd8a9 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 15 Jan 2013 14:16:01 -0500 -Subject: [PATCH 09/22] vdsm.spec: BuildRequires: python-pthreading - -Moving python-pthreading to be a generic BuildRequirement - -Change-Id: If996c366cac42e149193651d2d8a6dbde6d8c81e -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891542 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/11058 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index b518045..14381e5 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -39,6 +39,7 @@ BuildRequires: python-nose - - # BuildRequires needed by the tests during the build - BuildRequires: python-ethtool -+BuildRequires: python-pthreading - BuildRequires: libselinux-python - BuildRequires: libvirt-python - BuildRequires: genisoimage --- -1.8.1 - diff --git a/0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch b/0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch deleted file mode 100644 index 658729a..0000000 --- a/0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 72ff12082013c1682604e2ffb9e8a06b2714d64e Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Thu, 17 Jan 2013 09:38:43 +0200 -Subject: [PATCH 10/22] Searching for both py and pyc file to start super vdsm - -In oVirt Node we don't keep py files. - -Change-Id: I36771ce46f5d00ad8befe33569252bdb8cffeaa1 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/10854 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11133 -Reviewed-by: Vinzenz Feenstra ---- - vdsm/supervdsm.py | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py -index 532d5ac..740a93e 100644 ---- a/vdsm/supervdsm.py -+++ b/vdsm/supervdsm.py -@@ -35,19 +35,23 @@ _g_singletonSupervdsmInstance = None - _g_singletonSupervdsmInstance_lock = threading.Lock() - - --def __supervdsmServerPath(serverFile): -+def __supervdsmServerPath(): - base = os.path.dirname(__file__) - -- serverPath = os.path.join(base, serverFile) -- if os.path.exists(serverPath): -- return os.path.abspath(serverPath) -+ # serverFile can be both the py or pyc file. In oVirt node we don't keep -+ # py files. this method looks for one of the two to calculate the absolute -+ # path of supervdsmServer -+ for serverFile in ("supervdsmServer.py", "supervdsmServer.pyc"): -+ serverPath = os.path.join(base, serverFile) -+ if os.path.exists(serverPath): -+ return os.path.abspath(serverPath) - - raise RuntimeError("SuperVDSM Server not found") - - PIDFILE = os.path.join(constants.P_VDSM_RUN, "svdsm.pid") - TIMESTAMP = os.path.join(constants.P_VDSM_RUN, "svdsm.time") - ADDRESS = os.path.join(constants.P_VDSM_RUN, "svdsm.sock") --SUPERVDSM = __supervdsmServerPath("supervdsmServer.py") -+SUPERVDSM = __supervdsmServerPath() - - extraPythonPathList = [] - --- -1.8.1 - diff --git a/0011-adding-getHardwareInfo-API-to-vdsm.patch b/0011-adding-getHardwareInfo-API-to-vdsm.patch deleted file mode 100644 index 85a1509..0000000 --- a/0011-adding-getHardwareInfo-API-to-vdsm.patch +++ /dev/null @@ -1,334 +0,0 @@ -From 6d25123c36637eb82966d52e33330bdbfa733413 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Fri, 18 Jan 2013 15:01:37 +0200 -Subject: [PATCH 11/22] adding getHardwareInfo API to vdsm - -Super vdsm retrieves system info about host hardware -parameters. This info will be shown as part of getHardwareInfo -API call in a structure called HardwareInformation. - -This feature currently available only for x86 cpu platfroms, for other -platfroms the api call returns empty dictionary. - -Feature-Description: -http://wiki.ovirt.org/wiki/Features/Design/HostHardwareInfo - -Change-Id: Ic429ef101fcf9047c4b552405314dc7ba9ba07a0 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/9258 -Reviewed-by: Barak Azulay -Reviewed-by: Shu Ming -Reviewed-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/11168 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 5 +++ - vdsm/API.py | 11 +++++ - vdsm/BindingXMLRPC.py | 5 +++ - vdsm/Makefile.am | 1 + - vdsm/define.py | 3 ++ - vdsm/dmidecodeUtil.py | 99 ++++++++++++++++++++++++++++++++++++++++++++ - vdsm/supervdsmServer.py | 10 +++++ - vdsm_api/vdsmapi-schema.json | 25 +++++++++++ - vdsm_cli/vdsClient.py | 7 ++++ - 9 files changed, 166 insertions(+) - create mode 100644 vdsm/dmidecodeUtil.py - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 14381e5..5b13419 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -45,6 +45,9 @@ BuildRequires: libvirt-python - BuildRequires: genisoimage - BuildRequires: openssl - BuildRequires: m2crypto -+%ifarch x86_64 -+BuildRequires: python-dmidecode -+%endif - %if 0%{?rhel} == 6 - BuildRequires: python-ordereddict - %endif -@@ -77,6 +80,7 @@ Requires: m2crypto - Requires: %{name}-xmlrpc = %{version}-%{release} - - %ifarch x86_64 -+Requires: python-dmidecode - Requires: dmidecode - %endif - -@@ -610,6 +614,7 @@ exit 0 - %{_datadir}/%{vdsm_name}/blkid.py* - %{_datadir}/%{vdsm_name}/caps.py* - %{_datadir}/%{vdsm_name}/clientIF.py* -+%{_datadir}/%{vdsm_name}/dmidecodeUtil.py* - %{_datadir}/%{vdsm_name}/API.py* - %{_datadir}/%{vdsm_name}/hooking.py* - %{_datadir}/%{vdsm_name}/hooks.py* -diff --git a/vdsm/API.py b/vdsm/API.py -index a1e3f2c..732f8a3 100644 ---- a/vdsm/API.py -+++ b/vdsm/API.py -@@ -1119,6 +1119,17 @@ class Global(APIBase): - - return {'status': doneCode, 'info': c} - -+ def getHardwareInfo(self): -+ """ -+ Report host hardware information -+ """ -+ try: -+ hw = supervdsm.getProxy().getHardwareInfo() -+ return {'status': doneCode, 'info': hw} -+ except: -+ self.log.error("failed to retrieve hardware info", exc_info=True) -+ return errCode['hwInfoErr'] -+ - def getStats(self): - """ - Report host statistics. -diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py -index 73185b9..f19a8bb 100644 ---- a/vdsm/BindingXMLRPC.py -+++ b/vdsm/BindingXMLRPC.py -@@ -288,6 +288,10 @@ class BindingXMLRPC(object): - ret['info'].update(self.getServerInfo()) - return ret - -+ def getHardwareInfo(self): -+ api = API.Global() -+ return api.getHardwareInfo() -+ - def getStats(self): - api = API.Global() - return api.getStats() -@@ -768,6 +772,7 @@ class BindingXMLRPC(object): - (self.vmGetMigrationStatus, 'migrateStatus'), - (self.vmMigrationCancel, 'migrateCancel'), - (self.getCapabilities, 'getVdsCapabilities'), -+ (self.getHardwareInfo, 'getVdsHardwareInfo'), - (self.getStats, 'getVdsStats'), - (self.vmGetStats, 'getVmStats'), - (self.getAllVmStats, 'getAllVmStats'), -diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am -index dc0590e..88b3287 100644 ---- a/vdsm/Makefile.am -+++ b/vdsm/Makefile.am -@@ -32,6 +32,7 @@ dist_vdsm_PYTHON = \ - configNetwork.py \ - debugPluginClient.py \ - dummybr.py \ -+ dmidecodeUtil.py \ - guestIF.py \ - hooking.py \ - hooks.py \ -diff --git a/vdsm/define.py b/vdsm/define.py -index efebea1..01b0c60 100644 ---- a/vdsm/define.py -+++ b/vdsm/define.py -@@ -127,6 +127,9 @@ errCode = {'noVM': {'status': - 'updateDevice': {'status': - {'code': 56, - 'message': 'Failed to update device'}}, -+ 'hwInfoErr': {'status': -+ {'code': 57, -+ 'message': 'Failed to read hardware information'}}, - 'recovery': {'status': - {'code': 99, - 'message': -diff --git a/vdsm/dmidecodeUtil.py b/vdsm/dmidecodeUtil.py -new file mode 100644 -index 0000000..eb8d834 ---- /dev/null -+++ b/vdsm/dmidecodeUtil.py -@@ -0,0 +1,99 @@ -+# -+# Copyright 2012 Red Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+# -+# Refer to the README and COPYING files for full details of the license -+# -+ -+import dmidecode -+from vdsm import utils -+ -+ -+# This function gets dict and returns new dict that includes only string -+# value for each key. Keys in d that their value is a dictionary will be -+# ignored because those keys define a lable for the sub dictionary -+# (and those keys are irrelevant for us in dmidecode output) -+def __leafDict(d): -+ ret = {} -+ for k, v in d.iteritems(): -+ if isinstance(v, dict): -+ ret.update(__leafDict(v)) -+ else: -+ ret[k] = v -+ return ret -+ -+ -+@utils.memoized -+def getAllDmidecodeInfo(): -+ myLeafDict = {} -+ for k in ('system', 'bios', 'cache', 'processor', 'chassis', 'memory'): -+ myLeafDict[k] = __leafDict(getattr(dmidecode, k)()) -+ return myLeafDict -+ -+ -+@utils.memoized -+def getHardwareInfoStructure(): -+ dmiInfo = getAllDmidecodeInfo() -+ sysStruct = {} -+ for k1, k2 in (('system', 'Manufacturer'), -+ ('system', 'Product Name'), -+ ('system', 'Version'), -+ ('system', 'Serial Number'), -+ ('system', 'UUID'), -+ ('system', 'Family')): -+ sysStruct[(k1 + k2).replace(' ', '')] = dmiInfo[k1][k2] -+ -+ return sysStruct -+ -+ -+def printInfo(d): -+ -+ def formatData(data): -+ return '\n'.join(['%s - %s' % (k, v) for k, v in data.iteritems()]) -+ -+ print( -+ """ -+ SYSTEM INFORMATION -+ ================== -+{system} -+ -+ BIOS INFORMATION -+ ================ -+{bios} -+ -+ CACHE INFORMATION -+ ================= -+{cache} -+ -+ PROCESSOR INFO -+ ============== -+{processor} -+ -+ CHASSIS INFO -+ ============ -+{chassis} -+ -+ MEMORY INFORMATION -+ ================== -+{memory} -+ """.format( -+ system=formatData(d['system']), -+ bios=formatData(d['bios']), -+ cache=formatData(d['cache']), -+ processor=formatData(d['processor']), -+ chassis=formatData(d['chassis']), -+ memory=formatData(d['memory'])) -+ ) -diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py -index 5effd41..dc89218 100755 ---- a/vdsm/supervdsmServer.py -+++ b/vdsm/supervdsmServer.py -@@ -17,6 +17,7 @@ - # Refer to the README and COPYING files for full details of the license - # - -+import platform - import logging - import logging.config - import sys -@@ -94,6 +95,15 @@ class _SuperVdsm(object): - return True - - @logDecorator -+ def getHardwareInfo(self, *args, **kwargs): -+ if platform.machine() in ('x86_64', 'i686'): -+ from dmidecodeUtil import getHardwareInfoStructure -+ return getHardwareInfoStructure() -+ else: -+ # not implemented over other architecture -+ return {} -+ -+ @logDecorator - def getDevicePartedInfo(self, *args, **kwargs): - return _getDevicePartedInfo(*args, **kwargs) - -diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json -index 7c9ef22..b69d33e 100644 ---- a/vdsm_api/vdsmapi-schema.json -+++ b/vdsm_api/vdsmapi-schema.json -@@ -690,6 +690,31 @@ - 'data': {'release': 'str', 'version': 'str', 'name': 'OSName'}} - - ## -+# @HardwareInformation: -+# -+# Host hardware fields. -+# -+# @systemManufacturer:  Host manufacturer's name -+# -+# @systemProductName:   Host's hardware module -+# -+# @systemSerialNumber:  Hardware serial number -+# -+# @systemFamily:        Processor type -+# -+# @systemUUID:          Host's hardware UUID -+# -+# @systemVersion:       Host's hardware version -+# -+# Since: 4.10.3 -+## -+{'type': 'HardwareInformation', -+ 'data': {'systemManufacturer': 'str', -+ 'systemProductName': 'str', 'systemVersion': 'str', -+ 'systemSerialNumber': 'str', 'systemUUID': 'str', -+ 'systemFamily': 'str'}} -+ -+## - # @SoftwarePackage: - # - # An enumeration of aliases for important software components. -diff --git a/vdsm_cli/vdsClient.py b/vdsm_cli/vdsClient.py -index c67e3fe..884dc5d 100644 ---- a/vdsm_cli/vdsClient.py -+++ b/vdsm_cli/vdsClient.py -@@ -411,6 +411,9 @@ class service: - def do_getCap(self, args): - return self.ExecAndExit(self.s.getVdsCapabilities()) - -+ def do_getHardware(self, args): -+ return self.ExecAndExit(self.s.getVdsHardwareInfo()) -+ - def do_getVdsStats(self, args): - return self.ExecAndExit(self.s.getVdsStats()) - -@@ -1900,6 +1903,10 @@ if __name__ == '__main__': - ('', - 'Get Capabilities info of the VDS' - )), -+ 'getVdsHardwareInfo': (serv.do_getHardware, -+ ('', -+ 'Get hardware info of the VDS' -+ )), - 'getVdsStats': (serv.do_getVdsStats, - ('', - 'Get Statistics info on the VDS' --- -1.8.1 - diff --git a/0012-Explicitly-shutdown-m2crypto-socket.patch b/0012-Explicitly-shutdown-m2crypto-socket.patch deleted file mode 100644 index 00ac452..0000000 --- a/0012-Explicitly-shutdown-m2crypto-socket.patch +++ /dev/null @@ -1,55 +0,0 @@ -From dcdc1ce83f0f4d426d31401ca14fb8c685150c45 Mon Sep 17 00:00:00 2001 -From: Andrey Gordeev -Date: Mon, 14 Jan 2013 10:30:52 +0100 -Subject: [PATCH 12/22] Explicitly shutdown m2crypto socket - -Aparently some versions of the m2crypto library don't shutdown correctly -underlying sockets when a SSL connection is closed. - -In Python 2.6.6 (the version in RHEL6 and in CentOS6) when the XML RPC -server closes a connection it calls the shutdown method on that -connection with sock.SHUT_WR as the parameter. This works fine for plain -sockets, and works well also for SSL sockets using the builtin ssl -module as it translates the call to shutdown to a complete shutdown of -the SSL connection. But m2crypto does an different translation and the -net result is that the underlying SSL connection is not completely -closed. - -In Python 2.7.3 (the version in Fedora 18) when the XML RPC server -closes a connection it calls the shutdown method on that connection with -sock.SHUT_RDWR, so no matter what SSL implementation is used the -underlying SSL connection is completely closed. - -This patch changes the SSLSocket class so that it explicitly shuts down -and closes the underlying socket when when the connection is closed. - -Change-Id: Ie1a471aaccb32554b94340ebfb92b9d7ba14407a -Signed-off-by: Juan Hernandez -Reviewed-on: http://gerrit.ovirt.org/10972 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11384 -Reviewed-by: Federico Simoncelli ---- - vdsm/SecureXMLRPCServer.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/vdsm/SecureXMLRPCServer.py b/vdsm/SecureXMLRPCServer.py -index 2de1cf7..bad2067 100644 ---- a/vdsm/SecureXMLRPCServer.py -+++ b/vdsm/SecureXMLRPCServer.py -@@ -57,6 +57,10 @@ class SSLSocket(object): - def gettimeout(self): - return self.connection.socket.gettimeout() - -+ def close(self): -+ self.connection.shutdown(socket.SHUT_RDWR) -+ self.connection.close() -+ - def __getattr__(self, name): - # This is how we delegate all the rest of the methods to the - # underlying SSL connection: --- -1.8.1 - diff --git a/0013-spec-require-policycoreutils-and-skip-sebool-errors.patch b/0013-spec-require-policycoreutils-and-skip-sebool-errors.patch deleted file mode 100644 index d8f3a98..0000000 --- a/0013-spec-require-policycoreutils-and-skip-sebool-errors.patch +++ /dev/null @@ -1,59 +0,0 @@ -From f28df85573914d1ccb57fdc7bae5121a9a24576c Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Tue, 11 Dec 2012 04:01:21 -0500 -Subject: [PATCH 13/22] spec: require policycoreutils and skip sebool errors - -In order to avoid a policycoreutils bug (rhbz 883355) when selinux is -disabled we now require the version 2.1.13-44 (or newer) of Fedora. -Additionally we now skip any error in the rpm scriptlets for the sebool -configuration (sebool-config) since they could interfere with the rpm -installation potentially leaving multiple packages installed. - -Change-Id: Iefd5f53c9118eeea6817ce9660ea18abcfd1955c -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/9840 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11363 ---- - vdsm.spec.in | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 5b13419..e153880 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -131,6 +131,12 @@ Requires: selinux-policy-targeted >= 3.10.0-149 - Requires: lvm2 >= 2.02.95 - %endif - -+# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is -+# disabled we now require the version 2.1.13-44 (or newer) of Fedora. -+%if 0%{?fedora} >= 18 -+Requires: policycoreutils >= 2.1.13-44 -+%endif -+ - Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client - Requires: psmisc >= 22.6-15 - Requires: fence-agents -@@ -479,7 +485,7 @@ export LC_ALL=C - /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} - - %post --%{_bindir}/vdsm-tool sebool-config -+%{_bindir}/vdsm-tool sebool-config || : - # set the vdsm "secret" password for libvirt - %{_bindir}/vdsm-tool set-saslpasswd - -@@ -521,7 +527,7 @@ then - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ - /etc/sysctl.conf - -- %{_bindir}/vdsm-tool sebool-unconfig -+ %{_bindir}/vdsm-tool sebool-unconfig || : - - /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt - --- -1.8.1 - diff --git a/0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch b/0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch deleted file mode 100644 index 360ec83..0000000 --- a/0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d28299352e54fe6615aba70280f76d25a088f851 Mon Sep 17 00:00:00 2001 -From: Mark Wu -Date: Wed, 23 Jan 2013 10:55:47 +0800 -Subject: [PATCH 14/22] spec: requires selinux-policy to avoid selinux failure - on access tls cert - -selinux-policy tightened up the security on svirt_t on fedora18. It causes -that svirt_t is disallowed to access cert_t file. And therefore it will block -qemu run spice server with tls. For more details, please see: -https://bugzilla.redhat.com/show_bug.cgi?id=890345 - -Change-Id: I9fe74c6187e7e9f2a8c0b2a824d2871fb5497d86 -Signed-off-by: Mark Wu -Reviewed-on: http://gerrit.ovirt.org/11290 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11364 -Tested-by: Federico Simoncelli -Reviewed-by: Federico Simoncelli ---- - vdsm.spec.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index e153880..dfc2459 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -131,9 +131,10 @@ Requires: selinux-policy-targeted >= 3.10.0-149 - Requires: lvm2 >= 2.02.95 - %endif - -+%if 0%{?fedora} >= 18 -+Requires: selinux-policy-targeted >= 3.11.1-71 - # In order to avoid a policycoreutils bug (rhbz 883355) when selinux is - # disabled we now require the version 2.1.13-44 (or newer) of Fedora. --%if 0%{?fedora} >= 18 - Requires: policycoreutils >= 2.1.13-44 - %endif - --- -1.8.1 - diff --git a/0015-vdsmd.service-require-either-ntpd-or-chronyd.patch b/0015-vdsmd.service-require-either-ntpd-or-chronyd.patch deleted file mode 100644 index cceab27..0000000 --- a/0015-vdsmd.service-require-either-ntpd-or-chronyd.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8a0e831eafedb0aefc6aadab7ac1448cab6b7643 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 23 Jan 2013 10:27:01 +0200 -Subject: [PATCH 15/22] vdsmd.service: require either ntpd or chronyd - -Fedora 18 ships with chronyd by default, which conflicts with ntpd. We -do not really care which one of the two is running, as long as the host -clock is synchronized. That's what requiring time-sync.target means. - -Change-Id: Ie0605bea6d34c214aea8814a72a03e9ad2883fdb -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11291 -Reviewed-by: Zhou Zheng Sheng -Reviewed-by: Antoni Segura Puimedon -Reviewed-on: http://gerrit.ovirt.org/11366 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/vdsmd.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/vdsmd.service b/vdsm/vdsmd.service -index 6a650f4..9823b34 100644 ---- a/vdsm/vdsmd.service -+++ b/vdsm/vdsmd.service -@@ -1,6 +1,6 @@ - [Unit] - Description=Virtual Desktop Server Manager --Requires=multipathd.service libvirtd.service ntpd.service -+Requires=multipathd.service libvirtd.service time-sync.target - Conflicts=libvirt-guests.service - - [Service] --- -1.8.1 - diff --git a/0016-isRunning-didn-t-check-local-variable-before-reading.patch b/0016-isRunning-didn-t-check-local-variable-before-reading.patch deleted file mode 100644 index c2b85cb..0000000 --- a/0016-isRunning-didn-t-check-local-variable-before-reading.patch +++ /dev/null @@ -1,44 +0,0 @@ -From c95e492ccef335e82b2eb79495c35d08beab6629 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Thu, 17 Jan 2013 10:01:54 +0200 -Subject: [PATCH 16/22] isRunning didn't check local variable before reading - saved data - -All internal svdsm files contained last svdsm instance info, -after restart we didn't verify local manager instance before processing -the operation and got AttributeError exception when calling svdsm -manager. - -This returns false when _svdsm instance is None or in firstLaunch. - -Change-Id: I9dec0c6955dadcd959cc1c8df4e9745322fb0ce3 -Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=890365 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/10491 -Reviewed-by: Ayal Baron -Reviewed-on: http://gerrit.ovirt.org/11135 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/supervdsm.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py -index 740a93e..6a38076 100644 ---- a/vdsm/supervdsm.py -+++ b/vdsm/supervdsm.py -@@ -148,6 +148,9 @@ class SuperVdsmProxy(object): - self._firstLaunch = True - - def isRunning(self): -+ if self._firstLaunch or self._svdsm is None: -+ return False -+ - try: - with open(self.pidfile, "r") as f: - spid = f.read().strip() --- -1.8.1 - diff --git a/0017-udev-Race-fix-load-and-trigger-dev-rule.patch b/0017-udev-Race-fix-load-and-trigger-dev-rule.patch deleted file mode 100644 index 7615ee8..0000000 --- a/0017-udev-Race-fix-load-and-trigger-dev-rule.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 959a8703937f01161988221940d189acc4f7a796 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Sun, 13 Jan 2013 16:21:55 +0200 -Subject: [PATCH 17/22] udev: Race fix- load and trigger dev rule - -The rule file is generated, yet not synch-loaded in memory, so a VM with -a direct lun fails to start. -This patch reloads the rules before triggering using the new private -udev functions - udevReloadRules() in supervdsmServer.py . -Also added a check in appropriateDevice() (hsm.py) to make sure the -mapping is indeed there. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891300 -Change-Id: If3b2008a3d9df2dcaf54190721c2dd9764338627 -Signed-off-by: Lee Yarwood -Signed-off-by: Vered Volansky -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/11410 -Reviewed-by: Allon Mureinik ---- - vdsm/storage/hsm.py | 7 +++++++ - vdsm/supervdsmServer.py | 31 +++++++++++++++++++++++++++++++ - 2 files changed, 38 insertions(+) - -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index efb2749..62e9f74 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -67,6 +67,7 @@ import mount - import dispatcher - import supervdsm - import storageServer -+from vdsm import utils - - GUID = "guid" - NAME = "name" -@@ -87,6 +88,8 @@ SECTOR_SIZE = 512 - - STORAGE_CONNECTION_DIR = os.path.join(constants.P_VDSM_RUN, "connections/") - -+QEMU_READABLE_TIMEOUT = 30 -+ - - def public(f=None, **kwargs): - if f is None: -@@ -2925,6 +2928,10 @@ class HSM: - """ - supervdsm.getProxy().appropriateDevice(guid, thiefId) - supervdsm.getProxy().udevTrigger(guid) -+ devPath = devicemapper.DMPATH_FORMAT % guid -+ utils.retry(partial(fileUtils.validateQemuReadable, devPath), -+ expectedException=OSError, -+ timeout=QEMU_READABLE_TIMEOUT) - - @public - def inappropriateDevices(self, thiefId): -diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py -index dc89218..833e91f 100755 ---- a/vdsm/supervdsmServer.py -+++ b/vdsm/supervdsmServer.py -@@ -89,6 +89,10 @@ LOG_CONF_PATH = "/etc/vdsm/logger.conf" - - class _SuperVdsm(object): - -+ UDEV_WITH_RELOAD_VERSION = 181 -+ -+ log = logging.getLogger("SuperVdsm.ServerCallback") -+ - @logDecorator - def ping(self, *args, **kwargs): - # This method exists for testing purposes -@@ -226,6 +230,7 @@ class _SuperVdsm(object): - - @logDecorator - def udevTrigger(self, guid): -+ self.__udevReloadRules(guid) - cmd = [EXT_UDEVADM, 'trigger', '--verbose', '--action', 'change', - '--property-match=DM_NAME=%s' % guid] - rc, out, err = misc.execCmd(cmd, sudo=False) -@@ -304,6 +309,32 @@ class _SuperVdsm(object): - def removeFs(self, path): - return mkimage.removeFs(path) - -+ def __udevReloadRules(self, guid): -+ if self.__udevOperationReload(): -+ reload = "--reload" -+ else: -+ reload = "--reload-rules" -+ cmd = [EXT_UDEVADM, 'control', reload] -+ rc, out, err = misc.execCmd(cmd, sudo=False) -+ if rc: -+ self.log.error("Udevadm reload-rules command failed rc=%s, " -+ "out=\"%s\", err=\"%s\"", rc, out, err) -+ raise OSError(errno.EINVAL, "Could not reload-rules for device " -+ "%s" % guid) -+ -+ @utils.memoized -+ def __udevVersion(self): -+ cmd = [EXT_UDEVADM, '--version'] -+ rc, out, err = misc.execCmd(cmd, sudo=False) -+ if rc: -+ self.log.error("Udevadm version command failed rc=%s, " -+ " out=\"%s\", err=\"%s\"", rc, out, err) -+ raise RuntimeError("Could not get udev version number") -+ return int(out[0]) -+ -+ def __udevOperationReload(self): -+ return self.__udevVersion() > self.UDEV_WITH_RELOAD_VERSION -+ - - def __pokeParent(parentPid, address, log): - try: --- -1.8.1 - diff --git a/0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch b/0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch deleted file mode 100644 index 2412a47..0000000 --- a/0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch +++ /dev/null @@ -1,171 +0,0 @@ -From c7ee9217ec6edebec7b1d3a2536792114fd1a258 Mon Sep 17 00:00:00 2001 -From: Yeela Kaplan -Date: Fri, 25 Jan 2013 15:54:07 +0200 -Subject: [PATCH 18/22] Change scsi_id command path to be configured at runtime - -On fedora 18 scsi_id path is no longer under /sbin/scsi_id, -we configure vdsm to look for the path at runtime -and thus remove it from constants. - -Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886087 -Signed-off-by: Yeela Kaplan -Reviewed-on: http://gerrit.ovirt.org/10824 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11393 -Tested-by: Federico Simoncelli ---- - configure.ac | 2 -- - vdsm/constants.py.in | 24 ------------------------ - vdsm/storage/multipath.py | 45 ++++++++++++++++++++++++++++++++++++++++----- - vdsm/sudoers.vdsm.in | 1 - - 4 files changed, 40 insertions(+), 32 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 3489e38..edc0b50 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -167,8 +167,6 @@ AC_PATH_PROG([QEMUIMG_PATH], [qemu-img], [/usr/bin/qemu-img]) - AC_PATH_PROG([REBOOT_PATH], [reboot], [/usr/bin/reboot]) - AC_PATH_PROG([RPM_PATH], [rpm], [/bin/rpm]) - AC_PATH_PROG([RSYNC_PATH], [rsync], [/usr/bin/rsync]) --AC_PATH_PROG([SCSI_ID_PATH], [scsi_id], [/sbin/scsi_id], -- [$PATH$PATH_SEPARATOR/lib/udev]) - AC_PATH_PROG([SED_PATH], [sed], [/bin/sed]) - AC_PATH_PROG([SERVICE_PATH], [service], [/sbin/service]) - AC_PATH_PROG([SETSID_PATH], [setsid], [/usr/bin/setsid]) -diff --git a/vdsm/constants.py.in b/vdsm/constants.py.in -index 8034b8e..ec5fff9 100644 ---- a/vdsm/constants.py.in -+++ b/vdsm/constants.py.in -@@ -127,7 +127,6 @@ EXT_QEMUIMG = '@QEMUIMG_PATH@' - EXT_REBOOT = '@REBOOT_PATH@' - EXT_RSYNC = '@RSYNC_PATH@' - --EXT_SCSI_ID = '@SCSI_ID_PATH@' # TBD ! - EXT_SERVICE = '@SERVICE_PATH@' - EXT_SETSID = '@SETSID_PATH@' - EXT_SH = '/bin/sh' # The shell path is invariable -@@ -157,26 +156,3 @@ CMD_LOWPRIO = [EXT_NICE, '-n', '19', EXT_IONICE, '-c', '3'] - STRG_ISCSI_HOST = "iscsi_host/" - STRG_SCSI_HOST = "scsi_host/" - STRG_ISCSI_SESSION = "iscsi_session/" --STRG_MPATH_CONF = ( -- "\n\n" -- "defaults {\n" -- " polling_interval 5\n" -- " getuid_callout \"@SCSI_ID_PATH@ --whitelisted " -- "--replace-whitespace --device=/dev/%n\"\n" -- " no_path_retry fail\n" -- " user_friendly_names no\n" -- " flush_on_last_del yes\n" -- " fast_io_fail_tmo 5\n" -- " dev_loss_tmo 30\n" -- " max_fds 4096\n" -- "}\n" -- "\n" -- "devices {\n" -- "device {\n" -- " vendor \"HITACHI\"\n" -- " product \"DF.*\"\n" -- " getuid_callout \"@SCSI_ID_PATH@ --whitelisted " -- "--replace-whitespace --device=/dev/%n\"\n" -- "}\n" -- "}" --) -diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py -index 741f1a1..05fd186 100644 ---- a/vdsm/storage/multipath.py -+++ b/vdsm/storage/multipath.py -@@ -30,6 +30,7 @@ import re - from collections import namedtuple - - from vdsm import constants -+from vdsm import utils - import misc - import iscsi - import supervdsm -@@ -49,13 +50,47 @@ MPATH_CONF = "/etc/multipath.conf" - - OLD_TAGS = ["# RHAT REVISION 0.2", "# RHEV REVISION 0.3", - "# RHEV REVISION 0.4", "# RHEV REVISION 0.5", -- "# RHEV REVISION 0.6", "# RHEV REVISION 0.7"] --MPATH_CONF_TAG = "# RHEV REVISION 0.8" -+ "# RHEV REVISION 0.6", "# RHEV REVISION 0.7", -+ "# RHEV REVISION 0.8", "# RHEV REVISION 0.9"] -+MPATH_CONF_TAG = "# RHEV REVISION 1.0" - MPATH_CONF_PRIVATE_TAG = "# RHEV PRIVATE" --MPATH_CONF_TEMPLATE = MPATH_CONF_TAG + constants.STRG_MPATH_CONF -+STRG_MPATH_CONF = ( -+ "\n\n" -+ "defaults {\n" -+ " polling_interval 5\n" -+ " getuid_callout \"%(scsi_id_path)s --whitelisted " -+ "--replace-whitespace --device=/dev/%%n\"\n" -+ " no_path_retry fail\n" -+ " user_friendly_names no\n" -+ " flush_on_last_del yes\n" -+ " fast_io_fail_tmo 5\n" -+ " dev_loss_tmo 30\n" -+ " max_fds 4096\n" -+ "}\n" -+ "\n" -+ "devices {\n" -+ "device {\n" -+ " vendor \"HITACHI\"\n" -+ " product \"DF.*\"\n" -+ " getuid_callout \"%(scsi_id_path)s --whitelisted " -+ "--replace-whitespace --device=/dev/%%n\"\n" -+ "}\n" -+ "device {\n" -+ " vendor \"COMPELNT\"\n" -+ " product \"Compellent Vol\"\n" -+ " no_path_retry fail\n" -+ "}\n" -+ "}" -+) -+MPATH_CONF_TEMPLATE = MPATH_CONF_TAG + STRG_MPATH_CONF - - log = logging.getLogger("Storage.Multipath") - -+_scsi_id = utils.CommandPath("scsi_id", -+ "/sbin/scsi_id", # EL6 -+ "/usr/lib/udev/scsi_id", # Fedora -+ ) -+ - - def rescan(): - """ -@@ -127,7 +162,7 @@ def setupMultipath(): - os.path.basename(MPATH_CONF), MAX_CONF_COPIES, - cp=True, persist=True) - with tempfile.NamedTemporaryFile() as f: -- f.write(MPATH_CONF_TEMPLATE) -+ f.write(MPATH_CONF_TEMPLATE % {'scsi_id_path': _scsi_id.cmd}) - f.flush() - cmd = [constants.EXT_CP, f.name, MPATH_CONF] - rc = misc.execCmd(cmd, sudo=True)[0] -@@ -173,7 +208,7 @@ def getDeviceSize(dev): - - def getScsiSerial(physdev): - blkdev = os.path.join("/dev", physdev) -- cmd = [constants.EXT_SCSI_ID, -+ cmd = [_scsi_id.cmd, - "--page=0x80", - "--whitelisted", - "--export", -diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in -index ab99e8e..4fc75f9 100644 ---- a/vdsm/sudoers.vdsm.in -+++ b/vdsm/sudoers.vdsm.in -@@ -23,7 +23,6 @@ Cmnd_Alias VDSM_STORAGE = @MOUNT_PATH@, @UMOUNT_PATH@, \ - @SERVICE_PATH@ iscsid *, \ - @SERVICE_PATH@ multipathd restart, \ - @SERVICE_PATH@ multipathd reload, \ -- @SCSI_ID_PATH@, \ - @ISCSIADM_PATH@ *, \ - @LVM_PATH@, \ - @CAT_PATH@ /sys/block/*/device/../../*, \ --- -1.8.1 - diff --git a/0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch b/0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch deleted file mode 100644 index 5a1c4a9..0000000 --- a/0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 33480cbc90a4810aa99e3fc7b36e879cdb0c19d4 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Wed, 9 Jan 2013 09:57:52 +0200 -Subject: [PATCH 19/22] upgrade: force upgrade to v2 before upgrading to v3 - -During the upgrade of a domain to version 3 vdsm reallocates the -metadata slots that are higher than 1947 (given a leases LV of 2Gb) -in order to use the same offsets for the volume leases (BZ#882276 -and git commit hash 2ba76e3). -This has no effect when the domain is version 0 since the metadata -slots offsets are fixed (the first physical extent of the LV) and -they can't be reallocated. In such case the domain must be upgraded -to version 2 first. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893184 -Change-Id: I2bd424ad29e76d1368ff2959bb8fe45afc595cdb -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/10792 -Reviewed-by: Ayal Baron -Tested-by: Haim Ateya -Reviewed-on: http://gerrit.ovirt.org/11462 ---- - vdsm/storage/imageRepository/formatConverter.py | 26 +++++++++++++++++-------- - vdsm/storage/volume.py | 4 +++- - 2 files changed, 21 insertions(+), 9 deletions(-) - -diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py -index 0d7dd6d..88b053d 100644 ---- a/vdsm/storage/imageRepository/formatConverter.py -+++ b/vdsm/storage/imageRepository/formatConverter.py -@@ -93,6 +93,23 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): - log = logging.getLogger('Storage.v3DomainConverter') - log.debug("Starting conversion for domain %s", domain.sdUUID) - -+ targetVersion = 3 -+ currentVersion = domain.getVersion() -+ -+ # For block domains if we're upgrading from version 0 we need to first -+ # upgrade to version 2 and then proceed to upgrade to version 3. -+ if domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES: -+ if currentVersion == 0: -+ log.debug("Upgrading domain %s from version %s to version 2", -+ domain.sdUUID, currentVersion) -+ v2DomainConverter(repoPath, hostId, domain, isMsd) -+ currentVersion = domain.getVersion() -+ -+ if currentVersion != 2: -+ log.debug("Unsupported conversion from version %s to version %s", -+ currentVersion, targetVersion) -+ raise se.UnsupportedDomainVersion(currentVersion) -+ - if domain.getStorageType() in sd.FILE_DOMAIN_TYPES: - log.debug("Setting permissions for domain %s", domain.sdUUID) - domain.setMetadataPermissions() -@@ -268,17 +285,10 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): - "not critical since the volume might be in use", - imgUUID, exc_info=True) - -- targetVersion = 3 -- currentVersion = domain.getVersion() - log.debug("Finalizing the storage domain upgrade from version %s to " - "version %s for domain %s", currentVersion, targetVersion, - domain.sdUUID) -- -- if (currentVersion not in blockSD.VERS_METADATA_TAG -- and domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES): -- __convertDomainMetadataToTags(domain, targetVersion) -- else: -- domain.setMetaParam(sd.DMDK_VERSION, targetVersion) -+ domain.setMetaParam(sd.DMDK_VERSION, targetVersion) - - except: - if isMsd: -diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py -index cde612a..12dd188 100644 ---- a/vdsm/storage/volume.py -+++ b/vdsm/storage/volume.py -@@ -503,7 +503,9 @@ class Volume(object): - cls.newMetadata(metaId, sdUUID, imgUUID, srcVolUUID, size, - type2name(volFormat), type2name(preallocate), - volType, diskType, desc, LEGAL_VOL) -- cls.newVolumeLease(metaId, sdUUID, volUUID) -+ -+ if dom.hasVolumeLeases(): -+ cls.newVolumeLease(metaId, sdUUID, volUUID) - - except se.StorageException: - cls.log.error("Unexpected error", exc_info=True) --- -1.8.1 - diff --git a/0020-misc-rename-safelease-to-clusterlock.patch b/0020-misc-rename-safelease-to-clusterlock.patch deleted file mode 100644 index 3e1684c..0000000 --- a/0020-misc-rename-safelease-to-clusterlock.patch +++ /dev/null @@ -1,866 +0,0 @@ -From e60206af7781c86ddb5d2ef1fcac3f8f8b086ee4 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Fri, 14 Dec 2012 06:42:09 -0500 -Subject: [PATCH 20/22] misc: rename safelease to clusterlock - -The safelease module is now contaning also the sanlock implementation -and soon it might contain other (e.g.: a special lock for local storage -domains), for this reason it has been renamed with a more general name -clusterlock. The safelease implementation also required some cleanup in -order to achieve more uniformity between the locking mechanisms. - -Change-Id: I74070ebb43dd726362900a0746c08b2ee3d6eac7 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/10067 -Reviewed-by: Allon Mureinik -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11463 ---- - vdsm.spec.in | 2 +- - vdsm/API.py | 4 +- - vdsm/storage/Makefile.am | 4 +- - vdsm/storage/blockSD.py | 4 +- - vdsm/storage/clusterlock.py | 251 ++++++++++++++++++++++++ - vdsm/storage/hsm.py | 20 +- - vdsm/storage/imageRepository/formatConverter.py | 6 +- - vdsm/storage/safelease.py | 250 ----------------------- - vdsm/storage/sd.py | 12 +- - vdsm/storage/sp.py | 25 ++- - 10 files changed, 289 insertions(+), 289 deletions(-) - create mode 100644 vdsm/storage/clusterlock.py - delete mode 100644 vdsm/storage/safelease.py - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index dfc2459..8ad4dce 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -685,7 +685,7 @@ exit 0 - %{_datadir}/%{vdsm_name}/storage/resourceFactories.py* - %{_datadir}/%{vdsm_name}/storage/remoteFileHandler.py* - %{_datadir}/%{vdsm_name}/storage/resourceManager.py* --%{_datadir}/%{vdsm_name}/storage/safelease.py* -+%{_datadir}/%{vdsm_name}/storage/clusterlock.py* - %{_datadir}/%{vdsm_name}/storage/sdc.py* - %{_datadir}/%{vdsm_name}/storage/sd.py* - %{_datadir}/%{vdsm_name}/storage/securable.py* -diff --git a/vdsm/API.py b/vdsm/API.py -index 732f8a3..a050a51 100644 ---- a/vdsm/API.py -+++ b/vdsm/API.py -@@ -33,7 +33,7 @@ import configNetwork - from vdsm import netinfo - from vdsm import constants - import storage.misc --import storage.safelease -+import storage.clusterlock - import storage.volume - import storage.sd - import storage.image -@@ -992,7 +992,7 @@ class StoragePool(APIBase): - def spmStart(self, prevID, prevLver, enableScsiFencing, - maxHostID=None, domVersion=None): - if maxHostID is None: -- maxHostID = storage.safelease.MAX_HOST_ID -+ maxHostID = storage.clusterlock.MAX_HOST_ID - recoveryMode = None # unused - return self._irs.spmStart(self._UUID, prevID, prevLver, - recoveryMode, enableScsiFencing, maxHostID, domVersion) -diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am -index cff09be..abc1545 100644 ---- a/vdsm/storage/Makefile.am -+++ b/vdsm/storage/Makefile.am -@@ -25,6 +25,7 @@ dist_vdsmstorage_PYTHON = \ - __init__.py \ - blockSD.py \ - blockVolume.py \ -+ clusterlock.py \ - devicemapper.py \ - dispatcher.py \ - domainMonitor.py \ -@@ -35,8 +36,8 @@ dist_vdsmstorage_PYTHON = \ - hba.py \ - hsm.py \ - image.py \ -+ iscsiadm.py \ - iscsi.py \ -- iscsiadm.py \ - localFsSD.py \ - lvm.py \ - misc.py \ -@@ -48,7 +49,6 @@ dist_vdsmstorage_PYTHON = \ - remoteFileHandler.py \ - resourceFactories.py \ - resourceManager.py \ -- safelease.py \ - sdc.py \ - sd.py \ - securable.py \ -diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py -index 61ec996..862e413 100644 ---- a/vdsm/storage/blockSD.py -+++ b/vdsm/storage/blockSD.py -@@ -37,7 +37,7 @@ import misc - import fileUtils - import sd - import lvm --import safelease -+import clusterlock - import blockVolume - import multipath - import resourceFactories -@@ -63,7 +63,7 @@ log = logging.getLogger("Storage.BlockSD") - - # FIXME: Make this calculated from something logical - RESERVED_METADATA_SIZE = 40 * (2 ** 20) --RESERVED_MAILBOX_SIZE = MAILBOX_SIZE * safelease.MAX_HOST_ID -+RESERVED_MAILBOX_SIZE = MAILBOX_SIZE * clusterlock.MAX_HOST_ID - METADATA_BASE_SIZE = 378 - # VG's min metadata threshold is 20% - VG_MDA_MIN_THRESHOLD = 0.2 -diff --git a/vdsm/storage/clusterlock.py b/vdsm/storage/clusterlock.py -new file mode 100644 -index 0000000..4525b2f ---- /dev/null -+++ b/vdsm/storage/clusterlock.py -@@ -0,0 +1,251 @@ -+# -+# Copyright 2011 Red Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+# -+# Refer to the README and COPYING files for full details of the license -+# -+ -+import os -+import threading -+import logging -+import subprocess -+from contextlib import nested -+import sanlock -+ -+import misc -+import storage_exception as se -+from vdsm import constants -+from vdsm.config import config -+ -+ -+MAX_HOST_ID = 250 -+ -+# The LEASE_OFFSET is used by SANLock to not overlap with safelease in -+# orfer to preserve the ability to acquire both locks (e.g.: during the -+# domain upgrade) -+SDM_LEASE_NAME = 'SDM' -+SDM_LEASE_OFFSET = 512 * 2048 -+ -+ -+class SafeLease(object): -+ log = logging.getLogger("SafeLease") -+ -+ lockUtilPath = config.get('irs', 'lock_util_path') -+ lockCmd = config.get('irs', 'lock_cmd') -+ freeLockCmd = config.get('irs', 'free_lock_cmd') -+ -+ def __init__(self, sdUUID, idsPath, leasesPath, lockRenewalIntervalSec, -+ leaseTimeSec, leaseFailRetry, ioOpTimeoutSec): -+ self._lock = threading.Lock() -+ self._sdUUID = sdUUID -+ self._idsPath = idsPath -+ self._leasesPath = leasesPath -+ self.setParams(lockRenewalIntervalSec, leaseTimeSec, leaseFailRetry, -+ ioOpTimeoutSec) -+ -+ def initLock(self): -+ lockUtil = os.path.join(self.lockUtilPath, "safelease") -+ initCommand = [lockUtil, "release", "-f", self._leasesPath, "0"] -+ rc, out, err = misc.execCmd(initCommand, sudo=False, -+ cwd=self.lockUtilPath) -+ if rc != 0: -+ self.log.warn("could not initialise spm lease (%s): %s", rc, out) -+ raise se.ClusterLockInitError() -+ -+ def setParams(self, lockRenewalIntervalSec, leaseTimeSec, leaseFailRetry, -+ ioOpTimeoutSec): -+ self._lockRenewalIntervalSec = lockRenewalIntervalSec -+ self._leaseTimeSec = leaseTimeSec -+ self._leaseFailRetry = leaseFailRetry -+ self._ioOpTimeoutSec = ioOpTimeoutSec -+ -+ def getReservedId(self): -+ return 1000 -+ -+ def acquireHostId(self, hostId, async): -+ self.log.debug("Host id for domain %s successfully acquired (id: %s)", -+ self._sdUUID, hostId) -+ -+ def releaseHostId(self, hostId, async, unused): -+ self.log.debug("Host id for domain %s released successfully (id: %s)", -+ self._sdUUID, hostId) -+ -+ def hasHostId(self, hostId): -+ return True -+ -+ def acquire(self, hostID): -+ leaseTimeMs = self._leaseTimeSec * 1000 -+ ioOpTimeoutMs = self._ioOpTimeoutSec * 1000 -+ with self._lock: -+ self.log.debug("Acquiring cluster lock for domain %s" % -+ self._sdUUID) -+ -+ lockUtil = self.getLockUtilFullPath() -+ acquireLockCommand = subprocess.list2cmdline([ -+ lockUtil, "start", self._sdUUID, str(hostID), -+ str(self._lockRenewalIntervalSec), str(self._leasesPath), -+ str(leaseTimeMs), str(ioOpTimeoutMs), str(self._leaseFailRetry) -+ ]) -+ -+ cmd = [constants.EXT_SETSID, constants.EXT_IONICE, '-c1', '-n0', -+ constants.EXT_SU, misc.IOUSER, '-s', constants.EXT_SH, '-c', -+ acquireLockCommand] -+ (rc, out, err) = misc.execCmd(cmd, cwd=self.lockUtilPath, -+ sudo=True) -+ if rc != 0: -+ raise se.AcquireLockFailure(self._sdUUID, rc, out, err) -+ self.log.debug("Clustered lock acquired successfully") -+ -+ def getLockUtilFullPath(self): -+ return os.path.join(self.lockUtilPath, self.lockCmd) -+ -+ def release(self): -+ with self._lock: -+ freeLockUtil = os.path.join(self.lockUtilPath, self.freeLockCmd) -+ releaseLockCommand = [freeLockUtil, self._sdUUID] -+ self.log.info("Releasing cluster lock for domain %s" % -+ self._sdUUID) -+ (rc, out, err) = misc.execCmd(releaseLockCommand, sudo=False, -+ cwd=self.lockUtilPath) -+ if rc != 0: -+ self.log.error("Could not release cluster lock " -+ "rc=%s out=%s, err=%s" % (str(rc), out, err)) -+ -+ self.log.debug("Cluster lock released successfully") -+ -+ -+class SANLock(object): -+ log = logging.getLogger("SANLock") -+ -+ _sanlock_fd = None -+ _sanlock_lock = threading.Lock() -+ -+ def __init__(self, sdUUID, idsPath, leasesPath, *args): -+ self._lock = threading.Lock() -+ self._sdUUID = sdUUID -+ self._idsPath = idsPath -+ self._leasesPath = leasesPath -+ self._sanlockfd = None -+ -+ def initLock(self): -+ try: -+ sanlock.init_lockspace(self._sdUUID, self._idsPath) -+ sanlock.init_resource(self._sdUUID, SDM_LEASE_NAME, -+ [(self._leasesPath, SDM_LEASE_OFFSET)]) -+ except sanlock.SanlockException: -+ self.log.warn("Cannot initialize clusterlock", exc_info=True) -+ raise se.ClusterLockInitError() -+ -+ def setParams(self, *args): -+ pass -+ -+ def getReservedId(self): -+ return MAX_HOST_ID -+ -+ def acquireHostId(self, hostId, async): -+ with self._lock: -+ self.log.info("Acquiring host id for domain %s (id: %s)", -+ self._sdUUID, hostId) -+ -+ try: -+ sanlock.add_lockspace(self._sdUUID, hostId, self._idsPath, -+ async=async) -+ except sanlock.SanlockException, e: -+ if e.errno == os.errno.EINPROGRESS: -+ # if the request is not asynchronous wait for the ongoing -+ # lockspace operation to complete -+ if not async and not sanlock.inq_lockspace( -+ self._sdUUID, hostId, self._idsPath, wait=True): -+ raise se.AcquireHostIdFailure(self._sdUUID, e) -+ # else silently continue, the host id has been acquired -+ # or it's in the process of being acquired (async) -+ elif e.errno != os.errno.EEXIST: -+ raise se.AcquireHostIdFailure(self._sdUUID, e) -+ -+ self.log.debug("Host id for domain %s successfully acquired " -+ "(id: %s)", self._sdUUID, hostId) -+ -+ def releaseHostId(self, hostId, async, unused): -+ with self._lock: -+ self.log.info("Releasing host id for domain %s (id: %s)", -+ self._sdUUID, hostId) -+ -+ try: -+ sanlock.rem_lockspace(self._sdUUID, hostId, self._idsPath, -+ async=async, unused=unused) -+ except sanlock.SanlockException, e: -+ if e.errno != os.errno.ENOENT: -+ raise se.ReleaseHostIdFailure(self._sdUUID, e) -+ -+ self.log.debug("Host id for domain %s released successfully " -+ "(id: %s)", self._sdUUID, hostId) -+ -+ def hasHostId(self, hostId): -+ with self._lock: -+ try: -+ return sanlock.inq_lockspace(self._sdUUID, -+ hostId, self._idsPath) -+ except sanlock.SanlockException: -+ self.log.debug("Unable to inquire sanlock lockspace " -+ "status, returning False", exc_info=True) -+ return False -+ -+ # The hostId parameter is maintained here only for compatibility with -+ # ClusterLock. We could consider to remove it in the future but keeping it -+ # for logging purpose is desirable. -+ def acquire(self, hostId): -+ with nested(self._lock, SANLock._sanlock_lock): -+ self.log.info("Acquiring cluster lock for domain %s (id: %s)", -+ self._sdUUID, hostId) -+ -+ while True: -+ if SANLock._sanlock_fd is None: -+ try: -+ SANLock._sanlock_fd = sanlock.register() -+ except sanlock.SanlockException, e: -+ raise se.AcquireLockFailure(self._sdUUID, e.errno, -+ "Cannot register to sanlock", str(e)) -+ -+ try: -+ sanlock.acquire(self._sdUUID, SDM_LEASE_NAME, -+ [(self._leasesPath, SDM_LEASE_OFFSET)], -+ slkfd=SANLock._sanlock_fd) -+ except sanlock.SanlockException, e: -+ if e.errno != os.errno.EPIPE: -+ raise se.AcquireLockFailure(self._sdUUID, e.errno, -+ "Cannot acquire cluster lock", str(e)) -+ SANLock._sanlock_fd = None -+ continue -+ -+ break -+ -+ self.log.debug("Cluster lock for domain %s successfully acquired " -+ "(id: %s)", self._sdUUID, hostId) -+ -+ def release(self): -+ with self._lock: -+ self.log.info("Releasing cluster lock for domain %s", self._sdUUID) -+ -+ try: -+ sanlock.release(self._sdUUID, SDM_LEASE_NAME, -+ [(self._leasesPath, SDM_LEASE_OFFSET)], -+ slkfd=SANLock._sanlock_fd) -+ except sanlock.SanlockException, e: -+ raise se.ReleaseLockFailure(self._sdUUID, e) -+ -+ self._sanlockfd = None -+ self.log.debug("Cluster lock for domain %s successfully released", -+ self._sdUUID) -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index 62e9f74..8bbe3b8 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -53,7 +53,7 @@ import iscsi - import misc - from misc import deprecated - import taskManager --import safelease -+import clusterlock - import storage_exception as se - from threadLocal import vars - from vdsm import constants -@@ -528,7 +528,7 @@ class HSM: - - @public - def spmStart(self, spUUID, prevID, prevLVER, recoveryMode, scsiFencing, -- maxHostID=safelease.MAX_HOST_ID, domVersion=None, -+ maxHostID=clusterlock.MAX_HOST_ID, domVersion=None, - options=None): - """ - Starts an SPM. -@@ -845,7 +845,7 @@ class HSM: - :raises: an :exc:`Storage_Exception.InvalidParameterException` if the - master domain is not supplied in the domain list. - """ -- safeLease = sd.packLeaseParams( -+ leaseParams = sd.packLeaseParams( - lockRenewalIntervalSec=lockRenewalIntervalSec, - leaseTimeSec=leaseTimeSec, - ioOpTimeoutSec=ioOpTimeoutSec, -@@ -853,9 +853,9 @@ class HSM: - vars.task.setDefaultException( - se.StoragePoolCreationError( - "spUUID=%s, poolName=%s, masterDom=%s, domList=%s, " -- "masterVersion=%s, safelease params: (%s)" % -+ "masterVersion=%s, clusterlock params: (%s)" % - (spUUID, poolName, masterDom, domList, masterVersion, -- safeLease))) -+ leaseParams))) - misc.validateUUID(spUUID, 'spUUID') - if masterDom not in domList: - raise se.InvalidParameterException("masterDom", str(masterDom)) -@@ -892,7 +892,7 @@ class HSM: - - return sp.StoragePool( - spUUID, self.taskMng).create(poolName, masterDom, domList, -- masterVersion, safeLease) -+ masterVersion, leaseParams) - - @public - def connectStoragePool(self, spUUID, hostID, scsiKey, -@@ -1701,7 +1701,7 @@ class HSM: - :returns: Nothing ? pool.reconstructMaster return nothing - :rtype: ? - """ -- safeLease = sd.packLeaseParams( -+ leaseParams = sd.packLeaseParams( - lockRenewalIntervalSec=lockRenewalIntervalSec, - leaseTimeSec=leaseTimeSec, - ioOpTimeoutSec=ioOpTimeoutSec, -@@ -1710,9 +1710,9 @@ class HSM: - - vars.task.setDefaultException( - se.ReconstructMasterError( -- "spUUID=%s, masterDom=%s, masterVersion=%s, safelease " -+ "spUUID=%s, masterDom=%s, masterVersion=%s, clusterlock " - "params: (%s)" % (spUUID, masterDom, masterVersion, -- safeLease))) -+ leaseParams))) - - self.log.info("spUUID=%s master=%s", spUUID, masterDom) - -@@ -1738,7 +1738,7 @@ class HSM: - domDict[d] = sd.validateSDDeprecatedStatus(status) - - return pool.reconstructMaster(hostId, poolName, masterDom, domDict, -- masterVersion, safeLease) -+ masterVersion, leaseParams) - - def _logResp_getDeviceList(self, response): - logableDevs = deepcopy(response) -diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py -index 88b053d..0742560 100644 ---- a/vdsm/storage/imageRepository/formatConverter.py -+++ b/vdsm/storage/imageRepository/formatConverter.py -@@ -26,7 +26,7 @@ from vdsm import qemuImg - from storage import sd - from storage import blockSD - from storage import image --from storage import safelease -+from storage import clusterlock - from storage import volume - from storage import blockVolume - from storage import storage_exception as se -@@ -115,8 +115,8 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): - domain.setMetadataPermissions() - - log.debug("Initializing the new cluster lock for domain %s", domain.sdUUID) -- newClusterLock = safelease.SANLock(domain.sdUUID, domain.getIdsFilePath(), -- domain.getLeasesFilePath()) -+ newClusterLock = clusterlock.SANLock( -+ domain.sdUUID, domain.getIdsFilePath(), domain.getLeasesFilePath()) - newClusterLock.initLock() - - log.debug("Acquiring the host id %s for domain %s", hostId, domain.sdUUID) -diff --git a/vdsm/storage/safelease.py b/vdsm/storage/safelease.py -deleted file mode 100644 -index 88a4eae..0000000 ---- a/vdsm/storage/safelease.py -+++ /dev/null -@@ -1,250 +0,0 @@ --# --# Copyright 2011 Red Hat, Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --# --# Refer to the README and COPYING files for full details of the license --# -- --import os --from vdsm.config import config --import misc --import subprocess --import sanlock --from contextlib import nested --from vdsm import constants --import storage_exception as se --import threading --import logging -- -- --MAX_HOST_ID = 250 -- --# The LEASE_OFFSET is used by SANLock to not overlap with safelease in --# orfer to preserve the ability to acquire both locks (e.g.: during the --# domain upgrade) --SDM_LEASE_NAME = 'SDM' --SDM_LEASE_OFFSET = 512 * 2048 -- -- --class ClusterLock(object): -- log = logging.getLogger("ClusterLock") -- lockUtilPath = config.get('irs', 'lock_util_path') -- lockCmd = config.get('irs', 'lock_cmd') -- freeLockCmd = config.get('irs', 'free_lock_cmd') -- -- def __init__(self, sdUUID, idFile, leaseFile, -- lockRenewalIntervalSec, -- leaseTimeSec, -- leaseFailRetry, -- ioOpTimeoutSec): -- self._lock = threading.RLock() -- self._sdUUID = sdUUID -- self._leaseFile = leaseFile -- self.setParams(lockRenewalIntervalSec, leaseTimeSec, -- leaseFailRetry, ioOpTimeoutSec) -- -- def initLock(self): -- lockUtil = os.path.join(self.lockUtilPath, "safelease") -- initCommand = [lockUtil, "release", "-f", self._leaseFile, "0"] -- rc, out, err = misc.execCmd(initCommand, sudo=False, -- cwd=self.lockUtilPath) -- if rc != 0: -- self.log.warn("could not initialise spm lease (%s): %s", rc, out) -- raise se.ClusterLockInitError() -- -- def setParams(self, lockRenewalIntervalSec, -- leaseTimeSec, -- leaseFailRetry, -- ioOpTimeoutSec): -- self._lockRenewalIntervalSec = lockRenewalIntervalSec -- self._leaseTimeSec = leaseTimeSec -- self._leaseFailRetry = leaseFailRetry -- self._ioOpTimeoutSec = ioOpTimeoutSec -- -- def getReservedId(self): -- return 1000 -- -- def acquireHostId(self, hostId, async): -- pass -- -- def releaseHostId(self, hostId, async, unused): -- pass -- -- def hasHostId(self, hostId): -- return True -- -- def acquire(self, hostID): -- leaseTimeMs = self._leaseTimeSec * 1000 -- ioOpTimeoutMs = self._ioOpTimeoutSec * 1000 -- with self._lock: -- self.log.debug("Acquiring cluster lock for domain %s" % -- self._sdUUID) -- -- lockUtil = self.getLockUtilFullPath() -- acquireLockCommand = subprocess.list2cmdline([lockUtil, "start", -- self._sdUUID, str(hostID), str(self._lockRenewalIntervalSec), -- str(self._leaseFile), str(leaseTimeMs), str(ioOpTimeoutMs), -- str(self._leaseFailRetry)]) -- -- cmd = [constants.EXT_SETSID, constants.EXT_IONICE, '-c1', '-n0', -- constants.EXT_SU, misc.IOUSER, '-s', constants.EXT_SH, '-c', -- acquireLockCommand] -- (rc, out, err) = misc.execCmd(cmd, cwd=self.lockUtilPath, -- sudo=True) -- if rc != 0: -- raise se.AcquireLockFailure(self._sdUUID, rc, out, err) -- self.log.debug("Clustered lock acquired successfully") -- -- def getLockUtilFullPath(self): -- return os.path.join(self.lockUtilPath, self.lockCmd) -- -- def release(self): -- with self._lock: -- freeLockUtil = os.path.join(self.lockUtilPath, self.freeLockCmd) -- releaseLockCommand = [freeLockUtil, self._sdUUID] -- self.log.info("Releasing cluster lock for domain %s" % -- self._sdUUID) -- (rc, out, err) = misc.execCmd(releaseLockCommand, sudo=False, -- cwd=self.lockUtilPath) -- if rc != 0: -- self.log.error("Could not release cluster lock " -- "rc=%s out=%s, err=%s" % (str(rc), out, err)) -- -- self.log.debug("Cluster lock released successfully") -- -- --class SANLock(object): -- log = logging.getLogger("SANLock") -- -- _sanlock_fd = None -- _sanlock_lock = threading.Lock() -- -- def __init__(self, sdUUID, idsPath, leasesPath, *args): -- self._lock = threading.Lock() -- self._sdUUID = sdUUID -- self._idsPath = idsPath -- self._leasesPath = leasesPath -- self._sanlockfd = None -- -- def initLock(self): -- try: -- sanlock.init_lockspace(self._sdUUID, self._idsPath) -- sanlock.init_resource(self._sdUUID, SDM_LEASE_NAME, -- [(self._leasesPath, SDM_LEASE_OFFSET)]) -- except sanlock.SanlockException: -- self.log.warn("Cannot initialize clusterlock", exc_info=True) -- raise se.ClusterLockInitError() -- -- def setParams(self, *args): -- pass -- -- def getReservedId(self): -- return MAX_HOST_ID -- -- def acquireHostId(self, hostId, async): -- with self._lock: -- self.log.info("Acquiring host id for domain %s (id: %s)", -- self._sdUUID, hostId) -- -- try: -- sanlock.add_lockspace(self._sdUUID, hostId, self._idsPath, -- async=async) -- except sanlock.SanlockException, e: -- if e.errno == os.errno.EINPROGRESS: -- # if the request is not asynchronous wait for the ongoing -- # lockspace operation to complete -- if not async and not sanlock.inq_lockspace( -- self._sdUUID, hostId, self._idsPath, wait=True): -- raise se.AcquireHostIdFailure(self._sdUUID, e) -- # else silently continue, the host id has been acquired -- # or it's in the process of being acquired (async) -- elif e.errno != os.errno.EEXIST: -- raise se.AcquireHostIdFailure(self._sdUUID, e) -- -- self.log.debug("Host id for domain %s successfully acquired " -- "(id: %s)", self._sdUUID, hostId) -- -- def releaseHostId(self, hostId, async, unused): -- with self._lock: -- self.log.info("Releasing host id for domain %s (id: %s)", -- self._sdUUID, hostId) -- -- try: -- sanlock.rem_lockspace(self._sdUUID, hostId, self._idsPath, -- async=async, unused=unused) -- except sanlock.SanlockException, e: -- if e.errno != os.errno.ENOENT: -- raise se.ReleaseHostIdFailure(self._sdUUID, e) -- -- self.log.debug("Host id for domain %s released successfully " -- "(id: %s)", self._sdUUID, hostId) -- -- def hasHostId(self, hostId): -- with self._lock: -- try: -- return sanlock.inq_lockspace(self._sdUUID, -- hostId, self._idsPath) -- except sanlock.SanlockException: -- self.log.debug("Unable to inquire sanlock lockspace " -- "status, returning False", exc_info=True) -- return False -- -- # The hostId parameter is maintained here only for compatibility with -- # ClusterLock. We could consider to remove it in the future but keeping it -- # for logging purpose is desirable. -- def acquire(self, hostId): -- with nested(self._lock, SANLock._sanlock_lock): -- self.log.info("Acquiring cluster lock for domain %s (id: %s)", -- self._sdUUID, hostId) -- -- while True: -- if SANLock._sanlock_fd is None: -- try: -- SANLock._sanlock_fd = sanlock.register() -- except sanlock.SanlockException, e: -- raise se.AcquireLockFailure(self._sdUUID, e.errno, -- "Cannot register to sanlock", str(e)) -- -- try: -- sanlock.acquire(self._sdUUID, SDM_LEASE_NAME, -- [(self._leasesPath, SDM_LEASE_OFFSET)], -- slkfd=SANLock._sanlock_fd) -- except sanlock.SanlockException, e: -- if e.errno != os.errno.EPIPE: -- raise se.AcquireLockFailure(self._sdUUID, e.errno, -- "Cannot acquire cluster lock", str(e)) -- SANLock._sanlock_fd = None -- continue -- -- break -- -- self.log.debug("Cluster lock for domain %s successfully acquired " -- "(id: %s)", self._sdUUID, hostId) -- -- def release(self): -- with self._lock: -- self.log.info("Releasing cluster lock for domain %s", self._sdUUID) -- -- try: -- sanlock.release(self._sdUUID, SDM_LEASE_NAME, -- [(self._leasesPath, SDM_LEASE_OFFSET)], -- slkfd=SANLock._sanlock_fd) -- except sanlock.SanlockException, e: -- raise se.ReleaseLockFailure(self._sdUUID, e) -- -- self._sanlockfd = None -- self.log.debug("Cluster lock for domain %s successfully released", -- self._sdUUID) -diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py -index 1b11017..dbc1beb 100644 ---- a/vdsm/storage/sd.py -+++ b/vdsm/storage/sd.py -@@ -31,7 +31,7 @@ import resourceFactories - from resourceFactories import IMAGE_NAMESPACE, VOLUME_NAMESPACE - import resourceManager as rm - from vdsm import constants --import safelease -+import clusterlock - import outOfProcess as oop - from persistentDict import unicodeEncoder, unicodeDecoder - -@@ -307,12 +307,12 @@ class StorageDomain: - DEFAULT_LEASE_PARAMS[DMDK_LEASE_TIME_SEC], - DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], - DEFAULT_LEASE_PARAMS[DMDK_IO_OP_TIMEOUT_SEC]) -- self._clusterLock = safelease.ClusterLock(self.sdUUID, -- self.getIdsFilePath(), self.getLeasesFilePath(), -- *leaseParams) -+ self._clusterLock = clusterlock.SafeLease( -+ self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath(), -+ *leaseParams) - elif domversion in DOM_SANLOCK_VERS: -- self._clusterLock = safelease.SANLock(self.sdUUID, -- self.getIdsFilePath(), self.getLeasesFilePath()) -+ self._clusterLock = clusterlock.SANLock( -+ self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath()) - else: - raise se.UnsupportedDomainVersion(domversion) - -diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py -index 40d15b3..e13d088 100644 ---- a/vdsm/storage/sp.py -+++ b/vdsm/storage/sp.py -@@ -494,7 +494,7 @@ class StoragePool(Securable): - return config.getint("irs", "maximum_domains_in_pool") - - @unsecured -- def _acquireTemporaryClusterLock(self, msdUUID, safeLease): -+ def _acquireTemporaryClusterLock(self, msdUUID, leaseParams): - try: - # Master domain is unattached and all changes to unattached domains - # must be performed under storage lock -@@ -504,7 +504,7 @@ class StoragePool(Securable): - # assigned id for this pool - self.id = msd.getReservedId() - -- msd.changeLeaseParams(safeLease) -+ msd.changeLeaseParams(leaseParams) - - msd.acquireHostId(self.id) - -@@ -527,7 +527,7 @@ class StoragePool(Securable): - self.id = SPM_ID_FREE - - @unsecured -- def create(self, poolName, msdUUID, domList, masterVersion, safeLease): -+ def create(self, poolName, msdUUID, domList, masterVersion, leaseParams): - """ - Create new storage pool with single/multiple image data domain. - The command will create new storage pool meta-data attach each -@@ -537,10 +537,9 @@ class StoragePool(Securable): - 'msdUUID' - master domain of this pool (one of domList) - 'domList' - list of domains (i.e sdUUID,sdUUID,...,sdUUID) - """ -- self.log.info("spUUID=%s poolName=%s master_sd=%s " -- "domList=%s masterVersion=%s %s", -- self.spUUID, poolName, msdUUID, -- domList, masterVersion, str(safeLease)) -+ self.log.info("spUUID=%s poolName=%s master_sd=%s domList=%s " -+ "masterVersion=%s %s", self.spUUID, poolName, msdUUID, -+ domList, masterVersion, leaseParams) - - if msdUUID not in domList: - raise se.InvalidParameterException("masterDomain", msdUUID) -@@ -565,7 +564,7 @@ class StoragePool(Securable): - raise se.StorageDomainAlreadyAttached(spUUIDs[0], sdUUID) - - fileUtils.createdir(self.poolPath) -- self._acquireTemporaryClusterLock(msdUUID, safeLease) -+ self._acquireTemporaryClusterLock(msdUUID, leaseParams) - - try: - self._setSafe() -@@ -573,7 +572,7 @@ class StoragePool(Securable): - # We should do it before actually attaching this domain to the pool. - # During 'master' marking we create pool metadata and each attached - # domain should register there -- self.createMaster(poolName, msd, masterVersion, safeLease) -+ self.createMaster(poolName, msd, masterVersion, leaseParams) - self.__rebuild(msdUUID=msdUUID, masterVersion=masterVersion) - # Attach storage domains to the storage pool - # Since we are creating the pool then attach is done from the hsm and not the spm -@@ -722,10 +721,10 @@ class StoragePool(Securable): - - @unsecured - def reconstructMaster(self, hostId, poolName, msdUUID, domDict, -- masterVersion, safeLease): -+ masterVersion, leaseParams): - self.log.info("spUUID=%s hostId=%s poolName=%s msdUUID=%s domDict=%s " - "masterVersion=%s leaseparams=(%s)", self.spUUID, hostId, -- poolName, msdUUID, domDict, masterVersion, str(safeLease)) -+ poolName, msdUUID, domDict, masterVersion, leaseParams) - - if msdUUID not in domDict: - raise se.InvalidParameterException("masterDomain", msdUUID) -@@ -736,7 +735,7 @@ class StoragePool(Securable): - # For backward compatibility we must support a reconstructMaster - # that doesn't specify an hostId. - if not hostId: -- self._acquireTemporaryClusterLock(msdUUID, safeLease) -+ self._acquireTemporaryClusterLock(msdUUID, leaseParams) - temporaryLock = True - else: - # Forcing to acquire the host id (if it's not acquired already). -@@ -749,7 +748,7 @@ class StoragePool(Securable): - - try: - self.createMaster(poolName, futureMaster, masterVersion, -- safeLease) -+ leaseParams) - - for sdUUID in domDict: - domDict[sdUUID] = domDict[sdUUID].capitalize() --- -1.8.1 - diff --git a/0021-domain-select-the-cluster-lock-using-makeClusterLock.patch b/0021-domain-select-the-cluster-lock-using-makeClusterLock.patch deleted file mode 100644 index 3d0666c..0000000 --- a/0021-domain-select-the-cluster-lock-using-makeClusterLock.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 5da363f0412d2b709fb1460324ee04b5905e492b Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Thu, 20 Dec 2012 06:12:52 -0500 -Subject: [PATCH 21/22] domain: select the cluster lock using makeClusterLock - -In order to support different locking mechanisms (not only per-domain -format but also per-domain type) a new makeClusterLock method has been -introduced to select the appropriate cluster lock. - -Change-Id: I78072254441335a420292af642985840e9b2ac68 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/10281 -Reviewed-by: Allon Mureinik -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11464 ---- - vdsm/storage/imageRepository/formatConverter.py | 11 +++-- - vdsm/storage/sd.py | 54 +++++++++++++++---------- - 2 files changed, 39 insertions(+), 26 deletions(-) - -diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py -index 0742560..95a77d1 100644 ---- a/vdsm/storage/imageRepository/formatConverter.py -+++ b/vdsm/storage/imageRepository/formatConverter.py -@@ -26,7 +26,6 @@ from vdsm import qemuImg - from storage import sd - from storage import blockSD - from storage import image --from storage import clusterlock - from storage import volume - from storage import blockVolume - from storage import storage_exception as se -@@ -91,7 +90,12 @@ def v2DomainConverter(repoPath, hostId, domain, isMsd): - - def v3DomainConverter(repoPath, hostId, domain, isMsd): - log = logging.getLogger('Storage.v3DomainConverter') -- log.debug("Starting conversion for domain %s", domain.sdUUID) -+ -+ targetVersion = 3 -+ currentVersion = domain.getVersion() -+ -+ log.debug("Starting conversion for domain %s from version %s " -+ "to version %s", domain.sdUUID, currentVersion, targetVersion) - - targetVersion = 3 - currentVersion = domain.getVersion() -@@ -115,8 +119,7 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): - domain.setMetadataPermissions() - - log.debug("Initializing the new cluster lock for domain %s", domain.sdUUID) -- newClusterLock = clusterlock.SANLock( -- domain.sdUUID, domain.getIdsFilePath(), domain.getLeasesFilePath()) -+ newClusterLock = domain._makeClusterLock(targetVersion) - newClusterLock.initLock() - - log.debug("Acquiring the host id %s for domain %s", hostId, domain.sdUUID) -diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py -index dbc1beb..a55ce06 100644 ---- a/vdsm/storage/sd.py -+++ b/vdsm/storage/sd.py -@@ -101,10 +101,6 @@ BACKUP_DOMAIN = 3 - DOMAIN_CLASSES = {DATA_DOMAIN: 'Data', ISO_DOMAIN: 'Iso', - BACKUP_DOMAIN: 'Backup'} - --# Lock Version --DOM_SAFELEASE_VERS = (0, 2) --DOM_SANLOCK_VERS = (3,) -- - # Metadata keys - DMDK_VERSION = "VERSION" - DMDK_SDUUID = "SDUUID" -@@ -292,29 +288,20 @@ class StorageDomain: - mdBackupVersions = config.get('irs', 'md_backup_versions') - mdBackupDir = config.get('irs', 'md_backup_dir') - -+ # version: (clusterLockClass, hasVolumeLeases) -+ _clusterLockTable = { -+ 0: (clusterlock.SafeLease, False), -+ 2: (clusterlock.SafeLease, False), -+ 3: (clusterlock.SANLock, True), -+ } -+ - def __init__(self, sdUUID, domaindir, metadata): - self.sdUUID = sdUUID - self.domaindir = domaindir - self._metadata = metadata - self._lock = threading.Lock() - self.stat = None -- -- domversion = self.getVersion() -- -- if domversion in DOM_SAFELEASE_VERS: -- leaseParams = ( -- DEFAULT_LEASE_PARAMS[DMDK_LOCK_RENEWAL_INTERVAL_SEC], -- DEFAULT_LEASE_PARAMS[DMDK_LEASE_TIME_SEC], -- DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], -- DEFAULT_LEASE_PARAMS[DMDK_IO_OP_TIMEOUT_SEC]) -- self._clusterLock = clusterlock.SafeLease( -- self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath(), -- *leaseParams) -- elif domversion in DOM_SANLOCK_VERS: -- self._clusterLock = clusterlock.SANLock( -- self.sdUUID, self.getIdsFilePath(), self.getLeasesFilePath()) -- else: -- raise se.UnsupportedDomainVersion(domversion) -+ self._clusterLock = self._makeClusterLock() - - def __del__(self): - if self.stat: -@@ -328,6 +315,25 @@ class StorageDomain: - def oop(self): - return oop.getProcessPool(self.sdUUID) - -+ def _makeClusterLock(self, domVersion=None): -+ if not domVersion: -+ domVersion = self.getVersion() -+ -+ leaseParams = ( -+ DEFAULT_LEASE_PARAMS[DMDK_LOCK_RENEWAL_INTERVAL_SEC], -+ DEFAULT_LEASE_PARAMS[DMDK_LEASE_TIME_SEC], -+ DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], -+ DEFAULT_LEASE_PARAMS[DMDK_IO_OP_TIMEOUT_SEC], -+ ) -+ -+ try: -+ clusterLockClass = self._clusterLockTable[domVersion][0] -+ except KeyError: -+ raise se.UnsupportedDomainVersion(domVersion) -+ -+ return clusterLockClass(self.sdUUID, self.getIdsFilePath(), -+ self.getLeasesFilePath(), *leaseParams) -+ - @classmethod - def create(cls, sdUUID, domainName, domClass, typeSpecificArg, version): - """ -@@ -436,7 +442,11 @@ class StorageDomain: - return self._clusterLock.hasHostId(hostId) - - def hasVolumeLeases(self): -- return self.getVersion() in DOM_SANLOCK_VERS -+ domVersion = self.getVersion() -+ try: -+ return self._clusterLockTable[domVersion][1] -+ except KeyError: -+ raise se.UnsupportedDomainVersion(domVersion) - - def getVolumeLease(self, volUUID): - """ --- -1.8.1 - diff --git a/0022-clusterlock-add-the-local-locking-implementation.patch b/0022-clusterlock-add-the-local-locking-implementation.patch deleted file mode 100644 index d496718..0000000 --- a/0022-clusterlock-add-the-local-locking-implementation.patch +++ /dev/null @@ -1,225 +0,0 @@ -From e73c5bc586d1e689fc33ba77082488d755e3a621 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Thu, 20 Dec 2012 08:08:21 -0500 -Subject: [PATCH 22/22] clusterlock: add the local locking implementation - -In order to have a faster and more lightweight locking mechanism on -local storage domains a new cluster lock (based on flock) has been -introduced. - -Change-Id: I106618a9a61cc96727edaf2e3ab043b2ec28ebe1 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/10282 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11465 ---- - vdsm/storage/clusterlock.py | 122 +++++++++++++++++++++++++++++++++++++++++--- - vdsm/storage/localFsSD.py | 7 +++ - vdsm/storage/misc.py | 19 +++++++ - 3 files changed, 141 insertions(+), 7 deletions(-) - -diff --git a/vdsm/storage/clusterlock.py b/vdsm/storage/clusterlock.py -index 4525b2f..cabf174 100644 ---- a/vdsm/storage/clusterlock.py -+++ b/vdsm/storage/clusterlock.py -@@ -19,6 +19,7 @@ - # - - import os -+import fcntl - import threading - import logging - import subprocess -@@ -127,6 +128,22 @@ class SafeLease(object): - self.log.debug("Cluster lock released successfully") - - -+initSANLockLog = logging.getLogger("initSANLock") -+ -+ -+def initSANLock(sdUUID, idsPath, leasesPath): -+ initSANLockLog.debug("Initializing SANLock for domain %s", sdUUID) -+ -+ try: -+ sanlock.init_lockspace(sdUUID, idsPath) -+ sanlock.init_resource(sdUUID, SDM_LEASE_NAME, -+ [(leasesPath, SDM_LEASE_OFFSET)]) -+ except sanlock.SanlockException: -+ initSANLockLog.error("Cannot initialize SANLock for domain %s", -+ sdUUID, exc_info=True) -+ raise se.ClusterLockInitError() -+ -+ - class SANLock(object): - log = logging.getLogger("SANLock") - -@@ -141,13 +158,7 @@ class SANLock(object): - self._sanlockfd = None - - def initLock(self): -- try: -- sanlock.init_lockspace(self._sdUUID, self._idsPath) -- sanlock.init_resource(self._sdUUID, SDM_LEASE_NAME, -- [(self._leasesPath, SDM_LEASE_OFFSET)]) -- except sanlock.SanlockException: -- self.log.warn("Cannot initialize clusterlock", exc_info=True) -- raise se.ClusterLockInitError() -+ initSANLock(self._sdUUID, self._idsPath, self._leasesPath) - - def setParams(self, *args): - pass -@@ -249,3 +260,100 @@ class SANLock(object): - self._sanlockfd = None - self.log.debug("Cluster lock for domain %s successfully released", - self._sdUUID) -+ -+ -+class LocalLock(object): -+ log = logging.getLogger("LocalLock") -+ -+ _globalLockMap = {} -+ _globalLockMapSync = threading.Lock() -+ -+ def __init__(self, sdUUID, idsPath, leasesPath, *args): -+ self._sdUUID = sdUUID -+ self._idsPath = idsPath -+ self._leasesPath = leasesPath -+ -+ def initLock(self): -+ # The LocalLock initialization is based on SANLock to maintain on-disk -+ # domain format consistent across all the V3 types. -+ # The advantage is that the domain can be exposed as an NFS/GlusterFS -+ # domain later on without any modification. -+ # XXX: Keep in mind that LocalLock and SANLock cannot detect each other -+ # and therefore concurrently using the same domain as local domain and -+ # NFS domain (or any other shared file-based domain) will certainly -+ # lead to disastrous consequences. -+ initSANLock(self._sdUUID, self._idsPath, self._leasesPath) -+ -+ def setParams(self, *args): -+ pass -+ -+ def getReservedId(self): -+ return MAX_HOST_ID -+ -+ def acquireHostId(self, hostId, async): -+ self.log.debug("Host id for domain %s successfully acquired (id: %s)", -+ self._sdUUID, hostId) -+ -+ def releaseHostId(self, hostId, async, unused): -+ self.log.debug("Host id for domain %s released successfully (id: %s)", -+ self._sdUUID, hostId) -+ -+ def hasHostId(self, hostId): -+ return True -+ -+ def acquire(self, hostId): -+ with self._globalLockMapSync: -+ self.log.info("Acquiring local lock for domain %s (id: %s)", -+ self._sdUUID, hostId) -+ -+ lockFile = self._globalLockMap.get(self._sdUUID, None) -+ -+ if lockFile: -+ try: -+ misc.NoIntrCall(fcntl.fcntl, lockFile, fcntl.F_GETFD) -+ except IOError as e: -+ # We found a stale file descriptor, removing. -+ del self._globalLockMap[self._sdUUID] -+ -+ # Raise any other unkown error. -+ if e.errno != os.errno.EBADF: -+ raise -+ else: -+ self.log.debug("Local lock already acquired for domain " -+ "%s (id: %s)", self._sdUUID, hostId) -+ return # success, the lock was already acquired -+ -+ lockFile = misc.NoIntrCall(os.open, self._idsPath, os.O_RDONLY) -+ -+ try: -+ misc.NoIntrCall(fcntl.flock, lockFile, -+ fcntl.LOCK_EX | fcntl.LOCK_NB) -+ except IOError as e: -+ misc.NoIntrCall(os.close, lockFile) -+ if e.errno in (os.errno.EACCES, os.errno.EAGAIN): -+ raise se.AcquireLockFailure( -+ self._sdUUID, e.errno, "Cannot acquire local lock", -+ str(e)) -+ raise -+ else: -+ self._globalLockMap[self._sdUUID] = lockFile -+ -+ self.log.debug("Local lock for domain %s successfully acquired " -+ "(id: %s)", self._sdUUID, hostId) -+ -+ def release(self): -+ with self._globalLockMapSync: -+ self.log.info("Releasing local lock for domain %s", self._sdUUID) -+ -+ lockFile = self._globalLockMap.get(self._sdUUID, None) -+ -+ if not lockFile: -+ self.log.debug("Local lock already released for domain %s", -+ self._sdUUID) -+ return -+ -+ misc.NoIntrCall(os.close, lockFile) -+ del self._globalLockMap[self._sdUUID] -+ -+ self.log.debug("Local lock for domain %s successfully released", -+ self._sdUUID) -diff --git a/vdsm/storage/localFsSD.py b/vdsm/storage/localFsSD.py -index 198c073..7d59894 100644 ---- a/vdsm/storage/localFsSD.py -+++ b/vdsm/storage/localFsSD.py -@@ -26,9 +26,16 @@ import fileSD - import fileUtils - import storage_exception as se - import misc -+import clusterlock - - - class LocalFsStorageDomain(fileSD.FileStorageDomain): -+ # version: (clusterLockClass, hasVolumeLeases) -+ _clusterLockTable = { -+ 0: (clusterlock.SafeLease, False), -+ 2: (clusterlock.SafeLease, False), -+ 3: (clusterlock.LocalLock, True), -+ } - - @classmethod - def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg, version): -diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py -index 17d38ee..b26a317 100644 ---- a/vdsm/storage/misc.py -+++ b/vdsm/storage/misc.py -@@ -1344,6 +1344,25 @@ def itmap(func, iterable, maxthreads=UNLIMITED_THREADS): - yield respQueue.get() - - -+def NoIntrCall(fun, *args, **kwargs): -+ """ -+ This wrapper is used to handle the interrupt exceptions that might -+ occur during a system call. -+ """ -+ while True: -+ try: -+ return fun(*args, **kwargs) -+ except (IOError, select.error) as e: -+ if e.args[0] == os.errno.EINTR: -+ continue -+ raise -+ break -+ -+ -+# NOTE: it would be best to try and unify NoIntrCall and NoIntrPoll. -+# We could do so defining a new object that can be used as a placeholer -+# for the changing timeout value in the *args/**kwargs. This would -+# lead us to rebuilding the function arguments at each loop. - def NoIntrPoll(pollfun, timeout=-1): - """ - This wrapper is used to handle the interrupt exceptions that might occur --- -1.8.1 - diff --git a/0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch b/0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch deleted file mode 100644 index cda48c4..0000000 --- a/0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 94a3b6b63449ac4a16c76c1d5c52d58f5c895ecc Mon Sep 17 00:00:00 2001 -From: Lee Yarwood -Date: Tue, 22 Jan 2013 14:09:28 +0000 -Subject: [PATCH 23/27] upgrade: catch MetaDataKeyNotFoundError when preparing - images - -Ensure that we catch and continue past any MetaDataKeyNotFoundError -exception when preparing images that may contain partially removed -volumes. For example where the LV is still present but the metadata -block has been blanked out. - -Change-Id: I92f7a61bf6d1e24e84711486fd4f8ba67e2a0077 -Signed-off-by: Lee Yarwood -Reviewed-on: http://gerrit.ovirt.org/11485 -Reviewed-by: Federico Simoncelli ---- - vdsm/storage/imageRepository/formatConverter.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py -index 95a77d1..cbf64f5 100644 ---- a/vdsm/storage/imageRepository/formatConverter.py -+++ b/vdsm/storage/imageRepository/formatConverter.py -@@ -280,6 +280,11 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): - log.error("It is not possible to prepare the image %s, the " - "volume chain looks damaged", imgUUID, exc_info=True) - -+ except se.MetaDataKeyNotFoundError: -+ log.error("It is not possible to prepare the image %s, the " -+ "volume metadata looks damaged", imgUUID, -+ exc_info=True) -+ - finally: - try: - img.teardown(domain.sdUUID, imgUUID) --- -1.8.1 - diff --git a/0024-vdsm.spec-Require-openssl.patch b/0024-vdsm.spec-Require-openssl.patch deleted file mode 100644 index ab86511..0000000 --- a/0024-vdsm.spec-Require-openssl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 53e8505e34f1e7a76adfa0de74d5eb9d27efd586 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Wed, 30 Jan 2013 09:27:38 -0500 -Subject: [PATCH 24/27] vdsm.spec: Require openssl - -deployUtil uses openssl command, we should Require it. - -Change-Id: Ib53aa66bad94e9c4046f3430b892a60cbc80c520 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=905728 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/11543 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 8ad4dce..e898c59 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -207,6 +207,7 @@ BuildArch: noarch - - Requires: %{name} = %{version}-%{release} - Requires: m2crypto -+Requires: openssl - - %description reg - VDSM registration package. Used to register a Linux host to a Virtualization --- -1.8.1 - diff --git a/0025-Fedora-18-require-a-newer-udev.patch b/0025-Fedora-18-require-a-newer-udev.patch deleted file mode 100644 index 6464c3f..0000000 --- a/0025-Fedora-18-require-a-newer-udev.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 674f1003f05d84609e4555c1509b1409475e1c97 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 29 Jan 2013 10:44:01 +0200 -Subject: [PATCH 25/27] Fedora 18: require a newer udev - -Due to https://bugzilla.redhat.com/903716 `udev: device node permissions -not applied with "change" event' we could not use block storage in -Fedora. Let us explicitly require a newerer systemd that fixes this -issue, to avoid users' dismay. - -Change-Id: Ie17abb2af146c492efafc94bfbb533c7f6c8025c -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11489 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/11534 -Tested-by: Federico Simoncelli ---- - vdsm.spec.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index e898c59..00c1259 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -136,6 +136,7 @@ Requires: selinux-policy-targeted >= 3.11.1-71 - # In order to avoid a policycoreutils bug (rhbz 883355) when selinux is - # disabled we now require the version 2.1.13-44 (or newer) of Fedora. - Requires: policycoreutils >= 2.1.13-44 -+Requires: systemd >= 197-1.fc18.2 - %endif - - Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client --- -1.8.1 - diff --git a/0026-fix-sloppy-backport-of-safelease-rename.patch b/0026-fix-sloppy-backport-of-safelease-rename.patch deleted file mode 100644 index 8ae6b1e..0000000 --- a/0026-fix-sloppy-backport-of-safelease-rename.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7904843648c7dd368f832d8f2b652290ca717424 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 30 Jan 2013 13:43:33 +0200 -Subject: [PATCH 26/27] fix sloppy backport of safelease rename - -Somehow, this sloppy backport of I74070ebb43dd726362900a0746c -was not caught by Jenkins. Any idea why? - -Change-Id: Iaf1dc264d17b59934b78877a11f37b21614b268e -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11544 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Federico Simoncelli ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 80d6f52..06ffbf9 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -54,6 +54,7 @@ PEP8_WHITELIST = \ - vdsm/*.py.in \ - vdsm/storage/__init__.py \ - vdsm/storage/blockVolume.py \ -+ vdsm/storage/clusterlock.py \ - vdsm/storage/devicemapper.py \ - vdsm/storage/domainMonitor.py \ - vdsm/storage/fileSD.py \ -@@ -74,7 +75,6 @@ PEP8_WHITELIST = \ - vdsm/storage/persistentDict.py \ - vdsm/storage/remoteFileHandler.py \ - vdsm/storage/resourceFactories.py \ -- vdsm/storage/safelease.py \ - vdsm/storage/sd.py \ - vdsm/storage/sdc.py \ - vdsm/storage/securable.py \ --- -1.8.1 - diff --git a/0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch b/0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch deleted file mode 100644 index 14ce5fd..0000000 --- a/0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 18c24f7c7c27ac732c4a760caa9524e7319cd47e Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Tue, 29 Jan 2013 13:49:46 +0200 -Subject: [PATCH 27/27] removing the use of zombie reaper from supervdsm - -This may solve validateAccess errors, but can cause defuct subprocesses. -This patch is signed as WIP until we'll find better solution, until then -this patch helps to verify if the previous errors that was caused thanks -to zombie reaper handling don't occur. - -Change-Id: If3f9bae47f2894cc95785de8f19f6ec388ea58da -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/11491 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/supervdsmServer.py | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py -index 833e91f..21e7c94 100755 ---- a/vdsm/supervdsmServer.py -+++ b/vdsm/supervdsmServer.py -@@ -56,7 +56,6 @@ import tc - import ksm - import mkimage - from storage.multipath import MPATH_CONF --import zombieReaper - - _UDEV_RULE_FILE_DIR = "/etc/udev/rules.d/" - _UDEV_RULE_FILE_PREFIX = "99-vdsm-" -@@ -199,7 +198,6 @@ class _SuperVdsm(object): - pipe, hisPipe = Pipe() - proc = Process(target=child, args=(hisPipe,)) - proc.start() -- zombieReaper.autoReapPID(proc.pid) - - if not pipe.poll(RUN_AS_TIMEOUT): - try: -@@ -391,8 +389,6 @@ def main(): - if os.path.exists(address): - os.unlink(address) - -- zombieReaper.registerSignalHandler() -- - log.debug("Setting up keep alive thread") - - monThread = threading.Thread(target=__pokeParent, --- -1.8.1 - diff --git a/0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch b/0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch deleted file mode 100644 index a85b5fc..0000000 --- a/0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c1465ed861233cf90a1cace4c41560cbd48a61b3 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Fri, 1 Feb 2013 23:04:50 +0200 -Subject: [PATCH 28/30] configNet: allow delete/update of devices with no ifcfg - -In Fedora 18, ifcfg files are missing by default. This patch assumes -that there are no custom MTU setting for a device with no ifcfg file. - -This version of the patch owes a lot to Mark Wu's -http://gerrit.ovirt.org/11357 and to Toni who convinced me that it is -better to read the MTU directly from kernel. - -Change-Id: Icb3a623ca3d3b560288cbe4141eea6bd060ac798 -Bug-Url: https://bugzilla.redhat.com/906383 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/11621 -Reviewed-by: Antoni Segura Puimedon -Tested-by: Mike Kolesnik -Reviewed-on: http://gerrit.ovirt.org/11680 -Tested-by: Antoni Segura Puimedon ---- - vdsm/configNetwork.py | 18 +++++------------- - 1 file changed, 5 insertions(+), 13 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 53debfa..041e1a4 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -600,12 +600,10 @@ class ConfigWriter(object): - it check if a vlan, bond that have a higher mtu value - """ - for nic in nics: -- cf = self.NET_CONF_PREF + nic -- mtuval = self._getConfigValue(cf, 'MTU') -- if not mtuval is None: -- mtuval = int(mtuval) -- if mtuval > mtu: -- mtu = mtuval -+ mtuval = int(netinfo.getMtu(nic)) -+ -+ if mtuval > mtu: -+ mtu = mtuval - return mtu - - def setNewMtu(self, network, bridged): -@@ -623,13 +621,7 @@ class ConfigWriter(object): - _netinfo = netinfo.NetInfo() - currmtu = None - if bridged: -- cf = self.NET_CONF_PREF + network -- currmtu = self._getConfigValue(cf, 'MTU') -- if currmtu: -- currmtu = int(currmtu) -- else: -- # Optimization: if network hasn't custom MTU, do nothing -- return -+ currmtu = int(netinfo.getMtu(network)) - - nics, delvlan, bonding = \ - _netinfo.getNicsVlanAndBondingForNetwork(network) --- -1.8.1.2 - diff --git a/0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch b/0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch deleted file mode 100644 index 83a40f6..0000000 --- a/0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 6c021fc54d446f944acd497fb7e2110428ac289c Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 5 Feb 2013 14:30:49 -0500 -Subject: [PATCH 29/30] Requires policycoreutils-2.1.13-55 to avoid another - break on selinux disabled. - -When selinux is disabled on f18, it fails to import module sepolicy -with an exception. It causes the the vdsm-tool unavailable, and therefore -the bonding module can't be loaded when vdsm starts up. For details, -please see https://bugzilla.redhat.com/show_bug.cgi?id=889698 - -Change-Id: I09387167ceeffdc104910103b8381954296cdbe9 -Signed-off-by: Mark Wu -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/11731 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 00c1259..0aad124 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -133,9 +133,9 @@ Requires: lvm2 >= 2.02.95 - - %if 0%{?fedora} >= 18 - Requires: selinux-policy-targeted >= 3.11.1-71 --# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is --# disabled we now require the version 2.1.13-44 (or newer) of Fedora. --Requires: policycoreutils >= 2.1.13-44 -+# In order to avoid a policycoreutils bug (rhbz 889698) when selinux is -+# disabled we now require the version 2.1.13-55 (or newer) of Fedora. -+Requires: policycoreutils >= 2.1.13-55 - Requires: systemd >= 197-1.fc18.2 - %endif - --- -1.8.1.2 - diff --git a/0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch b/0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch deleted file mode 100644 index 6f21182..0000000 --- a/0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 73b120fd6d0cd8215f3857c034cc7d4584c8ee05 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Thu, 14 Feb 2013 13:46:06 +0200 -Subject: [PATCH 30/30] After fail to connect to supervdsm more than 3 time - vdsm gets into panic - -Due to race between old supervdsm instance to the new instance after -prepareForShutdown, sometimes the socket is removed after -new supervdsm started to listen on it. -_pokeParent thread unlink the socket when distinguish that vdsm is dead. -This can take more time than the time that takes to vdsm to startup and -start the new instance of supervdsm. The unlink removes the socket file -and vdsm cannot communicate with supervdsm. -When the communication fails, vdsm calls panic and restart itself, this -will start supervdsm again as needed. - -Change-Id: Iafe112893a76686edd2949d4f40b734646fd74df -Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=910005 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/11932 -Reviewed-by: Saggi Mizrahi -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/12053 ---- - vdsm/supervdsm.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py -index 6a38076..1b6402d 100644 ---- a/vdsm/supervdsm.py -+++ b/vdsm/supervdsm.py -@@ -194,7 +194,14 @@ class SuperVdsmProxy(object): - def launch(self): - self._firstLaunch = False - self._start() -- utils.retry(self._connect, Exception, timeout=60) -+ try: -+ # We retry 3 times to connect to avoid exceptions that are raised -+ # due to the process initializing. It might takes time to create -+ # the communication socket or other initialization methods take -+ # more time than expected. -+ utils.retry(self._connect, Exception, timeout=60) -+ except: -+ misc.panic("Couldn't connect to supervdsm") - - def __getattr__(self, name): - return ProxyCaller(self, name) --- -1.8.1.2 - diff --git a/0031-packaging-add-load_needed_modules.py.in.patch b/0031-packaging-add-load_needed_modules.py.in.patch deleted file mode 100644 index 25fc677..0000000 --- a/0031-packaging-add-load_needed_modules.py.in.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 45fec93749f8474db30cb0b518ca9b2f7b80f142 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Thu, 28 Feb 2013 10:44:49 +0100 -Subject: [PATCH 31/32] packaging: add load_needed_modules.py.in - -Signed-off-by: Federico Simoncelli ---- - vdsm-tool/load_needed_modules.py.in | 61 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 61 insertions(+) - create mode 100644 vdsm-tool/load_needed_modules.py.in - -diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in -new file mode 100644 -index 0000000..675a172 ---- /dev/null -+++ b/vdsm-tool/load_needed_modules.py.in -@@ -0,0 +1,61 @@ -+# Copyright IBM, Corp. 2012 -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+# -+# Refer to the README and COPYING files for full details of the license -+# -+ -+ -+import subprocess -+ -+from vdsm.tool import expose -+ -+ -+EX_MODPROBE = '@MODPROBE_PATH@' -+ -+ -+def _exec_command(argv): -+ """ -+ This function executes a given shell command. -+ """ -+ -+ p = subprocess.Popen(argv, stdout=subprocess.PIPE, -+ stderr=subprocess.PIPE) -+ out, err = p.communicate() -+ rc = p.returncode -+ if rc != 0: -+ raise Exception("Execute command %s failed: %s" % (argv, err)) -+ -+ -+def _enable_bond_dev(): -+ REQUIRED = set(['bond0', 'bond1', 'bond2', 'bond3', 'bond4']) -+ MASTER_FILE = '/sys/class/net/bonding_masters' -+ -+ # @ENGINENAME@ currently assumes that all bonding devices pre-exist -+ existing = set(file(MASTER_FILE).read().split()) -+ with open(MASTER_FILE, 'w') as f: -+ for bond in REQUIRED - existing: -+ f.write('+%s\n' % bond) -+ -+ -+@expose('load-needed-modules') -+def load_needed_modules(): -+ """ -+ Load needed modules -+ """ -+ -+ for mod in ['tun', 'bonding', '8021q']: -+ _exec_command([EX_MODPROBE, mod]) -+ _enable_bond_dev() --- -1.8.1.2 - diff --git a/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch b/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch deleted file mode 100644 index b73ce8b..0000000 --- a/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8cca94da272babb5eef7a81a7a05d178070efe69 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Mon, 25 Feb 2013 16:06:56 +0200 -Subject: [PATCH 32/32] tool: _enable_bond_dev: reopen bonding_masters per bond - -Writing multiple +bondnames into /sys/class/net/bonding_masters is not -enough to add new bonding devices. One has to reopen that file for each -added bond. - -Change-Id: I4693a3d2cc3beba0b5961d16fb1ef25170f99f9e -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/12409 -Reviewed-by: Antoni Segura Puimedon -Tested-by: gena cher -Reviewed-on: http://gerrit.ovirt.org/12447 -Reviewed-by: Igor Lvovsky ---- - vdsm-tool/load_needed_modules.py.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in -index 675a172..89c2b3f 100644 ---- a/vdsm-tool/load_needed_modules.py.in -+++ b/vdsm-tool/load_needed_modules.py.in -@@ -45,8 +45,8 @@ def _enable_bond_dev(): - - # @ENGINENAME@ currently assumes that all bonding devices pre-exist - existing = set(file(MASTER_FILE).read().split()) -- with open(MASTER_FILE, 'w') as f: -- for bond in REQUIRED - existing: -+ for bond in REQUIRED - existing: -+ with open(MASTER_FILE, 'w') as f: - f.write('+%s\n' % bond) - - --- -1.8.1.2 - diff --git a/0033-gluster-Handling-Attribute-error-in-Python-2.6.patch b/0033-gluster-Handling-Attribute-error-in-Python-2.6.patch deleted file mode 100644 index 52909b2..0000000 --- a/0033-gluster-Handling-Attribute-error-in-Python-2.6.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 345374cfd88cc5bd1295d8e72c579edf3669ab1a Mon Sep 17 00:00:00 2001 -From: Aravinda VK -Date: Wed, 6 Mar 2013 14:34:12 +0530 -Subject: [PATCH 33/36] gluster: Handling Attribute error in Python 2.6 - -xml.etree.cElementTree in Python 2.6 doesn't have the attribute -ParseError(Introduced in Python 2.7). VDSM gluster/cli.py tries -to capture etree.ParseError when gluster cli returns incompatible -xml output. - -Change-Id: I63c33b34ce11473636365ea094e267c5424c7255 -Signed-off-by: Aravinda VK -(cherry picked from commit 5759c876e414b433b1a42e50e1817d5841ec2ef2) -Reviewed-on: http://gerrit.ovirt.org/12829 -Reviewed-by: Dan Kenigsberg ---- - vdsm/gluster/cli.py | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py -index 7136281..d4f65ab 100644 ---- a/vdsm/gluster/cli.py -+++ b/vdsm/gluster/cli.py -@@ -31,6 +31,12 @@ _glusterCommandPath = utils.CommandPath("gluster", - ) - - -+if hasattr(etree, 'ParseError'): -+ _etreeExceptions = (etree.ParseError, AttributeError, ValueError) -+else: -+ _etreeExceptions = (SyntaxError, AttributeError, ValueError) -+ -+ - def _getGlusterVolCmd(): - return [_glusterCommandPath.cmd, "--mode=script", "volume"] - -@@ -85,7 +91,7 @@ def _execGlusterXml(cmd): - tree = etree.fromstring('\n'.join(out)) - rv = int(tree.find('opRet').text) - msg = tree.find('opErrstr').text -- except (etree.ParseError, AttributeError, ValueError): -+ except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=out) - if rv == 0: - return tree -@@ -303,7 +309,7 @@ def volumeStatus(volumeName, brick=None, option=None): - return _parseVolumeStatusMem(xmltree) - else: - return _parseVolumeStatus(xmltree) -- except (etree.ParseError, AttributeError, ValueError): -+ except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) - - -@@ -427,7 +433,7 @@ def volumeInfo(volumeName=None): - raise ge.GlusterVolumesListFailedException(rc=e.rc, err=e.err) - try: - return _parseVolumeInfo(xmltree) -- except (etree.ParseError, AttributeError, ValueError): -+ except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) - - -@@ -448,7 +454,7 @@ def volumeCreate(volumeName, brickList, replicaCount=0, stripeCount=0, - raise ge.GlusterVolumeCreateFailedException(rc=e.rc, err=e.err) - try: - return {'uuid': xmltree.find('volCreate/volume/id').text} -- except (etree.ParseError, AttributeError, ValueError): -+ except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) - - -@@ -787,7 +793,7 @@ def peerStatus(): - return _parsePeerStatus(xmltree, - _getLocalIpAddress() or _getGlusterHostName(), - _getGlusterUuid(), HostStatus.CONNECTED) -- except (etree.ParseError, AttributeError, ValueError): -+ except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) - - -@@ -878,5 +884,5 @@ def volumeProfileInfo(volumeName, nfs=False): - raise ge.GlusterVolumeProfileInfoFailedException(rc=e.rc, err=e.err) - try: - return _parseVolumeProfileInfo(xmltree, nfs) -- except (etree.ParseError, AttributeError, ValueError): -+ except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) --- -1.8.1.4 - diff --git a/0034-bootstrap-remove-glusterfs-packages.patch b/0034-bootstrap-remove-glusterfs-packages.patch deleted file mode 100644 index 8351336..0000000 --- a/0034-bootstrap-remove-glusterfs-packages.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f2277d595e06d86791abffabe52f4e397f26cb0f Mon Sep 17 00:00:00 2001 -From: "Bala.FA" -Date: Tue, 6 Nov 2012 16:09:49 +0530 -Subject: [PATCH 34/36] bootstrap: remove glusterfs packages - -As glusterfs packages are dependencies for vdsm-gluster package, -having these in bootstrap is redundant - -Change-Id: I5bdde338599155df43af3a0fd0d14a02e3bddda8 -Signed-off-by: Bala.FA -Reviewed-on: http://gerrit.ovirt.org/12959 -Reviewed-by: Timothy Asir -Reviewed-by: Dan Kenigsberg -Reviewed-by: Douglas Schilling Landgraf ---- - vds_bootstrap/vds_bootstrap.py | 3 +-- - vdsm.spec.in | 5 ++++- - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 61e0f6f..219e6e4 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -159,8 +159,7 @@ if rhel6based: - 'seabios', 'qemu-img', 'fence-agents', - 'libselinux-python', 'sanlock', 'sanlock-python') - # Gluster packages -- GLUSTER_PACK = ('vdsm-gluster', 'glusterfs-server', 'glusterfs-rdma', -- 'glusterfs-geo-replication') -+ GLUSTER_PACK = (VDSM_NAME + '-gluster', ) - else: - # Devel packages - DEVEL_PACK = ('gdb', 'tcpdump', 'strace', 'ltrace', 'sysstat', 'ntp', -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 0aad124..1cb189e 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -402,7 +402,10 @@ Summary: Gluster Plugin for VDSM - BuildArch: noarch - - Requires: %{name} = %{version}-%{release} --Requires: glusterfs glusterfs-server glusterfs-fuse -+Requires: glusterfs -+Requires: glusterfs-server -+Requires: glusterfs-fuse -+Requires: glusterfs-rdma - - %description gluster - Gluster plugin enables VDSM to serve Gluster functionalities. --- -1.8.1.4 - diff --git a/0035-gluster-set-glusterfs-dependency-version.patch b/0035-gluster-set-glusterfs-dependency-version.patch deleted file mode 100644 index 97bf1a0..0000000 --- a/0035-gluster-set-glusterfs-dependency-version.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8ad23d1cbc02d2a923fcdcf050d8a4faf26948b2 Mon Sep 17 00:00:00 2001 -From: "Bala.FA" -Date: Tue, 12 Mar 2013 14:28:08 +0530 -Subject: [PATCH 35/36] gluster: set glusterfs dependency version - -Now vdsm-gluster depends on glusterfs version 3.4.0 or higher. - -Change-Id: Icb42bf4dec26b118f52cc51701faa5e611f63c00 -Signed-off-by: Bala.FA -Reviewed-on: http://gerrit.ovirt.org/12960 -Reviewed-by: Aravinda VK -Tested-by: Aravinda VK -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 1cb189e..60e76e5 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -402,7 +402,7 @@ Summary: Gluster Plugin for VDSM - BuildArch: noarch - - Requires: %{name} = %{version}-%{release} --Requires: glusterfs -+Requires: glusterfs >= 3.4.0 - Requires: glusterfs-server - Requires: glusterfs-fuse - Requires: glusterfs-rdma --- -1.8.1.4 - diff --git a/0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch b/0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch deleted file mode 100644 index dc34ce0..0000000 --- a/0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 37334a9b538fdb7af6e2d49eea5f7bd7bedd82b4 Mon Sep 17 00:00:00 2001 -From: Eduardo Warszawski -Date: Mon, 18 Feb 2013 18:14:31 +0200 -Subject: [PATCH 36/36] Do not delete the template when zeroing a dependant - image. - -Change-Id: I9e472334efa9dadb5389db70b0953f88b9be858a -Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=910013 -Signed-off-by: Eduardo -Reviewed-on: http://gerrit.ovirt.org/12178 -Tested-by: Haim Ateya -Reviewed-by: Dan Kenigsberg -Reviewed-by: Yeela Kaplan -Reviewed-by: Ayal Baron -Reviewed-on: http://gerrit.ovirt.org/13028 -Tested-by: Federico Simoncelli ---- - vdsm/storage/blockSD.py | 12 +++++++++--- - vdsm/storage/hsm.py | 2 +- - 2 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py -index 862e413..e66256d 100644 ---- a/vdsm/storage/blockSD.py -+++ b/vdsm/storage/blockSD.py -@@ -945,14 +945,20 @@ class BlockStorageDomain(sd.StorageDomain): - self.log.debug("removed image dir: %s", imgPath) - return imgPath - -+ def _getImgExclusiveVols(self, imgUUID, volsImgs): -+ """Filter vols belonging to imgUUID only.""" -+ exclusives = dict((vName, v) for vName, v in volsImgs.iteritems() -+ if v.imgs[0] == imgUUID) -+ return exclusives -+ - def deleteImage(self, sdUUID, imgUUID, volsImgs): -- toDel = tuple(vName for vName, v in volsImgs.iteritems() -- if v.imgs[0] == imgUUID) -+ toDel = self._getImgExclusiveVols(imgUUID, volsImgs) - deleteVolumes(sdUUID, toDel) - self.rmDCImgDir(imgUUID, volsImgs) - - def zeroImage(self, sdUUID, imgUUID, volsImgs): -- zeroImgVolumes(sdUUID, imgUUID, volsImgs) -+ toZero = self._getImgExclusiveVols(imgUUID, volsImgs) -+ zeroImgVolumes(sdUUID, imgUUID, toZero) - self.rmDCImgDir(imgUUID, volsImgs) - - def getAllVolumes(self): -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index 8bbe3b8..32a32c9 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -1455,7 +1455,7 @@ class HSM: - # postZero implies block domain. Backup domains are always NFS - # hence no need to create fake template if postZero is true. - self._spmSchedule(spUUID, "zeroImage_%s" % imgUUID, dom.zeroImage, -- sdUUID, imgUUID, volsByImg.keys()) -+ sdUUID, imgUUID, volsByImg) - else: - dom.deleteImage(sdUUID, imgUUID, volsByImg) - # This is a hack to keep the interface consistent --- -1.8.1.4 - diff --git a/0037-vdsm.spec-fence-agents-all.patch b/0037-vdsm.spec-fence-agents-all.patch deleted file mode 100644 index 3229616..0000000 --- a/0037-vdsm.spec-fence-agents-all.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b5cba4b364912710ab5718b2a8370305dcc90016 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 8 Apr 2013 16:09:55 -0400 -Subject: [PATCH 37/38] vdsm.spec: fence-agents-all - -fence-agents package in version 4 replaced the package name -to fence-agents-all. This patch will adapt vdsm spec to this change. - -Change-Id: Ia7933fd043e535b568ce368e8e61f44e330b25ae -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/13729 -Reviewed-by: Federico Simoncelli ---- - vdsm.spec.in | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 14922e0..a00e989 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -89,6 +89,7 @@ Requires: dmidecode - ExclusiveArch: x86_64 - Requires: device-mapper-multipath - Requires: e2fsprogs -+Requires: fence-agents-all - Requires: iscsi-initiator-utils - Requires: libvirt - Requires: lvm2 -@@ -106,6 +107,7 @@ Requires: libvirt >= 0.9.10-21.el6_3.5 - Requires: iscsi-initiator-utils >= 6.2.0.872-15 - Requires: device-mapper-multipath >= 0.4.9-52 - Requires: e2fsprogs >= 1.41.12-11 -+Requires: fence-agents - Requires: kernel >= 2.6.32-279.9.1 - Requires: sanlock >= 2.3-4, sanlock-python - Requires: initscripts >= 9.03.31-2.el6_3.1 -@@ -115,6 +117,11 @@ Requires: lvm2 >= 2.02.95-10.el6_3.2 - Requires: logrotate < 3.8.0 - %endif - %else -+%if 0%{?fedora} >= 19 -+Requires: fence-agents-all -+%else -+Requires: fence-agents -+%endif - # Subprocess and thread bug was found on python 2.7.2 - Requires: python >= 2.7.3 - Requires: qemu-kvm >= 2:0.15.0-4 -@@ -141,7 +148,6 @@ Requires: systemd >= 197-1.fc18.2 - - Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client - Requires: psmisc >= 22.6-15 --Requires: fence-agents - Requires: bridge-utils - Requires: sos - Requires: tree --- -1.8.1.4 - diff --git a/0038-fix-storage.fuser.patch b/0038-fix-storage.fuser.patch deleted file mode 100644 index 7d2989e..0000000 --- a/0038-fix-storage.fuser.patch +++ /dev/null @@ -1,85 +0,0 @@ -From af3c0b0472f443c5c21a169b166cc1ee294d1606 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Sun, 24 Mar 2013 12:05:23 +0200 -Subject: [PATCH 38/39] fix storage.fuser - -Bug-Url: https://bugzilla.redhat.com/922515 -Change-Id: Iabd58847db7090f83106d30a763d09c0a7b78741 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/13302 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/13303 -Reviewed-by: Federico Simoncelli ---- - tests/Makefile.am | 1 + - tests/fuserTests.py | 31 +++++++++++++++++++++++++++++++ - vdsm/storage/fuser.py | 2 +- - 3 files changed, 33 insertions(+), 1 deletion(-) - create mode 100644 tests/fuserTests.py - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 8ad34e2..9aec750 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -27,6 +27,7 @@ test_modules = \ - capsTests.py \ - configNetworkTests.py \ - fileUtilTests.py \ -+ fuserTests.py \ - getAllVolumesTests.py \ - glusterTestData.py \ - gluster_cli_tests.py \ -diff --git a/tests/fuserTests.py b/tests/fuserTests.py -new file mode 100644 -index 0000000..7473dde ---- /dev/null -+++ b/tests/fuserTests.py -@@ -0,0 +1,31 @@ -+# -+# Copyright 2013 Red Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+# -+# Refer to the README and COPYING files for full details of the license -+# -+ -+import os -+from storage import fuser -+ -+from testrunner import VdsmTestCase -+ -+ -+class TestFuser(VdsmTestCase): -+ -+ def testSelfExe(self): -+ pid = os.getpid() -+ self.assertTrue(pid in fuser.fuser('/proc/%s/exe' % pid)) -diff --git a/vdsm/storage/fuser.py b/vdsm/storage/fuser.py -index d9becbc..135dad6 100644 ---- a/vdsm/storage/fuser.py -+++ b/vdsm/storage/fuser.py -@@ -27,7 +27,7 @@ def fuser(path, mountPoint=False): - cmd.append("-m") - - cmd.append(path) -- (rc, out, err) = misc.execCmd(cmd, sudo=True) -+ (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=True) - if rc != 0: - return [] - --- -1.8.1.4 - diff --git a/0039-Bump-up-libvirt-version-to-fix-network-linking.patch b/0039-Bump-up-libvirt-version-to-fix-network-linking.patch deleted file mode 100644 index 455971f..0000000 --- a/0039-Bump-up-libvirt-version-to-fix-network-linking.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3a99d6d89d9f978052baee3c27fb58316f12b863 Mon Sep 17 00:00:00 2001 -From: "Antoni S. Puimedon" -Date: Thu, 31 Jan 2013 17:32:07 +0100 -Subject: [PATCH 39/39] Bump up libvirt version to fix network linking. - -The libvirt feature leveraged for the Network linking feature had -a bug that made it fail when the vnic had a bootorder set. See -https://bugzilla.redhat.com/906446 . This was solved and has been marked -for backport (which did not yet happen) for the version this patch -sets). - -Change-Id: Ib9e96eb0192fbea35d2723cafbec145b629371fa -Signed-off-by: Antoni S. Puimedon -Reviewed-on: http://gerrit.ovirt.org/11600 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 60e76e5..14922e0 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -119,7 +119,7 @@ Requires: logrotate < 3.8.0 - Requires: python >= 2.7.3 - Requires: qemu-kvm >= 2:0.15.0-4 - Requires: qemu-img >= 2:0.15.0-4 --Requires: libvirt >= 0.10.1-1 -+Requires: libvirt >= 0.10.2.4-1 - Requires: iscsi-initiator-utils >= 6.2.0.872-14 - Requires: device-mapper-multipath >= 0.4.9-18 - Requires: e2fsprogs >= 1.41.14 --- -1.8.1.4 - diff --git a/0040-vdsm.spec.in-with_gluster.patch b/0040-vdsm.spec.in-with_gluster.patch deleted file mode 100644 index 6e19f2a..0000000 --- a/0040-vdsm.spec.in-with_gluster.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 529d7816dc1b5959a446ebef393dca154d6e4364 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 8 Apr 2013 18:17:13 -0400 -Subject: [PATCH] vdsm.spec.in: with_gluster - -Option to manage Gluster sub-package. - -Change-Id: I925c1b12f0447798eaae6da72d726bc007511e1c -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/13731 -Reviewed-by: Federico Simoncelli ---- - vdsm.spec.in | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index a00e989..4bc4c6e 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -3,6 +3,9 @@ - %global vdsm_bootstrap vdsm-bootstrap - %global vdsm_reg vdsm-reg - -+# Gluster -+%global with_gluster 1 -+ - # Required users and groups - %global vdsm_user @VDSMUSER@ - %global vdsm_group @VDSMGROUP@ -@@ -403,6 +406,7 @@ BuildArch: noarch - %description hook-vmdisk - Hook adds additional disk image for a VM (raw or qcow2) - -+%if 0%{?with_gluster} - %package gluster - Summary: Gluster Plugin for VDSM - BuildArch: noarch -@@ -415,6 +419,7 @@ Requires: glusterfs-rdma - - %description gluster - Gluster plugin enables VDSM to serve Gluster functionalities. -+%endif - - %prep - %setup -q -@@ -820,8 +825,12 @@ exit 0 - %{_datadir}/%{vdsm_name}/tests/run_tests.sh - %{_datadir}/%{vdsm_name}/tests/route_info.out - %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out -+%if 0%{?with_gluster} - %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml - %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml -+%else -+%exclude %{_datadir}/%{vdsm_name}/tests/gluster* -+%endif - %{_datadir}/%{vdsm_name}/tests/functional/*.py* - - %files hook-vhostmd -@@ -994,6 +1003,7 @@ exit 0 - %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop/10_faqemu - %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu - -+%if 0%{?with_gluster} - %files gluster - %defattr(-, root, root, -) - %dir %{_datadir}/%{vdsm_name}/gluster -@@ -1003,6 +1013,10 @@ exit 0 - %{_datadir}/%{vdsm_name}/gluster/cli.py* - %{_datadir}/%{vdsm_name}/gluster/exception.py* - %{_datadir}/%{vdsm_name}/gluster/hostname.py* -+%else -+%exclude %{_datadir}/%{vdsm_name}/gluster/* -+%endif -+ - - %changelog - * Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 --- -1.8.1.4 - diff --git a/0041-Don-t-user-sudo-in-fuser.patch b/0041-Don-t-user-sudo-in-fuser.patch deleted file mode 100644 index 7dc6d32..0000000 --- a/0041-Don-t-user-sudo-in-fuser.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 1576791841cdb21c95bea65f214c333cb4c188ac Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Wed, 10 Apr 2013 10:56:01 +0300 -Subject: [PATCH 41/47] Don't user sudo in fuser - -Change-Id: I74842ffda1bc1d5ebb54de5e1933fedd851e745b -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/13779 -Reviewed-by: Dan Kenigsberg -Tested-by: Antoni Segura Puimedon -Reviewed-on: http://gerrit.ovirt.org/13810 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/storage/blockSD.py | 5 +++-- - vdsm/storage/fuser.py | 2 +- - vdsm/sudoers.vdsm.in | 1 - - vdsm/supervdsmServer.py | 5 +++++ - 4 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py -index e66256d..e22a1e2 100644 ---- a/vdsm/storage/blockSD.py -+++ b/vdsm/storage/blockSD.py -@@ -48,7 +48,7 @@ import storage_exception as se - from storage_mailbox import MAILBOX_SIZE - import resourceManager as rm - import mount --from fuser import fuser -+import supervdsm as svdsm - - STORAGE_DOMAIN_TAG = "RHAT_storage_domain" - STORAGE_UNREADY_DOMAIN_TAG = STORAGE_DOMAIN_TAG + "_UNREADY" -@@ -1122,7 +1122,8 @@ class BlockStorageDomain(sd.StorageDomain): - masterMount.umount() - except mount.MountError: - # umount failed, try to kill that processes holding mount point -- pids = fuser(masterMount.fs_file, mountPoint=True) -+ svdsmp = svdsm.getProxy() -+ pids = svdsmp.fuser(masterMount.fs_file, mountPoint=True) - - # It was unmounted while I was checking no need to do anything - if not masterMount.isMounted(): -diff --git a/vdsm/storage/fuser.py b/vdsm/storage/fuser.py -index 135dad6..0f235ee 100644 ---- a/vdsm/storage/fuser.py -+++ b/vdsm/storage/fuser.py -@@ -27,7 +27,7 @@ def fuser(path, mountPoint=False): - cmd.append("-m") - - cmd.append(path) -- (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=True) -+ (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=False) - if rc != 0: - return [] - -diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in -index 4fc75f9..70628f8 100644 ---- a/vdsm/sudoers.vdsm.in -+++ b/vdsm/sudoers.vdsm.in -@@ -12,7 +12,6 @@ Cmnd_Alias VDSM_STORAGE = @MOUNT_PATH@, @UMOUNT_PATH@, \ - @FSCK_PATH@ -p *, \ - @TUNE2FS_PATH@ -j *, \ - @MKFS_PATH@ -q -j *, \ -- @FUSER_PATH@ -m *, \ - @KILL_PATH@, \ - @CHOWN_PATH@ @VDSMUSER@\:@QEMUGROUP@ *, \ - @CHOWN_PATH@ @METADATAUSER@\:@METADATAGROUP@ *, \ -diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py -index 21e7c94..3f7ce1c 100755 ---- a/vdsm/supervdsmServer.py -+++ b/vdsm/supervdsmServer.py -@@ -26,6 +26,7 @@ import stat - import errno - import threading - import re -+import fuser - from time import sleep - import signal - from multiprocessing import Pipe, Process -@@ -307,6 +308,10 @@ class _SuperVdsm(object): - def removeFs(self, path): - return mkimage.removeFs(path) - -+ @logDecorator -+ def fuser(self, *args): -+ return fuser.fuser(*args) -+ - def __udevReloadRules(self, guid): - if self.__udevOperationReload(): - reload = "--reload" --- -1.8.1.4 - diff --git a/0042-svdsm-fix-fuser-import-in-supervdsmServer.patch b/0042-svdsm-fix-fuser-import-in-supervdsmServer.patch deleted file mode 100644 index 06dd3c4..0000000 --- a/0042-svdsm-fix-fuser-import-in-supervdsmServer.patch +++ /dev/null @@ -1,31 +0,0 @@ -From acd99086f6f7d0b2f94065806be6faaee0f41f46 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Thu, 11 Apr 2013 05:15:56 -0400 -Subject: [PATCH 42/47] svdsm: fix fuser import in supervdsmServer - -Change-Id: I319a96e1357b5ed47ef5b6bcf3dec0ce678b9748 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/13804 -Reviewed-by: Yaniv Bronhaim -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/13811 ---- - vdsm/supervdsmServer.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py -index 3f7ce1c..949a7cc 100755 ---- a/vdsm/supervdsmServer.py -+++ b/vdsm/supervdsmServer.py -@@ -26,7 +26,7 @@ import stat - import errno - import threading - import re --import fuser -+from storage import fuser - from time import sleep - import signal - from multiprocessing import Pipe, Process --- -1.8.1.4 - diff --git a/0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch b/0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch deleted file mode 100644 index 0536202..0000000 --- a/0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b7743c5593b72d1e669a8ace7a5a657fb9eb8643 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Thu, 7 Feb 2013 11:00:03 +0200 -Subject: [PATCH 43/47] Removing vdsm configuration when removing vdsm service - -Before we removed that section only over rhel and we looked for the -wrong string. This patch adds sed command for both dist with the current -string that is written by vdsmd init script. - -Change-Id: Ia8f59375e20efa6b5de8483a12a772f5f0ce3749 -Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=902346 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/11295 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/13812 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm.spec.in | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 4bc4c6e..f8a2924 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -529,18 +529,26 @@ exit 0 - %endif - - %preun -+if [ "$1" -eq 0 ]; then -+ start_conf_section="## beginning of configuration section by vdsm" -+ end_conf_section="## end of configuration section by vdsm" -+ by_vdsm="by vdsm" -+ -+ /bin/sed -i -e "/${start_conf_section}/,/${end_conf_section}/d" \ -+ -e "/${by_vdsm}/d" \ -+ %{_sysconfdir}/libvirt/libvirtd.conf \ -+ %{_sysconfdir}/libvirt/qemu.conf \ -+ %{_sysconfdir}/sysconfig/libvirtd \ -+ %{_sysconfdir}/sysctl.conf \ -+ %{_sysconfdir}/libvirt/qemu-sanlock.conf -+fi -+ - %if 0%{?rhel} - if [ "$1" -eq 0 ] - then - /sbin/service vdsmd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del vdsmd - -- /bin/sed -i '/# by vdsm$/d' \ -- /etc/libvirt/libvirtd.conf \ -- /etc/libvirt/qemu.conf \ -- /etc/sysconfig/libvirtd \ -- /etc/sysctl.conf -- - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ - /etc/sysctl.conf - --- -1.8.1.4 - diff --git a/0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch b/0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch deleted file mode 100644 index 6dd59f7..0000000 --- a/0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch +++ /dev/null @@ -1,144 +0,0 @@ -From baf505e8698f38fdeeb152ffe1d4377f94a39231 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Wed, 17 Apr 2013 09:44:40 +0300 -Subject: [PATCH 44/47] Seperating supervdsm log to supervdsm.log file - -Supervdsm as root process can change the logfile ownership -to root when creating the file. Manual deletion of vdsm.log can cause -this scenario. - -Change-Id: I2e5fb4a2cd5421671f942120b6718c1bb20b9e60 -Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=912308 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: https://gerrit.eng.lab.tlv.redhat.com/7190 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/13964 ---- - vdsm.spec.in | 1 + - vdsm/Makefile.am | 5 +++++ - vdsm/logger.conf.in | 8 +------- - vdsm/supervdsmServer.py | 2 +- - vdsm/svdsm.logger.conf.in | 29 +++++++++++++++++++++++++++++ - 6 files changed, 38 insertions(+), 8 deletions(-) - create mode 100644 vdsm/svdsm.logger.conf.in - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index f8a2924..0120c3e 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -668,6 +668,7 @@ exit 0 - %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/dummybr.py* - %attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py* - %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf -+%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf - %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf - %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.policy - %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm -diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am -index 88b3287..382eaf5 100644 ---- a/vdsm/Makefile.am -+++ b/vdsm/Makefile.am -@@ -86,6 +86,7 @@ nodist_vdsm_SCRIPTS = \ - - nodist_noinst_DATA = \ - logger.conf \ -+ svdsm.logger.conf \ - mom.conf \ - sudoers.vdsm \ - vdsm-logrotate.conf \ -@@ -124,6 +125,7 @@ EXTRA_DIST = \ - libvirt_password \ - limits.conf \ - logger.conf.in \ -+ svdsm.logger.conf.in \ - mk_sysprep_floppy.in \ - mom.conf.in \ - mom.policy \ -@@ -188,9 +190,12 @@ uninstall-local: \ - install-data-logger: - $(MKDIR_P) $(DESTDIR)$(vdsmconfdir) - $(INSTALL_DATA) logger.conf $(DESTDIR)$(vdsmconfdir)/logger.conf -+ $(INSTALL_DATA) svdsm.logger.conf \ -+ $(DESTDIR)$(vdsmconfdir)/svdsm.logger.conf - - uninstall-data-logger: - $(RM) $(DESTDIR)$(vdsmconfdir)/logger.conf -+ $(RM) $(DESTDIR)$(vdsmconfdir)/svdsm.logger.conf - - install-data-libvirtpass: - $(MKDIR_P) $(DESTDIR)$(vdsmtsdir)/keys -diff --git a/vdsm/logger.conf.in b/vdsm/logger.conf.in -index edd4616..0a4622f 100644 ---- a/vdsm/logger.conf.in -+++ b/vdsm/logger.conf.in -@@ -1,5 +1,5 @@ - [loggers] --keys=root,vds,Storage,metadata,SuperVdsm -+keys=root,vds,Storage,metadata - - [handlers] - keys=console,syslog,logfile,metadata -@@ -24,12 +24,6 @@ handlers=syslog,logfile - qualname=Storage - propagate=0 - --[logger_SuperVdsm] --level=DEBUG --handlers=syslog,logfile --qualname=SuperVdsm --propagate=0 -- - [logger_metadata] - level=WARNING - handlers=metadata -diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py -index 949a7cc..db6b778 100755 ---- a/vdsm/supervdsmServer.py -+++ b/vdsm/supervdsmServer.py -@@ -84,7 +84,7 @@ def logDecorator(func): - - KB = 2 ** 10 - TEST_BUFF_LEN = 4 * KB --LOG_CONF_PATH = "/etc/vdsm/logger.conf" -+LOG_CONF_PATH = "/etc/vdsm/svdsm.logger.conf" - - - class _SuperVdsm(object): -diff --git a/vdsm/svdsm.logger.conf.in b/vdsm/svdsm.logger.conf.in -new file mode 100644 -index 0000000..3728170 ---- /dev/null -+++ b/vdsm/svdsm.logger.conf.in -@@ -0,0 +1,29 @@ -+[loggers] -+keys=root,SuperVdsm -+ -+[handlers] -+keys=logfile -+ -+[formatters] -+keys=long -+ -+[logger_root] -+level=DEBUG -+handlers=logfile -+propagate=0 -+ -+[logger_SuperVdsm] -+level=DEBUG -+handlers=logfile -+qualname=SuperVdsm -+propagate=0 -+ -+[handler_logfile] -+class=logging.handlers.WatchedFileHandler -+args=('@VDSMLOGDIR@/supervdsm.log',) -+filters=storage.misc.TracebackRepeatFilter -+level=DEBUG -+formatter=long -+ -+[formatter_long] -+format: %(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s) %(message)s --- -1.8.1.4 - diff --git a/0045-vdsm.spec-Adding-with_systemd-macro.patch b/0045-vdsm.spec-Adding-with_systemd-macro.patch deleted file mode 100644 index 059adcc..0000000 --- a/0045-vdsm.spec-Adding-with_systemd-macro.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 20becc2c3174ab500f4bce4f75a9604de30c9c35 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 4 Mar 2013 16:18:24 -0500 -Subject: [PATCH 45/47] vdsm.spec: Adding with_systemd macro - -This patch adds the macro with_systemd which can be used -to validate if the system uses Systemd. - -Change-Id: Ibcd8567868e16453ed6633f143a6b1fff8e9c454 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/12086 -Tested-by: oVirt Jenkins CI Server -Reviewed-by: Vinzenz Feenstra -Reviewed-by: Yaniv Bronhaim -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/13814 -Reviewed-by: Federico Simoncelli ---- - vdsm.spec.in | 45 ++++++++++++++++++++++++++++++--------------- - 1 file changed, 30 insertions(+), 15 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 0120c3e..d7944cb 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -20,6 +20,15 @@ - %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d - %endif - -+# Systemd macro -+%if 0%{?fedora} >= 15 -+%global with_systemd 1 -+%endif -+ -+%if 0%{?rhel} >= 7 -+%global with_systemd 1 -+%endif -+ - # Default to skipping autoreconf. Distros can change just this one line - # (or provide a command-line override) if they backport any patches that - # touch configure.ac or Makefile.am. -@@ -66,6 +75,9 @@ BuildRequires: libtool - %if !0%{?rhel} - BuildRequires: pyflakes - BuildRequires: python-pep8 -+%endif -+ -+%if 0%{?with_systemd} - BuildRequires: systemd-units - %endif - -@@ -454,11 +466,21 @@ install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ - install -Dm 0644 vdsm/limits.conf \ - %{buildroot}/etc/security/limits.d/99-vdsm.conf - --%if 0%{?rhel} -+%if 0%{?with_systemd} -+# Install the systemd scripts -+install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd -+install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service -+install -Dm 0755 vdsm_reg/vdsm-reg.init \ -+ %{buildroot}/lib/systemd/systemd-vdsm-reg -+install -Dm 0644 vdsm_reg/vdsm-reg.service \ -+ %{buildroot}%{_unitdir}/vdsm-reg.service -+%else - # Install the SysV init scripts - install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd - install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg -+%endif - -+%if 0%{?rhel} - # This is not commonplace, but we want /var/log/core to be a world-writable - # dropbox for core dumps - install -dDm 1777 %{buildroot}%{_localstatedir}/log/core -@@ -467,14 +489,6 @@ install -dDm 1777 %{buildroot}%{_localstatedir}/log/core - install -Dm 0644 vdsm/vdsm.conf.sample \ - %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf - --# Install the systemd scripts --install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd --install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service --install -Dm 0755 vdsm_reg/vdsm-reg.init \ -- %{buildroot}/lib/systemd/systemd-vdsm-reg --install -Dm 0644 vdsm_reg/vdsm-reg.service \ -- %{buildroot}%{_unitdir}/vdsm-reg.service -- - # Install the polkit for libvirt - %if 0%{?fedora} >= 18 - install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ -@@ -628,12 +642,13 @@ exit 0 - %files - %defattr(-, root, root, -) - %doc COPYING README vdsm/vdsm.conf.sample --%if 0%{?rhel} --%{_initrddir}/vdsmd --%else -+%if 0%{?with_systemd} - /lib/systemd/systemd-vdsmd - %{_unitdir}/vdsmd.service -+%else -+%{_initrddir}/vdsmd - %endif -+ - %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ - %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks - %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt -@@ -981,11 +996,11 @@ exit 0 - %config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf - %ghost %dir /data - %ghost %dir %attr(0775, root, root) /data/updates --%if 0%{?rhel} --%{_initrddir}/vdsm-reg --%else -+%if 0%{?with_systemd} - /lib/systemd/systemd-vdsm-reg - %{_unitdir}/vdsm-reg.service -+%else -+%{_initrddir}/vdsm-reg - %endif - %{_datadir}/%{vdsm_reg}/vdsm-reg-setup - %{_datadir}/%{vdsm_reg}/vdsm-complete --- -1.8.1.4 - diff --git a/0046-spec-use-the-fedora-systemd-macros.patch b/0046-spec-use-the-fedora-systemd-macros.patch deleted file mode 100644 index b130923..0000000 --- a/0046-spec-use-the-fedora-systemd-macros.patch +++ /dev/null @@ -1,140 +0,0 @@ -From d848def9d4e011c234675130c9588c86e6f6a411 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Thu, 21 Feb 2013 09:22:01 -0500 -Subject: [PATCH 46/47] spec: use the fedora systemd macros - -Add the support for the fedora systemd macros introduced in fedora 18. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=850412 -Change-Id: I76857a6b9ae1a945511f359333735b9497c5e2b0 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/12285 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/13815 -Tested-by: Douglas Schilling Landgraf -Reviewed-by: Yaniv Bronhaim ---- - vdsm.spec.in | 33 ++++++++++++++++++++++++++------- - 1 file changed, 26 insertions(+), 7 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index d7944cb..e8f4876 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -3,9 +3,6 @@ - %global vdsm_bootstrap vdsm-bootstrap - %global vdsm_reg vdsm-reg - --# Gluster --%global with_gluster 1 -- - # Required users and groups - %global vdsm_user @VDSMUSER@ - %global vdsm_group @VDSMGROUP@ -@@ -20,13 +17,15 @@ - %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d - %endif - --# Systemd macro --%if 0%{?fedora} >= 15 -+# Gluster -+%global with_gluster 1 -+ -+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 - %global with_systemd 1 - %endif - --%if 0%{?rhel} >= 7 --%global with_systemd 1 -+%if 0%{?fedora} >= 18 -+%global with_systemd_macros 1 - %endif - - # Default to skipping autoreconf. Distros can change just this one line -@@ -535,12 +534,16 @@ if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsmd - fi - %else -+%if 0%{?with_systemd_macros} -+%systemd_post vdsmd.service -+%else - if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - fi - exit 0 - %endif -+%endif - - %preun - if [ "$1" -eq 0 ]; then -@@ -579,12 +582,16 @@ then - fi - fi - %else -+%if 0%{?with_systemd_macros} -+%systemd_preun vdsmd.service -+%else - if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : - fi - exit 0 - %endif -+%endif - - %postun - %if 0%{?rhel} -@@ -593,11 +600,15 @@ if [ "$1" -ge 1 ]; then - fi - exit 0 - %else -+%if 0%{?with_systemd_macros} -+%systemd_postun_with_restart vdsmd.service -+%else - if [ "$1" -ge 1 ] ; then - /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : - fi - exit 0 - %endif -+%endif - - %if 0%{?rhel} - %triggerun -- libvirt -@@ -617,12 +628,16 @@ if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsm-reg - fi - %else -+%if 0%{?with_systemd_macros} -+%systemd_post vdsm-reg.service -+%else - if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - fi - exit 0 - %endif -+%endif - - %preun reg - %if 0%{?rhel} -@@ -632,12 +647,16 @@ then - /sbin/chkconfig --del vdsm-reg - fi - %else -+%if 0%{?with_systemd_macros} -+%systemd_preun vdsm-reg.service -+%else - if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsm-reg.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1 || : - fi - exit 0 - %endif -+%endif - - %files - %defattr(-, root, root, -) --- -1.8.1.4 - diff --git a/0047-spec-enable-gluster-upstream-and-on-fedora-19.patch b/0047-spec-enable-gluster-upstream-and-on-fedora-19.patch deleted file mode 100644 index 258f1f5..0000000 --- a/0047-spec-enable-gluster-upstream-and-on-fedora-19.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 7fd5b70e91f59d396da79b44ae1dc6edba2c7d49 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Wed, 10 Apr 2013 11:41:06 -0400 -Subject: [PATCH 47/47] spec: enable gluster upstream and on fedora 19 - -The gluster package should be always enabled upstream or since fedora 19 -in koji builds. - -Change-Id: I68436bf10cecdaea8b3ce6c95797aac4895ec482 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/13791 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/13816 -Reviewed-by: Yaniv Bronhaim -Tested-by: Douglas Schilling Landgraf ---- - vdsm.spec.in | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index e8f4876..9a44260 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -10,6 +10,14 @@ - %global snlk_group @SNLKGROUP@ - %global snlk_user @SNLKUSER@ - -+# Fedora official build -+%global fedora_koji_build 0 -+ -+# Default to skipping autoreconf. Distros can change just this one line -+# (or provide a command-line override) if they backport any patches that -+# touch configure.ac or Makefile.am. -+%{!?enable_autotools:%define enable_autotools 0} -+ - # Required paths - %if 0%{?fedora} >= 18 - %global _polkitdir %{_datadir}/polkit-1/rules.d -@@ -17,8 +25,9 @@ - %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d - %endif - --# Gluster -+%if !0%{fedora_koji_build} || 0%{?fedora} >= 19 - %global with_gluster 1 -+%endif - - %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 - %global with_systemd 1 -@@ -28,11 +37,6 @@ - %global with_systemd_macros 1 - %endif - --# Default to skipping autoreconf. Distros can change just this one line --# (or provide a command-line override) if they backport any patches that --# touch configure.ac or Makefile.am. --%{!?enable_autotools:%define enable_autotools 0} -- - Name: %{vdsm_name} - Version: @PACKAGE_VERSION@ - Release: @PACKAGE_RELEASE@%{?dist}%{?extra_release} --- -1.8.1.4 - diff --git a/0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch b/0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch deleted file mode 100644 index 41735b7..0000000 --- a/0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 96c4ae5b46a83cd7099fd2a0558e2be7e8831d3a Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 23 Apr 2013 15:24:13 -0400 -Subject: [PATCH] Makefile.am: ignore false positive pyflakes lvm.py - -Temporary workaround. - -Change-Id: Id8cdeb0c28c1ee5dc3a18a7688ae60fe641f9a6c -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/14184 -Reviewed-by: Dan Kenigsberg ---- - Makefile.am | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 06ffbf9..7b0d161 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -99,9 +99,14 @@ PEP8_WHITELIST = \ - - PEP8_BLACKLIST = apiData.py,config.py,constants.py - -+SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \ -+ 'lv' from line .*" -+ - check-local: - find . -path './.git' -prune -type f -o \ -- -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) -+ -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \ -+ grep -w -v $(SKIP_PYFLAKES_ERR) | \ -+ while read LINE; do echo "$$LINE"; false; done - $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' \ - --ignore=E126,E127,E128 \ - $(PEP8_WHITELIST) --- -1.7.1 - diff --git a/0049-Deactivate-libvirtVM.Drives.patch b/0049-Deactivate-libvirtVM.Drives.patch deleted file mode 100644 index 24aa19b..0000000 --- a/0049-Deactivate-libvirtVM.Drives.patch +++ /dev/null @@ -1,79 +0,0 @@ -From b94d0a6c37303a977a46fe95ee77a2dd287d862c Mon Sep 17 00:00:00 2001 -From: Eduardo Warszawski -Date: Sun, 19 May 2013 20:20:07 +0300 -Subject: [PATCH] Deactivate libvirtVM.Drives() - -Change I8d310f216987b7 has introduced teardownVolumePath() calls with a -Drive object instead of a drive dictionary from self.conf. -In its previous form, teardownVolumePath() has silently ignored such -input, keeping the volume active. - -This patch makes teardownVolumePath() handle such inputs properly. This -is one baby step in the process of getting rid of self.conf: we would -like to use the objects everywhere within vdsm. - -Note that this patch introduces an ugly log line when pointlessly trying -to tear down a cdrom device. This would be fixed in a subsequent patch. - -Change-Id: I8ba965f0987037fa5dafc6b3ea6eeb6f01a82436 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=962549 -Signed-off-by: Eduardo -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/14869 -Reviewed-on: http://gerrit.ovirt.org/14953 -Tested-by: Federico Simoncelli ---- - vdsm/clientIF.py | 17 ++++++++++------- - vdsm/libvirtvm.py | 8 ++++++++ - 2 files changed, 18 insertions(+), 7 deletions(-) - -diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py -index 65b4e72..fabd494 100644 ---- a/vdsm/clientIF.py -+++ b/vdsm/clientIF.py -@@ -318,13 +318,16 @@ class clientIF: - - def teardownVolumePath(self, drive): - res = {'status': doneCode} -- if type(drive) == dict: -- try: -- res = self.irs.teardownImage(drive['domainID'], -- drive['poolID'], drive['imageID']) -- except KeyError: -- #This drive is not a vdsm image (quartet) -- self.log.info("Avoiding tear down drive %s", str(drive)) -+ try: -+ res = self.irs.teardownImage(drive['domainID'], -+ drive['poolID'], drive['imageID']) -+ except KeyError: -+ self.log.warning("Drive is not a vdsm image: %s", -+ drive, exc_info=True) -+ except TypeError: -+ if not isinstance(drive, basestring): -+ raise -+ # paths (strings) are not deactivated - - return res['status']['code'] - -diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py -index 19c5547..91f7a56 100644 ---- a/vdsm/libvirtvm.py -+++ b/vdsm/libvirtvm.py -@@ -1071,6 +1071,14 @@ class Drive(LibvirtVmDevice): - - self._customize() - -+ def __getitem__(self, key): -+ try: -+ value = getattr(self, str(key)) -+ except AttributeError: -+ raise KeyError(key) -+ else: -+ return value -+ - @property - def volExtensionChunk(self): - """ --- -1.7.1 - diff --git a/0050-vdsm-fix-Vm-cleanup-routine.patch b/0050-vdsm-fix-Vm-cleanup-routine.patch deleted file mode 100644 index a13a6a6..0000000 --- a/0050-vdsm-fix-Vm-cleanup-routine.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 0939dd0d8c23067f6c74d722a07c46623f57a6da Mon Sep 17 00:00:00 2001 -From: Peter V. Saveliev -Date: Thu, 4 Apr 2013 15:28:29 +0200 -Subject: [PATCH] vdsm: fix Vm cleanup routine - -The issue was that on Vm disk hot unplug the general clean up routine -was called, that wiped out also qemu and ovirt guest agent's sockets. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=927143 -Signed-off-by: Peter V. Saveliev -Change-Id: Ie355022866d008a83257b1b6e3a4226a07d34c2f -Reviewed-on: http://gerrit.ovirt.org/13610 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Vered Volansky -Reviewed-on: http://gerrit.ovirt.org/15055 -Tested-by: Federico Simoncelli ---- - vdsm/libvirtvm.py | 10 ++++++++-- - vdsm/vm.py | 23 ++++++++++++++++++++--- - 2 files changed, 28 insertions(+), 5 deletions(-) - -diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py -index fe140ec..19c5547 100644 ---- a/vdsm/libvirtvm.py -+++ b/vdsm/libvirtvm.py -@@ -1391,7 +1391,13 @@ class LibvirtVm(vm.Vm): - self._guestEventTime = self._startTime - - def _cleanup(self): -- vm.Vm._cleanup(self) -+ """ -+ General clean up routine -+ """ -+ self._cleanupDrives() -+ self._cleanupFloppy() -+ self._cleanupGuestAgent() -+ utils.rmFile(self._recoveryFile) - utils.rmFile(self._qemuguestSocketFile) - - def updateGuestCpuRunning(self): -@@ -1874,7 +1880,7 @@ class LibvirtVm(vm.Vm): - 'status': {'code': errCode['hotunplugDisk']['status']['code'], - 'message': e.message}} - else: -- self._cleanup() -+ self._cleanupDrives(drive) - - return {'status': doneCode, 'vmList': self.status()} - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 9610644..c0d98ad 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -1030,15 +1030,29 @@ class Vm(object): - except: - self.log.error("_timedShutdown failed", exc_info=True) - -- def _cleanup(self): -+ def _cleanupDrives(self, *drives): -+ """ -+ Clean up drives related stuff. Sample usage: -+ -+ self._cleanupDrives() -+ self._cleanupDrives(drive) -+ self._cleanupDrives(drive1, drive2, drive3) -+ self._cleanupDrives(*drives_list) -+ """ -+ drives = drives or self._devices[DISK_DEVICES] -+ # clean them up - with self._volPrepareLock: -- for drive in self._devices[DISK_DEVICES]: -+ for drive in drives: - try: - self.cif.teardownVolumePath(drive) - except: - self.log.error("Drive teardown failure for %s", - drive, exc_info=True) - -+ def _cleanupFloppy(self): -+ """ -+ Clean up floppy drive -+ """ - if self.conf.get('volatileFloppy'): - try: - self.log.debug("Floppy %s cleanup" % self.conf['floppy']) -@@ -1046,13 +1060,16 @@ class Vm(object): - except: - pass - -+ def _cleanupGuestAgent(self): -+ """ -+ Try to stop the guest agent and clean up its socket -+ """ - try: - self.guestAgent.stop() - except: - pass - - utils.rmFile(self._guestSocketFile) -- utils.rmFile(self._recoveryFile) - - def setDownStatus(self, code, reason): - try: --- -1.7.1 - diff --git a/0051-Support-teardownVolumePath-None.patch b/0051-Support-teardownVolumePath-None.patch deleted file mode 100644 index 421d1a5..0000000 --- a/0051-Support-teardownVolumePath-None.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 617ff7d9e577c0c09bbe277543a0cf28120b6f4f Mon Sep 17 00:00:00 2001 -From: Eduardo Warszawski -Date: Wed, 22 May 2013 12:40:54 +0300 -Subject: [PATCH] Support teardownVolumePath(None) - -Change-Id: I68bc4996ec1789e090111e8aeadaf733e163543b -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=962549 -Signed-off-by: Eduardo -Reviewed-on: http://gerrit.ovirt.org/15316 -Reviewed-by: Federico Simoncelli -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Vinzenz Feenstra -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/15353 -Tested-by: Federico Simoncelli ---- - vdsm/clientIF.py | 10 ++++------ - 1 files changed, 4 insertions(+), 6 deletions(-) - -diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py -index fabd494..fec7d39 100644 ---- a/vdsm/clientIF.py -+++ b/vdsm/clientIF.py -@@ -321,13 +321,11 @@ class clientIF: - try: - res = self.irs.teardownImage(drive['domainID'], - drive['poolID'], drive['imageID']) -- except KeyError: -- self.log.warning("Drive is not a vdsm image: %s", -- drive, exc_info=True) -- except TypeError: -- if not isinstance(drive, basestring): -- raise -+ except (KeyError, TypeError): - # paths (strings) are not deactivated -+ if not isinstance(drive, basestring): -+ self.log.warning("Drive is not a vdsm image: %s", -+ drive, exc_info=True) - - return res['status']['code'] - --- -1.7.1 - diff --git a/0052-vdsm.spec-update-python-pthreading.patch b/0052-vdsm.spec-update-python-pthreading.patch deleted file mode 100644 index 9c6d373..0000000 --- a/0052-vdsm.spec-update-python-pthreading.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 3f66bb373d43072de4a3e39019e0d7df9791f274 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Fri, 14 Jun 2013 02:47:26 -0400 -Subject: [PATCH] vdsm.spec: update python-pthreading - -F19 and EL7 should require python-pthreading >= 1.0.2 - -Change-Id: Ie50a5b7a794b9df135478f3adace7501893d992c -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/15705 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 9a44260..8c00001 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -93,7 +93,6 @@ Requires: iproute - Requires: python-ethtool - Requires: rpm-python - Requires: nfs-utils --Requires: python-pthreading - Requires: m2crypto - Requires: %{name}-xmlrpc = %{version}-%{release} - -@@ -112,6 +111,7 @@ Requires: iscsi-initiator-utils - Requires: libvirt - Requires: lvm2 - Requires: python -+Requires: python-pthreading >= 0.1.2 - Requires: qemu-kvm - Requires: qemu-kvm-img - Requires: sanlock, sanlock-python -@@ -130,14 +130,17 @@ Requires: kernel >= 2.6.32-279.9.1 - Requires: sanlock >= 2.3-4, sanlock-python - Requires: initscripts >= 9.03.31-2.el6_3.1 - Requires: mom >= 0.3.0 -+Requires: python-pthreading - Requires: selinux-policy-targeted >= 3.7.19-80 - Requires: lvm2 >= 2.02.95-10.el6_3.2 - Requires: logrotate < 3.8.0 - %endif - %else - %if 0%{?fedora} >= 19 -+Requires: python-pthreading >= 0.1.2 - Requires: fence-agents-all - %else -+Requires: python-pthreading - Requires: fence-agents - %endif - # Subprocess and thread bug was found on python 2.7.2 --- -1.8.2.1 - diff --git a/0053-service-make-iscsid-a-systemd-dependency.patch b/0053-service-make-iscsid-a-systemd-dependency.patch deleted file mode 100644 index 2349dc8..0000000 --- a/0053-service-make-iscsid-a-systemd-dependency.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 73463217963c3c138fdac822a092fc68b8541b8a Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Mon, 8 Jul 2013 20:50:50 -0400 -Subject: [PATCH] service: make iscsid a systemd dependency - -Also remove starting iscsid with force-start as it is no longer -supported - -master commit 3c0adf791e790c820d44317204f275aa09513318 - -Change-Id: I461cf35763c495b0630acf9d4a7c8716036ad41e -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=981906 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/16527 -Reviewed-by: Federico Simoncelli ---- - vdsm/vdsmd.init.in | 1 - - vdsm/vdsmd.service | 2 +- - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in -index c8223d3..9789437 100755 ---- a/vdsm/vdsmd.init.in -+++ b/vdsm/vdsmd.init.in -@@ -158,7 +158,6 @@ start_needed_srv() { - fi - done - -- /sbin/service iscsid force-start - } - - test_lo() { -diff --git a/vdsm/vdsmd.service b/vdsm/vdsmd.service -index 9823b34..9ed69ba 100644 ---- a/vdsm/vdsmd.service -+++ b/vdsm/vdsmd.service -@@ -1,6 +1,6 @@ - [Unit] - Description=Virtual Desktop Server Manager --Requires=multipathd.service libvirtd.service time-sync.target -+Requires=multipathd.service libvirtd.service time-sync.target iscsid.service - Conflicts=libvirt-guests.service - - [Service] --- -1.8.2.1 - diff --git a/sources b/sources index d373508..3cc5616 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e181a25b2b4fc9e5f85faafc9d73aa1 vdsm-4.10.3.tar.gz +1872fb0d60a1a4908349ef958e19f611 vdsm-4.12.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 0acce9f..db5d2fa 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -31,7 +31,7 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -%if !0%{fedora_koji_build} || 0%{?fedora} >= 19 +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 %global with_gluster 1 %endif @@ -41,11 +41,12 @@ %if 0%{?fedora} >= 18 %global with_systemd_macros 1 +%global with_tmpfiles_macro 1 %endif Name: %{vdsm_name} -Version: 4.10.3 -Release: 18%{?vdsm_relvtag}%{?dist}%{?extra_release} +Version: 4.12.0 +Release: 0.1.rc3%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -59,69 +60,14 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz - -# ovirt-3.2 patches -Patch0: 0001-schema-Fix-schema-for-VM.updateDevice.patch -Patch1: 0002-schema-Missing-comment-for-new-VmDeviceType.patch -Patch2: 0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch -Patch3: 0004-caps.py-osversion-validate-OVIRT.patch -Patch4: 0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch -Patch5: 0006-Integrate-Smartcard-support.patch -Patch6: 0007-vdsm.spec-python-ordereddict-only-for-rhel-7.patch -Patch7: 0008-vdsm.spec-Don-t-require-python-ordereddict-on-fedora.patch -Patch8: 0009-vdsm.spec-BuildRequires-python-pthreading.patch -Patch9: 0010-Searching-for-both-py-and-pyc-file-to-start-super-vd.patch -Patch10: 0011-adding-getHardwareInfo-API-to-vdsm.patch -Patch11: 0012-Explicitly-shutdown-m2crypto-socket.patch -Patch12: 0013-spec-require-policycoreutils-and-skip-sebool-errors.patch -Patch13: 0014-spec-requires-selinux-policy-to-avoid-selinux-failur.patch -Patch14: 0015-vdsmd.service-require-either-ntpd-or-chronyd.patch -Patch15: 0016-isRunning-didn-t-check-local-variable-before-reading.patch -Patch16: 0017-udev-Race-fix-load-and-trigger-dev-rule.patch -Patch17: 0018-Change-scsi_id-command-path-to-be-configured-at-runt.patch -Patch18: 0019-upgrade-force-upgrade-to-v2-before-upgrading-to-v3.patch -Patch19: 0020-misc-rename-safelease-to-clusterlock.patch -Patch20: 0021-domain-select-the-cluster-lock-using-makeClusterLock.patch -Patch21: 0022-clusterlock-add-the-local-locking-implementation.patch -Patch22: 0023-upgrade-catch-MetaDataKeyNotFoundError-when-preparin.patch -Patch23: 0024-vdsm.spec-Require-openssl.patch -Patch24: 0025-Fedora-18-require-a-newer-udev.patch -Patch25: 0026-fix-sloppy-backport-of-safelease-rename.patch -Patch26: 0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch -Patch27: 0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch -Patch28: 0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch -Patch29: 0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch -# This patch is not present in the upstream ovirt-3.2 branch and it was added to -# add a missing file in the base vdsm tar.gz -Patch30: 0031-packaging-add-load_needed_modules.py.in.patch -Patch31: 0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch -Patch32: 0033-gluster-Handling-Attribute-error-in-Python-2.6.patch -Patch33: 0034-bootstrap-remove-glusterfs-packages.patch -Patch34: 0035-gluster-set-glusterfs-dependency-version.patch -Patch35: 0036-Do-not-delete-the-template-when-zeroing-a-dependant-.patch -Patch36: 0037-vdsm.spec-fence-agents-all.patch -Patch37: 0038-fix-storage.fuser.patch -Patch38: 0039-Bump-up-libvirt-version-to-fix-network-linking.patch -Patch39: 0040-vdsm.spec.in-with_gluster.patch -Patch40: 0041-Don-t-user-sudo-in-fuser.patch -Patch41: 0042-svdsm-fix-fuser-import-in-supervdsmServer.patch -Patch42: 0043-Removing-vdsm-configuration-when-removing-vdsm-servi.patch -Patch43: 0044-Seperating-supervdsm-log-to-supervdsm.log-file.patch -Patch44: 0045-vdsm.spec-Adding-with_systemd-macro.patch -Patch45: 0046-spec-use-the-fedora-systemd-macros.patch -Patch46: 0047-spec-enable-gluster-upstream-and-on-fedora-19.patch -Patch47: 0048-Makefile.am-ignore-false-positive-pyflakes-lvm.py.patch -Patch48: 0049-Deactivate-libvirtVM.Drives.patch -Patch49: 0050-vdsm-fix-Vm-cleanup-routine.patch -Patch50: 0051-Support-teardownVolumePath-None.patch -Patch51: 0052-vdsm.spec-update-python-pthreading.patch -Patch52: 0053-service-make-iscsid-a-systemd-dependency.patch +Patch0: 0001-build-use-pythondir-for-vdsmapi.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python BuildRequires: python-devel BuildRequires: python-nose +BuildRequires: python-netaddr # BuildRequires needed by the tests during the build BuildRequires: python-ethtool @@ -137,6 +83,7 @@ BuildRequires: python-dmidecode %if 0%{?rhel} == 6 BuildRequires: python-ordereddict %endif +BuildRequires: python-ethtool # Autotools BuildRequires %if 0%{?enable_autotools} @@ -158,30 +105,51 @@ BuildRequires: systemd-units Requires: which Requires: sudo >= 1.7.3 Requires: logrotate +Requires: rsyslog Requires: xz Requires: ntp Requires: iproute -Requires: python-ethtool +Requires: python-netaddr +Requires: python-inotify +Requires: python-ethtool >= 0.6-3 Requires: rpm-python Requires: nfs-utils Requires: m2crypto +Requires: libguestfs-tools-c Requires: %{name}-xmlrpc = %{version}-%{release} +Requires: mom >= 0.3.2 %ifarch x86_64 Requires: python-dmidecode Requires: dmidecode %endif +%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18 +Requires: libvirt-daemon >= 1.0.2-1 +Requires: libvirt-daemon-config-nwfilter +Requires: libvirt-daemon-driver-network +Requires: libvirt-daemon-driver-nwfilter +Requires: libvirt-daemon-driver-qemu +%else %if 0%{?rhel} +Requires: libvirt >= 0.10.2-18.el6_4.4 +%else +Requires: libvirt >= 1.0.2-1 +%endif +%endif +Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client + +%if 0%{?rhel} +Requires: python-ethtool >= 0.6-3 %if 0%{?rhel} >= 7 ExclusiveArch: x86_64 Requires: device-mapper-multipath Requires: e2fsprogs Requires: fence-agents-all Requires: iscsi-initiator-utils -Requires: libvirt Requires: lvm2 Requires: python +Requires: policycoreutils-python Requires: python-pthreading >= 0.1.2 Requires: qemu-kvm Requires: qemu-kvm-img @@ -192,7 +160,6 @@ Requires: python # Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 -Requires: libvirt >= 0.9.10-21.el6_3.5 Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 @@ -200,9 +167,10 @@ Requires: fence-agents Requires: kernel >= 2.6.32-279.9.1 Requires: sanlock >= 2.3-4, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 -Requires: mom >= 0.3.0 +Requires: policycoreutils >= 2.0.83-19.30 +Requires: policycoreutils-python >= 2.0.83-19.30 Requires: python-pthreading -Requires: selinux-policy-targeted >= 3.7.19-80 +Requires: selinux-policy-targeted >= 3.7.19-155 Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif @@ -218,13 +186,16 @@ Requires: fence-agents Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 -Requires: libvirt >= 0.10.2.4-1 +Requires: python-ethtool >= 0.8-1 +%if 0%{?fedora} >= 18 +Requires: initscripts >= 9.42.2-1 +%endif Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 Requires: kernel >= 3.6 -Requires: mom >= 0.3.0 Requires: sanlock >= 2.4-2, sanlock-python +Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: selinux-policy-targeted >= 3.10.0-149 Requires: lvm2 >= 2.02.95 @@ -238,13 +209,11 @@ Requires: policycoreutils >= 2.1.13-55 Requires: systemd >= 197-1.fc18.2 %endif -Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client Requires: psmisc >= 22.6-15 Requires: bridge-utils Requires: sos Requires: tree Requires: dosfstools -Requires: policycoreutils-python Requires: genisoimage Requires: libselinux-python Requires: %{name}-python = %{version}-%{release} @@ -267,6 +236,7 @@ BuildArch: noarch Requires: %{name}-python = %{version}-%{release} Requires: %{name}-xmlrpc = %{version}-%{release} +Requires: %{name}-python-cpopen %description cli Call VDSM commands from the command line. Used for testing and debugging. @@ -276,16 +246,26 @@ Summary: VDSM xmlrpc API BuildArch: noarch Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-python-cpopen + %description xmlrpc An XMLRPC interface for interacting with vdsmd. Primary control interface for ovirt-engine and vdsClient. +%package api +Summary: VDSM API definition +BuildArch: noarch + +%description api +Provides the VDSM API schema and documentation. + %package jsonrpc Summary: VDSM API Server BuildArch: noarch Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-api = %{version}-%{release} %if 0%{?rhel} == 6 Requires: python-ordereddict %endif @@ -293,6 +273,15 @@ Requires: python-ordereddict %description jsonrpc A Json-based RPC interface that serves as the protocol for libvdsm. +%package yajsonrpc +Summary: JSON RPC server and client implementation +BuildArch: noarch + +Requires: python >= 2.6 + +%description yajsonrpc +A JSON RPC server and client implementation. + %package bootstrap Summary: VDSM bootstrapping package BuildArch: noarch @@ -313,6 +302,15 @@ Requires: openssl VDSM registration package. Used to register a Linux host to a Virtualization Manager. +%package python-cpopen +Summary: Creates a sub-process in simpler safer manner. + +BuildRequires: python2-devel + +%description python-cpopen +Python package for creating sub-process in simpler and safer manner by using C +code. + %package python Summary: VDSM python libraries @@ -338,6 +336,15 @@ BuildArch: noarch %description tests A test suite for verifying the functionality of a running vdsm instance +%package hook-checkimages +Summary: Qcow2 disk image format check hook for VDSM +BuildArch: noarch +Requires: vdsm + +%description hook-checkimages +VDSM hook used to perform consistency check on a qcow2 format disk image +using the QEMU disk image utility. + %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd Requires: vhostmd @@ -365,6 +372,13 @@ BuildArch: noarch VDSM hook enable user to add storage LUN for VDSM without the sharing and storage handling of VDSM. +%package hook-macspoof +Summary: Disables MAC spoofing filtering +BuildArch: noarch + +%description hook-macspoof +VDSM hook that disables mac spoof filtering on all the of the VM's interfaces. + %package hook-fileinject Summary: Allow uploading file to VMs disk BuildArch: noarch @@ -384,6 +398,7 @@ Allow adding floppy to VM %package hook-hostusb Summary: Allow attaching USB device from host BuildArch: noarch +Requires: usbutils %description hook-hostusb Hook is getting vendor and product id of USB device @@ -416,13 +431,20 @@ If the nested virtualization is enabled in your kvm module this hook will expose it to the guests. %package hook-numa -Summary: numa sopport for VDSM +Summary: NUMA support for VDSM BuildArch: noarch %description hook-numa -Hooks is getting number/rage of numa nodes and numa mode, +Hooks is getting number/rage of NUMA nodes and NUMA mode, and update the VM xml. +%package hook-openstacknet +Summary: OpenStack Network vNICs support for VDSM +BuildArch: noarch + +%description hook-openstacknet +Hook for OpenStack Network vNICs. + %package hook-pincpu Summary: Hook pin VM so specific CPUs BuildArch: noarch @@ -476,6 +498,7 @@ such as: vendor, version, date and release %package hook-sriov Summary: sr-iov support for VDSM +Requires: libvirt-daemon-driver-nodedev BuildArch: noarch %description hook-sriov @@ -506,6 +529,7 @@ Requires: glusterfs >= 3.4.0 Requires: glusterfs-server Requires: glusterfs-fuse Requires: glusterfs-rdma +Requires: python-magic %description gluster Gluster plugin enables VDSM to serve Gluster functionalities. @@ -513,62 +537,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q - -# ovirt-3.2 patches %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 -%patch38 -p1 -%patch39 -p1 -%patch40 -p1 -%patch41 -p1 -%patch42 -p1 -%patch43 -p1 -%patch44 -p1 -%patch45 -p1 -%patch46 -p1 -%patch47 -p1 -%patch48 -p1 -%patch49 -p1 -%patch50 -p1 -%patch51 -p1 -%patch52 -p1 - %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -582,7 +551,9 @@ make # Setting software_version and software_revision in dsaversion.py baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +rawversion=%{version}-%{release} sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ + -e 's/^raw_version_revision =.*/raw_version_revision = "'"${rawversion}"'"/' \ -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py %install @@ -604,14 +575,29 @@ install -Dm 0644 vdsm/limits.conf \ # Install the systemd scripts install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +install -Dm 0644 vdsm/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service + +install -Dm 0644 vdsm/vdsm-restore-net-config.service \ + %{buildroot}%{_unitdir}/vdsm-restore-net-config.service install -Dm 0755 vdsm_reg/vdsm-reg.init \ %{buildroot}/lib/systemd/systemd-vdsm-reg install -Dm 0644 vdsm_reg/vdsm-reg.service \ %{buildroot}%{_unitdir}/vdsm-reg.service +install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ + %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf %else # Install the SysV init scripts install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd +install -Dm 0755 vdsm/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd + install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg +install -Dm 0755 vdsm/vdsm-restore-net-config.init \ + %{buildroot}%{_initrddir}/vdsm-restore-net-config +%endif + +%if 0%{?with_tmpfiles_macro} +install -Dm 0644 vdsm/vdsm-tmpfiles.d.conf \ + %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf %endif %if 0%{?rhel} @@ -620,7 +606,7 @@ install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg install -dDm 1777 %{buildroot}%{_localstatedir}/log/core %else # Install the configuration sample -install -Dm 0644 vdsm/vdsm.conf.sample \ +install -Dm 0644 lib/vdsm/vdsm.conf.sample \ %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf # Install the polkit for libvirt @@ -663,24 +649,30 @@ if grep -q "# VDSM section begin" /etc/sysctl.conf; then /etc/sysctl.conf fi -# Make the /etc/sysctl.d/vdsm take effect immediately after installation. -/sbin/sysctl -q -p /etc/sysctl.d/vdsm - %if 0%{?rhel} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd + /sbin/chkconfig --add supervdsmd + /sbin/chkconfig --add vdsm-restore-net-config fi %else +%if 0%{?with_systemd} +/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : %if 0%{?with_systemd_macros} %systemd_post vdsmd.service +%systemd_post supervdsmd.service +%systemd_post vdsm-restore-net-config.service %else if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : + /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : + /bin/systemctl enable vdsm-restore-net-config.service >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi exit 0 %endif %endif +%endif %preun if [ "$1" -eq 0 ]; then @@ -691,10 +683,14 @@ if [ "$1" -eq 0 ]; then /bin/sed -i -e "/${start_conf_section}/,/${end_conf_section}/d" \ -e "/${by_vdsm}/d" \ %{_sysconfdir}/libvirt/libvirtd.conf \ + %{_sysconfdir}/logrotate.d/libvirtd \ %{_sysconfdir}/libvirt/qemu.conf \ %{_sysconfdir}/sysconfig/libvirtd \ %{_sysconfdir}/sysctl.conf \ %{_sysconfdir}/libvirt/qemu-sanlock.conf + + # Restoring backuped logrotate.d/libvirtd + /bin/sed -i -e 's/# VDSM backup//' %{_sysconfdir}/logrotate.d/libvirtd fi %if 0%{?rhel} @@ -702,6 +698,9 @@ if [ "$1" -eq 0 ] then /sbin/service vdsmd stop > /dev/null 2>&1 || : /sbin/chkconfig --del vdsmd + /sbin/service supervdsmd stop > /dev/null 2>&1 || : + /sbin/chkconfig --del supervdsmd + /sbin/chkconfig --del vdsm-restore-net-config /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf @@ -721,10 +720,15 @@ fi %else %if 0%{?with_systemd_macros} %systemd_preun vdsmd.service +%systemd_preun supervdsmd.service +%systemd_preun vdsm-restore-net-config.service %else if [ "$1" -eq 0 ]; then /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : + /bin/systemctl --no-reload disable supervdsmd.service > /dev/null 2>&1 || : + /bin/systemctl --no-reload disable vdsm-restore-net-config.service > /dev/null 2>&1 || : /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : + /bin/systemctl stop supervdsmd.service > /dev/null 2>&1 || : fi exit 0 %endif @@ -734,14 +738,17 @@ exit 0 %if 0%{?rhel} if [ "$1" -ge 1 ]; then /sbin/service vdsmd condrestart > /dev/null 2>&1 + /sbin/service supervdsmd condrestart > /dev/null 2>&1 fi exit 0 %else %if 0%{?with_systemd_macros} %systemd_postun_with_restart vdsmd.service +%systemd_postun_with_restart supervdsmd.service %else if [ "$1" -ge 1 ] ; then /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : + /bin/systemctl try-restart supervdsmd.service >/dev/null 2>&1 || : fi exit 0 %endif @@ -797,18 +804,24 @@ exit 0 %files %defattr(-, root, root, -) -%doc COPYING README vdsm/vdsm.conf.sample +%doc COPYING README lib/vdsm/vdsm.conf.sample %if 0%{?with_systemd} /lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service +%{_unitdir}/supervdsmd.service +%{_unitdir}/vdsm-restore-net-config.service %else %{_initrddir}/vdsmd +%{_initrddir}/supervdsmd +%{_initrddir}/vdsm-restore-net-config %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} +%dir %{_sysconfdir}/%{vdsm_name} +%dir %{_sysconfdir}/%{vdsm_name}/mom.d %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/storage %dir %{_datadir}/%{vdsm_name}/storage/imageRepository @@ -820,12 +833,13 @@ exit 0 %{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/hooking.py* %{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/libvirtvm.py* %{_datadir}/%{vdsm_name}/lsblk.py* %{_datadir}/%{vdsm_name}/md_utils.py* %{_datadir}/%{vdsm_name}/mk_sysprep_floppy %{_datadir}/%{vdsm_name}/parted_utils.py* %{_datadir}/%{vdsm_name}/mkimage.py* +%{_datadir}/%{vdsm_name}/sourceRoute.py* +%{_datadir}/%{vdsm_name}/sourceRouteThread.py* %{_datadir}/%{vdsm_name}/supervdsm.py* %{_datadir}/%{vdsm_name}/supervdsmServer.py* %{_datadir}/%{vdsm_name}/vmChannels.py* @@ -834,23 +848,28 @@ exit 0 %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config %{_datadir}/%{vdsm_name}/vm.py* -%{_datadir}/%{vdsm_name}/write-net-config %{_datadir}/%{vdsm_name}/zombieReaper.py* -%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/dummybr.py* -%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py* %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.policy +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %config(noreplace) %{_sysconfdir}/sysctl.d/vdsm +%if 0%{?with_systemd} +%config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf +%endif +%if 0%{?with_tmpfiles_macro} +%config(noreplace) %{_tmpfilesdir}/%{vdsm_name}.conf +%endif +%{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/cron.d/vdsm-libvirt-logrotate %{_datadir}/%{vdsm_name}/guestIF.py* %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* +%{_libexecdir}/%{vdsm_name}/curl-img-wrap %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh @@ -858,6 +877,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* +%{_datadir}/%{vdsm_name}/storage/curlImgWrap.py* %{_datadir}/%{vdsm_name}/storage/devicemapper.py* %{_datadir}/%{vdsm_name}/storage/dispatcher.py* %{_datadir}/%{vdsm_name}/storage/domainMonitor.py* @@ -865,9 +885,16 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/fileUtils.py* %{_datadir}/%{vdsm_name}/storage/fileVolume.py* %{_datadir}/%{vdsm_name}/storage/fuser.py* +%if 0%{?with_gluster} +%{_datadir}/%{vdsm_name}/storage/glusterSD.py* +%{_datadir}/%{vdsm_name}/storage/glusterVolume.py* +%else +%exclude %{_datadir}/%{vdsm_name}/storage/gluster* +%endif %{_datadir}/%{vdsm_name}/storage/hba.py* %{_datadir}/%{vdsm_name}/storage/hsm.py* %{_datadir}/%{vdsm_name}/storage/image.py* +%{_datadir}/%{vdsm_name}/storage/imageSharing.py* %{_datadir}/%{vdsm_name}/storage/iscsiadm.py* %{_datadir}/%{vdsm_name}/storage/iscsi.py* %{_datadir}/%{vdsm_name}/storage/localFsSD.py* @@ -901,6 +928,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/safelease %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont @@ -911,6 +942,10 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_hibernate %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_dehibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination @@ -919,12 +954,19 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_update_device +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device_fail %dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug %dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotunplug %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug_fail %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotunplug %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop %{_datadir}/%{vdsm_name}/addNetwork @@ -935,9 +977,24 @@ exit 0 %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* %{_datadir}/%{vdsm_name}/ksm.py* %{_datadir}/%{vdsm_name}/momIF.py* +%{_datadir}/%{vdsm_name}/netconf/__init__.py* +%{_datadir}/%{vdsm_name}/netconf/ifcfg.py* +%{_datadir}/%{vdsm_name}/netconf/libvirtCfg.py* +%{_datadir}/%{vdsm_name}/netconf/iproute2.py* %{_datadir}/%{vdsm_name}/neterrors.py* +%{_datadir}/%{vdsm_name}/netmodels.py* %{_datadir}/%{vdsm_name}/respawn +%{_datadir}/%{vdsm_name}/sampling.py* %{_datadir}/%{vdsm_name}/set-conf-item +%if 0%{?with_gluster} +%dir %{_datadir}/%{vdsm_name}/gluster +%{_datadir}/%{vdsm_name}/gluster/__init__.py* +%{_datadir}/%{vdsm_name}/gluster/cli.py* +%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{_datadir}/%{vdsm_name}/gluster/hostname.py* +%else +%exclude %{_datadir}/%{vdsm_name}/gluster/* +%endif %{python_sitelib}/sos/plugins/vdsm.py* /lib/udev/rules.d/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -962,7 +1019,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password %dir %{_localstatedir}/lib/%{vdsm_name} %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback -%ghost %dir %{_localstatedir}/run/%{vdsm_name} +%dir %{_localstatedir}/run/%{vdsm_name} +%dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes +%dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces %ghost %dir %{_localstatedir}/run/%{vdsm_name}/pools %ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload %dir %{_localstatedir}/log/%{vdsm_name} @@ -979,31 +1038,42 @@ exit 0 %{python_sitearch}/%{vdsm_name}/constants.py* %{python_sitearch}/%{vdsm_name}/define.py* %{python_sitearch}/%{vdsm_name}/exception.py* +%{python_sitearch}/%{vdsm_name}/ipwrapper.py* %{python_sitearch}/%{vdsm_name}/libvirtconnection.py* %{python_sitearch}/%{vdsm_name}/netinfo.py* %{python_sitearch}/%{vdsm_name}/qemuImg.py* %{python_sitearch}/%{vdsm_name}/SecureXMLRPCServer.py* %{python_sitearch}/%{vdsm_name}/utils.py* %{python_sitearch}/%{vdsm_name}/vdscli.py* -%{python_sitearch}/%{vdsm_name}/betterPopen/__init__.py* -%{python_sitearch}/%{vdsm_name}/betterPopen/createprocess.so %{python_sitearch}/%{vdsm_name}/tool/__init__.py* +%if 0%{?with_systemd} +%exclude %{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py* +%else %{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py* +%endif +%{python_sitearch}/%{vdsm_name}/tool/dummybr.py* +%{python_sitearch}/%{vdsm_name}/tool/nwfilter.py* +%{python_sitearch}/%{vdsm_name}/tool/libvirt_configure.py* +%{_libexecdir}/%{vdsm_name}/libvirt_configure.sh %{python_sitearch}/%{vdsm_name}/tool/passwd.py* +%{python_sitearch}/%{vdsm_name}/tool/sanlock.py* %{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py* +%{python_sitearch}/%{vdsm_name}/tool/service.py* %{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py* +%{python_sitearch}/%{vdsm_name}/tool/vdsm-id.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README %defattr(-, root, root, -) %{_datadir}/%{vdsm_name}/tests/*.py* %{_datadir}/%{vdsm_name}/tests/cpu_info.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out %{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out %{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh -%{_datadir}/%{vdsm_name}/tests/route_info.out %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out %if 0%{?with_gluster} %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml @@ -1013,6 +1083,20 @@ exit 0 %endif %{_datadir}/%{vdsm_name}/tests/functional/*.py* +%files hook-openstacknet +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_consts.py* + %files hook-vhostmd %defattr(-, root, root, -) %doc COPYING @@ -1028,6 +1112,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline %if 0%{?with_hooks} +%files hook-checkimages +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages + %files hook-directlun %defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun @@ -1063,6 +1151,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan %config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml +%files hook-macspoof +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof + %files hook-nestedvt %defattr(-, root, root, -) %{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf @@ -1131,11 +1223,20 @@ exit 0 %defattr(-, root, root, -) %{_datadir}/%{vdsm_name}/BindingXMLRPC.py* +%files api +%doc vdsm_api/vdsm-api.html +%{_datadir}/%{vdsm_name}/vdsmapi-schema.json +%{python_sitelib}/vdsmapi.py* + %files jsonrpc %{_datadir}/%{vdsm_name}/BindingJsonRpc.py* %{_datadir}/%{vdsm_name}/Bridge.py* -%{_datadir}/%{vdsm_name}/vdsmapi.py* -%{_datadir}/%{vdsm_name}/vdsmapi-schema.json + +%files yajsonrpc +%{python_sitelib}/yajsonrpc/__init__.py* +%{python_sitelib}/yajsonrpc/asyncoreReactor.py* +%{python_sitelib}/yajsonrpc/protonReactor.py* +%{python_sitelib}/yajsonrpc/client.py* %files bootstrap %defattr(-, root, root, -) @@ -1179,8 +1280,6 @@ exit 0 %files hook-faqemu %defattr(-, root, root, -) %doc COPYING -%{_libexecdir}/%{vdsm_name}/vdsm-faqemu -%{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop/10_faqemu %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %if 0%{?with_gluster} @@ -1188,17 +1287,21 @@ exit 0 %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name}/gluster %doc COPYING -%{_datadir}/%{vdsm_name}/gluster/__init__.py* %{_datadir}/%{vdsm_name}/gluster/api.py* -%{_datadir}/%{vdsm_name}/gluster/cli.py* -%{_datadir}/%{vdsm_name}/gluster/exception.py* -%{_datadir}/%{vdsm_name}/gluster/hostname.py* -%else -%exclude %{_datadir}/%{vdsm_name}/gluster/* +%{_datadir}/%{vdsm_name}/gluster/vdsmapi-gluster-schema.json +%{_datadir}/%{vdsm_name}/gluster/hooks.py* +%{_datadir}/%{vdsm_name}/gluster/services.py* %endif +%files python-cpopen +%{python_sitearch}/cpopen/__init__.py* +%attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* + %changelog +* Tue Jul 23 2013 Federico Simoncelli 4.12.0-0.1.rc3 +- update to vdsm-4.12.0-rc3 + * Wed Jul 10 2013 Douglas Schilling Landgraf 4.10.3-18 - vdsm.spec: update python-pthreading - service: make iscsid a systemd dependency From f70871956f961bd8664912a5fe010dfe617e5fd5 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 01:04:29 -0500 Subject: [PATCH 045/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index db5d2fa..6811bd6 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.0 -Release: 0.1.rc3%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 0.2.rc3%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1299,6 +1299,9 @@ exit 0 %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 4.12.0-0.2.rc3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue Jul 23 2013 Federico Simoncelli 4.12.0-0.1.rc3 - update to vdsm-4.12.0-rc3 From 63105a25cb34f358c3a91950fb9e3be71c2eb9aa Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 13 Aug 2013 16:26:48 +0200 Subject: [PATCH 046/126] update to vdsm-4.12.0-1 - update to 4.12.0 final release - mom: Require latest mom - Mark ksmtuned as conflicting service in the init file - spec: vdsm-hook-sriov on el6 should not require - Crash fix for migrations that involve devices with no aliases (BZ#988065) - vdsm: Always retrieve alias for Balloon and Console (BZ#988065) - vdsm: Fix regression introduced by refactoring (BZ#985735) - VDSM now writes its version number in VDSM-generated - Bump requires version of selinux-policy-targeted - vdsm_reg: fix ovirt_node without default bridge (BZ#988990) - Source Route script now checks that the DHCP response (BZ#994600) - Management network is now kept in main routing table (BZ#984028) - Only remove dhcp source routing if the removal reason (BZ#995142) - image: use successor volume size when merging --- 0001-build-use-pythondir-for-vdsmapi.patch | 41 --- 0001-mom-Require-latest-mom.patch | 36 ++ ...-conflicting-service-in-the-init-fil.patch | 35 ++ ...riov-on-el6-should-not-require-non-e.patch | 40 +++ ...grations-that-involve-devices-with-n.patch | 49 +++ ...ieve-alias-for-Balloon-and-Console-d.patch | 88 +++++ ...ion-introduced-by-refactoring-libvir.patch | 76 ++++ ...its-version-number-in-VDSM-generated.patch | 53 +++ ...s-version-of-selinux-policy-targeted.patch | 41 +++ ...ix-ovirt_node-without-default-bridge.patch | 47 +++ ...ipt-now-checks-that-the-DHCP-respons.patch | 46 +++ ...rk-is-now-kept-in-main-routing-table.patch | 324 ++++++++++++++++++ ...-source-routing-if-the-removal-reaso.patch | 38 ++ ...e-successor-volume-size-when-merging.patch | 47 +++ sources | 2 +- vdsm.spec | 65 +++- 16 files changed, 974 insertions(+), 54 deletions(-) delete mode 100644 0001-build-use-pythondir-for-vdsmapi.patch create mode 100644 0001-mom-Require-latest-mom.patch create mode 100644 0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch create mode 100644 0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch create mode 100644 0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch create mode 100644 0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch create mode 100644 0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch create mode 100644 0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch create mode 100644 0008-Bump-requires-version-of-selinux-policy-targeted.patch create mode 100644 0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch create mode 100644 0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch create mode 100644 0011-Management-network-is-now-kept-in-main-routing-table.patch create mode 100644 0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch create mode 100644 0013-image-use-successor-volume-size-when-merging.patch diff --git a/0001-build-use-pythondir-for-vdsmapi.patch b/0001-build-use-pythondir-for-vdsmapi.patch deleted file mode 100644 index 392aac6..0000000 --- a/0001-build-use-pythondir-for-vdsmapi.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 69c86e0adc6974d6170ab7297dc4ea1688bdfe8a Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Tue, 23 Jul 2013 08:36:23 -0400 -Subject: [PATCH] build: use pythondir for vdsmapi - -Change-Id: I8077efea03adb7d018c35cfd81b121b9e47d3e98 -Signed-off-by: Federico Simoncelli ---- - vdsm.spec.in | 2 +- - vdsm_api/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 9b02677..608735a 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -1208,7 +1208,7 @@ exit 0 - %files api - %doc vdsm_api/vdsm-api.html - %{_datadir}/%{vdsm_name}/vdsmapi-schema.json --%{python_sitearch}/vdsmapi.py* -+%{python_sitelib}/vdsmapi.py* - - %files jsonrpc - %{_datadir}/%{vdsm_name}/BindingJsonRpc.py* -diff --git a/vdsm_api/Makefile.am b/vdsm_api/Makefile.am -index 0a9e610..8331dea 100644 ---- a/vdsm_api/Makefile.am -+++ b/vdsm_api/Makefile.am -@@ -16,7 +16,7 @@ dist_vdsm_DATA = \ - vdsmapi-schema.json \ - $(NULL) - --dist_pyexec_PYTHON = \ -+dist_python_PYTHON = \ - vdsmapi.py \ - $(NULL) - --- -1.7.1 - diff --git a/0001-mom-Require-latest-mom.patch b/0001-mom-Require-latest-mom.patch new file mode 100644 index 0000000..81003b0 --- /dev/null +++ b/0001-mom-Require-latest-mom.patch @@ -0,0 +1,36 @@ +From 189c632a18610b88f8fdb8c8500e8bb224cbe359 Mon Sep 17 00:00:00 2001 +From: Doron Fediuck +Date: Tue, 30 Jul 2013 23:34:46 +0300 +Subject: [PATCH 01/13] mom: Require latest mom + +Latest mom build uses strings for the balloon info, +needed for proper ballooning integration. + +This patch will make vdsm depending on the latest mom +supporting the strings api. + +Change-Id: Ia2aebf588f823ee986bd20bbf47bace176b4cd21 +Signed-off-by: Doron Fediuck +Reviewed-on: http://gerrit.ovirt.org/17519 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + vdsm.spec.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 235d1db..d95bb2a 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -102,7 +102,7 @@ Requires: nfs-utils + Requires: m2crypto + Requires: libguestfs-tools-c + Requires: %{name}-xmlrpc = %{version}-%{release} +-Requires: mom >= 0.3.2-2 ++Requires: mom >= 0.3.2-3 + + %ifarch x86_64 + Requires: python-dmidecode +-- +1.8.3.1 + diff --git a/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch b/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch new file mode 100644 index 0000000..bf177d7 --- /dev/null +++ b/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch @@ -0,0 +1,35 @@ +From 647ac116919ce8273238223a9e1b41345b1ffc59 Mon Sep 17 00:00:00 2001 +From: Martin Sivak +Date: Thu, 25 Jul 2013 10:23:02 +0200 +Subject: [PATCH 02/13] Mark ksmtuned as conflicting service in the init file + +MoM and ksmtuned fight over control of ksm when running at the +same time. MoM is the prefered manager now so ksmtuned should +be stopped during VDSM startup. VDSM can start ksmtuned again +when needed (in case MoM is not available or fails). + +Change-Id: Iaaf8fd5f9dd3d92ef3d06b433312d5d22b594191 +Resolves: rhbz#987926 +Signed-off-by: Martin Sivak +Reviewed-on: http://gerrit.ovirt.org/17537 +Reviewed-by: Dan Kenigsberg +--- + vdsm/vdsmd.init.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in +index 4d77b01..56f07bd 100755 +--- a/vdsm/vdsmd.init.in ++++ b/vdsm/vdsmd.init.in +@@ -32,7 +32,7 @@ DOM_METADATA_BACKUP_DIR=/var/log/vdsm/backup + CORE_PATTERN=/proc/sys/kernel/core_pattern + NEEDED_SERVICES="iscsid multipathd rpcbind ntpd wdmd sanlock network libvirtd + supervdsmd" +-CONFLICTING_SERVICES="libvirt-guests" ++CONFLICTING_SERVICES="libvirt-guests ksmtuned" + VDSM_TOOL="@BINDIR@/vdsm-tool" + RETVAL=0 + +-- +1.8.3.1 + diff --git a/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch b/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch new file mode 100644 index 0000000..2325751 --- /dev/null +++ b/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch @@ -0,0 +1,40 @@ +From 7ed5813430052a587dadbff6301187097ce118a4 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Thu, 1 Aug 2013 09:50:39 +0300 +Subject: [PATCH 03/13] spec: vdsm-hook-sriov on el6 should not require + non-existing rpm + +As reported by a dead horse, el6 does not carry +libvirt-daemon-driver-nodedev so the said hook should not require this +subrpm. Since it the rpm hook is meaningful only when vdsm is installed, +and el6's vdsm requires al libvirt, we need no special requirement +there. + +Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/17554 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Dead Horse +Tested-by: Dead Horse +Reviewed-on: http://gerrit.ovirt.org/17591 +--- + vdsm.spec.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index d95bb2a..87bc231 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -483,7 +483,9 @@ such as: vendor, version, date and release + + %package hook-sriov + Summary: sr-iov support for VDSM ++%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18 + Requires: libvirt-daemon-driver-nodedev ++%endif + BuildArch: noarch + + %description hook-sriov +-- +1.8.3.1 + diff --git a/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch b/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch new file mode 100644 index 0000000..b065315 --- /dev/null +++ b/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch @@ -0,0 +1,49 @@ +From 127da86be3ac1330c2518e704b8bcb000ab43753 Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Tue, 30 Jul 2013 14:22:38 +0300 +Subject: [PATCH 04/13] Crash fix for migrations that involve devices with no + aliases + +The destination host updates the device XML cache for every +device by scanning the VM's XML that was received from +the source host, breaking it apart and placing each device's +XML into its Device class instance. The identification +of devices is done via the alias pulled from the VM conf. Some +devices don't have aliases pulled from libvirt. In any case, +migrations should succeed (instead of crashing VDSM) and +devices with no aliases should be dealt with in a separate patch. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065 +Change-Id: I3f05a945c2f3507d5571ac3f3b212e59a30bdfae +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/17515 +Reviewed-by: Michal Skrivanek +Reviewed-by: Vinzenz Feenstra +Tested-by: Vinzenz Feenstra +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/17685 +--- + vdsm/vm.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 4333170..eefbccd 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -4763,7 +4763,12 @@ class Vm(object): + aliasToDevice = {} + for devType in self._devices: + for dev in self._devices[devType]: +- aliasToDevice[dev.alias] = dev ++ if hasattr(dev, 'alias'): ++ aliasToDevice[dev.alias] = dev ++ else: ++ self.log.error("Alias not found for device type %s " ++ "during migration at destination host" % ++ devType) + + devices = _domParseStr(xml).childNodes[0]. \ + getElementsByTagName('devices')[0] +-- +1.8.3.1 + diff --git a/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch b/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch new file mode 100644 index 0000000..efdd1ca --- /dev/null +++ b/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch @@ -0,0 +1,88 @@ +From 02bd2860a8eac53c1e843867fa67dc16c07b6669 Mon Sep 17 00:00:00 2001 +From: Vinzenz Feenstra +Date: Fri, 2 Aug 2013 15:18:13 +0200 +Subject: [PATCH 05/13] vdsm: Always retrieve alias for Balloon and Console + devices + +We haven't been retrieving the alias value for console devices which +now starts to bite us due to the assumption that all VmDevice objects, +have to have an alias attribute during the migration. + +Due to a bug in the handling for Balloon devices this also happened. + +This commit fixes the problem for the future by retrieving the aliases. + +Change-Id: Ic828d13761b26b3ec01b604f431050a611bce01c +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065 +Signed-off-by: Vinzenz Feenstra +Reviewed-on: http://gerrit.ovirt.org/17602 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/17686 +--- + vdsm/vm.py | 36 +++++++++++++++++++++++++++++------- + 1 file changed, 29 insertions(+), 7 deletions(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index eefbccd..92b4b91 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -2732,6 +2732,7 @@ class Vm(object): + self._getUnderlyingBalloonDeviceInfo() + self._getUnderlyingWatchdogDeviceInfo() + self._getUnderlyingSmartcardDeviceInfo() ++ self._getUnderlyingConsoleDeviceInfo() + # Obtain info of all unknown devices. Must be last! + self._getUnderlyingUnknownDeviceInfo() + +@@ -4427,20 +4428,41 @@ class Vm(object): + for x in balloonxml: + # Ignore balloon devices without address. + if not x.getElementsByTagName('address'): +- continue +- +- address = self._getUnderlyingDeviceAddress(x) ++ address = None ++ else: ++ address = self._getUnderlyingDeviceAddress(x) + alias = x.getElementsByTagName('alias')[0].getAttribute('name') + + for dev in self._devices[BALLOON_DEVICES]: +- if not hasattr(dev, 'address'): ++ if address and not hasattr(dev, 'address'): + dev.address = address ++ if not hasattr(dev, 'alias'): + dev.alias = alias + + for dev in self.conf['devices']: +- if ((dev['type'] == BALLOON_DEVICES) and +- not dev.get('address')): +- dev['address'] = address ++ if dev['type'] == BALLOON_DEVICES: ++ if address and not dev.get('address'): ++ dev['address'] = address ++ if not dev.get('alias'): ++ dev['alias'] = alias ++ ++ def _getUnderlyingConsoleDeviceInfo(self): ++ """ ++ Obtain the alias for the console device from libvirt ++ """ ++ consolexml = _domParseStr(self._lastXMLDesc).childNodes[0].\ ++ getElementsByTagName('devices')[0].\ ++ getElementsByTagName('console') ++ for x in consolexml: ++ # All we care about is the alias ++ alias = x.getElementsByTagName('alias')[0].getAttribute('name') ++ for dev in self._devices[CONSOLE_DEVICES]: ++ if not hasattr(dev, 'alias'): ++ dev.alias = alias ++ ++ for dev in self.conf['devices']: ++ if dev['device'] == CONSOLE_DEVICES and \ ++ not dev.get('alias'): + dev['alias'] = alias + + def _getUnderlyingSmartcardDeviceInfo(self): +-- +1.8.3.1 + diff --git a/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch b/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch new file mode 100644 index 0000000..cd768f4 --- /dev/null +++ b/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch @@ -0,0 +1,76 @@ +From e5dbe4cbef2d57c34232fd998ee82b3641ee7931 Mon Sep 17 00:00:00 2001 +From: Vinzenz Feenstra +Date: Mon, 5 Aug 2013 12:07:01 +0200 +Subject: [PATCH 06/13] vdsm: Fix regression introduced by refactoring + libvirtvm + +Rebasing the changeset of refactoring libvirtvm.py and vm.py into vm.py [1] +caused an accidental removal of changes made in commit 30a4b50 [2]. + +This commit fixes the mess up of this rebase mess up. + +[1]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=ee082b8 +[2]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=30a4b50 + +Change-Id: I0eeb53828e1a33e6f0e010f9e17fb2911fda3f45 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=985735 +Signed-off-by: Vinzenz Feenstra +Reviewed-on: http://gerrit.ovirt.org/17687 +Reviewed-by: Dan Kenigsberg +--- + vdsm/vm.py | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 92b4b91..f0690b7 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -1356,7 +1356,7 @@ class Drive(VmDevice): + can also dynamically change according to the VM needs (e.g. increase + during a live storage migration). + """ +- if hasattr(self, "diskReplicate"): ++ if self.isDiskReplicationInProgress(): + return self.VOLWM_CHUNK_MB * self.VOLWM_CHUNK_REPLICATE_MULT + return self.VOLWM_CHUNK_MB + +@@ -3290,7 +3290,8 @@ class Vm(object): + for dev in self.conf['devices'][:]: + if (dev['type'] == DISK_DEVICES and + dev['path'] == diskParams['path']): +- self.conf['devices'].remove(dev) ++ with self._confLock: ++ self.conf['devices'].remove(dev) + diskDev = dev + break + +@@ -3801,10 +3802,6 @@ class Vm(object): + raise LookupError("No such drive: '%s'" % srcDrive.name) + + srcDrive.diskReplicate = dstDisk +- self.saveState() +- +- def isDiskReplicationInProgress(self, srcDrive): +- return hasattr(srcDrive, 'diskReplicate') + + def _delDiskReplica(self, srcDrive): + """ +@@ -3822,7 +3819,6 @@ class Vm(object): + raise LookupError("No such drive: '%s'" % srcDrive.name) + + del srcDrive.diskReplicate +- self.saveState() + + def diskReplicateStart(self, srcDisk, dstDisk): + try: +@@ -3838,7 +3834,6 @@ class Vm(object): + "destination '%s'" % srcDrive.name, dstDisk) + return errCode['replicaErr'] + +- self._setDiskReplica(srcDrive, dstDisk) + dstDiskCopy = dstDisk.copy() + + # The device entry is enforced because stricly required by +-- +1.8.3.1 + diff --git a/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch b/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch new file mode 100644 index 0000000..ad7067a --- /dev/null +++ b/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch @@ -0,0 +1,53 @@ +From 28af8498966978cf5a442af8ecaacddde2d41cf9 Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Thu, 1 Aug 2013 11:44:44 +0300 +Subject: [PATCH 07/13] VDSM now writes its version number in VDSM-generated + ifcfg files + +Change-Id: Ida8a540356e04d86eb19e05149861d800d8f7313 +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/17566 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/17612 +--- + vdsm/netconf/ifcfg.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py +index 774f831..140b538 100644 +--- a/vdsm/netconf/ifcfg.py ++++ b/vdsm/netconf/ifcfg.py +@@ -28,6 +28,7 @@ import selinux + import shutil + import threading + ++import dsaversion + from netconf import Configurator + from neterrors import ConfigNetworkError + from netmodels import Nic, Bridge +@@ -181,7 +182,8 @@ class Ifcfg(Configurator): + + + class ConfigWriter(object): +- CONFFILE_HEADER = '# automatically generated by vdsm' ++ CONFFILE_HEADER = '# Generated by VDSM version %s' %\ ++ dsaversion.raw_version_revision + DELETED_HEADER = '# original file did not exist' + + def __init__(self): +@@ -447,9 +449,10 @@ class ConfigWriter(object): + gateway=None, bootproto=None, mtu=None, onboot='yes', + **kwargs): + """ Create ifcfg-* file with proper fields per device """ ++ cfg = self.CONFFILE_HEADER + '\n' + +- cfg = """DEVICE=%s\nONBOOT=%s\n""" % (pipes.quote(name), +- pipes.quote(onboot)) ++ cfg += """DEVICE=%s\nONBOOT=%s\n""" % (pipes.quote(name), ++ pipes.quote(onboot)) + cfg += conf + if ipaddr: + cfg = cfg + 'IPADDR=%s\nNETMASK=%s\n' % (pipes.quote(ipaddr), +-- +1.8.3.1 + diff --git a/0008-Bump-requires-version-of-selinux-policy-targeted.patch b/0008-Bump-requires-version-of-selinux-policy-targeted.patch new file mode 100644 index 0000000..0b79d82 --- /dev/null +++ b/0008-Bump-requires-version-of-selinux-policy-targeted.patch @@ -0,0 +1,41 @@ +From 513440e9a06a4466a7ea0955220ac39e2df4334e Mon Sep 17 00:00:00 2001 +From: Mark Wu +Date: Mon, 5 Aug 2013 15:07:28 +0800 +Subject: [PATCH 08/13] Bump requires version of selinux-policy-targeted + +Current SElinux policy prevent the dhcp hook for source routing +from running. It has been fixed in latest selinux policy, so we +we need bump the requires version. More information, please see: +https://bugzilla.redhat.com/show_bug.cgi?id=977856 + +Change-Id: Ia2521d34dafdad2bba57c6da16253ff10f8a780f +Signed-off-by: Mark Wu +Reviewed-on: http://gerrit.ovirt.org/17642 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/17763 +Tested-by: Dan Kenigsberg +--- + vdsm.spec.in | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 87bc231..21b3565 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -187,7 +187,11 @@ Requires: lvm2 >= 2.02.95 + %endif + + %if 0%{?fedora} >= 18 +-Requires: selinux-policy-targeted >= 3.11.1-71 ++%if 0%{?fedora} >= 19 ++Requires: selinux-policy-targeted >= 3.12.1-69 ++%else ++Requires: selinux-policy-targeted >= 3.11.1-100 ++%endif + # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is + # disabled we now require the version 2.1.13-55 (or newer) of Fedora. + Requires: policycoreutils >= 2.1.13-55 +-- +1.8.3.1 + diff --git a/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch b/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch new file mode 100644 index 0000000..17b5450 --- /dev/null +++ b/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch @@ -0,0 +1,47 @@ +From d48853e48db9e95c040e7e8573a8ce80e14c69ab Mon Sep 17 00:00:00 2001 +From: "Antoni S. Puimedon" +Date: Tue, 6 Aug 2013 23:54:40 +0200 +Subject: [PATCH 09/13] vdsm_reg: fix ovirt_node without default bridge + +This patch reflects the fact that nowadays ovirt-node usually +doesn't have a br* interface by default, thus the standing +assumption that it did lead to exceptions. + +Change-Id: I01b761e4fa134850875a4118d40359df72ffd0ef +Bug-Url: https://bugzilla.redhat.com/988990 +Signed-off-by: Antoni S. Puimedon +Reviewed-on: http://gerrit.ovirt.org/17730 +Reviewed-by: Alon Bar-Lev +Reviewed-by: Mark Wu +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/17771 +--- + vdsm_reg/deployUtil.py.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index de0ac41..857c33c 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -1056,7 +1056,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None): + # No more handling GATEWAYDEV. + + if fReturn: +- if fIsOvirt: ++ if fIsOvirt and fIsBridgeDevice: + vlan, bonding, nic = _getOvirtBridgeParams(mgtBridge) + else: + vlan, bonding, nic = _getRHELBridgeParams(mgtIface, +@@ -1064,7 +1064,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None): + fReturn = (nic is not None) + + #Delete existing bridge in oVirt +- if fReturn and fIsOvirt: ++ if fReturn and fIsOvirt and fIsBridgeDevice: + try: + out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), + mgtBridge, vlan, bonding, nic]) +-- +1.8.3.1 + diff --git a/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch b/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch new file mode 100644 index 0000000..3542255 --- /dev/null +++ b/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch @@ -0,0 +1,46 @@ +From c7e69a1e9eee9d4a0b06b779f8dfc3ac99128ba5 Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Wed, 7 Aug 2013 18:17:18 +0300 +Subject: [PATCH 10/13] Source Route script now checks that the DHCP response + is whole + +Previously we assumed that every DHCP response contains a +gateway. Clearly that's wrong :( + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994600 +Change-Id: I3400b1ef736082ed3d5c42edf8ed5d66e94cce98 +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/17793 +Reviewed-by: Dan Kenigsberg +--- + vdsm/sourceRoute.sh | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh +index 2dafe39..bb8384e 100755 +--- a/vdsm/sourceRoute.sh ++++ b/vdsm/sourceRoute.sh +@@ -3,11 +3,16 @@ + timeStamp=`date +%s` + + sourceRoute_config() { +- echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \ +- "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp ++ if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ] && \ ++ [ -n "$new_routers" ] && [ -n "$interface" ]; then ++ echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \ ++ "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp ++ fi + } + + sourceRoute_restore() { +- echo "remove" "$interface" > \ +- /var/run/vdsm/sourceRoutes/$timeStamp ++ if [ -n "$interface" ]; then ++ echo "remove" "$interface" > \ ++ /var/run/vdsm/sourceRoutes/$timeStamp ++ fi + } +-- +1.8.3.1 + diff --git a/0011-Management-network-is-now-kept-in-main-routing-table.patch b/0011-Management-network-is-now-kept-in-main-routing-table.patch new file mode 100644 index 0000000..be74165 --- /dev/null +++ b/0011-Management-network-is-now-kept-in-main-routing-table.patch @@ -0,0 +1,324 @@ +From 24dc35742d6a5e1da365bd43659752b394841ddb Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Thu, 1 Aug 2013 15:10:05 +0300 +Subject: [PATCH 11/13] Management network is now kept in main routing table + +Only the management network should add its default route +to the main routing table. Each NetDevice holds an IpConfig +instance who now holds defaultRoute='yes', 'no' or None. +Only the top level device will have a defaultRoute value. +When writing ifcfg files we check if we got a defaultRoute +value, if so we write it. + +Patch Set 7 changed the implementation so that only the top +level device has DEFROUTE=yes/no in its ifcfg file. + +Change-Id: I55c50269dd3d52fd058951200282c925a7014aca +Signed-off-by: Assaf Muller +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=984028 +Reviewed-on: http://gerrit.ovirt.org/17844 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Federico Simoncelli +--- + lib/vdsm/constants.py.in | 3 +++ + vdsm/configNetwork.py | 12 +++++++++--- + vdsm/netconf/__init__.py | 2 +- + vdsm/netconf/ifcfg.py | 48 ++++++++++++++++++++++++++++++++---------------- + vdsm/netmodels.py | 21 ++++++++++++++------- + vdsm/sourceRoute.py | 2 +- + 6 files changed, 60 insertions(+), 28 deletions(-) + +diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in +index bbbb625..cfea347 100644 +--- a/lib/vdsm/constants.py.in ++++ b/lib/vdsm/constants.py.in +@@ -22,6 +22,9 @@ + + import os + ++# VDSM management device ++MANAGEMENT_NETWORK = '@VDSMBRIDGE@' ++ + # SMBIOS manufacturer + SMBIOS_MANUFACTURER = '@SMBIOS_MANUFACTURER@' + SMBIOS_OSNAME = '@SMBIOS_OSNAME@' +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index fdb0b8f..155d22a 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -46,7 +46,7 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None, + bondingOptions=None, nics=None, mtu=None, ipaddr=None, + netmask=None, gateway=None, bootproto=None, + _netinfo=None, configurator=None, blockingdhcp=None, +- implicitBonding=None, **opts): ++ implicitBonding=None, defaultRoute=None, **opts): + """ + Constructs an object hierarchy that describes the network configuration + that is passed in the parameters. +@@ -66,6 +66,8 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None, + :param blockingdhcp: whether to acquire dhcp IP config in a synced manner. + :param implicitBonding: whether the bond's existance is tied to it's + master's. ++ :param defaultRoute: Should this network's gateway be set in the main ++ routing table? + + :returns: the top object of the hierarchy. + """ +@@ -101,7 +103,7 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None, + if topNetDev is None: + raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'Network defined without' + 'devices.') +- topNetDev.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway), ++ topNetDev.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway, defaultRoute), + bootproto=bootproto, + blocking=utils.tobool(blockingdhcp)) + return topNetDev +@@ -182,6 +184,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, + for nic in nics: + _validateInterNetworkCompatibility(_netinfo, vlan, nic, + bridged) ++ + logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," + " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", + network, vlan, bonding, nics, bondingOptions, +@@ -192,10 +195,13 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, + + bootproto = options.pop('bootproto', None) + ++ defaultRoute = network == constants.MANAGEMENT_NETWORK ++ + netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding, + bondingOptions, nics, mtu, ipaddr, netmask, + gateway, bootproto, _netinfo, configurator, +- **options) ++ defaultRoute=defaultRoute, **options) ++ + netEnt.configure(**options) + configurator.configureLibvirtNetwork(network, netEnt, + qosInbound=qosInbound, +diff --git a/vdsm/netconf/__init__.py b/vdsm/netconf/__init__.py +index c5227c2..d618522 100644 +--- a/vdsm/netconf/__init__.py ++++ b/vdsm/netconf/__init__.py +@@ -81,7 +81,7 @@ class Configurator(object): + DynamicSourceRoute.addInterfaceTracking(netEnt) + + def _removeSourceRoute(self, netEnt): +- _, _, _, bootproto, _ = netEnt.getIpConfig() ++ _, _, _, bootproto, _, _ = netEnt.getIpConfig() + if bootproto != 'dhcp' and netEnt.master is None: + logging.debug("Removing source route for device %s" % netEnt.name) + StaticSourceRoute(netEnt.name, self).remove() +diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py +index 140b538..5e6239e 100644 +--- a/vdsm/netconf/ifcfg.py ++++ b/vdsm/netconf/ifcfg.py +@@ -61,7 +61,7 @@ class Ifcfg(Configurator): + self._libvirtAdded = set() + + def configureBridge(self, bridge, **opts): +- ipaddr, netmask, gateway, bootproto, async = bridge.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, async, _ = bridge.getIpConfig() + self.configApplier.addBridge(bridge, **opts) + ifdown(bridge.name) + if bridge.port: +@@ -70,14 +70,14 @@ class Ifcfg(Configurator): + ifup(bridge.name, async) + + def configureVlan(self, vlan, **opts): +- ipaddr, netmask, gateway, bootproto, async = vlan.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, async, _ = vlan.getIpConfig() + self.configApplier.addVlan(vlan, **opts) + vlan.device.configure(**opts) + self._addSourceRoute(vlan, ipaddr, netmask, gateway, bootproto) + ifup(vlan.name, async) + + def configureBond(self, bond, **opts): +- ipaddr, netmask, gateway, bootproto, async = bond.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, async, _ = bond.getIpConfig() + self.configApplier.addBonding(bond, **opts) + if not netinfo.isVlanned(bond.name): + for slave in bond.slaves: +@@ -97,7 +97,7 @@ class Ifcfg(Configurator): + self.configureBond(bond) + + def configureNic(self, nic, **opts): +- ipaddr, netmask, gateway, bootproto, async = nic.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, async, _ = nic.getIpConfig() + self.configApplier.addNic(nic, **opts) + self._addSourceRoute(nic, ipaddr, netmask, gateway, bootproto) + if nic.bond is None: +@@ -445,9 +445,15 @@ class ConfigWriter(object): + logging.debug('ignoring restorecon error in case ' + 'SElinux is disabled', exc_info=True) + ++ @staticmethod ++ def _toIfcfgFormat(defaultRoute): ++ if defaultRoute is None: ++ return None ++ return 'yes' if defaultRoute else 'no' ++ + def _createConfFile(self, conf, name, ipaddr=None, netmask=None, +- gateway=None, bootproto=None, mtu=None, onboot='yes', +- **kwargs): ++ gateway=None, bootproto=None, mtu=None, ++ defaultRoute=None, onboot='yes', **kwargs): + """ Create ifcfg-* file with proper fields per device """ + cfg = self.CONFFILE_HEADER + '\n' + +@@ -467,6 +473,8 @@ class ConfigWriter(object): + cfg = cfg + 'BOOTPROTO=%s\n' % pipes.quote(bootproto) + if mtu: + cfg = cfg + 'MTU=%d\n' % mtu ++ if defaultRoute: ++ cfg = cfg + 'DEFROUTE=%s\n' % defaultRoute + cfg += 'NM_CONTROLLED=no\n' + BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', + 'force', 'blockingdhcp', +@@ -482,20 +490,24 @@ class ConfigWriter(object): + + def addBridge(self, bridge, **opts): + """ Create ifcfg-* file with proper fields for bridge """ +- ipaddr, netmask, gateway, bootproto, _ = bridge.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, _, defaultRoute = \ ++ bridge.getIpConfig() + conf = 'TYPE=Bridge\nDELAY=%s\n' % bridge.forwardDelay + self._createConfFile(conf, bridge.name, ipaddr, netmask, gateway, +- bootproto, bridge.mtu, **opts) ++ bootproto, bridge.mtu, ++ self._toIfcfgFormat(defaultRoute), **opts) + + def addVlan(self, vlan, **opts): + """ Create ifcfg-* file with proper fields for VLAN """ +- ipaddr, netmask, gateway, bootproto, _ = vlan.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, _, defaultRoute = \ ++ vlan.getIpConfig() + conf = 'VLAN=yes\n' + if vlan.bridge: + conf += 'BRIDGE=%s\n' % pipes.quote(vlan.bridge.name) + + self._createConfFile(conf, vlan.name, ipaddr, netmask, gateway, +- bootproto, vlan.mtu, **opts) ++ bootproto, vlan.mtu, ++ self._toIfcfgFormat(defaultRoute), **opts) + + def addBonding(self, bond, **opts): + """ Create ifcfg-* file with proper fields for bond """ +@@ -503,10 +515,10 @@ class ConfigWriter(object): + if bond.bridge: + conf += 'BRIDGE=%s\n' % pipes.quote(bond.bridge.name) + +- ipaddr, netmask, gateway, bootproto, mtu = \ ++ ipaddr, netmask, gateway, bootproto, mtu, defaultRoute = \ + self._getIfaceConfValues(bond, netinfo.NetInfo()) + self._createConfFile(conf, bond.name, ipaddr, netmask, gateway, +- bootproto, mtu, **opts) ++ bootproto, mtu, defaultRoute, **opts) + + # create the bonding device to avoid initscripts noise + if bond.name not in open(netinfo.BONDING_MASTERS).read().split(): +@@ -524,14 +536,16 @@ class ConfigWriter(object): + if nic.bond: + conf += 'MASTER=%s\nSLAVE=yes\n' % pipes.quote(nic.bond.name) + +- ipaddr, netmask, gateway, bootproto, mtu = \ ++ ipaddr, netmask, gateway, bootproto, mtu, defaultRoute = \ + self._getIfaceConfValues(nic, _netinfo) + self._createConfFile(conf, nic.name, ipaddr, netmask, gateway, +- bootproto, mtu, **opts) ++ bootproto, mtu, defaultRoute, **opts) + + @staticmethod + def _getIfaceConfValues(iface, _netinfo): +- ipaddr, netmask, gateway, bootproto, _ = iface.getIpConfig() ++ ipaddr, netmask, gateway, bootproto, _, defaultRoute = \ ++ iface.getIpConfig() ++ defaultRoute = ConfigWriter._toIfcfgFormat(defaultRoute) + mtu = iface.mtu + if _netinfo.ifaceUsers(iface.name): + confParams = netinfo.getIfaceCfg(iface.name) +@@ -540,11 +554,13 @@ class ConfigWriter(object): + netmask = confParams.get('NETMASK', None) + gateway = confParams.get('GATEWAY', None) + bootproto = confParams.get('BOOTPROTO', None) ++ if defaultRoute is None: ++ defaultRoute = confParams.get('DEFROUTE', None) + if not iface.mtu: + mtu = confParams.get('MTU', None) + if mtu: + mtu = int(mtu) +- return ipaddr, netmask, gateway, bootproto, mtu ++ return ipaddr, netmask, gateway, bootproto, mtu, defaultRoute + + def removeNic(self, nic): + cf = netinfo.NET_CONF_PREF + nic +diff --git a/vdsm/netmodels.py b/vdsm/netmodels.py +index 6368e36..fffba2a 100644 +--- a/vdsm/netmodels.py ++++ b/vdsm/netmodels.py +@@ -44,10 +44,12 @@ class NetDevice(object): + + def getIpConfig(self): + try: +- ipaddr, netmask, gateway, bootproto, async = self.ip.getConfig() ++ ipaddr, netmask, gateway, bootproto, async, defaultRoute = \ ++ self.ip.getConfig() + except AttributeError: +- ipaddr = netmask = gateway = bootproto = async = None +- return ipaddr, netmask, gateway, bootproto, async ++ ipaddr = netmask = gateway = bootproto = async = defaultRoute = \ ++ None ++ return ipaddr, netmask, gateway, bootproto, async, defaultRoute + + @property + def bridge(self): +@@ -260,7 +262,8 @@ class Bond(NetDevice): + + + class IPv4(object): +- def __init__(self, address=None, netmask=None, gateway=None): ++ def __init__(self, address=None, netmask=None, gateway=None, ++ defaultRoute=None): + if address: + if not netmask: + raise ConfigNetworkError(ne.ERR_BAD_ADDR, 'Must specify ' +@@ -277,9 +280,11 @@ class IPv4(object): + self.address = address + self.netmask = netmask + self.gateway = gateway ++ self.defaultRoute = defaultRoute + + def __repr__(self): +- return 'IPv4(%s, %s, %s)' % (self.address, self.netmask, self.gateway) ++ return 'IPv4(%s, %s, %s, %s)' % (self.address, self.netmask, ++ self.gateway, self.defaultRoute) + + @classmethod + def validateAddress(cls, address): +@@ -328,6 +333,8 @@ class IpConfig(object): + ipaddr = self.inet.address + netmask = self.inet.netmask + gateway = self.inet.gateway ++ defaultRoute = self.inet.defaultRoute + except AttributeError: +- ipaddr = netmask = gateway = None +- return ipaddr, netmask, gateway, self.bootproto, self.async ++ ipaddr = netmask = gateway = defaultRoute = None ++ return ipaddr, netmask, gateway, self.bootproto, self.async, \ ++ defaultRoute +diff --git a/vdsm/sourceRoute.py b/vdsm/sourceRoute.py +index bed5cd0..c05d066 100644 +--- a/vdsm/sourceRoute.py ++++ b/vdsm/sourceRoute.py +@@ -101,7 +101,7 @@ class DynamicSourceRoute(StaticSourceRoute): + + @staticmethod + def addInterfaceTracking(device): +- _, _, _, bootproto, _ = device.getIpConfig() ++ _, _, _, bootproto, _, _ = device.getIpConfig() + if bootproto == 'dhcp': + open(DynamicSourceRoute.getTrackingFilePath(device.name), 'a').\ + close() +-- +1.8.3.1 + diff --git a/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch b/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch new file mode 100644 index 0000000..9e47e9e --- /dev/null +++ b/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch @@ -0,0 +1,38 @@ +From 46a360381ad8b2ffa121d90e718fb838352a123c Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Mon, 12 Aug 2013 14:23:28 +0300 +Subject: [PATCH 12/13] Only remove dhcp source routing if the removal reason + is "STOP" + +If the reason is FAIL then the IP configuration is not lost +and source routing should not be removed. Only STOP actually +removes the ip configuration from the device. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=995142 +Change-Id: Ie92a4b4a95e9f1a7855f3d276b4e4d5b8b4c6ad3 +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/17961 +Reviewed-by: Saggi Mizrahi +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/17963 +--- + vdsm/sourceRoute.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh +index bb8384e..8c60430 100755 +--- a/vdsm/sourceRoute.sh ++++ b/vdsm/sourceRoute.sh +@@ -11,7 +11,7 @@ sourceRoute_config() { + } + + sourceRoute_restore() { +- if [ -n "$interface" ]; then ++ if [ -n "$interface" ] && [ "$reason" == "STOP" ]; then + echo "remove" "$interface" > \ + /var/run/vdsm/sourceRoutes/$timeStamp + fi +-- +1.8.3.1 + diff --git a/0013-image-use-successor-volume-size-when-merging.patch b/0013-image-use-successor-volume-size-when-merging.patch new file mode 100644 index 0000000..7894024 --- /dev/null +++ b/0013-image-use-successor-volume-size-when-merging.patch @@ -0,0 +1,47 @@ +From 99290c2dd497b6447dd226ca20076073cb06449a Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Thu, 18 Jul 2013 13:41:15 -0400 +Subject: [PATCH 13/13] image: use successor volume size when merging + +Volumes in the same image chain might have different capacity since the +introduction of the disk resize feature. This means that when we merge +volumes the ancestor should get the new size from the successor in order +to be able to contain the additional data that we are collapsing. + +Change-Id: Ic0bfd2ffa080bf89709ae543043b52aad27eb759 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/17093 +Reviewed-by: Eduardo +Reviewed-on: http://gerrit.ovirt.org/18025 +--- + vdsm/storage/image.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py +index 2a9510d..9aa8fc7 100644 +--- a/vdsm/storage/image.py ++++ b/vdsm/storage/image.py +@@ -1000,7 +1000,7 @@ class Image: + # destination volume's parent parameters + newUUID = srcVol.volUUID + "_MERGE" + sdDom.createVolume( +- imgUUID=srcVolParams['imgUUID'], size=volParams['size'], ++ imgUUID=srcVolParams['imgUUID'], size=srcVolParams['size'], + volFormat=volParams['volFormat'], + preallocate=volParams['prealloc'], + diskType=volParams['disktype'], volUUID=newUUID, +@@ -1111,6 +1111,11 @@ class Image: + reqSize = min(accSize, imageApparentSize) * 1.1 + try: + # Start the actual merge image procedure ++ # IMPORTANT NOTE: volumes in the same image chain might have ++ # different capacity since the introduction of the disk resize ++ # feature. This means that when we merge volumes the ancestor ++ # should get the new size from the successor (in order to be ++ # able to contain the additional data that we are collapsing). + if dstParentUUID != sd.BLANK_UUID: + # The ancestor isn't a base volume of the chain. + self.log.info("Internal volume merge: src = %s dst = %s", +-- +1.8.3.1 + diff --git a/sources b/sources index 3cc5616..7a9f675 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1872fb0d60a1a4908349ef958e19f611 vdsm-4.12.0.tar.gz +d5ce66e518d8538224f1845c17c6e86f vdsm-4.12.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 6811bd6..366613b 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.0 -Release: 0.2.rc3%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -60,7 +60,21 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -Patch0: 0001-build-use-pythondir-for-vdsmapi.patch + +Patch1: 0001-mom-Require-latest-mom.patch +Patch2: 0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch +Patch3: 0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch +Patch4: 0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch +Patch5: 0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch +Patch6: 0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch +Patch7: 0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch +Patch8: 0008-Bump-requires-version-of-selinux-policy-targeted.patch +Patch9: 0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch +Patch10: 0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch +Patch11: 0011-Management-network-is-now-kept-in-main-routing-table.patch +Patch12: 0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch +Patch13: 0013-image-use-successor-volume-size-when-merging.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -117,7 +131,7 @@ Requires: nfs-utils Requires: m2crypto Requires: libguestfs-tools-c Requires: %{name}-xmlrpc = %{version}-%{release} -Requires: mom >= 0.3.2 +Requires: mom >= 0.3.2-3 %ifarch x86_64 Requires: python-dmidecode @@ -202,7 +216,11 @@ Requires: lvm2 >= 2.02.95 %endif %if 0%{?fedora} >= 18 -Requires: selinux-policy-targeted >= 3.11.1-71 +%if 0%{?fedora} >= 19 +Requires: selinux-policy-targeted >= 3.12.1-69 +%else +Requires: selinux-policy-targeted >= 3.11.1-100 +%endif # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is # disabled we now require the version 2.1.13-55 (or newer) of Fedora. Requires: policycoreutils >= 2.1.13-55 @@ -498,7 +516,9 @@ such as: vendor, version, date and release %package hook-sriov Summary: sr-iov support for VDSM +%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18 Requires: libvirt-daemon-driver-nodedev +%endif BuildArch: noarch %description hook-sriov @@ -537,7 +557,19 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -658,11 +690,6 @@ fi %else %if 0%{?with_systemd} /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : -%if 0%{?with_systemd_macros} -%systemd_post vdsmd.service -%systemd_post supervdsmd.service -%systemd_post vdsm-restore-net-config.service -%else if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : @@ -672,7 +699,6 @@ fi exit 0 %endif %endif -%endif %preun if [ "$1" -eq 0 ]; then @@ -1297,8 +1323,23 @@ exit 0 %{python_sitearch}/cpopen/__init__.py* %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* - %changelog +* Tue Aug 13 2013 Federico Simoncelli 4.12.0-1 +- update to 4.12.0 final release +- mom: Require latest mom +- Mark ksmtuned as conflicting service in the init file +- spec: vdsm-hook-sriov on el6 should not require +- Crash fix for migrations that involve devices with no aliases (BZ#988065) +- vdsm: Always retrieve alias for Balloon and Console (BZ#988065) +- vdsm: Fix regression introduced by refactoring (BZ#985735) +- VDSM now writes its version number in VDSM-generated +- Bump requires version of selinux-policy-targeted +- vdsm_reg: fix ovirt_node without default bridge (BZ#988990) +- Source Route script now checks that the DHCP response (BZ#994600) +- Management network is now kept in main routing table (BZ#984028) +- Only remove dhcp source routing if the removal reason (BZ#995142) +- image: use successor volume size when merging + * Sun Aug 04 2013 Fedora Release Engineering - 4.12.0-0.2.rc3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 300cff5242cb0b5867249d883f727ede53410b1c Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Thu, 22 Aug 2013 17:51:40 +0200 Subject: [PATCH 047/126] update to vdsm-4.12.0-2 - Fix GlusterFS RPM dep to support GlusterFS SD (BZ#988299) --- ...299-Fix-GlusterFS-RPM-dep-to-support.patch | 61 +++++++++++++++++++ vdsm.spec | 18 +++++- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch diff --git a/0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch b/0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch new file mode 100644 index 0000000..ed16d98 --- /dev/null +++ b/0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch @@ -0,0 +1,61 @@ +From 578b323ad473aca9bc0a0bd8f99d0b5ab9a9296c Mon Sep 17 00:00:00 2001 +From: Deepak C Shetty +Date: Sun, 11 Aug 2013 00:21:59 +0530 +Subject: [PATCH 14/14] vdsm.spec: BZ 988299: Fix GlusterFS RPM dep to support + GlusterFS SD + +This patch fixes the GlusterFS RPM dependency needed by VDSM to +support Gluster Storage Domain feature. Recent GlusterFS RPM +re-packaging effort to better separate the client and server side +bits and availability of qemu with libgfapi support mark the +pre-req for this patch. These pre-req are now available in +F18/F19/RHEL6/Centos6 and above in the appropriate distro specific +repos. Also removing F17 dep as its End of life now. + +BZ 988299 has more details, with pointers to the community +discussions around these. + +Change-Id: If648feec92ed33f24f45550f016ac132a25e6923 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988299 +Signed-off-by: Deepak C Shetty +Reviewed-on: http://gerrit.ovirt.org/17994 +Reviewed-by: Bala.FA +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/18426 +Tested-by: Federico Simoncelli +--- + vdsm.spec.in | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 21b3565..74ad331 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -25,7 +25,7 @@ + %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d + %endif + +-%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 ++%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 + %global with_gluster 1 + %endif + +@@ -198,6 +198,15 @@ Requires: policycoreutils >= 2.1.13-55 + Requires: systemd >= 197-1.fc18.2 + %endif + ++# GlusterFS client-side RPMs needed for Gluster SD ++%if 0%{?with_gluster} ++Requires: glusterfs >= 3.4.0 ++Requires: glusterfs-cli ++Requires: glusterfs-api ++Requires: glusterfs-fuse ++Requires: glusterfs-rdma ++%endif ++ + Requires: psmisc >= 22.6-15 + Requires: bridge-utils + Requires: sos +-- +1.8.3.1 + diff --git a/vdsm.spec b/vdsm.spec index 366613b..d816491 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -31,7 +31,7 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 %global with_gluster 1 %endif @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.0 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -74,6 +74,7 @@ Patch10: 0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch Patch11: 0011-Management-network-is-now-kept-in-main-routing-table.patch Patch12: 0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch Patch13: 0013-image-use-successor-volume-size-when-merging.patch +Patch14: 0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -227,6 +228,15 @@ Requires: policycoreutils >= 2.1.13-55 Requires: systemd >= 197-1.fc18.2 %endif +# GlusterFS client-side RPMs needed for Gluster SD +%if 0%{?with_gluster} +Requires: glusterfs >= 3.4.0 +Requires: glusterfs-cli +Requires: glusterfs-api +Requires: glusterfs-fuse +Requires: glusterfs-rdma +%endif + Requires: psmisc >= 22.6-15 Requires: bridge-utils Requires: sos @@ -570,6 +580,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1324,6 +1335,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Thu Aug 22 2013 Federico Simoncelli 4.12.0-2 +- Fix GlusterFS RPM dep to support GlusterFS SD (BZ#988299) + * Tue Aug 13 2013 Federico Simoncelli 4.12.0-1 - update to 4.12.0 final release - mom: Require latest mom From 71fb0170ce32629e13188b595ee283c7f127db67 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 27 Aug 2013 23:25:39 +0200 Subject: [PATCH 048/126] update to vdsm-4.12.1-1 - update to 4.12.1 --- 0001-mom-Require-latest-mom.patch | 36 -- ...-conflicting-service-in-the-init-fil.patch | 35 -- ...riov-on-el6-should-not-require-non-e.patch | 40 --- ...grations-that-involve-devices-with-n.patch | 49 --- ...ieve-alias-for-Balloon-and-Console-d.patch | 88 ----- ...ion-introduced-by-refactoring-libvir.patch | 76 ---- ...its-version-number-in-VDSM-generated.patch | 53 --- ...s-version-of-selinux-policy-targeted.patch | 41 --- ...ix-ovirt_node-without-default-bridge.patch | 47 --- ...ipt-now-checks-that-the-DHCP-respons.patch | 46 --- ...rk-is-now-kept-in-main-routing-table.patch | 324 ------------------ ...-source-routing-if-the-removal-reaso.patch | 38 -- ...e-successor-volume-size-when-merging.patch | 47 --- ...299-Fix-GlusterFS-RPM-dep-to-support.patch | 61 ---- sources | 2 +- vdsm.spec | 37 +- 16 files changed, 6 insertions(+), 1014 deletions(-) delete mode 100644 0001-mom-Require-latest-mom.patch delete mode 100644 0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch delete mode 100644 0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch delete mode 100644 0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch delete mode 100644 0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch delete mode 100644 0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch delete mode 100644 0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch delete mode 100644 0008-Bump-requires-version-of-selinux-policy-targeted.patch delete mode 100644 0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch delete mode 100644 0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch delete mode 100644 0011-Management-network-is-now-kept-in-main-routing-table.patch delete mode 100644 0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch delete mode 100644 0013-image-use-successor-volume-size-when-merging.patch delete mode 100644 0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch diff --git a/0001-mom-Require-latest-mom.patch b/0001-mom-Require-latest-mom.patch deleted file mode 100644 index 81003b0..0000000 --- a/0001-mom-Require-latest-mom.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 189c632a18610b88f8fdb8c8500e8bb224cbe359 Mon Sep 17 00:00:00 2001 -From: Doron Fediuck -Date: Tue, 30 Jul 2013 23:34:46 +0300 -Subject: [PATCH 01/13] mom: Require latest mom - -Latest mom build uses strings for the balloon info, -needed for proper ballooning integration. - -This patch will make vdsm depending on the latest mom -supporting the strings api. - -Change-Id: Ia2aebf588f823ee986bd20bbf47bace176b4cd21 -Signed-off-by: Doron Fediuck -Reviewed-on: http://gerrit.ovirt.org/17519 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 235d1db..d95bb2a 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -102,7 +102,7 @@ Requires: nfs-utils - Requires: m2crypto - Requires: libguestfs-tools-c - Requires: %{name}-xmlrpc = %{version}-%{release} --Requires: mom >= 0.3.2-2 -+Requires: mom >= 0.3.2-3 - - %ifarch x86_64 - Requires: python-dmidecode --- -1.8.3.1 - diff --git a/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch b/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch deleted file mode 100644 index bf177d7..0000000 --- a/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 647ac116919ce8273238223a9e1b41345b1ffc59 Mon Sep 17 00:00:00 2001 -From: Martin Sivak -Date: Thu, 25 Jul 2013 10:23:02 +0200 -Subject: [PATCH 02/13] Mark ksmtuned as conflicting service in the init file - -MoM and ksmtuned fight over control of ksm when running at the -same time. MoM is the prefered manager now so ksmtuned should -be stopped during VDSM startup. VDSM can start ksmtuned again -when needed (in case MoM is not available or fails). - -Change-Id: Iaaf8fd5f9dd3d92ef3d06b433312d5d22b594191 -Resolves: rhbz#987926 -Signed-off-by: Martin Sivak -Reviewed-on: http://gerrit.ovirt.org/17537 -Reviewed-by: Dan Kenigsberg ---- - vdsm/vdsmd.init.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in -index 4d77b01..56f07bd 100755 ---- a/vdsm/vdsmd.init.in -+++ b/vdsm/vdsmd.init.in -@@ -32,7 +32,7 @@ DOM_METADATA_BACKUP_DIR=/var/log/vdsm/backup - CORE_PATTERN=/proc/sys/kernel/core_pattern - NEEDED_SERVICES="iscsid multipathd rpcbind ntpd wdmd sanlock network libvirtd - supervdsmd" --CONFLICTING_SERVICES="libvirt-guests" -+CONFLICTING_SERVICES="libvirt-guests ksmtuned" - VDSM_TOOL="@BINDIR@/vdsm-tool" - RETVAL=0 - --- -1.8.3.1 - diff --git a/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch b/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch deleted file mode 100644 index 2325751..0000000 --- a/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7ed5813430052a587dadbff6301187097ce118a4 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Thu, 1 Aug 2013 09:50:39 +0300 -Subject: [PATCH 03/13] spec: vdsm-hook-sriov on el6 should not require - non-existing rpm - -As reported by a dead horse, el6 does not carry -libvirt-daemon-driver-nodedev so the said hook should not require this -subrpm. Since it the rpm hook is meaningful only when vdsm is installed, -and el6's vdsm requires al libvirt, we need no special requirement -there. - -Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/17554 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Dead Horse -Tested-by: Dead Horse -Reviewed-on: http://gerrit.ovirt.org/17591 ---- - vdsm.spec.in | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index d95bb2a..87bc231 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -483,7 +483,9 @@ such as: vendor, version, date and release - - %package hook-sriov - Summary: sr-iov support for VDSM -+%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18 - Requires: libvirt-daemon-driver-nodedev -+%endif - BuildArch: noarch - - %description hook-sriov --- -1.8.3.1 - diff --git a/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch b/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch deleted file mode 100644 index b065315..0000000 --- a/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 127da86be3ac1330c2518e704b8bcb000ab43753 Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Tue, 30 Jul 2013 14:22:38 +0300 -Subject: [PATCH 04/13] Crash fix for migrations that involve devices with no - aliases - -The destination host updates the device XML cache for every -device by scanning the VM's XML that was received from -the source host, breaking it apart and placing each device's -XML into its Device class instance. The identification -of devices is done via the alias pulled from the VM conf. Some -devices don't have aliases pulled from libvirt. In any case, -migrations should succeed (instead of crashing VDSM) and -devices with no aliases should be dealt with in a separate patch. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065 -Change-Id: I3f05a945c2f3507d5571ac3f3b212e59a30bdfae -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/17515 -Reviewed-by: Michal Skrivanek -Reviewed-by: Vinzenz Feenstra -Tested-by: Vinzenz Feenstra -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/17685 ---- - vdsm/vm.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 4333170..eefbccd 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -4763,7 +4763,12 @@ class Vm(object): - aliasToDevice = {} - for devType in self._devices: - for dev in self._devices[devType]: -- aliasToDevice[dev.alias] = dev -+ if hasattr(dev, 'alias'): -+ aliasToDevice[dev.alias] = dev -+ else: -+ self.log.error("Alias not found for device type %s " -+ "during migration at destination host" % -+ devType) - - devices = _domParseStr(xml).childNodes[0]. \ - getElementsByTagName('devices')[0] --- -1.8.3.1 - diff --git a/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch b/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch deleted file mode 100644 index efdd1ca..0000000 --- a/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 02bd2860a8eac53c1e843867fa67dc16c07b6669 Mon Sep 17 00:00:00 2001 -From: Vinzenz Feenstra -Date: Fri, 2 Aug 2013 15:18:13 +0200 -Subject: [PATCH 05/13] vdsm: Always retrieve alias for Balloon and Console - devices - -We haven't been retrieving the alias value for console devices which -now starts to bite us due to the assumption that all VmDevice objects, -have to have an alias attribute during the migration. - -Due to a bug in the handling for Balloon devices this also happened. - -This commit fixes the problem for the future by retrieving the aliases. - -Change-Id: Ic828d13761b26b3ec01b604f431050a611bce01c -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065 -Signed-off-by: Vinzenz Feenstra -Reviewed-on: http://gerrit.ovirt.org/17602 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/17686 ---- - vdsm/vm.py | 36 +++++++++++++++++++++++++++++------- - 1 file changed, 29 insertions(+), 7 deletions(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index eefbccd..92b4b91 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -2732,6 +2732,7 @@ class Vm(object): - self._getUnderlyingBalloonDeviceInfo() - self._getUnderlyingWatchdogDeviceInfo() - self._getUnderlyingSmartcardDeviceInfo() -+ self._getUnderlyingConsoleDeviceInfo() - # Obtain info of all unknown devices. Must be last! - self._getUnderlyingUnknownDeviceInfo() - -@@ -4427,20 +4428,41 @@ class Vm(object): - for x in balloonxml: - # Ignore balloon devices without address. - if not x.getElementsByTagName('address'): -- continue -- -- address = self._getUnderlyingDeviceAddress(x) -+ address = None -+ else: -+ address = self._getUnderlyingDeviceAddress(x) - alias = x.getElementsByTagName('alias')[0].getAttribute('name') - - for dev in self._devices[BALLOON_DEVICES]: -- if not hasattr(dev, 'address'): -+ if address and not hasattr(dev, 'address'): - dev.address = address -+ if not hasattr(dev, 'alias'): - dev.alias = alias - - for dev in self.conf['devices']: -- if ((dev['type'] == BALLOON_DEVICES) and -- not dev.get('address')): -- dev['address'] = address -+ if dev['type'] == BALLOON_DEVICES: -+ if address and not dev.get('address'): -+ dev['address'] = address -+ if not dev.get('alias'): -+ dev['alias'] = alias -+ -+ def _getUnderlyingConsoleDeviceInfo(self): -+ """ -+ Obtain the alias for the console device from libvirt -+ """ -+ consolexml = _domParseStr(self._lastXMLDesc).childNodes[0].\ -+ getElementsByTagName('devices')[0].\ -+ getElementsByTagName('console') -+ for x in consolexml: -+ # All we care about is the alias -+ alias = x.getElementsByTagName('alias')[0].getAttribute('name') -+ for dev in self._devices[CONSOLE_DEVICES]: -+ if not hasattr(dev, 'alias'): -+ dev.alias = alias -+ -+ for dev in self.conf['devices']: -+ if dev['device'] == CONSOLE_DEVICES and \ -+ not dev.get('alias'): - dev['alias'] = alias - - def _getUnderlyingSmartcardDeviceInfo(self): --- -1.8.3.1 - diff --git a/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch b/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch deleted file mode 100644 index cd768f4..0000000 --- a/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch +++ /dev/null @@ -1,76 +0,0 @@ -From e5dbe4cbef2d57c34232fd998ee82b3641ee7931 Mon Sep 17 00:00:00 2001 -From: Vinzenz Feenstra -Date: Mon, 5 Aug 2013 12:07:01 +0200 -Subject: [PATCH 06/13] vdsm: Fix regression introduced by refactoring - libvirtvm - -Rebasing the changeset of refactoring libvirtvm.py and vm.py into vm.py [1] -caused an accidental removal of changes made in commit 30a4b50 [2]. - -This commit fixes the mess up of this rebase mess up. - -[1]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=ee082b8 -[2]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=30a4b50 - -Change-Id: I0eeb53828e1a33e6f0e010f9e17fb2911fda3f45 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=985735 -Signed-off-by: Vinzenz Feenstra -Reviewed-on: http://gerrit.ovirt.org/17687 -Reviewed-by: Dan Kenigsberg ---- - vdsm/vm.py | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 92b4b91..f0690b7 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -1356,7 +1356,7 @@ class Drive(VmDevice): - can also dynamically change according to the VM needs (e.g. increase - during a live storage migration). - """ -- if hasattr(self, "diskReplicate"): -+ if self.isDiskReplicationInProgress(): - return self.VOLWM_CHUNK_MB * self.VOLWM_CHUNK_REPLICATE_MULT - return self.VOLWM_CHUNK_MB - -@@ -3290,7 +3290,8 @@ class Vm(object): - for dev in self.conf['devices'][:]: - if (dev['type'] == DISK_DEVICES and - dev['path'] == diskParams['path']): -- self.conf['devices'].remove(dev) -+ with self._confLock: -+ self.conf['devices'].remove(dev) - diskDev = dev - break - -@@ -3801,10 +3802,6 @@ class Vm(object): - raise LookupError("No such drive: '%s'" % srcDrive.name) - - srcDrive.diskReplicate = dstDisk -- self.saveState() -- -- def isDiskReplicationInProgress(self, srcDrive): -- return hasattr(srcDrive, 'diskReplicate') - - def _delDiskReplica(self, srcDrive): - """ -@@ -3822,7 +3819,6 @@ class Vm(object): - raise LookupError("No such drive: '%s'" % srcDrive.name) - - del srcDrive.diskReplicate -- self.saveState() - - def diskReplicateStart(self, srcDisk, dstDisk): - try: -@@ -3838,7 +3834,6 @@ class Vm(object): - "destination '%s'" % srcDrive.name, dstDisk) - return errCode['replicaErr'] - -- self._setDiskReplica(srcDrive, dstDisk) - dstDiskCopy = dstDisk.copy() - - # The device entry is enforced because stricly required by --- -1.8.3.1 - diff --git a/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch b/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch deleted file mode 100644 index ad7067a..0000000 --- a/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 28af8498966978cf5a442af8ecaacddde2d41cf9 Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Thu, 1 Aug 2013 11:44:44 +0300 -Subject: [PATCH 07/13] VDSM now writes its version number in VDSM-generated - ifcfg files - -Change-Id: Ida8a540356e04d86eb19e05149861d800d8f7313 -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/17566 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/17612 ---- - vdsm/netconf/ifcfg.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py -index 774f831..140b538 100644 ---- a/vdsm/netconf/ifcfg.py -+++ b/vdsm/netconf/ifcfg.py -@@ -28,6 +28,7 @@ import selinux - import shutil - import threading - -+import dsaversion - from netconf import Configurator - from neterrors import ConfigNetworkError - from netmodels import Nic, Bridge -@@ -181,7 +182,8 @@ class Ifcfg(Configurator): - - - class ConfigWriter(object): -- CONFFILE_HEADER = '# automatically generated by vdsm' -+ CONFFILE_HEADER = '# Generated by VDSM version %s' %\ -+ dsaversion.raw_version_revision - DELETED_HEADER = '# original file did not exist' - - def __init__(self): -@@ -447,9 +449,10 @@ class ConfigWriter(object): - gateway=None, bootproto=None, mtu=None, onboot='yes', - **kwargs): - """ Create ifcfg-* file with proper fields per device """ -+ cfg = self.CONFFILE_HEADER + '\n' - -- cfg = """DEVICE=%s\nONBOOT=%s\n""" % (pipes.quote(name), -- pipes.quote(onboot)) -+ cfg += """DEVICE=%s\nONBOOT=%s\n""" % (pipes.quote(name), -+ pipes.quote(onboot)) - cfg += conf - if ipaddr: - cfg = cfg + 'IPADDR=%s\nNETMASK=%s\n' % (pipes.quote(ipaddr), --- -1.8.3.1 - diff --git a/0008-Bump-requires-version-of-selinux-policy-targeted.patch b/0008-Bump-requires-version-of-selinux-policy-targeted.patch deleted file mode 100644 index 0b79d82..0000000 --- a/0008-Bump-requires-version-of-selinux-policy-targeted.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 513440e9a06a4466a7ea0955220ac39e2df4334e Mon Sep 17 00:00:00 2001 -From: Mark Wu -Date: Mon, 5 Aug 2013 15:07:28 +0800 -Subject: [PATCH 08/13] Bump requires version of selinux-policy-targeted - -Current SElinux policy prevent the dhcp hook for source routing -from running. It has been fixed in latest selinux policy, so we -we need bump the requires version. More information, please see: -https://bugzilla.redhat.com/show_bug.cgi?id=977856 - -Change-Id: Ia2521d34dafdad2bba57c6da16253ff10f8a780f -Signed-off-by: Mark Wu -Reviewed-on: http://gerrit.ovirt.org/17642 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/17763 -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 87bc231..21b3565 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -187,7 +187,11 @@ Requires: lvm2 >= 2.02.95 - %endif - - %if 0%{?fedora} >= 18 --Requires: selinux-policy-targeted >= 3.11.1-71 -+%if 0%{?fedora} >= 19 -+Requires: selinux-policy-targeted >= 3.12.1-69 -+%else -+Requires: selinux-policy-targeted >= 3.11.1-100 -+%endif - # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is - # disabled we now require the version 2.1.13-55 (or newer) of Fedora. - Requires: policycoreutils >= 2.1.13-55 --- -1.8.3.1 - diff --git a/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch b/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch deleted file mode 100644 index 17b5450..0000000 --- a/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d48853e48db9e95c040e7e8573a8ce80e14c69ab Mon Sep 17 00:00:00 2001 -From: "Antoni S. Puimedon" -Date: Tue, 6 Aug 2013 23:54:40 +0200 -Subject: [PATCH 09/13] vdsm_reg: fix ovirt_node without default bridge - -This patch reflects the fact that nowadays ovirt-node usually -doesn't have a br* interface by default, thus the standing -assumption that it did lead to exceptions. - -Change-Id: I01b761e4fa134850875a4118d40359df72ffd0ef -Bug-Url: https://bugzilla.redhat.com/988990 -Signed-off-by: Antoni S. Puimedon -Reviewed-on: http://gerrit.ovirt.org/17730 -Reviewed-by: Alon Bar-Lev -Reviewed-by: Mark Wu -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/17771 ---- - vdsm_reg/deployUtil.py.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index de0ac41..857c33c 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1056,7 +1056,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None): - # No more handling GATEWAYDEV. - - if fReturn: -- if fIsOvirt: -+ if fIsOvirt and fIsBridgeDevice: - vlan, bonding, nic = _getOvirtBridgeParams(mgtBridge) - else: - vlan, bonding, nic = _getRHELBridgeParams(mgtIface, -@@ -1064,7 +1064,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None): - fReturn = (nic is not None) - - #Delete existing bridge in oVirt -- if fReturn and fIsOvirt: -+ if fReturn and fIsOvirt and fIsBridgeDevice: - try: - out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), - mgtBridge, vlan, bonding, nic]) --- -1.8.3.1 - diff --git a/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch b/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch deleted file mode 100644 index 3542255..0000000 --- a/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch +++ /dev/null @@ -1,46 +0,0 @@ -From c7e69a1e9eee9d4a0b06b779f8dfc3ac99128ba5 Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Wed, 7 Aug 2013 18:17:18 +0300 -Subject: [PATCH 10/13] Source Route script now checks that the DHCP response - is whole - -Previously we assumed that every DHCP response contains a -gateway. Clearly that's wrong :( - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994600 -Change-Id: I3400b1ef736082ed3d5c42edf8ed5d66e94cce98 -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/17793 -Reviewed-by: Dan Kenigsberg ---- - vdsm/sourceRoute.sh | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh -index 2dafe39..bb8384e 100755 ---- a/vdsm/sourceRoute.sh -+++ b/vdsm/sourceRoute.sh -@@ -3,11 +3,16 @@ - timeStamp=`date +%s` - - sourceRoute_config() { -- echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \ -- "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp -+ if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ] && \ -+ [ -n "$new_routers" ] && [ -n "$interface" ]; then -+ echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \ -+ "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp -+ fi - } - - sourceRoute_restore() { -- echo "remove" "$interface" > \ -- /var/run/vdsm/sourceRoutes/$timeStamp -+ if [ -n "$interface" ]; then -+ echo "remove" "$interface" > \ -+ /var/run/vdsm/sourceRoutes/$timeStamp -+ fi - } --- -1.8.3.1 - diff --git a/0011-Management-network-is-now-kept-in-main-routing-table.patch b/0011-Management-network-is-now-kept-in-main-routing-table.patch deleted file mode 100644 index be74165..0000000 --- a/0011-Management-network-is-now-kept-in-main-routing-table.patch +++ /dev/null @@ -1,324 +0,0 @@ -From 24dc35742d6a5e1da365bd43659752b394841ddb Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Thu, 1 Aug 2013 15:10:05 +0300 -Subject: [PATCH 11/13] Management network is now kept in main routing table - -Only the management network should add its default route -to the main routing table. Each NetDevice holds an IpConfig -instance who now holds defaultRoute='yes', 'no' or None. -Only the top level device will have a defaultRoute value. -When writing ifcfg files we check if we got a defaultRoute -value, if so we write it. - -Patch Set 7 changed the implementation so that only the top -level device has DEFROUTE=yes/no in its ifcfg file. - -Change-Id: I55c50269dd3d52fd058951200282c925a7014aca -Signed-off-by: Assaf Muller -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=984028 -Reviewed-on: http://gerrit.ovirt.org/17844 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Federico Simoncelli ---- - lib/vdsm/constants.py.in | 3 +++ - vdsm/configNetwork.py | 12 +++++++++--- - vdsm/netconf/__init__.py | 2 +- - vdsm/netconf/ifcfg.py | 48 ++++++++++++++++++++++++++++++++---------------- - vdsm/netmodels.py | 21 ++++++++++++++------- - vdsm/sourceRoute.py | 2 +- - 6 files changed, 60 insertions(+), 28 deletions(-) - -diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in -index bbbb625..cfea347 100644 ---- a/lib/vdsm/constants.py.in -+++ b/lib/vdsm/constants.py.in -@@ -22,6 +22,9 @@ - - import os - -+# VDSM management device -+MANAGEMENT_NETWORK = '@VDSMBRIDGE@' -+ - # SMBIOS manufacturer - SMBIOS_MANUFACTURER = '@SMBIOS_MANUFACTURER@' - SMBIOS_OSNAME = '@SMBIOS_OSNAME@' -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index fdb0b8f..155d22a 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -46,7 +46,7 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None, - bondingOptions=None, nics=None, mtu=None, ipaddr=None, - netmask=None, gateway=None, bootproto=None, - _netinfo=None, configurator=None, blockingdhcp=None, -- implicitBonding=None, **opts): -+ implicitBonding=None, defaultRoute=None, **opts): - """ - Constructs an object hierarchy that describes the network configuration - that is passed in the parameters. -@@ -66,6 +66,8 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None, - :param blockingdhcp: whether to acquire dhcp IP config in a synced manner. - :param implicitBonding: whether the bond's existance is tied to it's - master's. -+ :param defaultRoute: Should this network's gateway be set in the main -+ routing table? - - :returns: the top object of the hierarchy. - """ -@@ -101,7 +103,7 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None, - if topNetDev is None: - raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'Network defined without' - 'devices.') -- topNetDev.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway), -+ topNetDev.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway, defaultRoute), - bootproto=bootproto, - blocking=utils.tobool(blockingdhcp)) - return topNetDev -@@ -182,6 +184,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, - for nic in nics: - _validateInterNetworkCompatibility(_netinfo, vlan, nic, - bridged) -+ - logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," - " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", - network, vlan, bonding, nics, bondingOptions, -@@ -192,10 +195,13 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, - - bootproto = options.pop('bootproto', None) - -+ defaultRoute = network == constants.MANAGEMENT_NETWORK -+ - netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding, - bondingOptions, nics, mtu, ipaddr, netmask, - gateway, bootproto, _netinfo, configurator, -- **options) -+ defaultRoute=defaultRoute, **options) -+ - netEnt.configure(**options) - configurator.configureLibvirtNetwork(network, netEnt, - qosInbound=qosInbound, -diff --git a/vdsm/netconf/__init__.py b/vdsm/netconf/__init__.py -index c5227c2..d618522 100644 ---- a/vdsm/netconf/__init__.py -+++ b/vdsm/netconf/__init__.py -@@ -81,7 +81,7 @@ class Configurator(object): - DynamicSourceRoute.addInterfaceTracking(netEnt) - - def _removeSourceRoute(self, netEnt): -- _, _, _, bootproto, _ = netEnt.getIpConfig() -+ _, _, _, bootproto, _, _ = netEnt.getIpConfig() - if bootproto != 'dhcp' and netEnt.master is None: - logging.debug("Removing source route for device %s" % netEnt.name) - StaticSourceRoute(netEnt.name, self).remove() -diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py -index 140b538..5e6239e 100644 ---- a/vdsm/netconf/ifcfg.py -+++ b/vdsm/netconf/ifcfg.py -@@ -61,7 +61,7 @@ class Ifcfg(Configurator): - self._libvirtAdded = set() - - def configureBridge(self, bridge, **opts): -- ipaddr, netmask, gateway, bootproto, async = bridge.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, async, _ = bridge.getIpConfig() - self.configApplier.addBridge(bridge, **opts) - ifdown(bridge.name) - if bridge.port: -@@ -70,14 +70,14 @@ class Ifcfg(Configurator): - ifup(bridge.name, async) - - def configureVlan(self, vlan, **opts): -- ipaddr, netmask, gateway, bootproto, async = vlan.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, async, _ = vlan.getIpConfig() - self.configApplier.addVlan(vlan, **opts) - vlan.device.configure(**opts) - self._addSourceRoute(vlan, ipaddr, netmask, gateway, bootproto) - ifup(vlan.name, async) - - def configureBond(self, bond, **opts): -- ipaddr, netmask, gateway, bootproto, async = bond.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, async, _ = bond.getIpConfig() - self.configApplier.addBonding(bond, **opts) - if not netinfo.isVlanned(bond.name): - for slave in bond.slaves: -@@ -97,7 +97,7 @@ class Ifcfg(Configurator): - self.configureBond(bond) - - def configureNic(self, nic, **opts): -- ipaddr, netmask, gateway, bootproto, async = nic.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, async, _ = nic.getIpConfig() - self.configApplier.addNic(nic, **opts) - self._addSourceRoute(nic, ipaddr, netmask, gateway, bootproto) - if nic.bond is None: -@@ -445,9 +445,15 @@ class ConfigWriter(object): - logging.debug('ignoring restorecon error in case ' - 'SElinux is disabled', exc_info=True) - -+ @staticmethod -+ def _toIfcfgFormat(defaultRoute): -+ if defaultRoute is None: -+ return None -+ return 'yes' if defaultRoute else 'no' -+ - def _createConfFile(self, conf, name, ipaddr=None, netmask=None, -- gateway=None, bootproto=None, mtu=None, onboot='yes', -- **kwargs): -+ gateway=None, bootproto=None, mtu=None, -+ defaultRoute=None, onboot='yes', **kwargs): - """ Create ifcfg-* file with proper fields per device """ - cfg = self.CONFFILE_HEADER + '\n' - -@@ -467,6 +473,8 @@ class ConfigWriter(object): - cfg = cfg + 'BOOTPROTO=%s\n' % pipes.quote(bootproto) - if mtu: - cfg = cfg + 'MTU=%d\n' % mtu -+ if defaultRoute: -+ cfg = cfg + 'DEFROUTE=%s\n' % defaultRoute - cfg += 'NM_CONTROLLED=no\n' - BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', - 'force', 'blockingdhcp', -@@ -482,20 +490,24 @@ class ConfigWriter(object): - - def addBridge(self, bridge, **opts): - """ Create ifcfg-* file with proper fields for bridge """ -- ipaddr, netmask, gateway, bootproto, _ = bridge.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, _, defaultRoute = \ -+ bridge.getIpConfig() - conf = 'TYPE=Bridge\nDELAY=%s\n' % bridge.forwardDelay - self._createConfFile(conf, bridge.name, ipaddr, netmask, gateway, -- bootproto, bridge.mtu, **opts) -+ bootproto, bridge.mtu, -+ self._toIfcfgFormat(defaultRoute), **opts) - - def addVlan(self, vlan, **opts): - """ Create ifcfg-* file with proper fields for VLAN """ -- ipaddr, netmask, gateway, bootproto, _ = vlan.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, _, defaultRoute = \ -+ vlan.getIpConfig() - conf = 'VLAN=yes\n' - if vlan.bridge: - conf += 'BRIDGE=%s\n' % pipes.quote(vlan.bridge.name) - - self._createConfFile(conf, vlan.name, ipaddr, netmask, gateway, -- bootproto, vlan.mtu, **opts) -+ bootproto, vlan.mtu, -+ self._toIfcfgFormat(defaultRoute), **opts) - - def addBonding(self, bond, **opts): - """ Create ifcfg-* file with proper fields for bond """ -@@ -503,10 +515,10 @@ class ConfigWriter(object): - if bond.bridge: - conf += 'BRIDGE=%s\n' % pipes.quote(bond.bridge.name) - -- ipaddr, netmask, gateway, bootproto, mtu = \ -+ ipaddr, netmask, gateway, bootproto, mtu, defaultRoute = \ - self._getIfaceConfValues(bond, netinfo.NetInfo()) - self._createConfFile(conf, bond.name, ipaddr, netmask, gateway, -- bootproto, mtu, **opts) -+ bootproto, mtu, defaultRoute, **opts) - - # create the bonding device to avoid initscripts noise - if bond.name not in open(netinfo.BONDING_MASTERS).read().split(): -@@ -524,14 +536,16 @@ class ConfigWriter(object): - if nic.bond: - conf += 'MASTER=%s\nSLAVE=yes\n' % pipes.quote(nic.bond.name) - -- ipaddr, netmask, gateway, bootproto, mtu = \ -+ ipaddr, netmask, gateway, bootproto, mtu, defaultRoute = \ - self._getIfaceConfValues(nic, _netinfo) - self._createConfFile(conf, nic.name, ipaddr, netmask, gateway, -- bootproto, mtu, **opts) -+ bootproto, mtu, defaultRoute, **opts) - - @staticmethod - def _getIfaceConfValues(iface, _netinfo): -- ipaddr, netmask, gateway, bootproto, _ = iface.getIpConfig() -+ ipaddr, netmask, gateway, bootproto, _, defaultRoute = \ -+ iface.getIpConfig() -+ defaultRoute = ConfigWriter._toIfcfgFormat(defaultRoute) - mtu = iface.mtu - if _netinfo.ifaceUsers(iface.name): - confParams = netinfo.getIfaceCfg(iface.name) -@@ -540,11 +554,13 @@ class ConfigWriter(object): - netmask = confParams.get('NETMASK', None) - gateway = confParams.get('GATEWAY', None) - bootproto = confParams.get('BOOTPROTO', None) -+ if defaultRoute is None: -+ defaultRoute = confParams.get('DEFROUTE', None) - if not iface.mtu: - mtu = confParams.get('MTU', None) - if mtu: - mtu = int(mtu) -- return ipaddr, netmask, gateway, bootproto, mtu -+ return ipaddr, netmask, gateway, bootproto, mtu, defaultRoute - - def removeNic(self, nic): - cf = netinfo.NET_CONF_PREF + nic -diff --git a/vdsm/netmodels.py b/vdsm/netmodels.py -index 6368e36..fffba2a 100644 ---- a/vdsm/netmodels.py -+++ b/vdsm/netmodels.py -@@ -44,10 +44,12 @@ class NetDevice(object): - - def getIpConfig(self): - try: -- ipaddr, netmask, gateway, bootproto, async = self.ip.getConfig() -+ ipaddr, netmask, gateway, bootproto, async, defaultRoute = \ -+ self.ip.getConfig() - except AttributeError: -- ipaddr = netmask = gateway = bootproto = async = None -- return ipaddr, netmask, gateway, bootproto, async -+ ipaddr = netmask = gateway = bootproto = async = defaultRoute = \ -+ None -+ return ipaddr, netmask, gateway, bootproto, async, defaultRoute - - @property - def bridge(self): -@@ -260,7 +262,8 @@ class Bond(NetDevice): - - - class IPv4(object): -- def __init__(self, address=None, netmask=None, gateway=None): -+ def __init__(self, address=None, netmask=None, gateway=None, -+ defaultRoute=None): - if address: - if not netmask: - raise ConfigNetworkError(ne.ERR_BAD_ADDR, 'Must specify ' -@@ -277,9 +280,11 @@ class IPv4(object): - self.address = address - self.netmask = netmask - self.gateway = gateway -+ self.defaultRoute = defaultRoute - - def __repr__(self): -- return 'IPv4(%s, %s, %s)' % (self.address, self.netmask, self.gateway) -+ return 'IPv4(%s, %s, %s, %s)' % (self.address, self.netmask, -+ self.gateway, self.defaultRoute) - - @classmethod - def validateAddress(cls, address): -@@ -328,6 +333,8 @@ class IpConfig(object): - ipaddr = self.inet.address - netmask = self.inet.netmask - gateway = self.inet.gateway -+ defaultRoute = self.inet.defaultRoute - except AttributeError: -- ipaddr = netmask = gateway = None -- return ipaddr, netmask, gateway, self.bootproto, self.async -+ ipaddr = netmask = gateway = defaultRoute = None -+ return ipaddr, netmask, gateway, self.bootproto, self.async, \ -+ defaultRoute -diff --git a/vdsm/sourceRoute.py b/vdsm/sourceRoute.py -index bed5cd0..c05d066 100644 ---- a/vdsm/sourceRoute.py -+++ b/vdsm/sourceRoute.py -@@ -101,7 +101,7 @@ class DynamicSourceRoute(StaticSourceRoute): - - @staticmethod - def addInterfaceTracking(device): -- _, _, _, bootproto, _ = device.getIpConfig() -+ _, _, _, bootproto, _, _ = device.getIpConfig() - if bootproto == 'dhcp': - open(DynamicSourceRoute.getTrackingFilePath(device.name), 'a').\ - close() --- -1.8.3.1 - diff --git a/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch b/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch deleted file mode 100644 index 9e47e9e..0000000 --- a/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 46a360381ad8b2ffa121d90e718fb838352a123c Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Mon, 12 Aug 2013 14:23:28 +0300 -Subject: [PATCH 12/13] Only remove dhcp source routing if the removal reason - is "STOP" - -If the reason is FAIL then the IP configuration is not lost -and source routing should not be removed. Only STOP actually -removes the ip configuration from the device. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=995142 -Change-Id: Ie92a4b4a95e9f1a7855f3d276b4e4d5b8b4c6ad3 -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/17961 -Reviewed-by: Saggi Mizrahi -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/17963 ---- - vdsm/sourceRoute.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh -index bb8384e..8c60430 100755 ---- a/vdsm/sourceRoute.sh -+++ b/vdsm/sourceRoute.sh -@@ -11,7 +11,7 @@ sourceRoute_config() { - } - - sourceRoute_restore() { -- if [ -n "$interface" ]; then -+ if [ -n "$interface" ] && [ "$reason" == "STOP" ]; then - echo "remove" "$interface" > \ - /var/run/vdsm/sourceRoutes/$timeStamp - fi --- -1.8.3.1 - diff --git a/0013-image-use-successor-volume-size-when-merging.patch b/0013-image-use-successor-volume-size-when-merging.patch deleted file mode 100644 index 7894024..0000000 --- a/0013-image-use-successor-volume-size-when-merging.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 99290c2dd497b6447dd226ca20076073cb06449a Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Thu, 18 Jul 2013 13:41:15 -0400 -Subject: [PATCH 13/13] image: use successor volume size when merging - -Volumes in the same image chain might have different capacity since the -introduction of the disk resize feature. This means that when we merge -volumes the ancestor should get the new size from the successor in order -to be able to contain the additional data that we are collapsing. - -Change-Id: Ic0bfd2ffa080bf89709ae543043b52aad27eb759 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/17093 -Reviewed-by: Eduardo -Reviewed-on: http://gerrit.ovirt.org/18025 ---- - vdsm/storage/image.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py -index 2a9510d..9aa8fc7 100644 ---- a/vdsm/storage/image.py -+++ b/vdsm/storage/image.py -@@ -1000,7 +1000,7 @@ class Image: - # destination volume's parent parameters - newUUID = srcVol.volUUID + "_MERGE" - sdDom.createVolume( -- imgUUID=srcVolParams['imgUUID'], size=volParams['size'], -+ imgUUID=srcVolParams['imgUUID'], size=srcVolParams['size'], - volFormat=volParams['volFormat'], - preallocate=volParams['prealloc'], - diskType=volParams['disktype'], volUUID=newUUID, -@@ -1111,6 +1111,11 @@ class Image: - reqSize = min(accSize, imageApparentSize) * 1.1 - try: - # Start the actual merge image procedure -+ # IMPORTANT NOTE: volumes in the same image chain might have -+ # different capacity since the introduction of the disk resize -+ # feature. This means that when we merge volumes the ancestor -+ # should get the new size from the successor (in order to be -+ # able to contain the additional data that we are collapsing). - if dstParentUUID != sd.BLANK_UUID: - # The ancestor isn't a base volume of the chain. - self.log.info("Internal volume merge: src = %s dst = %s", --- -1.8.3.1 - diff --git a/0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch b/0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch deleted file mode 100644 index ed16d98..0000000 --- a/0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 578b323ad473aca9bc0a0bd8f99d0b5ab9a9296c Mon Sep 17 00:00:00 2001 -From: Deepak C Shetty -Date: Sun, 11 Aug 2013 00:21:59 +0530 -Subject: [PATCH 14/14] vdsm.spec: BZ 988299: Fix GlusterFS RPM dep to support - GlusterFS SD - -This patch fixes the GlusterFS RPM dependency needed by VDSM to -support Gluster Storage Domain feature. Recent GlusterFS RPM -re-packaging effort to better separate the client and server side -bits and availability of qemu with libgfapi support mark the -pre-req for this patch. These pre-req are now available in -F18/F19/RHEL6/Centos6 and above in the appropriate distro specific -repos. Also removing F17 dep as its End of life now. - -BZ 988299 has more details, with pointers to the community -discussions around these. - -Change-Id: If648feec92ed33f24f45550f016ac132a25e6923 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988299 -Signed-off-by: Deepak C Shetty -Reviewed-on: http://gerrit.ovirt.org/17994 -Reviewed-by: Bala.FA -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/18426 -Tested-by: Federico Simoncelli ---- - vdsm.spec.in | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 21b3565..74ad331 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -25,7 +25,7 @@ - %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d - %endif - --%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 -+%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 - %global with_gluster 1 - %endif - -@@ -198,6 +198,15 @@ Requires: policycoreutils >= 2.1.13-55 - Requires: systemd >= 197-1.fc18.2 - %endif - -+# GlusterFS client-side RPMs needed for Gluster SD -+%if 0%{?with_gluster} -+Requires: glusterfs >= 3.4.0 -+Requires: glusterfs-cli -+Requires: glusterfs-api -+Requires: glusterfs-fuse -+Requires: glusterfs-rdma -+%endif -+ - Requires: psmisc >= 22.6-15 - Requires: bridge-utils - Requires: sos --- -1.8.3.1 - diff --git a/sources b/sources index 7a9f675..4b8ec82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d5ce66e518d8538224f1845c17c6e86f vdsm-4.12.0.tar.gz +6b09314cd4aa11b102ea6187f1dcbd4f vdsm-4.12.1.tar.gz diff --git a/vdsm.spec b/vdsm.spec index d816491..653d84b 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,8 +45,8 @@ %endif Name: %{vdsm_name} -Version: 4.12.0 -Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} +Version: 4.12.1 +Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -61,22 +61,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -Patch1: 0001-mom-Require-latest-mom.patch -Patch2: 0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch -Patch3: 0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch -Patch4: 0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch -Patch5: 0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch -Patch6: 0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch -Patch7: 0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch -Patch8: 0008-Bump-requires-version-of-selinux-policy-targeted.patch -Patch9: 0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch -Patch10: 0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch -Patch11: 0011-Management-network-is-now-kept-in-main-routing-table.patch -Patch12: 0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch -Patch13: 0013-image-use-successor-volume-size-when-merging.patch -Patch14: 0014-vdsm.spec-BZ-988299-Fix-GlusterFS-RPM-dep-to-support.patch - - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -567,20 +551,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1335,6 +1305,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Aug 27 2013 Federico Simoncelli 4.12.1-1 +- update to 4.12.1 + * Thu Aug 22 2013 Federico Simoncelli 4.12.0-2 - Fix GlusterFS RPM dep to support GlusterFS SD (BZ#988299) From f49b65ba51db74d283afa29f324ab0c9d1995793 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Tue, 10 Sep 2013 14:57:32 +0200 Subject: [PATCH 049/126] update to vdsm-4.12.1-2 - systemd init: no need to stop conflicting services (BZ#999664) --- ...no-need-to-stop-conflicting-services.patch | 38 +++++++++++++++++++ vdsm.spec | 8 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0001-systemd-init-no-need-to-stop-conflicting-services.patch diff --git a/0001-systemd-init-no-need-to-stop-conflicting-services.patch b/0001-systemd-init-no-need-to-stop-conflicting-services.patch new file mode 100644 index 0000000..cd415d0 --- /dev/null +++ b/0001-systemd-init-no-need-to-stop-conflicting-services.patch @@ -0,0 +1,38 @@ +From 6bfb990b3711631ea2cd13fac243d3de9587e1da Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Tue, 10 Sep 2013 09:15:49 +0100 +Subject: [PATCH] systemd init: no need to stop conflicting services + +We use the explict systemd Conflicts= statement for that. + +This patch is sent only to the ovirt-3.3 branch, as in master branch we +already have an independent systemd service management. + +Bug-Url: https://bugzilla.redhat.com/999664 +Change-Id: I7b5469ce61ae8aca353c2c7345a8a719ab0e898f +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/19046 +Reviewed-by: Zhou Zheng Sheng +Reviewed-by: Yaniv Bronhaim +--- + vdsm/vdsmd.init.in | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in +index 56f07bd..b38791d 100755 +--- a/vdsm/vdsmd.init.in ++++ b/vdsm/vdsmd.init.in +@@ -186,7 +186,9 @@ start() { + local ret_val + "@PYTHON@" "@VDSMDIR@/hooks.pyc" before_vdsm_start + +- shutdown_conflicting_srv ++ if ! has_systemd; then ++ shutdown_conflicting_srv ++ fi + + if ! "@LIBEXECDIR@/vdsm-gencerts.sh" --check; then + printf $"Configuring a self-signed VDSM host certificate: " +-- +1.8.3.1 + diff --git a/vdsm.spec b/vdsm.spec index 653d84b..b3ff959 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.1 -Release: 1%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -61,6 +61,8 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz +Patch1: 0001-systemd-init-no-need-to-stop-conflicting-services.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -551,6 +553,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +%patch1 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1305,6 +1308,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Sep 10 2013 Federico Simoncelli 4.12.1-2 +- systemd init: no need to stop conflicting services (BZ#999664) + * Tue Aug 27 2013 Federico Simoncelli 4.12.1-1 - update to 4.12.1 From 878b10bada1a74bb6675935fc83031f16b6d5c30 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 8 Oct 2013 11:57:09 -0400 Subject: [PATCH 050/126] vdsm 4.12.1-3 - vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks (BZ#1007980) - Require libvirt that allows vmUpdateDevice (BZ#1001001) - imageSharing: return proper size in httpGetSize - vdsmd.init: Add service-is-managed in shutdown_conflicting_srv (BZ#1006842) --- ...ervice-is-managed-in-shutdown_confli.patch | 32 +++++++++++++ ...ng-return-proper-size-in-httpGetSize.patch | 47 +++++++++++++++++++ ...e-libvirt-that-allows-vmUpdateDevice.patch | 31 ++++++++++++ ...yingDriveInfo-extract-path-of-gluste.patch | 41 ++++++++++++++++ vdsm.spec | 16 ++++++- 5 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch create mode 100644 0003-imageSharing-return-proper-size-in-httpGetSize.patch create mode 100644 0004-Require-libvirt-that-allows-vmUpdateDevice.patch create mode 100644 0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch diff --git a/0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch b/0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch new file mode 100644 index 0000000..616a5b9 --- /dev/null +++ b/0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch @@ -0,0 +1,32 @@ +From cac71a74f4d4b91eac76be60c050632cfb2d9dba Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Thu, 12 Sep 2013 11:52:04 -0400 +Subject: [PATCH] vdsmd.init: Add service-is-managed in + shutdown_conflicting_srv + +We should not throw a stack trace if a service does not exist + +Change-Id: I8916a73c446ea2f296b66f5fcf133b07c2d7a66c +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1006842 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/19197 +Reviewed-by: Dan Kenigsberg +--- + vdsm/vdsmd.init.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in +index b38791d..482d2ec 100755 +--- a/vdsm/vdsmd.init.in ++++ b/vdsm/vdsmd.init.in +@@ -83,6 +83,7 @@ shutdown_conflicting_srv() { + local srv + + for srv in ${CONFLICTING_SERVICES}; do ++ "$VDSM_TOOL" service-is-managed "$srv" >/dev/null 2>&1 || continue + "$VDSM_TOOL" service-disable "$srv" + if "$VDSM_TOOL" service-status "$srv" > /dev/null 2>&1; then + if [ "$srv" = "libvirt-guests" ]; then +-- +1.8.3.1 + diff --git a/0003-imageSharing-return-proper-size-in-httpGetSize.patch b/0003-imageSharing-return-proper-size-in-httpGetSize.patch new file mode 100644 index 0000000..4a10358 --- /dev/null +++ b/0003-imageSharing-return-proper-size-in-httpGetSize.patch @@ -0,0 +1,47 @@ +From 5751ff1a2390c0145d4c0f48345ab9b062afd648 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Fri, 13 Sep 2013 11:07:46 -0400 +Subject: [PATCH] imageSharing: return proper size in httpGetSize + +When importing images from OpenStack Glance the Content-Length is 0 +so we need to override the value with the content of the custom header +X-Image-Meta-Size. + +Change-Id: Icbcc601767d7f5b044b9e0e32f35abccdfb5746b +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/19222 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/19284 +--- + vdsm/storage/imageSharing.py | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/vdsm/storage/imageSharing.py b/vdsm/storage/imageSharing.py +index 5db0a4e..26f299a 100644 +--- a/vdsm/storage/imageSharing.py ++++ b/vdsm/storage/imageSharing.py +@@ -29,11 +29,18 @@ def httpGetSize(methodArgs): + headers = curlImgWrap.head(methodArgs.get('url'), + methodArgs.get("headers", {})) + ++ size = None ++ + if 'Content-Length' in headers: + size = int(headers['Content-Length']) +- elif 'X-Image-Meta-Size' in headers: +- size = int(headers['X-Image-Meta-Size']) +- else: ++ ++ # OpenStack Glance returns Content-Length = 0 so we need to ++ # override the value with the content of the custom header ++ # X-Image-Meta-Size. ++ if 'X-Image-Meta-Size' in headers: ++ size = max(size, int(headers['X-Image-Meta-Size'])) ++ ++ if size is None: + raise RuntimeError("Unable to determine image size") + + return size +-- +1.8.3.1 + diff --git a/0004-Require-libvirt-that-allows-vmUpdateDevice.patch b/0004-Require-libvirt-that-allows-vmUpdateDevice.patch new file mode 100644 index 0000000..cb1d0ce --- /dev/null +++ b/0004-Require-libvirt-that-allows-vmUpdateDevice.patch @@ -0,0 +1,31 @@ +From 61dbd7ff62551b368301de89cd72d541d36d9b8e Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Fri, 6 Sep 2013 20:25:59 +0100 +Subject: [PATCH] Require libvirt that allows vmUpdateDevice + +Change-Id: I50b9af97887c2e00e87d34620153a82e28c2a310 +Bug-Url: https://bugzilla.redhat.com/1001001 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/18937 +Reviewed-by: Antoni Segura Puimedon +Reviewed-on: http://gerrit.ovirt.org/18950 +--- + vdsm.spec.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 74ad331..b4218a6 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -117,7 +117,7 @@ Requires: libvirt-daemon-driver-nwfilter + Requires: libvirt-daemon-driver-qemu + %else + %if 0%{?rhel} +-Requires: libvirt >= 0.10.2-18.el6_4.4 ++Requires: libvirt >= 0.10.2-18.el6_4.10 + %else + Requires: libvirt >= 1.0.2-1 + %endif +-- +1.8.3.1 + diff --git a/0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch b/0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch new file mode 100644 index 0000000..060889c --- /dev/null +++ b/0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch @@ -0,0 +1,41 @@ +From e5b3bc3b4c6e613e25988294ab3306b88deb061d Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Mon, 7 Oct 2013 01:46:54 +0100 +Subject: [PATCH] vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks + +_getUnderlyingDriveInfo() is broken by design. It has no reliable means +to match Engine-requested devices with libvirt-produced ones. As a +heuristic, it uses the device's as matching key. However, before this +patch, it failed to extract the path from the xml definition of gluster +disks. + +Bug-Url: https://bugzilla.redhat.com/1007980 +Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/19906 +Reviewed-by: Vinzenz Feenstra +Reviewed-by: Michal Skrivanek +Reviewed-by: Martin Polednik +Tested-by: Martin Polednik +Reviewed-on: http://gerrit.ovirt.org/19950 +--- + vdsm/vm.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index f0690b7..662eacc 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -4579,7 +4579,8 @@ class Vm(object): + sources = x.getElementsByTagName('source') + if sources: + devPath = (sources[0].getAttribute('file') or +- sources[0].getAttribute('dev')) ++ sources[0].getAttribute('dev') or ++ sources[0].getAttribute('name')) + else: + devPath = '' + +-- +1.8.3.1 + diff --git a/vdsm.spec b/vdsm.spec index b3ff959..c501e8a 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.1 -Release: 2%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 3%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -62,6 +62,10 @@ Url: http://www.ovirt.org/wiki/Vdsm Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz Patch1: 0001-systemd-init-no-need-to-stop-conflicting-services.patch +Patch2: 0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch +Patch3: 0003-imageSharing-return-proper-size-in-httpGetSize.patch +Patch4: 0004-Require-libvirt-that-allows-vmUpdateDevice.patch +Patch5: 0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -554,6 +558,10 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1308,6 +1316,12 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Oct 08 2013 Douglas Schilling Landgraf 4.12.1-3 +- vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks (BZ#1007980) +- Require libvirt that allows vmUpdateDevice (BZ#1001001) +- imageSharing: return proper size in httpGetSize +- vdsmd.init: Add service-is-managed in shutdown_conflicting_srv (BZ#1006842) + * Tue Sep 10 2013 Federico Simoncelli 4.12.1-2 - systemd init: no need to stop conflicting services (BZ#999664) From bf7d37c535f66e4e5248820280a46bcc2e607f87 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 10 Oct 2013 05:21:49 -0400 Subject: [PATCH 051/126] vdsm-4.12.1-4 - remoteFileHandler: Add create exclusive option for truncateFile (BZ#979193) - oop: improve safety for truncateFile --- ...r-Add-create-exclusive-option-for-tr.patch | 41 +++++++ ...-oop-improve-safety-for-truncateFile.patch | 105 ++++++++++++++++++ vdsm.spec | 11 +- 3 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch create mode 100644 0007-oop-improve-safety-for-truncateFile.patch diff --git a/0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch b/0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch new file mode 100644 index 0000000..bfb8e16 --- /dev/null +++ b/0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch @@ -0,0 +1,41 @@ +From e086b7a3d1de694d3335304442a3564c277acc30 Mon Sep 17 00:00:00 2001 +From: Yeela Kaplan +Date: Mon, 9 Sep 2013 11:04:39 +0200 +Subject: [PATCH] remoteFileHandler: Add create exclusive option for + truncateFile + +Change-Id: Idfeff348e0f6fc240954e7d304b794dd99ea098c +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193 +Signed-off-by: Yeela Kaplan +Reviewed-on: http://gerrit.ovirt.org/19022 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/20062 +Reviewed-by: Federico Simoncelli +Tested-by: Federico Simoncelli +--- + vdsm/storage/remoteFileHandler.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py +index abe9915..47b237b 100644 +--- a/vdsm/storage/remoteFileHandler.py ++++ b/vdsm/storage/remoteFileHandler.py +@@ -334,8 +334,13 @@ def directWriteLines(path, lines): + return f.writelines(lines) + + +-def truncateFile(path, size, mode=None): +- with open(path, "w") as f: ++def truncateFile(path, size, mode=None, creatExcl=False): ++ flags = os.O_CREAT | os.O_WRONLY ++ if creatExcl: ++ flags |= os.O_EXCL ++ ++ fd = os.open(path, flags) ++ with os.fdopen(fd, 'w') as f: + if mode is not None: + os.chmod(path, mode) + f.truncate(size) +-- +1.8.3.1 + diff --git a/0007-oop-improve-safety-for-truncateFile.patch b/0007-oop-improve-safety-for-truncateFile.patch new file mode 100644 index 0000000..b01203b --- /dev/null +++ b/0007-oop-improve-safety-for-truncateFile.patch @@ -0,0 +1,105 @@ +From 22b94817d1647e2bfdce66a24d0c25ead47fdedc Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Wed, 9 Oct 2013 15:03:25 -0400 +Subject: [PATCH] oop: improve safety for truncateFile + +In order to make truncateFile safer and to avoid any confusion on its +behavior: + +* a new comment has been added mentioning O_TRUNC and "w" to avoid any + future mistake in this area +* a new test has been added to check the expected outcomes +* the "w" mode has been removed from truncateFile (used in os.fdopen) + to prevent any future reconversion to open(path, "w") +* the risk of a file descriptor leak (for a failing os.fdopen call) + has been removed using the relevant posix calls + +Change-Id: Ib71b53498c7bc4ea7a1ab725feb18bc5929f8c85 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/20046 +Reviewed-by: Nir Soffer +Reviewed-by: Sergey Gotliv +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/20063 +--- + tests/remoteFileHandlerTests.py | 28 ++++++++++++++++++++++++++++ + vdsm/storage/remoteFileHandler.py | 14 +++++++++++--- + 2 files changed, 39 insertions(+), 3 deletions(-) + +diff --git a/tests/remoteFileHandlerTests.py b/tests/remoteFileHandlerTests.py +index 544ec28..a2ca574 100644 +--- a/tests/remoteFileHandlerTests.py ++++ b/tests/remoteFileHandlerTests.py +@@ -18,6 +18,8 @@ + # Refer to the README and COPYING files for full details of the license + # + import os ++import string ++import tempfile + from vdsm import utils + + from testrunner import VdsmTestCase as TestCaseBase +@@ -69,3 +71,29 @@ class PoolHandlerTests(TestCaseBase): + test = lambda: self.assertFalse(os.path.exists(procPath)) + + utils.retry(test, AssertionError, timeout=4, sleep=0.1) ++ ++ ++class RemoteFileHandlerFunctionTests(TestCaseBase): ++ def testTruncateFile(self): ++ fd, path = tempfile.mkstemp() ++ try: ++ os.write(fd, string.ascii_uppercase) ++ os.close(fd) ++ ++ # Verifying content ++ data = string.ascii_uppercase ++ self.assertEquals(data, file(path).read()) ++ ++ # Testing truncate to a larger size ++ data = string.ascii_uppercase + chr(0) * 16 ++ ++ rhandler.truncateFile(path, len(data)) ++ self.assertEquals(data, file(path).read()) ++ ++ # Testing truncate to a smaller size ++ data = string.ascii_uppercase ++ ++ rhandler.truncateFile(path, len(data)) ++ self.assertEquals(data, file(path).read()) ++ finally: ++ os.unlink(path) +diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py +index 47b237b..3a22bc4 100644 +--- a/vdsm/storage/remoteFileHandler.py ++++ b/vdsm/storage/remoteFileHandler.py +@@ -335,15 +335,23 @@ def directWriteLines(path, lines): + + + def truncateFile(path, size, mode=None, creatExcl=False): ++ # NOTE: Under no circumstance you should add the O_TRUNC ++ # flag here. We rely on the fact that the file content is ++ # not deleted when truncating to a larger size. ++ # Please also note that the "w" option used in open/file ++ # contains O_TRUNC and therefore should not be used here. + flags = os.O_CREAT | os.O_WRONLY ++ + if creatExcl: + flags |= os.O_EXCL + + fd = os.open(path, flags) +- with os.fdopen(fd, 'w') as f: ++ try: + if mode is not None: +- os.chmod(path, mode) +- f.truncate(size) ++ os.fchmod(fd, mode) ++ os.ftruncate(fd, size) ++ finally: ++ os.close(fd) + + + def readLines(path): +-- +1.8.3.1 + diff --git a/vdsm.spec b/vdsm.spec index c501e8a..f494557 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.1 -Release: 3%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -66,6 +66,8 @@ Patch2: 0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch Patch3: 0003-imageSharing-return-proper-size-in-httpGetSize.patch Patch4: 0004-Require-libvirt-that-allows-vmUpdateDevice.patch Patch5: 0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch +Patch6: 0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch +Patch7: 0007-oop-improve-safety-for-truncateFile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -562,6 +564,9 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1316,6 +1321,10 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Thu Oct 10 2013 Douglas Schilling Landgraf 4.12.1-4 +- remoteFileHandler: Add create exclusive option for truncateFile (BZ#979193) +- oop: improve safety for truncateFile + * Tue Oct 08 2013 Douglas Schilling Landgraf 4.12.1-3 - vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks (BZ#1007980) - Require libvirt that allows vmUpdateDevice (BZ#1001001) From 03249a2f5a853ef12c05851bebe70d86b5e8dfea Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 30 Oct 2013 10:00:12 -0400 Subject: [PATCH 052/126] Fix broken hostname dep on rawhide --- vdsm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index f494557..8245a38 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.12.1 -Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release} +Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -240,7 +240,7 @@ Requires: %{name}-python = %{version}-%{release} Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 -Requires(post): /bin/hostname +Requires(post): hostname Requires(post): policycoreutils-python Requires(preun): policycoreutils-python @@ -1321,6 +1321,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Wed Oct 30 2013 Cole Robinson - 4.12.1-5 +- Fix broken hostname dep on rawhide + * Thu Oct 10 2013 Douglas Schilling Landgraf 4.12.1-4 - remoteFileHandler: Add create exclusive option for truncateFile (BZ#979193) - oop: improve safety for truncateFile From 8fc34a90c2101702b595a070f2792aa9e16967b7 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 5 Nov 2013 11:42:37 -0500 Subject: [PATCH 053/126] update to 4.13.0-9 --- ...no-need-to-stop-conflicting-services.patch | 38 ------ ...ervice-is-managed-in-shutdown_confli.patch | 32 ----- ...ng-return-proper-size-in-httpGetSize.patch | 47 ------- ...e-libvirt-that-allows-vmUpdateDevice.patch | 31 ----- ...yingDriveInfo-extract-path-of-gluste.patch | 41 ------- ...r-Add-create-exclusive-option-for-tr.patch | 41 ------- ...-oop-improve-safety-for-truncateFile.patch | 105 ---------------- sources | 2 +- vdsm.spec | 116 ++++++++++-------- 9 files changed, 63 insertions(+), 390 deletions(-) delete mode 100644 0001-systemd-init-no-need-to-stop-conflicting-services.patch delete mode 100644 0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch delete mode 100644 0003-imageSharing-return-proper-size-in-httpGetSize.patch delete mode 100644 0004-Require-libvirt-that-allows-vmUpdateDevice.patch delete mode 100644 0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch delete mode 100644 0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch delete mode 100644 0007-oop-improve-safety-for-truncateFile.patch diff --git a/0001-systemd-init-no-need-to-stop-conflicting-services.patch b/0001-systemd-init-no-need-to-stop-conflicting-services.patch deleted file mode 100644 index cd415d0..0000000 --- a/0001-systemd-init-no-need-to-stop-conflicting-services.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6bfb990b3711631ea2cd13fac243d3de9587e1da Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 10 Sep 2013 09:15:49 +0100 -Subject: [PATCH] systemd init: no need to stop conflicting services - -We use the explict systemd Conflicts= statement for that. - -This patch is sent only to the ovirt-3.3 branch, as in master branch we -already have an independent systemd service management. - -Bug-Url: https://bugzilla.redhat.com/999664 -Change-Id: I7b5469ce61ae8aca353c2c7345a8a719ab0e898f -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/19046 -Reviewed-by: Zhou Zheng Sheng -Reviewed-by: Yaniv Bronhaim ---- - vdsm/vdsmd.init.in | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in -index 56f07bd..b38791d 100755 ---- a/vdsm/vdsmd.init.in -+++ b/vdsm/vdsmd.init.in -@@ -186,7 +186,9 @@ start() { - local ret_val - "@PYTHON@" "@VDSMDIR@/hooks.pyc" before_vdsm_start - -- shutdown_conflicting_srv -+ if ! has_systemd; then -+ shutdown_conflicting_srv -+ fi - - if ! "@LIBEXECDIR@/vdsm-gencerts.sh" --check; then - printf $"Configuring a self-signed VDSM host certificate: " --- -1.8.3.1 - diff --git a/0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch b/0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch deleted file mode 100644 index 616a5b9..0000000 --- a/0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch +++ /dev/null @@ -1,32 +0,0 @@ -From cac71a74f4d4b91eac76be60c050632cfb2d9dba Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Thu, 12 Sep 2013 11:52:04 -0400 -Subject: [PATCH] vdsmd.init: Add service-is-managed in - shutdown_conflicting_srv - -We should not throw a stack trace if a service does not exist - -Change-Id: I8916a73c446ea2f296b66f5fcf133b07c2d7a66c -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1006842 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/19197 -Reviewed-by: Dan Kenigsberg ---- - vdsm/vdsmd.init.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in -index b38791d..482d2ec 100755 ---- a/vdsm/vdsmd.init.in -+++ b/vdsm/vdsmd.init.in -@@ -83,6 +83,7 @@ shutdown_conflicting_srv() { - local srv - - for srv in ${CONFLICTING_SERVICES}; do -+ "$VDSM_TOOL" service-is-managed "$srv" >/dev/null 2>&1 || continue - "$VDSM_TOOL" service-disable "$srv" - if "$VDSM_TOOL" service-status "$srv" > /dev/null 2>&1; then - if [ "$srv" = "libvirt-guests" ]; then --- -1.8.3.1 - diff --git a/0003-imageSharing-return-proper-size-in-httpGetSize.patch b/0003-imageSharing-return-proper-size-in-httpGetSize.patch deleted file mode 100644 index 4a10358..0000000 --- a/0003-imageSharing-return-proper-size-in-httpGetSize.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5751ff1a2390c0145d4c0f48345ab9b062afd648 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Fri, 13 Sep 2013 11:07:46 -0400 -Subject: [PATCH] imageSharing: return proper size in httpGetSize - -When importing images from OpenStack Glance the Content-Length is 0 -so we need to override the value with the content of the custom header -X-Image-Meta-Size. - -Change-Id: Icbcc601767d7f5b044b9e0e32f35abccdfb5746b -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/19222 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/19284 ---- - vdsm/storage/imageSharing.py | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/vdsm/storage/imageSharing.py b/vdsm/storage/imageSharing.py -index 5db0a4e..26f299a 100644 ---- a/vdsm/storage/imageSharing.py -+++ b/vdsm/storage/imageSharing.py -@@ -29,11 +29,18 @@ def httpGetSize(methodArgs): - headers = curlImgWrap.head(methodArgs.get('url'), - methodArgs.get("headers", {})) - -+ size = None -+ - if 'Content-Length' in headers: - size = int(headers['Content-Length']) -- elif 'X-Image-Meta-Size' in headers: -- size = int(headers['X-Image-Meta-Size']) -- else: -+ -+ # OpenStack Glance returns Content-Length = 0 so we need to -+ # override the value with the content of the custom header -+ # X-Image-Meta-Size. -+ if 'X-Image-Meta-Size' in headers: -+ size = max(size, int(headers['X-Image-Meta-Size'])) -+ -+ if size is None: - raise RuntimeError("Unable to determine image size") - - return size --- -1.8.3.1 - diff --git a/0004-Require-libvirt-that-allows-vmUpdateDevice.patch b/0004-Require-libvirt-that-allows-vmUpdateDevice.patch deleted file mode 100644 index cb1d0ce..0000000 --- a/0004-Require-libvirt-that-allows-vmUpdateDevice.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 61dbd7ff62551b368301de89cd72d541d36d9b8e Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Fri, 6 Sep 2013 20:25:59 +0100 -Subject: [PATCH] Require libvirt that allows vmUpdateDevice - -Change-Id: I50b9af97887c2e00e87d34620153a82e28c2a310 -Bug-Url: https://bugzilla.redhat.com/1001001 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/18937 -Reviewed-by: Antoni Segura Puimedon -Reviewed-on: http://gerrit.ovirt.org/18950 ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 74ad331..b4218a6 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -117,7 +117,7 @@ Requires: libvirt-daemon-driver-nwfilter - Requires: libvirt-daemon-driver-qemu - %else - %if 0%{?rhel} --Requires: libvirt >= 0.10.2-18.el6_4.4 -+Requires: libvirt >= 0.10.2-18.el6_4.10 - %else - Requires: libvirt >= 1.0.2-1 - %endif --- -1.8.3.1 - diff --git a/0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch b/0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch deleted file mode 100644 index 060889c..0000000 --- a/0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e5b3bc3b4c6e613e25988294ab3306b88deb061d Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Mon, 7 Oct 2013 01:46:54 +0100 -Subject: [PATCH] vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks - -_getUnderlyingDriveInfo() is broken by design. It has no reliable means -to match Engine-requested devices with libvirt-produced ones. As a -heuristic, it uses the device's as matching key. However, before this -patch, it failed to extract the path from the xml definition of gluster -disks. - -Bug-Url: https://bugzilla.redhat.com/1007980 -Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/19906 -Reviewed-by: Vinzenz Feenstra -Reviewed-by: Michal Skrivanek -Reviewed-by: Martin Polednik -Tested-by: Martin Polednik -Reviewed-on: http://gerrit.ovirt.org/19950 ---- - vdsm/vm.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index f0690b7..662eacc 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -4579,7 +4579,8 @@ class Vm(object): - sources = x.getElementsByTagName('source') - if sources: - devPath = (sources[0].getAttribute('file') or -- sources[0].getAttribute('dev')) -+ sources[0].getAttribute('dev') or -+ sources[0].getAttribute('name')) - else: - devPath = '' - --- -1.8.3.1 - diff --git a/0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch b/0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch deleted file mode 100644 index bfb8e16..0000000 --- a/0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e086b7a3d1de694d3335304442a3564c277acc30 Mon Sep 17 00:00:00 2001 -From: Yeela Kaplan -Date: Mon, 9 Sep 2013 11:04:39 +0200 -Subject: [PATCH] remoteFileHandler: Add create exclusive option for - truncateFile - -Change-Id: Idfeff348e0f6fc240954e7d304b794dd99ea098c -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193 -Signed-off-by: Yeela Kaplan -Reviewed-on: http://gerrit.ovirt.org/19022 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/20062 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/storage/remoteFileHandler.py | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py -index abe9915..47b237b 100644 ---- a/vdsm/storage/remoteFileHandler.py -+++ b/vdsm/storage/remoteFileHandler.py -@@ -334,8 +334,13 @@ def directWriteLines(path, lines): - return f.writelines(lines) - - --def truncateFile(path, size, mode=None): -- with open(path, "w") as f: -+def truncateFile(path, size, mode=None, creatExcl=False): -+ flags = os.O_CREAT | os.O_WRONLY -+ if creatExcl: -+ flags |= os.O_EXCL -+ -+ fd = os.open(path, flags) -+ with os.fdopen(fd, 'w') as f: - if mode is not None: - os.chmod(path, mode) - f.truncate(size) --- -1.8.3.1 - diff --git a/0007-oop-improve-safety-for-truncateFile.patch b/0007-oop-improve-safety-for-truncateFile.patch deleted file mode 100644 index b01203b..0000000 --- a/0007-oop-improve-safety-for-truncateFile.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 22b94817d1647e2bfdce66a24d0c25ead47fdedc Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Wed, 9 Oct 2013 15:03:25 -0400 -Subject: [PATCH] oop: improve safety for truncateFile - -In order to make truncateFile safer and to avoid any confusion on its -behavior: - -* a new comment has been added mentioning O_TRUNC and "w" to avoid any - future mistake in this area -* a new test has been added to check the expected outcomes -* the "w" mode has been removed from truncateFile (used in os.fdopen) - to prevent any future reconversion to open(path, "w") -* the risk of a file descriptor leak (for a failing os.fdopen call) - has been removed using the relevant posix calls - -Change-Id: Ib71b53498c7bc4ea7a1ab725feb18bc5929f8c85 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/20046 -Reviewed-by: Nir Soffer -Reviewed-by: Sergey Gotliv -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/20063 ---- - tests/remoteFileHandlerTests.py | 28 ++++++++++++++++++++++++++++ - vdsm/storage/remoteFileHandler.py | 14 +++++++++++--- - 2 files changed, 39 insertions(+), 3 deletions(-) - -diff --git a/tests/remoteFileHandlerTests.py b/tests/remoteFileHandlerTests.py -index 544ec28..a2ca574 100644 ---- a/tests/remoteFileHandlerTests.py -+++ b/tests/remoteFileHandlerTests.py -@@ -18,6 +18,8 @@ - # Refer to the README and COPYING files for full details of the license - # - import os -+import string -+import tempfile - from vdsm import utils - - from testrunner import VdsmTestCase as TestCaseBase -@@ -69,3 +71,29 @@ class PoolHandlerTests(TestCaseBase): - test = lambda: self.assertFalse(os.path.exists(procPath)) - - utils.retry(test, AssertionError, timeout=4, sleep=0.1) -+ -+ -+class RemoteFileHandlerFunctionTests(TestCaseBase): -+ def testTruncateFile(self): -+ fd, path = tempfile.mkstemp() -+ try: -+ os.write(fd, string.ascii_uppercase) -+ os.close(fd) -+ -+ # Verifying content -+ data = string.ascii_uppercase -+ self.assertEquals(data, file(path).read()) -+ -+ # Testing truncate to a larger size -+ data = string.ascii_uppercase + chr(0) * 16 -+ -+ rhandler.truncateFile(path, len(data)) -+ self.assertEquals(data, file(path).read()) -+ -+ # Testing truncate to a smaller size -+ data = string.ascii_uppercase -+ -+ rhandler.truncateFile(path, len(data)) -+ self.assertEquals(data, file(path).read()) -+ finally: -+ os.unlink(path) -diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py -index 47b237b..3a22bc4 100644 ---- a/vdsm/storage/remoteFileHandler.py -+++ b/vdsm/storage/remoteFileHandler.py -@@ -335,15 +335,23 @@ def directWriteLines(path, lines): - - - def truncateFile(path, size, mode=None, creatExcl=False): -+ # NOTE: Under no circumstance you should add the O_TRUNC -+ # flag here. We rely on the fact that the file content is -+ # not deleted when truncating to a larger size. -+ # Please also note that the "w" option used in open/file -+ # contains O_TRUNC and therefore should not be used here. - flags = os.O_CREAT | os.O_WRONLY -+ - if creatExcl: - flags |= os.O_EXCL - - fd = os.open(path, flags) -- with os.fdopen(fd, 'w') as f: -+ try: - if mode is not None: -- os.chmod(path, mode) -- f.truncate(size) -+ os.fchmod(fd, mode) -+ os.ftruncate(fd, size) -+ finally: -+ os.close(fd) - - - def readLines(path): --- -1.8.3.1 - diff --git a/sources b/sources index 4b8ec82..f7155f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6b09314cd4aa11b102ea6187f1dcbd4f vdsm-4.12.1.tar.gz +142e847e85f23233dfdfef601b3badbb vdsm-4.13.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 8245a38..330a2e8 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,8 +45,8 @@ %endif Name: %{vdsm_name} -Version: 4.12.1 -Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release} +Version: 4.13.0 +Release: 9%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -61,14 +61,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -Patch1: 0001-systemd-init-no-need-to-stop-conflicting-services.patch -Patch2: 0002-vdsmd.init-Add-service-is-managed-in-shutdown_confli.patch -Patch3: 0003-imageSharing-return-proper-size-in-httpGetSize.patch -Patch4: 0004-Require-libvirt-that-allows-vmUpdateDevice.patch -Patch5: 0005-vm.Vm._getUnderlyingDriveInfo-extract-path-of-gluste.patch -Patch6: 0006-remoteFileHandler-Add-create-exclusive-option-for-tr.patch -Patch7: 0007-oop-improve-safety-for-truncateFile.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -118,6 +110,7 @@ Requires: ntp Requires: iproute Requires: python-netaddr Requires: python-inotify +Requires: python-argparse Requires: python-ethtool >= 0.6-3 Requires: rpm-python Requires: nfs-utils @@ -139,7 +132,7 @@ Requires: libvirt-daemon-driver-nwfilter Requires: libvirt-daemon-driver-qemu %else %if 0%{?rhel} -Requires: libvirt >= 0.10.2-18.el6_4.4 +Requires: libvirt >= 0.10.2-18.el6_4.10 %else Requires: libvirt >= 1.0.2-1 %endif @@ -204,15 +197,14 @@ Requires: kernel >= 3.6 Requires: sanlock >= 2.4-2, sanlock-python Requires: policycoreutils-python Requires: sed >= 4.2.1-10 -Requires: selinux-policy-targeted >= 3.10.0-149 +Requires: ed Requires: lvm2 >= 2.02.95 -%endif %if 0%{?fedora} >= 18 %if 0%{?fedora} >= 19 -Requires: selinux-policy-targeted >= 3.12.1-69 +Requires: selinux-policy-targeted >= 3.12.1-71 %else -Requires: selinux-policy-targeted >= 3.11.1-100 +Requires: selinux-policy-targeted >= 3.11.1-103 %endif # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is # disabled we now require the version 2.1.13-55 (or newer) of Fedora. @@ -220,6 +212,8 @@ Requires: policycoreutils >= 2.1.13-55 Requires: systemd >= 197-1.fc18.2 %endif +%endif + # GlusterFS client-side RPMs needed for Gluster SD %if 0%{?with_gluster} Requires: glusterfs >= 3.4.0 @@ -326,6 +320,8 @@ Manager. Summary: Creates a sub-process in simpler safer manner. BuildRequires: python2-devel +Provides: python-cpopen = %{version}-%{release} +Obsoletes: python-cpopen %description python-cpopen Python package for creating sub-process in simpler and safer manner by using C @@ -397,7 +393,9 @@ Summary: Disables MAC spoofing filtering BuildArch: noarch %description hook-macspoof -VDSM hook that disables mac spoof filtering on all the of the VM's interfaces. +VDSM hooks which allow to disable mac spoof filtering +either on all the of the VM's interfaces or on +specific vnics. %package hook-fileinject Summary: Allow uploading file to VMs disk @@ -547,10 +545,7 @@ Summary: Gluster Plugin for VDSM BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: glusterfs >= 3.4.0 Requires: glusterfs-server -Requires: glusterfs-fuse -Requires: glusterfs-rdma Requires: python-magic %description gluster @@ -559,14 +554,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 - %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -590,23 +577,22 @@ rm -rf %{buildroot} make DESTDIR=%{buildroot} install # Install the respawn utility -install -Dm 0755 vdsm/respawn \ +install -Dm 0755 init/sysvinit/respawn \ %{buildroot}%{_datadir}/%{vdsm_name}/respawn # Install the lvm rules -install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ +install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf %if 0%{?with_systemd} -# Install the systemd scripts -install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd -install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service -install -Dm 0644 vdsm/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service +install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/lib/systemd/systemd-vdsmd +install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service -install -Dm 0644 vdsm/vdsm-restore-net-config.service \ +install -Dm 0644 init/systemd/vdsm-restore-net-config.service \ %{buildroot}%{_unitdir}/vdsm-restore-net-config.service install -Dm 0755 vdsm_reg/vdsm-reg.init \ %{buildroot}/lib/systemd/systemd-vdsm-reg @@ -616,16 +602,16 @@ install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf %else # Install the SysV init scripts -install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd -install -Dm 0755 vdsm/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd +install -Dm 0755 init/sysvinit/vdsmd.init %{buildroot}%{_initrddir}/vdsmd +install -Dm 0755 init/sysvinit/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg -install -Dm 0755 vdsm/vdsm-restore-net-config.init \ +install -Dm 0755 init/sysvinit/vdsm-restore-net-config.init \ %{buildroot}%{_initrddir}/vdsm-restore-net-config %endif %if 0%{?with_tmpfiles_macro} -install -Dm 0644 vdsm/vdsm-tmpfiles.d.conf \ +install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf %endif @@ -683,6 +669,11 @@ if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd /sbin/chkconfig --add supervdsmd /sbin/chkconfig --add vdsm-restore-net-config + + # drop this ugly hack when selinux-policy-3.7.19-195.el6.13 is released + /usr/sbin/semanage fcontext -a -s system_u -t virt_var_run_t -r s0 \ + '/var/run/vdsm(/.*)?' + /sbin/restorecon /var/run/vdsm fi %else %if 0%{?with_systemd} @@ -758,24 +749,30 @@ exit 0 %endif %postun -%if 0%{?rhel} if [ "$1" -ge 1 ]; then - /sbin/service vdsmd condrestart > /dev/null 2>&1 - /sbin/service supervdsmd condrestart > /dev/null 2>&1 + supervdsmd_start_required='no' + vdsmd_start_required='no' + if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 + vdsmd_start_required='yes' + fi + if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 + supervdsmd_start_required='yes' + fi + if %{_bindir}/vdsm-tool libvirt-configure | grep -q 'is done.'; then + if %{_bindir}/vdsm-tool service-status libvirtd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-restart libvirtd >/dev/null 2>&1 + fi + fi + if [ "${supervdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 + fi + if [ "${vdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 + fi fi exit 0 -%else -%if 0%{?with_systemd_macros} -%systemd_postun_with_restart vdsmd.service -%systemd_postun_with_restart supervdsmd.service -%else -if [ "$1" -ge 1 ] ; then - /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : - /bin/systemctl try-restart supervdsmd.service >/dev/null 2>&1 || : -fi -exit 0 -%endif -%endif %if 0%{?rhel} %triggerun -- libvirt @@ -852,6 +849,7 @@ exit 0 %{_datadir}/%{vdsm_name}/blkid.py* %{_datadir}/%{vdsm_name}/caps.py* %{_datadir}/%{vdsm_name}/clientIF.py* +%{_datadir}/%{vdsm_name}/daemonAdapter %{_datadir}/%{vdsm_name}/dmidecodeUtil.py* %{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/hooking.py* @@ -864,7 +862,7 @@ exit 0 %{_datadir}/%{vdsm_name}/sourceRoute.py* %{_datadir}/%{vdsm_name}/sourceRouteThread.py* %{_datadir}/%{vdsm_name}/supervdsm.py* -%{_datadir}/%{vdsm_name}/supervdsmServer.py* +%{_datadir}/%{vdsm_name}/supervdsmServer %{_datadir}/%{vdsm_name}/vmChannels.py* %{_datadir}/%{vdsm_name}/tc.py* %{_datadir}/%{vdsm_name}/vdsm @@ -897,6 +895,7 @@ exit 0 %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh %{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh +%{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* @@ -1039,6 +1038,7 @@ exit 0 %dir %{_sysconfdir}/pki/%{vdsm_name} %dir %{_sysconfdir}/pki/%{vdsm_name}/keys %dir %{_sysconfdir}/pki/%{vdsm_name}/certs +%dir %{_sysconfdir}/pki/%{vdsm_name}/libvirt-spice %config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password %dir %{_localstatedir}/lib/%{vdsm_name} %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback @@ -1101,10 +1101,13 @@ exit 0 %if 0%{?with_gluster} %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml %else %exclude %{_datadir}/%{vdsm_name}/tests/gluster* %endif %{_datadir}/%{vdsm_name}/tests/functional/*.py* +%{_datadir}/%{vdsm_name}/tests/functional/*.policy %files hook-openstacknet %defattr(-, root, root, -) @@ -1177,6 +1180,8 @@ exit 0 %files hook-macspoof %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof %files hook-nestedvt %defattr(-, root, root, -) @@ -1321,6 +1326,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Nov 05 2013 Douglas Schilling Landgraf - 4.13.0-9 +- Build 4.13.0-9 from branch ovirt-3.3 + * Wed Oct 30 2013 Cole Robinson - 4.12.1-5 - Fix broken hostname dep on rawhide From 617a4420f10acdfd3e2d23733d7ed08524f48451 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 12 Nov 2013 22:43:36 -0500 Subject: [PATCH 054/126] 4.13.0-11 - update from 3.3 branch update from branch ovirt-3.3 which include: upgrade-fix-v3ResetMetaVolSize-argument lvm-Do-not-use-udev-cache-for-obtaining-device-list Fix-ballooning-rules-for-computing-the-minimum-avail Avoid-M2Crypto-races spec-declare-we-provide-an-existing-python-cpopen configuring-selinux-allowing-qemu-kvm-to-generate-co --- sources | 2 +- vdsm.spec | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sources b/sources index f7155f1..5427207 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -142e847e85f23233dfdfef601b3badbb vdsm-4.13.0.tar.gz +84a09ba25f1eaef08ddaf698aff40bfe vdsm-4.13.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 330a2e8..e714801 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.13.0 -Release: 9%{?dist}%{?extra_release} +Release: 11%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -234,7 +234,7 @@ Requires: %{name}-python = %{version}-%{release} Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 -Requires(post): hostname +Requires(post): /bin/hostname Requires(post): policycoreutils-python Requires(preun): policycoreutils-python @@ -320,7 +320,7 @@ Manager. Summary: Creates a sub-process in simpler safer manner. BuildRequires: python2-devel -Provides: python-cpopen = %{version}-%{release} +Provides: python-cpopen = 1.2.3 Obsoletes: python-cpopen %description python-cpopen @@ -664,6 +664,10 @@ if grep -q "# VDSM section begin" /etc/sysctl.conf; then /etc/sysctl.conf fi +# hack until we replace core dump with abrt +/usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' +/sbin/restorecon -R -v /var/log/core + %if 0%{?rhel} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd @@ -1326,6 +1330,18 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 +- update from branch ovirt-3.3 which include: + upgrade-fix-v3ResetMetaVolSize-argument + lvm-Do-not-use-udev-cache-for-obtaining-device-list + Fix-ballooning-rules-for-computing-the-minimum-avail + Avoid-M2Crypto-races + spec-declare-we-provide-an-existing-python-cpopen + configuring-selinux-allowing-qemu-kvm-to-generate-co + +* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-10 +- Fix requires on post for hostname. + * Tue Nov 05 2013 Douglas Schilling Landgraf - 4.13.0-9 - Build 4.13.0-9 from branch ovirt-3.3 From 0e2b9140cd67a266e6e88915b55377b21b28efa6 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 14 Nov 2013 11:27:17 -0500 Subject: [PATCH 055/126] Update spec to fit a new validation for hostname --- vdsm.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index e714801..262e60e 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.13.0 -Release: 11%{?dist}%{?extra_release} +Release: 12%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -234,6 +234,13 @@ Requires: %{name}-python = %{version}-%{release} Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 + +%if 0%{?fedora} && 0%{?fedora} >= 21 +Requires(post): %{_bindir}/hostname +%else +Requires(post): /bin/hostname +%endif + Requires(post): /bin/hostname Requires(post): policycoreutils-python Requires(preun): policycoreutils-python @@ -1330,6 +1337,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Wed Nov 13 2013 Douglas Schilling Landgraf - 4.13.0-12 +- Update spec to fit a new validation for hostname requires. + * Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 - update from branch ovirt-3.3 which include: upgrade-fix-v3ResetMetaVolSize-argument From 0c53bf9d2326b01aadab3321945acdef3d2fc79e Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Sat, 16 Nov 2013 23:03:10 -0500 Subject: [PATCH 056/126] replace %{_bindir}/hostname to hostname for >= F21 --- vdsm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 262e60e..733ca35 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -236,7 +236,7 @@ Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 %if 0%{?fedora} && 0%{?fedora} >= 21 -Requires(post): %{_bindir}/hostname +Requires(post): hostname %else Requires(post): /bin/hostname %endif From 798d9999cc27aa10e177fa4b8f5a94f5a339db6d Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 19 Nov 2013 21:52:13 -0500 Subject: [PATCH 057/126] remove duplicate require hostname entry rawhide only --- vdsm.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 733ca35..c54173a 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.13.0 -Release: 12%{?dist}%{?extra_release} +Release: 13%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -241,7 +241,6 @@ Requires(post): hostname Requires(post): /bin/hostname %endif -Requires(post): /bin/hostname Requires(post): policycoreutils-python Requires(preun): policycoreutils-python @@ -1337,6 +1336,9 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Nov 19 2013 Douglas Schilling Landgraf - 4.13.0-13 +- remove duplicate require hostname + * Wed Nov 13 2013 Douglas Schilling Landgraf - 4.13.0-12 - Update spec to fit a new validation for hostname requires. From 234e9a34dae18776e05e3b5b1a37d614a82da521 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 9 Dec 2013 22:36:22 +0200 Subject: [PATCH 058/126] vdsm 4.13.0-14 --- ...rs-on-HSMs-before-rescanning-extende.patch | 67 +++++++ ...fresh-raw-disk-before-live-extension.patch | 41 +++++ ...ctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch | 81 +++++++++ ...unify-_highWrite-and-_onAbnormalStop.patch | 109 +++++++++++ ...-vm-prevent-faulty-volume-extensions.patch | 79 ++++++++ ...rse-grain-libvirt.rpm-may-be-missing.patch | 73 ++++++++ 0007-Report-qemu-kvm-rhev-if-installed.patch | 35 ++++ ...multiple-LVs-to-be-refreshed-at-once.patch | 63 +++++++ ...-lvm-Deactivate-lvs-during-bootstrap.patch | 115 ++++++++++++ ...ndentation-to-comply-with-pep8-1.3.3.patch | 40 ++++ ...services-restart-after-reconfiguring.patch | 118 ++++++++++++ ...s-in-the-vm-name-break-the-migration.patch | 36 ++++ ...ion-of-migrations-gets-handled-corre.patch | 93 ++++++++++ ...r-modules-when-with_gluster-set-to-0.patch | 104 +++++++++++ ...llation-replies-wrong-message-format.patch | 47 +++++ ...fix-linkShowDev-parsing-in-getVlanID.patch | 66 +++++++ 0017-fuserTests-fix-for-f20-and-arch.patch | 45 +++++ 0018-Adding-debian-folder-makefile.patch | 150 +++++++++++++++ 0019-Fix-Makefile.am-in-debian-folder.patch | 172 ++++++++++++++++++ ...le-exception-on-after-hooks-failures.patch | 79 ++++++++ ...-vm-Fix-vm-unpausing-during-recovery.patch | 119 ++++++++++++ ...ert-fix-premature-selinux-dependency.patch | 45 +++++ ...spec-conditional-to-execute-semanage.patch | 37 ++++ ...pec-conditional-for-hostname-require.patch | 124 +++++++++++++ vdsm.spec | 94 +++++++--- 25 files changed, 2004 insertions(+), 28 deletions(-) create mode 100644 0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch create mode 100644 0002-vm-refresh-raw-disk-before-live-extension.patch create mode 100644 0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch create mode 100644 0004-vm-unify-_highWrite-and-_onAbnormalStop.patch create mode 100644 0005-vm-prevent-faulty-volume-extensions.patch create mode 100644 0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch create mode 100644 0007-Report-qemu-kvm-rhev-if-installed.patch create mode 100644 0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch create mode 100644 0009-lvm-Deactivate-lvs-during-bootstrap.patch create mode 100644 0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch create mode 100644 0011-Peform-related-services-restart-after-reconfiguring.patch create mode 100644 0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch create mode 100644 0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch create mode 100644 0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch create mode 100644 0015-Migration-cancellation-replies-wrong-message-format.patch create mode 100644 0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch create mode 100644 0017-fuserTests-fix-for-f20-and-arch.patch create mode 100644 0018-Adding-debian-folder-makefile.patch create mode 100644 0019-Fix-Makefile.am-in-debian-folder.patch create mode 100644 0020-Disable-exception-on-after-hooks-failures.patch create mode 100644 0021-vm-Fix-vm-unpausing-during-recovery.patch create mode 100644 0022-Revert-fix-premature-selinux-dependency.patch create mode 100644 0023-vdsm.spec-conditional-to-execute-semanage.patch create mode 100644 0024-vdsm.spec-conditional-for-hostname-require.patch diff --git a/0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch b/0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch new file mode 100644 index 0000000..8127536 --- /dev/null +++ b/0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch @@ -0,0 +1,67 @@ +From d6589211bbe9b9b8975faecd6b04ea297bfeea4f Mon Sep 17 00:00:00 2001 +From: Pavel Zhukov +Date: Fri, 25 Oct 2013 11:10:39 +0200 +Subject: [PATCH 01/21] Invalidate filters on HSMs before rescanning extended + VG +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +domainMonitor thread might use stale lvm filters while running vgs +command after extending of the VG (added PV is missed in the filter +set). Since LvmCache doesn't invalidate filters, the volume +group is marked as partial and domainMonitor selftest fails +(host goes to non-operational status). By design filter should be +invalidated if cmd returns nonzero code but vgs returns zero even if +devices are filtered . The patch introduces public method for +filter invalidation and calls it from the getDevicesVisibility +because getDevicesVisibility is called on all DC hosts after +adding new device but before extendSD. + +Change-Id: If1eeed1c203f2c8c73370987048565d665932299 +Bugzilla-Url: https://bugzilla.redhat.com/1022976 +Signed-off-by: Pavel Zhukov +Signed-off-by: Sergey Gotliv +Reviewed-on: http://gerrit.ovirt.org/20552 +Reviewed-by: Tomáš Došek +Reviewed-by: Sergey Gotliv +Reviewed-by: Ayal Baron +Reviewed-by: Nir Soffer +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/21223 +Reviewed-by: Allon Mureinik +--- + vdsm/storage/hsm.py | 1 + + vdsm/storage/lvm.py | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index 1307699..3e0c022 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -1996,6 +1996,7 @@ class HSM: + :rtype: dict + """ + visibility = self.scanDevicesVisibility(guids) ++ lvm.invalidateFilter() + for guid in guids: + if visibility[guid]: + visibility[guid] = (os.stat('/dev/mapper/' + guid).st_mode & +diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py +index 065e1ea..7f87362 100644 +--- a/vdsm/storage/lvm.py ++++ b/vdsm/storage/lvm.py +@@ -1313,6 +1313,10 @@ def lvsByTag(vgName, tag): + return [lv for lv in getLV(vgName) if tag in lv.tags] + + ++def invalidateFilter(): ++ _lvminfo.invalidateFilter() ++ ++ + # Fix me: unify with addTag + def replaceLVTag(vg, lv, deltag, addtag): + """ +-- +1.8.4.2 + diff --git a/0002-vm-refresh-raw-disk-before-live-extension.patch b/0002-vm-refresh-raw-disk-before-live-extension.patch new file mode 100644 index 0000000..bac974f --- /dev/null +++ b/0002-vm-refresh-raw-disk-before-live-extension.patch @@ -0,0 +1,41 @@ +From 97eeb3f814659ff81bed6b9e5817b6fffa9825a8 Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Tue, 12 Nov 2013 09:02:08 -0500 +Subject: [PATCH 02/21] vm: refresh raw disk before live extension + +As part of the online disk extension (raw format on block domains) flow +the leaf logical volume is extended by the SPM to the new size. +On the HSM host (where the VM is running) we need to refresh the volume +in order to update the volume segments and make the new size visible to +the qemu process. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1029501 +Change-Id: I4fc3b578a865e25586a719f7c5120df12842d046 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/21177 +Reviewed-by: Ayal Baron +Reviewed-on: http://gerrit.ovirt.org/21274 +--- + vdsm/vm.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 1a16d53..475f6ce 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -4054,6 +4054,12 @@ class Vm(object): + return {'status': doneCode, 'size': str(sizeRoundedBytes)} + + def _diskSizeExtendRaw(self, drive, newSizeBytes): ++ # Picking up the volume size extension ++ self.__refreshDriveVolume({ ++ 'domainID': drive.domainID, 'poolID': drive.poolID, ++ 'imageID': drive.imageID, 'volumeID': drive.volumeID, ++ }) ++ + volumeInfo = self.cif.irs.getVolumeSize( + drive.domainID, drive.poolID, drive.imageID, drive.volumeID) + +-- +1.8.4.2 + diff --git a/0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch b/0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch new file mode 100644 index 0000000..54e8170 --- /dev/null +++ b/0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch @@ -0,0 +1,81 @@ +From 03008aac61d426777bd2fc34ba7f9e3f2032a95b Mon Sep 17 00:00:00 2001 +From: Sandro Bonazzola +Date: Tue, 12 Nov 2013 11:14:24 +0100 +Subject: [PATCH 03/21] Renaming /etc/sysctl.d/vdsm to /etc/sysctl.d/vdsm.conf + +Fixing Bug #740887 it has been added the file /etc/sysctl.d/vdsm which +works fine on RHEL and CentOS but it's not read on Fedora because +it should be /etc/sysctl.d/vdsm.conf ( see sysctl --system output ) + +Change-Id: I4ac929db854d7a5f9bd96d144e8ef36070f74126 +Bug-Url: https://bugzilla.redhat.com/1029368 +Signed-off-by: Sandro Bonazzola +Reviewed-on: http://gerrit.ovirt.org/21160 +Reviewed-by: Yaniv Bronhaim +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21202 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Douglas Schilling Landgraf +--- + debian/vdsm.install | 2 +- + debian/vdsm.postinst | 2 +- + init/vdsmd_init_common.sh.in | 2 +- + vdsm.spec.in | 4 ++-- + vdsm/Makefile.am | 4 ++-- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in +index 38da542..89c60e9 100644 +--- a/init/vdsmd_init_common.sh.in ++++ b/init/vdsmd_init_common.sh.in +@@ -93,7 +93,7 @@ task_load_needed_modules(){ + + + task_tune_system(){ +- "@SYSCTL_PATH@" -q -p "/etc/sysctl.d/vdsm" ++ "@SYSCTL_PATH@" -q -p "/etc/sysctl.d/vdsm.conf" + } + + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index eae38fa..5e306e4 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -641,7 +641,7 @@ export LC_ALL=C + # set the vdsm "secret" password for libvirt + %{_bindir}/vdsm-tool set-saslpasswd + +-# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm. ++# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. + # So Remove them if it is played with /etc/sysctl.conf. + if grep -q "# VDSM section begin" /etc/sysctl.conf; then + /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ +@@ -864,7 +864,7 @@ exit 0 + %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy + %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm + %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm +-%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm ++%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf + %if 0%{?with_systemd} + %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf + %endif +diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am +index 305ef6b..26be4dc 100644 +--- a/vdsm/Makefile.am ++++ b/vdsm/Makefile.am +@@ -239,10 +239,10 @@ uninstall-data-sudoers: + install-data-sysctl: + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d + $(INSTALL_DATA) $(srcdir)/vdsm-sysctl.conf \ +- $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm ++ $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm.conf + + uninstall-data-sysctl: +- $(RM) $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm ++ $(RM) $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm.conf + + install-data-dhclient-hooks: + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/dhcp/dhclient.d +-- +1.8.4.2 + diff --git a/0004-vm-unify-_highWrite-and-_onAbnormalStop.patch b/0004-vm-unify-_highWrite-and-_onAbnormalStop.patch new file mode 100644 index 0000000..3346a4b --- /dev/null +++ b/0004-vm-unify-_highWrite-and-_onAbnormalStop.patch @@ -0,0 +1,109 @@ +From 8a34b1055736aa677ce5fcd88f0086c0df6c599c Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Wed, 6 Nov 2013 08:50:57 -0500 +Subject: [PATCH 04/21] vm: unify _highWrite and _onAbnormalStop + +Both _highWrite and _onAbnormalStop should share the same logic about +the volume extension. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998443 +Change-Id: I4fd790986b81402847b06810529841cfd7bae119 +Signed-off-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/20966 +Reviewed-by: Sergey Gotliv +Reviewed-by: Ayal Baron +Reviewed-on: http://gerrit.ovirt.org/21382 +Tested-by: Allon Mureinik +Reviewed-by: Allon Mureinik +Reviewed-by: Dan Kenigsberg +--- + vdsm/vm.py | 59 ++++++++++++++++++++++++----------------------------------- + 1 file changed, 24 insertions(+), 35 deletions(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 475f6ce..2bf9a1e 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -504,22 +504,7 @@ class VmStatsThread(sampling.AdvancedStatsThread): + if not self._vm.isDisksStatsCollectionEnabled(): + # Avoid queries from storage during recovery process + return +- +- for vmDrive in self._vm._devices[DISK_DEVICES]: +- if not vmDrive.blockDev or vmDrive.format != 'cow': +- continue +- +- capacity, alloc, physical = \ +- self._vm._dom.blockInfo(vmDrive.path, 0) +- +- if physical - alloc >= vmDrive.watermarkLimit: +- continue +- +- self._log.info('%s/%s apparent: %s capacity: %s, alloc: %s, ' +- 'phys: %s', vmDrive.domainID, vmDrive.volumeID, +- vmDrive.apparentsize, capacity, alloc, physical) +- +- self._vm.extendDriveVolume(vmDrive) ++ self._vm.extendDrivesIfNeeded() + + def _updateVolumes(self): + if not self._vm.isDisksStatsCollectionEnabled(): +@@ -2272,6 +2257,27 @@ class Vm(object): + with self._confLock: + self.conf['timeOffset'] = timeOffset + ++ def extendDrivesIfNeeded(self): ++ extend = [] ++ ++ for drive in self._devices[DISK_DEVICES]: ++ if not drive.blockDev or drive.format != 'cow': ++ continue ++ ++ capacity, alloc, physical = self._dom.blockInfo(drive.path, 0) ++ if physical - alloc < drive.watermarkLimit: ++ extend.append((drive, capacity, alloc, physical)) ++ ++ for drive, capacity, alloc, physical in extend: ++ self.log.info( ++ "Requesting extension for volume %s on domain %s (apparent: " ++ "%s, capacity: %s, allocated: %s, physical: %s)", ++ drive.volumeID, drive.domainID, drive.apparentsize, capacity, ++ alloc, physical) ++ self.extendDriveVolume(drive) ++ ++ return len(extend) > 0 ++ + def extendDriveVolume(self, vmDrive): + if not vmDrive.blockDev: + return +@@ -4208,25 +4214,8 @@ class Vm(object): + self.conf['pauseCode'] = err.upper() + self._guestCpuRunning = False + if err.upper() == 'ENOSPC': +- for d in self._devices[DISK_DEVICES]: +- if d.alias == blockDevAlias: +- #in the case of a qcow2-like file stored inside a block +- #device 'physical' will give the block device size, while +- #'allocation' will give the qcow2 image size +- #D. Berrange +- capacity, alloc, physical = self._dom.blockInfo(d.path, 0) +- if (physical > +- (alloc + config.getint( +- 'irs', 'volume_utilization_chunk_mb'))): +- self.log.warn('%s = %s/%s error %s phys: %s alloc: %s ' +- 'Ingnoring already managed event.', +- blockDevAlias, d.domainID, d.volumeID, +- err, physical, alloc) +- return +- self.log.info('%s = %s/%s error %s phys: %s alloc: %s', +- blockDevAlias, d.domainID, d.volumeID, err, +- physical, alloc) +- self.extendDriveVolume(d) ++ if not self.extendDrivesIfNeeded(): ++ self.log.info("No VM drives were extended") + + def _acpiShutdown(self): + self._dom.shutdownFlags(libvirt.VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN) +-- +1.8.4.2 + diff --git a/0005-vm-prevent-faulty-volume-extensions.patch b/0005-vm-prevent-faulty-volume-extensions.patch new file mode 100644 index 0000000..a1f4d20 --- /dev/null +++ b/0005-vm-prevent-faulty-volume-extensions.patch @@ -0,0 +1,79 @@ +From 7a5649330298880c9ac2cd80815b0d06dac738df Mon Sep 17 00:00:00 2001 +From: Federico Simoncelli +Date: Mon, 11 Nov 2013 09:05:05 -0500 +Subject: [PATCH 05/21] vm: prevent faulty volume extensions + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998443 +Change-Id: If7e85c50f375ed7ed0297330b8cd83e38e0986c7 +Signed-off-by: Federico Simoncelli +Signed-off-by: Yeela Kaplan +Reviewed-on: http://gerrit.ovirt.org/21150 +Reviewed-by: Sergey Gotliv +Reviewed-by: Ayal Baron +Reviewed-by: Allon Mureinik +Reviewed-on: http://gerrit.ovirt.org/21383 +Reviewed-by: Dan Kenigsberg +--- + vdsm/vm.py | 35 +++++++++++++++++++++++++++++++++-- + 1 file changed, 33 insertions(+), 2 deletions(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 2bf9a1e..0921fb2 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -2265,6 +2265,36 @@ class Vm(object): + continue + + capacity, alloc, physical = self._dom.blockInfo(drive.path, 0) ++ ++ # Since the check based on nextPhysSize is extremly risky (it ++ # may result in the VM being paused) we can't use the regular ++ # getNextVolumeSize call as it relies on a cached value of the ++ # drive apparentsize. ++ nextPhysSize = physical + drive.VOLWM_CHUNK_MB * constants.MEGAB ++ ++ # NOTE: the intent of this check is to prevent faulty images to ++ # trick qemu in requesting extremely large extensions (BZ#998443). ++ # Probably the definitive check would be comparing the allocated ++ # space with capacity + format_overhead. Anyway given that: ++ # ++ # - format_overhead is tricky to be computed (it depends on few ++ # assumptions that may change in the future e.g. cluster size) ++ # - currently we allow only to extend by one chunk at time ++ # ++ # the current check compares alloc with the next volume size. ++ # It should be noted that alloc cannot be directly compared with ++ # the volume physical size as it includes also the clusters not ++ # written yet (pending). ++ if alloc > nextPhysSize: ++ self.log.error( ++ "Improbable extension request for volume %s on domain " ++ "%s, pausing the VM to avoid corruptions (capacity: %s, " ++ "allocated: %s, physical: %s, next physical size: %s)", ++ drive.volumeID, drive.domainID, capacity, alloc, ++ physical, nextPhysSize) ++ self.pause(pauseCode='EOTHER') ++ return False ++ + if physical - alloc < drive.watermarkLimit: + extend.append((drive, capacity, alloc, physical)) + +@@ -2415,12 +2445,13 @@ class Vm(object): + if not guestCpuLocked: + self._guestCpuLock.release() + +- def pause(self, afterState='Paused', guestCpuLocked=False): ++ def pause(self, afterState='Paused', guestCpuLocked=False, ++ pauseCode='NOERR'): + if not guestCpuLocked: + self._acquireCpuLockWithTimeout() + try: + with self._confLock: +- self.conf['pauseCode'] = 'NOERR' ++ self.conf['pauseCode'] = pauseCode + self._underlyingPause() + if hasattr(self, 'updateGuestCpuRunning'): + self.updateGuestCpuRunning() +-- +1.8.4.2 + diff --git a/0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch b/0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch new file mode 100644 index 0000000..7ebdfd5 --- /dev/null +++ b/0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch @@ -0,0 +1,73 @@ +From 9792e7e2ec67bf29bcd2083125792d55f5bfab28 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Mon, 16 Sep 2013 16:02:46 +0100 +Subject: [PATCH 06/21] caps: coarse-grain libvirt.rpm may be missing + +As of http://gerrit.ovirt.org/15761 we no longer require the legacy +libvirt.rpm to be installed on Fedora, so getCaps should not look for +it. Instead, it should report the information of the installed +libvirt-daemon-kvm.rpm. + +Without this patch we get an annoying + (_getKeyPackages) rpm package libvirt not found +log message, and do not report libvirt's version. + +Change-Id: I733a1a2411c910caa030e435c2a7f751a8e4dad4 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/19295 +Reviewed-by: mooli tayer +Reviewed-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/21363 +Tested-by: Yaniv Bronhaim +Reviewed-by: Yaniv Bronhaim +--- + vdsm/caps.py | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/vdsm/caps.py b/vdsm/caps.py +index 3a7a6a2..c5ecadc 100644 +--- a/vdsm/caps.py ++++ b/vdsm/caps.py +@@ -20,6 +20,7 @@ + + """Collect host capabilities""" + ++import itertools + import os + from xml.dom import minidom + import logging +@@ -323,12 +324,12 @@ def _getKeyPackages(): + pkgs = {'kernel': kernelDict()} + + if getos() in (OSName.RHEVH, OSName.OVIRT, OSName.FEDORA, OSName.RHEL): +- KEY_PACKAGES = {'qemu-kvm': 'qemu-kvm', +- 'qemu-img': 'qemu-img', +- 'vdsm': 'vdsm', +- 'spice-server': 'spice-server', +- 'libvirt': 'libvirt', +- 'mom': 'mom', ++ KEY_PACKAGES = {'qemu-kvm': ('qemu-kvm',), ++ 'qemu-img': ('qemu-img',), ++ 'vdsm': ('vdsm',), ++ 'spice-server': ('spice-server',), ++ 'libvirt': ('libvirt', 'libvirt-daemon-kvm'), ++ 'mom': ('mom',), + } + + if _glusterEnabled: +@@ -337,9 +338,10 @@ def _getKeyPackages(): + try: + ts = rpm.TransactionSet() + +- for pkg in KEY_PACKAGES: ++ for pkg, names in KEY_PACKAGES.iteritems(): + try: +- mi = ts.dbMatch('name', KEY_PACKAGES[pkg]).next() ++ mi = itertools.chain(*[ts.dbMatch('name', name) ++ for name in names]).next() + except StopIteration: + logging.debug("rpm package %s not found", + KEY_PACKAGES[pkg]) +-- +1.8.4.2 + diff --git a/0007-Report-qemu-kvm-rhev-if-installed.patch b/0007-Report-qemu-kvm-rhev-if-installed.patch new file mode 100644 index 0000000..3ac4763 --- /dev/null +++ b/0007-Report-qemu-kvm-rhev-if-installed.patch @@ -0,0 +1,35 @@ +From 0150a6ed14787830527adcc5e137e2402569331f Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Wed, 13 Nov 2013 13:18:43 +0000 +Subject: [PATCH 07/21] Report qemu-kvm-rhev if installed + +Change-Id: If6b59241bbf38b6cd15fd941e1f68115853d22c1 +Bug-Url: https://bugzilla.redhat.com/1029792 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21226 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/21364 +Tested-by: Yaniv Bronhaim +Reviewed-by: Yaniv Bronhaim +--- + vdsm/caps.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm/caps.py b/vdsm/caps.py +index c5ecadc..a6e22d2 100644 +--- a/vdsm/caps.py ++++ b/vdsm/caps.py +@@ -324,8 +324,8 @@ def _getKeyPackages(): + pkgs = {'kernel': kernelDict()} + + if getos() in (OSName.RHEVH, OSName.OVIRT, OSName.FEDORA, OSName.RHEL): +- KEY_PACKAGES = {'qemu-kvm': ('qemu-kvm',), +- 'qemu-img': ('qemu-img',), ++ KEY_PACKAGES = {'qemu-kvm': ('qemu-kvm', 'qemu-kvm-rhev'), ++ 'qemu-img': ('qemu-img', 'qemu-img-rhev'), + 'vdsm': ('vdsm',), + 'spice-server': ('spice-server',), + 'libvirt': ('libvirt', 'libvirt-daemon-kvm'), +-- +1.8.4.2 + diff --git a/0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch b/0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch new file mode 100644 index 0000000..14d7ef3 --- /dev/null +++ b/0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch @@ -0,0 +1,63 @@ +From e789aec721baf6f77a9ac304375d0e170cf63358 Mon Sep 17 00:00:00 2001 +From: Lee Yarwood +Date: Mon, 18 Nov 2013 16:30:51 +0000 +Subject: [PATCH 08/21] lvm: Allow multiple LVs to be refreshed at once + +lvm.refreshLV() function used to accept only single lv, requiring +multiple invocations for refreshing multiple lvs, although lvm allows +refreshing of multiple lvs. This patch rename the function and accept +multiple lvs and invoke lvchange once with given lvs. + +This change is required for patch http://gerrit.ovirt.org/#/c/21501. + +Change-Id: I1ecc64b8ca0133b030ba5bfa37f1a2c55067dd5d +Bug-Url: https://bugzilla.redhat.com/1009812 +Signed-off-by: Lee Yarwood +Reviewed-on: http://gerrit.ovirt.org/19871 +Reviewed-by: Nir Soffer +Reviewed-by: Allon Mureinik +Tested-by: Nir Soffer +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/21500 +--- + vdsm/storage/blockVolume.py | 2 +- + vdsm/storage/lvm.py | 9 +++++---- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py +index badf2c1..958a04d 100644 +--- a/vdsm/storage/blockVolume.py ++++ b/vdsm/storage/blockVolume.py +@@ -95,7 +95,7 @@ class BlockVolume(volume.Volume): + volume.Volume.validate(self) + + def refreshVolume(self): +- lvm.refreshLV(self.sdUUID, self.volUUID) ++ lvm.refreshLVs(self.sdUUID, (self.volUUID,)) + + @classmethod + def getVSize(cls, sdobj, imgUUID, volUUID, bs=BLOCK_SIZE): +diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py +index 7f87362..b195343 100644 +--- a/vdsm/storage/lvm.py ++++ b/vdsm/storage/lvm.py +@@ -1150,11 +1150,12 @@ def renameLV(vg, oldlv, newlv): + _lvminfo._reloadlvs(vg, newlv) + + +-def refreshLV(vgName, lvName): +- # If the logical volume is active, reload its metadata. +- cmd = ['lvchange', '--refresh', "%s/%s" % (vgName, lvName)] ++def refreshLVs(vgName, lvNames): ++ # If the logical volumes are active, reload their metadata. ++ cmd = ['lvchange', '--refresh'] ++ cmd.extend("%s/%s" % (vgName, lv) for lv in lvNames) + rc, out, err = _lvminfo.cmd(cmd, _lvminfo._getVGDevs((vgName, ))) +- _lvminfo._invalidatelvs(vgName, lvName) ++ _lvminfo._invalidatelvs(vgName, lvNames) + if rc != 0: + raise se.LogicalVolumeRefreshError("%s failed" % list2cmdline(cmd)) + +-- +1.8.4.2 + diff --git a/0009-lvm-Deactivate-lvs-during-bootstrap.patch b/0009-lvm-Deactivate-lvs-during-bootstrap.patch new file mode 100644 index 0000000..0e1eb1e --- /dev/null +++ b/0009-lvm-Deactivate-lvs-during-bootstrap.patch @@ -0,0 +1,115 @@ +From 08650fe0d462f4d877792c020e26b2fd19c1ccf4 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Fri, 15 Nov 2013 01:19:32 +0200 +Subject: [PATCH 09/21] lvm: Deactivate lvs during bootstrap + +When using FC storage, physical volumes are connected during boot, and vdsm +logical volumes are auto-activated by both /etc/rc.sysinit and +/etc/init.d/netfs startup scripts. These logical volumes do not pick changes +done by the SPM on the storage, which may lead to data corruption sooner or +later, when a vm is trying to write to logical volume with stale meta data. + +This patch check all vdsm logical volumes during lvm bootstrap and +deactivate them if possible. Special logical volumes are refreshed, +since they are accessed early when connecting to storage pool, possibly +before lvm bootstrap is done. Open logical volumes are skipped because +we assume that they use correct meta data when opened. + +To fix the auto-activation during boot, we could perform this only on +the first start of the service and limit the operation to FC storage. +However, we decided to use this on all block storage types, and on every +start of the service, as additional layer of protection from logical +volumes left active after unclean shutdown of the service, or other +failures to deactivate logical volumes. + +Deactivation adds up to two lvchange calls for each volume group with +active logical volumes. After the first service start, logical volumes +are typically inactive and this change adds minimal additional cost, +refreshing active special logical volumes. + +Depends on http://gerrit.ovirt.org/#/c/21500/ for refreshing multiple +logical volumes in one call. + +Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db +Bug-Url: https://bugzilla.redhat.com/1009812 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21291 +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/21501 +Reviewed-by: Allon Mureinik +--- + vdsm/storage/hsm.py | 2 +- + vdsm/storage/lvm.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 45 insertions(+), 1 deletion(-) + +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index 3e0c022..d4c5dfc 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -371,7 +371,7 @@ class HSM: + self.log.warn("Failed to clean Storage Repository.", exc_info=True) + + def storageRefresh(): +- lvm._lvminfo.bootstrap() ++ lvm.bootstrap(refreshlvs=blockSD.SPECIAL_LVS) + sdCache.refreshStorage() + + fileUtils.createdir(self.tasksDir) +diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py +index b195343..52bb8b3 100644 +--- a/vdsm/storage/lvm.py ++++ b/vdsm/storage/lvm.py +@@ -650,6 +650,50 @@ class LVMCache(object): + _lvminfo = LVMCache() + + ++def bootstrap(refreshlvs=()): ++ """ ++ Bootstrap lvm module ++ ++ This function builds the lvm cache and ensure that all unused lvs are ++ deactivated, expect lvs matching refreshlvs, which are refreshed instead. ++ """ ++ _lvminfo.bootstrap() ++ ++ refreshlvs = set(refreshlvs) ++ ++ for vg in _lvminfo.getAllVgs(): ++ deactivate = [] ++ refresh = [] ++ ++ for lv in _lvminfo.getLv(vg.name): ++ if lv.active: ++ if lv.name in refreshlvs: ++ refresh.append(lv.name) ++ elif lv.opened: ++ log.debug("Skipping open lv: vg=%s lv=%s", vg.name, ++ lv.name) ++ else: ++ deactivate.append(lv.name) ++ ++ if deactivate: ++ log.info("Deactivating lvs: vg=%s lvs=%s", vg.name, deactivate) ++ try: ++ _setLVAvailability(vg.name, deactivate, "n") ++ except se.CannotDeactivateLogicalVolume: ++ log.error("Error deactivating lvs: vg=%s lvs=%s", vg.name, ++ deactivate) ++ # Some lvs are inactive now ++ _lvminfo._invalidatelvs(vg.name, deactivate) ++ ++ if refresh: ++ log.info("Refreshing lvs: vg=%s lvs=%s", vg.name, refresh) ++ try: ++ refreshLVs(vg.name, refresh) ++ except se.LogicalVolumeRefreshError: ++ log.error("Error refreshing lvs: vg=%s lvs=%s", vg.name, ++ refresh) ++ ++ + def invalidateCache(): + _lvminfo.invalidateCache() + +-- +1.8.4.2 + diff --git a/0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch b/0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch new file mode 100644 index 0000000..948f77f --- /dev/null +++ b/0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch @@ -0,0 +1,40 @@ +From 1114579a64370cdda1b554e90718c1fba90195fd Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Thu, 7 Nov 2013 20:37:14 +0200 +Subject: [PATCH 10/21] pep8: Fix indentation to comply with pep8 1.3.3 + +Commit 2c9f0d66db7795 introduced a pep8 indentation regression, breaking +the build on RHEL using vdsm provided pep8. This patch fixes the +indentation by breaking long statement to multiple lines. + +Change-Id: I3431742f9dbfd86a9816c7b3c6de90e282dbd415 +Relates-To: https://bugzilla.redhat.com/1022975 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21055 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21196 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/imageRepository/formatConverter.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py +index 441f484..c701163 100644 +--- a/vdsm/storage/imageRepository/formatConverter.py ++++ b/vdsm/storage/imageRepository/formatConverter.py +@@ -276,8 +276,8 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): + + for volUUID in imgVolumes: + try: +- v3ResetMetaVolSize( # BZ#811880 +- domain.produceVolume(imgUUID, volUUID)) ++ vol = domain.produceVolume(imgUUID, volUUID) ++ v3ResetMetaVolSize(vol) # BZ#811880 + except qemuImg.QImgError: + log.error("It is not possible to read the volume %s " + "using qemu-img, the content looks damaged", +-- +1.8.4.2 + diff --git a/0011-Peform-related-services-restart-after-reconfiguring.patch b/0011-Peform-related-services-restart-after-reconfiguring.patch new file mode 100644 index 0000000..2fed013 --- /dev/null +++ b/0011-Peform-related-services-restart-after-reconfiguring.patch @@ -0,0 +1,118 @@ +From e686703f15ca86973d36174e33c18adc9bc3b4e1 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Sun, 24 Nov 2013 14:08:15 +0200 +Subject: [PATCH 11/21] Peform related services restart after reconfiguring + +Although we tried to avoid doing restart to external services as part of +the pre-start of vdsm, the full implementation of vdsm-tool API that allows to +check isconfigured before performing the configuration itself is missing in +ovirt-3.3. + +Currently when running libvirt-configure we return 0 (SUCCESS) on both +reconfigure and if libvirt conf is already configured with vdsm details. +That's lead to a problem to decide when to stop the pre-start part and wait +for manual restart, or continue as it is already working with the right +configurations. + +To avoid more changes, we return the auto restart to allow easy start of +vdsm without more specific tweaks. + +Change-Id: I8216f9556e6ef4df96977db494c5b5169bfae80a +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031592 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/21356 +Reviewed-by: Alon Bar-Lev +Reviewed-by: Dan Kenigsberg +--- + README | 4 +--- + init/systemd/systemd-vdsmd.in | 3 +-- + init/sysvinit/vdsmd.init.in | 3 +-- + lib/vdsm/tool/libvirt_configure.sh.in | 9 ++------- + vdsm.spec.in | 7 +++---- + 5 files changed, 8 insertions(+), 18 deletions(-) + +diff --git a/README b/README +index 7ddce56..e3f70ef 100644 +--- a/README ++++ b/README +@@ -25,11 +25,9 @@ start you can do + make + sudo make install + +-Before starting the VDSM service in the first time, you must configure and +-restart libvirt service: ++Before starting the VDSM service in the first time, you must configure libvirt + + vdsm-tool libvirt-configure +- vdsm-tool libvirt-configure-services-restart + + Packaging + ========= +diff --git a/init/systemd/systemd-vdsmd.in b/init/systemd/systemd-vdsmd.in +index 692e5eb..cf20b84 100644 +--- a/init/systemd/systemd-vdsmd.in ++++ b/init/systemd/systemd-vdsmd.in +@@ -26,5 +26,4 @@ usage_exit(){ + [ "$1" != "reconfigure" ] && usage_exit + [ -n "$2" -a "$2" != "force" ] && usage_exit + +-"@BINDIR@/vdsm-tool" libvirt-configure ${2:+--force} && +- "@BINDIR@/vdsm-tool" libvirt-configure-services-restart ++"@BINDIR@/vdsm-tool" libvirt-configure ${2:+--force} +diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in +index efd9c35..dc7847e 100755 +--- a/init/sysvinit/vdsmd.init.in ++++ b/init/sysvinit/vdsmd.init.in +@@ -117,8 +117,7 @@ test_already_running() + reconfigure_libvirt() { + local force + [ "${1}" = "force" ] && force="--force" +- "$VDSM_TOOL" libvirt-configure ${force} && +- "$VDSM_TOOL" libvirt-configure-services-restart ++ "$VDSM_TOOL" libvirt-configure ${force} + } + + start() { +diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in +index 18ebe60..cf70f59 100755 +--- a/lib/vdsm/tool/libvirt_configure.sh.in ++++ b/lib/vdsm/tool/libvirt_configure.sh.in +@@ -291,15 +291,10 @@ EOF + ovirt_store_config "${lconf}" "${qconf}" "${ldconf}" "${llogr}" + fi + ++ /usr/bin/vdsm-tool libvirt-configure-services-restart || return 1 ++ + echo "Reconfiguration of libvirt is done." + echo +- cat << __EOF__ +-To start working with the new configuration, execute: +-'vdsm-tool libvirt-configure-services-restart' +-This will manage restarting of the following services: +-libvirtd, supervdsmd +-__EOF__ +- echo + + # + # finished reconfiguration, do not trigger +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 5e306e4..26cf267 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -748,10 +748,9 @@ if [ "$1" -ge 1 ]; then + %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 + supervdsmd_start_required='yes' + fi +- if %{_bindir}/vdsm-tool libvirt-configure | grep -q 'is done.'; then +- if %{_bindir}/vdsm-tool service-status libvirtd >/dev/null 2>&1; then +- %{_bindir}/vdsm-tool service-restart libvirtd >/dev/null 2>&1 +- fi ++ ++ %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1 ++ + fi + if [ "${supervdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 +-- +1.8.4.2 + diff --git a/0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch b/0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch new file mode 100644 index 0000000..142b9dd --- /dev/null +++ b/0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch @@ -0,0 +1,36 @@ +From 36d8edd5fe8b0ca13f4e0a4aa2e649e6435373b6 Mon Sep 17 00:00:00 2001 +From: Martin Betak +Date: Mon, 30 Sep 2013 14:35:36 +0200 +Subject: [PATCH 12/21] vdsm: Accents in the vm name break the migration + +Added utf-8 encoding of the configuration xml on the destination to +handle non-ascii characters. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1002246 +Change-Id: I9db5ea4f0745ef42633e3d265bcf40fb4733b2ce +Signed-off-by: Martin Betak +Reviewed-on: http://gerrit.ovirt.org/19684 +Reviewed-by: Federico Simoncelli +Reviewed-by: Michal Skrivanek +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21521 +--- + vdsm/vm.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 0921fb2..7e986a9 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -4910,7 +4910,7 @@ class Vm(object): + if not self._pathsPreparedEvent.isSet(): + self.log.debug('Timeout while waiting for path preparation') + return False +- srcDomXML = self.conf.pop('_srcDomXML') ++ srcDomXML = self.conf.pop('_srcDomXML').encode('utf-8') + self._updateDevicesDomxmlCache(srcDomXML) + + for dev in self._customDevices(): +-- +1.8.4.2 + diff --git a/0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch b/0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch new file mode 100644 index 0000000..4d1992f --- /dev/null +++ b/0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch @@ -0,0 +1,93 @@ +From fd7dffbea5f3b2b5510f64f5e748c475ed2df49f Mon Sep 17 00:00:00 2001 +From: Martin Polednik +Date: Wed, 20 Nov 2013 08:17:34 +0100 +Subject: [PATCH 13/21] Ensure cancellation of migrations gets handled + correctly + +If the migration is cancelled before the source calls libvirt.migrateToURI2 +we have to raise an libvirtError with the VIR_ERROR_OPERATION_ABORTED error +code to ensure that _finishSuccessfully() does not get called and we're +correctly reporting that the migration has been cancelled and that we're +destroying the VM on the destination in the process, since we're bailing +out. + +Additionally we'll do the check if the migration has been cancelled +right after the semaphore has been accquired, to avoid doing things +like calling the before_vm_migration_source hook and calling the +destination vdsm to create the VM instance. + +Change-Id: Id271a41466bc355ca505f764206457af419f0edd +Bug-Url: https://bugzilla.redhat.com/1023131 +Signed-off-by: Martin Polednik +Signed-off-by: Vinzenz Feenstra +Reviewed-on: http://gerrit.ovirt.org/21445 +Reviewed-by: Michal Skrivanek +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21536 +--- + vdsm/vm.py | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 7e986a9..f2971fe 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -145,7 +145,7 @@ class MigrationSourceThread(threading.Thread): + 'message': 'Migration in progress'}, + 'progress': 0} + threading.Thread.__init__(self) +- self._preparingMigrationEvt = False ++ self._preparingMigrationEvt = True + self._migrationCanceledEvt = False + self._monitorThread = None + +@@ -288,6 +288,19 @@ class MigrationSourceThread(threading.Thread): + # vdsm < 4.13 expect this to exist + self._machineParams['afterMigrationStatus'] = '' + ++ @staticmethod ++ def _raiseAbortError(): ++ e = libvirt.libvirtError(defmsg='') ++ # we have to override the value to get what we want ++ # err might be None ++ e.err = (libvirt.VIR_ERR_OPERATION_ABORTED, # error code ++ libvirt.VIR_FROM_QEMU, # error domain ++ 'operation aborted', # error message ++ libvirt.VIR_ERR_WARNING, # error level ++ '', '', '', # str1, str2, str3, ++ -1, -1) # int1, int2 ++ raise e ++ + def run(self): + try: + mstate = '' +@@ -296,6 +309,8 @@ class MigrationSourceThread(threading.Thread): + self._prepareGuest() + MigrationSourceThread._ongoingMigrations.acquire() + try: ++ if self._migrationCanceledEvt: ++ self._raiseAbortError() + self.log.debug("migration semaphore acquired") + if not mstate: + self._vm.conf['_migrationParams'] = { +@@ -321,7 +336,6 @@ class MigrationSourceThread(threading.Thread): + self.log.error("Failed to migrate", exc_info=True) + + def _startUnderlyingMigration(self): +- self._preparingMigrationEvt = True + if self._mode == 'file': + hooks.before_vm_hibernate(self._vm._dom.XMLDesc(0), self._vm.conf) + try: +@@ -383,6 +397,9 @@ class MigrationSourceThread(threading.Thread): + (libvirt.VIR_MIGRATE_TUNNELLED if + self._tunneled else 0), + None, maxBandwidth) ++ else: ++ self._raiseAbortError() ++ + finally: + t.cancel() + if MigrationMonitorThread._MIGRATION_MONITOR_INTERVAL: +-- +1.8.4.2 + diff --git a/0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch b/0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch new file mode 100644 index 0000000..0dcc754 --- /dev/null +++ b/0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch @@ -0,0 +1,104 @@ +From 3c07e78f63e21b530c897947ddf95b4ceea679d3 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Wed, 20 Nov 2013 18:21:26 +0200 +Subject: [PATCH 14/21] Keeping gluster modules when with_gluster set to 0 + +Currently the code imports and uses gluster modules. Setting +with_gluster=0 brakes the code. With this patch with_gluster=0 will +only drop the vdsm-gluster rpm creation. + +This patch was reviewed on - http://gerrit.ovirt.org/21477 && +http://gerrit.ovirt.org/#/c/21625/ (as a join of both patches) + +Change-Id: I1cdbd8b399652bf0d306308e2d4cfc0014be689c +Signed-off-by: Yaniv Bronhaim +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21577 +--- + vdsm.spec.in | 8 -------- + vdsm/storage/glusterVolume.py | 6 +++++- + vdsm/supervdsmServer | 12 +++++++++--- + 3 files changed, 14 insertions(+), 12 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 26cf267..08119d9 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -894,12 +894,8 @@ exit 0 + %{_datadir}/%{vdsm_name}/storage/fileUtils.py* + %{_datadir}/%{vdsm_name}/storage/fileVolume.py* + %{_datadir}/%{vdsm_name}/storage/fuser.py* +-%if 0%{?with_gluster} + %{_datadir}/%{vdsm_name}/storage/glusterSD.py* + %{_datadir}/%{vdsm_name}/storage/glusterVolume.py* +-%else +-%exclude %{_datadir}/%{vdsm_name}/storage/gluster* +-%endif + %{_datadir}/%{vdsm_name}/storage/hba.py* + %{_datadir}/%{vdsm_name}/storage/hsm.py* + %{_datadir}/%{vdsm_name}/storage/image.py* +@@ -1085,14 +1081,10 @@ exit 0 + %{_datadir}/%{vdsm_name}/tests/netmaskconversions + %{_datadir}/%{vdsm_name}/tests/run_tests.sh + %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out +-%if 0%{?with_gluster} + %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml + %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml + %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml + %{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml +-%else +-%exclude %{_datadir}/%{vdsm_name}/tests/gluster* +-%endif + %{_datadir}/%{vdsm_name}/tests/functional/*.py* + %{_datadir}/%{vdsm_name}/tests/functional/*.policy + +diff --git a/vdsm/storage/glusterVolume.py b/vdsm/storage/glusterVolume.py +index 3368de3..647b1ec 100644 +--- a/vdsm/storage/glusterVolume.py ++++ b/vdsm/storage/glusterVolume.py +@@ -2,7 +2,11 @@ from volume import VmVolumeInfo + import fileVolume + from sdc import sdCache + import supervdsm as svdsm +-from gluster.exception import GlusterException ++try: ++ from gluster.exception import GlusterException ++ _glusterEnabled = True ++except ImportError: ++ _glusterEnabled = False + + + class GlusterVolume(fileVolume.FileVolume): +diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer +index 40ec9df..7fa1c2b 100755 +--- a/vdsm/supervdsmServer ++++ b/vdsm/supervdsmServer +@@ -43,7 +43,12 @@ except: + + from storage import fuser + from multiprocessing import Pipe, Process +-from gluster import listPublicFunctions ++try: ++ from gluster import listPublicFunctions ++ _glusterEnabled = True ++except ImportError: ++ _glusterEnabled = False ++ + import storage.misc as misc + from vdsm import utils + from parted_utils import getDevicePartedInfo as _getDevicePartedInfo +@@ -362,8 +367,9 @@ def main(sockfile, pidfile=None): + return func(*args, **kwargs) + return wrapper + +- for name, func in listPublicFunctions(): +- setattr(_SuperVdsm, name, logDecorator(bind(func))) ++ if _glusterEnabled: ++ for name, func in listPublicFunctions(): ++ setattr(_SuperVdsm, name, logDecorator(bind(func))) + + try: + log.debug("Making sure I'm root - SuperVdsm") +-- +1.8.4.2 + diff --git a/0015-Migration-cancellation-replies-wrong-message-format.patch b/0015-Migration-cancellation-replies-wrong-message-format.patch new file mode 100644 index 0000000..0723e6c --- /dev/null +++ b/0015-Migration-cancellation-replies-wrong-message-format.patch @@ -0,0 +1,47 @@ +From 618e0d4a8ec3f6b7ca0719d14f8231e0cd50e5f9 Mon Sep 17 00:00:00 2001 +From: Vinzenz Feenstra +Date: Thu, 14 Nov 2013 08:47:55 +0100 +Subject: [PATCH 15/21] Migration cancellation replies wrong message format + +The message currently returns: + +{'status': {'message': 'Migration canceled', + 'code': { 'status': { 'message': 'Migration not in progress', + 'code': 47}}}, + 'progress': 1} + +The content of code is wrong. This commit fixes it so the message will +look like this: + +{'status': {'message': 'Migration canceled', 'code': 47}, 'progress': 1} + +Change-Id: I17a2463154e9f67191a818f137a4e7158a74dbbb +Bug-Url: https://bugzilla.redhat.com/1015887 +Signed-off-by: Vinzenz Feenstra +Reviewed-on: http://gerrit.ovirt.org/21250 +Reviewed-by: Michal Skrivanek +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21700 +Tested-by: Yaniv Bronhaim +Reviewed-by: Yaniv Bronhaim +--- + vdsm/vm.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index f2971fe..22d7a2d 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -324,7 +324,8 @@ class MigrationSourceThread(threading.Thread): + self._finishSuccessfully() + except libvirt.libvirtError as e: + if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED: +- self.status['status']['code'] = errCode['migCancelErr'] ++ self.status['status']['code'] = \ ++ errCode['migCancelErr']['status']['code'] + self.status['status']['message'] = 'Migration canceled' + raise + finally: +-- +1.8.4.2 + diff --git a/0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch b/0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch new file mode 100644 index 0000000..9a738ab --- /dev/null +++ b/0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch @@ -0,0 +1,66 @@ +From 06a2dbc7c28ea0985ce6166240ba621a924cd3bf Mon Sep 17 00:00:00 2001 +From: "Antoni S. Puimedon" +Date: Wed, 27 Nov 2013 01:35:52 +0100 +Subject: [PATCH 16/21] F20 netinfo: fix linkShowDev parsing in getVlanID + +Newer linux distributions return more detailed information for each +link. Where before we had: + + 3: enp3s0.11@enp3s0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default + link/ether c8:60:00:99:01:37 brd ff:ff:ff:ff:ff:ff promiscuity 0 + vlan id 11 + +Now we have: + + 3: enp3s0.11@enp3s0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default + link/ether c8:60:00:99:01:37 brd ff:ff:ff:ff:ff:ff promiscuity 0 + vlan protocol 802.1Q id 11 + +Thus, since after the vlan type indication we can have several key, value +pairs, it is necessary to change the parsing so that it looks at the keys +to decide if it's the value we want. + +This patch is a very very partial backport of the master branch fix: + http://gerrit.ovirt.org/#/c/21054/ +That patch was very complex and introduced different behaviors that +are not suitable for a backport such as the one this patch is doing. + +Change-Id: I6fbc492d2eee88e856e893ad69fe7552ede30b1a +Signed-off-by: Antoni S. Puimedon +Reviewed-on: http://gerrit.ovirt.org/21759 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Yaniv Bronhaim +--- + lib/vdsm/netinfo.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py +index ba78dc9..790c099 100644 +--- a/lib/vdsm/netinfo.py ++++ b/lib/vdsm/netinfo.py +@@ -568,15 +568,15 @@ def getVlanDevice(vlan): + + def getVlanID(vlan): + """ Return the ID of the given VLAN. """ +- vlanId = None + out = linkShowDev(vlan) + +- for item in out: +- if "vlan id" in item: +- vlanId = item.split()[2] +- break +- +- return int(vlanId) ++ vlanPos = out[2].find('vlan') ++ if vlanPos == -1: ++ raise ValueError('device %s does not seem to be a vlan' % vlan) ++ tokens = [token.strip() for token in out[2][vlanPos:].split(' ')] ++ for index, token in enumerate(tokens): ++ if "id" == token: ++ return int(tokens[index + 1]) + + + def getIpAddresses(): +-- +1.8.4.2 + diff --git a/0017-fuserTests-fix-for-f20-and-arch.patch b/0017-fuserTests-fix-for-f20-and-arch.patch new file mode 100644 index 0000000..339a0f0 --- /dev/null +++ b/0017-fuserTests-fix-for-f20-and-arch.patch @@ -0,0 +1,45 @@ +From df42ad1ec8f78a6c934c539cbe37efbd2d614009 Mon Sep 17 00:00:00 2001 +From: "Antoni S. Puimedon" +Date: Tue, 5 Nov 2013 15:11:19 +0100 +Subject: [PATCH 17/21] fuserTests fix for f20 and arch + +In newer distributions, fuser doesn't report a process as accessing +it's own executable file, making this test fail. We don't know why +this has changed (tried with newer kernels and newer fuser and the +issue persists) but we do not care enough about fuser reporting all +the pids from the processes created and alive of an executable file. +We fix this test for the fuser use case that we have. + +Change-Id: I9ead0d5dbed6a9373f1437f6484ba2f2ce108c2b +Signed-off-by: Antoni S. Puimedon +Reviewed-on: http://gerrit.ovirt.org/20921 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21740 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + tests/fuserTests.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/fuserTests.py b/tests/fuserTests.py +index 7473dde..6516758 100644 +--- a/tests/fuserTests.py ++++ b/tests/fuserTests.py +@@ -19,6 +19,7 @@ + # + + import os ++from tempfile import NamedTemporaryFile + from storage import fuser + + from testrunner import VdsmTestCase +@@ -28,4 +29,5 @@ class TestFuser(VdsmTestCase): + + def testSelfExe(self): + pid = os.getpid() +- self.assertTrue(pid in fuser.fuser('/proc/%s/exe' % pid)) ++ with NamedTemporaryFile() as tempFile: ++ self.assertTrue(pid in fuser.fuser(tempFile.name)) +-- +1.8.4.2 + diff --git a/0018-Adding-debian-folder-makefile.patch b/0018-Adding-debian-folder-makefile.patch new file mode 100644 index 0000000..4d504f0 --- /dev/null +++ b/0018-Adding-debian-folder-makefile.patch @@ -0,0 +1,150 @@ +From c4c8f5c63c4afd3bf0ccde8d0c3e80470310d6fc Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Tue, 26 Nov 2013 11:10:23 +0200 +Subject: [PATCH 18/21] Adding debian folder makefile + +Change-Id: I31dad533c70b501c3d521364bd98eb30517d2f3f +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/21695 +Reviewed-by: Sandro Bonazzola +Reviewed-by: Kiril Nesenko +Reviewed-by: Zhou Zheng Sheng +Tested-by: Zhou Zheng Sheng +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21795 +--- + Makefile.am | 1 + + configure.ac | 1 + + debian/Makefile.am | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 98 insertions(+) + create mode 100644 debian/Makefile.am + +diff --git a/Makefile.am b/Makefile.am +index 195688f..d71ee28 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,6 +20,7 @@ + + SUBDIRS = \ + client \ ++ debian \ + init \ + lib \ + vds_bootstrap \ +diff --git a/configure.ac b/configure.ac +index 93b6b96..fac9755 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -247,6 +247,7 @@ AC_PATH_PROG([YUM_PATH], [yum], [/usr/bin/yum]) + AC_OUTPUT([ + Makefile + client/Makefile ++ debian/Makefile + init/Makefile + init/systemd/Makefile + init/sysvinit/Makefile +diff --git a/debian/Makefile.am b/debian/Makefile.am +new file mode 100644 +index 0000000..67cb2d2 +--- /dev/null ++++ b/debian/Makefile.am +@@ -0,0 +1,96 @@ ++# ++# Copyright 2013 Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++# ++# Refer to the README and COPYING files for full details of the license ++# ++include $(top_srcdir)/build-aux/Makefile.subs ++ ++EXTRA_DIST = \ ++ changelog \ ++ compat \ ++ control \ ++ copyright \ ++ dependencyMap.txt \ ++ README.Debian \ ++ rules \ ++ source \ ++ TODO \ ++ vdsm-client.docs \ ++ vdsm-client.install \ ++ vdsm.dirs \ ++ vdsm.docs \ ++ vdsm-gluster.docs \ ++ vdsm-gluster.install \ ++ vdsm-hook-checkimages.docs \ ++ vdsm-hook-checkimages.install \ ++ vdsm-hook-directlun.docs \ ++ vdsm-hook-directlun.install \ ++ vdsm-hook-faqemu.docs \ ++ vdsm-hook-faqemu.install \ ++ vdsm-hook-fileinject.docs \ ++ vdsm-hook-fileinject.install \ ++ vdsm-hook-floppy.docs \ ++ vdsm-hook-floppy.install \ ++ vdsm-hook-hostusb.docs \ ++ vdsm-hook-hostusb.install \ ++ vdsm-hook-hugepages.docs \ ++ vdsm-hook-hugepages.install \ ++ vdsm-hook-isolatedprivatevlan.docs \ ++ vdsm-hook-isolatedprivatevlan.install \ ++ vdsm-hook-macspoof.docs \ ++ vdsm-hook-macspoof.install \ ++ vdsm-hook-nestedvt.docs \ ++ vdsm-hook-nestedvt.install \ ++ vdsm-hook-numa.docs \ ++ vdsm-hook-numa.install \ ++ vdsm-hook-openstacknet.docs \ ++ vdsm-hook-openstacknet.install \ ++ vdsm-hook-pincpu.docs \ ++ vdsm-hook-pincpu.install \ ++ vdsm-hook-promisc.docs \ ++ vdsm-hook-promisc.install \ ++ vdsm-hook-qemucmdline.docs \ ++ vdsm-hook-qemucmdline.install \ ++ vdsm-hook-qos.docs \ ++ vdsm-hook-qos.install \ ++ vdsm-hook-scratchpad.docs \ ++ vdsm-hook-scratchpad.install \ ++ vdsm-hook-smbios.docs \ ++ vdsm-hook-smbios.install \ ++ vdsm-hook-sriov.docs \ ++ vdsm-hook-sriov.install \ ++ vdsm-hook-vhostmd.docs \ ++ vdsm-hook-vhostmd.install \ ++ vdsm-hook-vmdisk.docs \ ++ vdsm-hook-vmdisk.install \ ++ vdsm-hook-vmfex.docs \ ++ vdsm-hook-vmfex.install \ ++ vdsm.install \ ++ vdsm.postinst \ ++ vdsm.postrm \ ++ vdsm.preinst \ ++ vdsm.prerm \ ++ vdsm-python.docs \ ++ vdsm-python.install \ ++ vdsm-python-zombiereaper.docs \ ++ vdsm-python-zombiereaper.install \ ++ vdsm-tests.docs \ ++ vdsm-tests.install \ ++ vdsm-yajsonrpc.docs \ ++ vdsm-yajsonrpc.install \ ++ watch \ ++ $(NULL) +-- +1.8.4.2 + diff --git a/0019-Fix-Makefile.am-in-debian-folder.patch b/0019-Fix-Makefile.am-in-debian-folder.patch new file mode 100644 index 0000000..92a07c1 --- /dev/null +++ b/0019-Fix-Makefile.am-in-debian-folder.patch @@ -0,0 +1,172 @@ +From 7c493590933bf80e01e0cb87e30a2d1e48ab7f39 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Wed, 27 Nov 2013 17:41:36 +0200 +Subject: [PATCH 19/21] Fix Makefile.am in debian folder. + +Change-Id: I30278a5d8046a1e87896426d2eb8aa6b93863a51 +Signed-off-by: Yaniv Bronhaim +Signed-off-by: Kiril Nesenko +Reviewed-on: http://gerrit.ovirt.org/21798 +--- + debian/Makefile.am | 148 ++++++++++++++++++++++++++--------------------------- + 1 file changed, 74 insertions(+), 74 deletions(-) + +diff --git a/debian/Makefile.am b/debian/Makefile.am +index 67cb2d2..25e79c3 100644 +--- a/debian/Makefile.am ++++ b/debian/Makefile.am +@@ -20,77 +20,77 @@ + include $(top_srcdir)/build-aux/Makefile.subs + + EXTRA_DIST = \ +- changelog \ +- compat \ +- control \ +- copyright \ +- dependencyMap.txt \ +- README.Debian \ +- rules \ +- source \ +- TODO \ +- vdsm-client.docs \ +- vdsm-client.install \ +- vdsm.dirs \ +- vdsm.docs \ +- vdsm-gluster.docs \ +- vdsm-gluster.install \ +- vdsm-hook-checkimages.docs \ +- vdsm-hook-checkimages.install \ +- vdsm-hook-directlun.docs \ +- vdsm-hook-directlun.install \ +- vdsm-hook-faqemu.docs \ +- vdsm-hook-faqemu.install \ +- vdsm-hook-fileinject.docs \ +- vdsm-hook-fileinject.install \ +- vdsm-hook-floppy.docs \ +- vdsm-hook-floppy.install \ +- vdsm-hook-hostusb.docs \ +- vdsm-hook-hostusb.install \ +- vdsm-hook-hugepages.docs \ +- vdsm-hook-hugepages.install \ +- vdsm-hook-isolatedprivatevlan.docs \ +- vdsm-hook-isolatedprivatevlan.install \ +- vdsm-hook-macspoof.docs \ +- vdsm-hook-macspoof.install \ +- vdsm-hook-nestedvt.docs \ +- vdsm-hook-nestedvt.install \ +- vdsm-hook-numa.docs \ +- vdsm-hook-numa.install \ +- vdsm-hook-openstacknet.docs \ +- vdsm-hook-openstacknet.install \ +- vdsm-hook-pincpu.docs \ +- vdsm-hook-pincpu.install \ +- vdsm-hook-promisc.docs \ +- vdsm-hook-promisc.install \ +- vdsm-hook-qemucmdline.docs \ +- vdsm-hook-qemucmdline.install \ +- vdsm-hook-qos.docs \ +- vdsm-hook-qos.install \ +- vdsm-hook-scratchpad.docs \ +- vdsm-hook-scratchpad.install \ +- vdsm-hook-smbios.docs \ +- vdsm-hook-smbios.install \ +- vdsm-hook-sriov.docs \ +- vdsm-hook-sriov.install \ +- vdsm-hook-vhostmd.docs \ +- vdsm-hook-vhostmd.install \ +- vdsm-hook-vmdisk.docs \ +- vdsm-hook-vmdisk.install \ +- vdsm-hook-vmfex.docs \ +- vdsm-hook-vmfex.install \ +- vdsm.install \ +- vdsm.postinst \ +- vdsm.postrm \ +- vdsm.preinst \ +- vdsm.prerm \ +- vdsm-python.docs \ +- vdsm-python.install \ +- vdsm-python-zombiereaper.docs \ +- vdsm-python-zombiereaper.install \ +- vdsm-tests.docs \ +- vdsm-tests.install \ +- vdsm-yajsonrpc.docs \ +- vdsm-yajsonrpc.install \ +- watch \ +- $(NULL) ++ changelog \ ++ compat \ ++ control \ ++ copyright \ ++ dependencyMap.txt \ ++ README.Debian \ ++ rules \ ++ source \ ++ TODO \ ++ vdsm-client.docs \ ++ vdsm-client.install \ ++ vdsm.dirs \ ++ vdsm.docs \ ++ vdsm-gluster.docs \ ++ vdsm-gluster.install \ ++ vdsm-hook-checkimages.docs \ ++ vdsm-hook-checkimages.install \ ++ vdsm-hook-directlun.docs \ ++ vdsm-hook-directlun.install \ ++ vdsm-hook-faqemu.docs \ ++ vdsm-hook-faqemu.install \ ++ vdsm-hook-fileinject.docs \ ++ vdsm-hook-fileinject.install \ ++ vdsm-hook-floppy.docs \ ++ vdsm-hook-floppy.install \ ++ vdsm-hook-hostusb.docs \ ++ vdsm-hook-hostusb.install \ ++ vdsm-hook-hugepages.docs \ ++ vdsm-hook-hugepages.install \ ++ vdsm-hook-isolatedprivatevlan.docs \ ++ vdsm-hook-isolatedprivatevlan.install \ ++ vdsm-hook-macspoof.docs \ ++ vdsm-hook-macspoof.install \ ++ vdsm-hook-nestedvt.docs \ ++ vdsm-hook-nestedvt.install \ ++ vdsm-hook-numa.docs \ ++ vdsm-hook-numa.install \ ++ vdsm-hook-openstacknet.docs \ ++ vdsm-hook-openstacknet.install \ ++ vdsm-hook-pincpu.docs \ ++ vdsm-hook-pincpu.install \ ++ vdsm-hook-promisc.docs \ ++ vdsm-hook-promisc.install \ ++ vdsm-hook-qemucmdline.docs \ ++ vdsm-hook-qemucmdline.install \ ++ vdsm-hook-qos.docs \ ++ vdsm-hook-qos.install \ ++ vdsm-hook-scratchpad.docs \ ++ vdsm-hook-scratchpad.install \ ++ vdsm-hook-smbios.docs \ ++ vdsm-hook-smbios.install \ ++ vdsm-hook-sriov.docs \ ++ vdsm-hook-sriov.install \ ++ vdsm-hook-vhostmd.docs \ ++ vdsm-hook-vhostmd.install \ ++ vdsm-hook-vmdisk.docs \ ++ vdsm-hook-vmdisk.install \ ++ vdsm-hook-vmfex.docs \ ++ vdsm-hook-vmfex.install \ ++ vdsm.install \ ++ vdsm.postinst \ ++ vdsm.postrm \ ++ vdsm.preinst \ ++ vdsm.prerm \ ++ vdsm-python-cpopen.docs \ ++ vdsm-python-cpopen.install \ ++ vdsm-python.docs \ ++ vdsm-python.install \ ++ vdsm-tests.docs \ ++ vdsm-tests.install \ ++ vdsm-yajsonrpc.docs \ ++ vdsm-yajsonrpc.install \ ++ watch \ ++ $(NULL) +-- +1.8.4.2 + diff --git a/0020-Disable-exception-on-after-hooks-failures.patch b/0020-Disable-exception-on-after-hooks-failures.patch new file mode 100644 index 0000000..1cce686 --- /dev/null +++ b/0020-Disable-exception-on-after-hooks-failures.patch @@ -0,0 +1,79 @@ +From 8dc7063183b4d3d3e0d809214a5df786bdcd105b Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Wed, 20 Nov 2013 16:07:21 +0200 +Subject: [PATCH 20/21] Disable exception on after hooks failures + +Adding to all after hooks - raiseError=False + +Change-Id: Ia3cc7b8e11f0e5b31984aaae9d9c47bd948b80c7 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/21464 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21767 +--- + vdsm/hooks.py | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/vdsm/hooks.py b/vdsm/hooks.py +index a1f8158..8b74907 100644 +--- a/vdsm/hooks.py ++++ b/vdsm/hooks.py +@@ -110,7 +110,7 @@ def before_device_create(devicexml, vmconf={}, customProperties={}): + + def after_device_create(devicexml, vmconf={}, customProperties={}): + return _runHooksDir(devicexml, 'after_device_create', vmconf=vmconf, +- params=customProperties) ++ params=customProperties, raiseError=False) + + + def before_device_destroy(devicexml, vmconf={}, customProperties={}): +@@ -120,7 +120,7 @@ def before_device_destroy(devicexml, vmconf={}, customProperties={}): + + def after_device_destroy(devicexml, vmconf={}, customProperties={}): + return _runHooksDir(devicexml, 'after_device_destroy', vmconf=vmconf, +- params=customProperties) ++ params=customProperties, raiseError=False) + + + def before_vm_start(domxml, vmconf={}): +@@ -157,7 +157,8 @@ def before_device_migrate_source(devicexml, vmconf={}, customProperties={}): + + def after_device_migrate_source(devicexml, vmconf={}, customProperties={}): + return _runHooksDir(devicexml, 'after_device_migrate_source', +- vmconf=vmconf, params=customProperties) ++ vmconf=vmconf, params=customProperties, ++ raiseError=False) + + + def before_device_migrate_destination( +@@ -169,7 +170,8 @@ def before_device_migrate_destination( + def after_device_migrate_destination( + devicexml, vmconf={}, customProperties={}): + return _runHooksDir(devicexml, 'after_device_migrate_destination', +- vmconf=vmconf, params=customProperties) ++ vmconf=vmconf, params=customProperties, ++ raiseError=False) + + + def before_vm_migrate_source(domxml, vmconf={}): +@@ -281,7 +283,7 @@ def before_disk_hotplug(domxml, vmconf={}, params={}): + + def after_disk_hotplug(domxml, vmconf={}, params={}): + return _runHooksDir(domxml, 'after_disk_hotplug', vmconf=vmconf, +- params=params) ++ params=params, raiseError=False) + + + def before_disk_hotunplug(domxml, vmconf={}, params={}): +@@ -291,7 +293,7 @@ def before_disk_hotunplug(domxml, vmconf={}, params={}): + + def after_disk_hotunplug(domxml, vmconf={}, params={}): + return _runHooksDir(domxml, 'after_disk_hotunplug', vmconf=vmconf, +- params=params) ++ params=params, raiseError=False) + + + def before_vdsm_start(): +-- +1.8.4.2 + diff --git a/0021-vm-Fix-vm-unpausing-during-recovery.patch b/0021-vm-Fix-vm-unpausing-during-recovery.patch new file mode 100644 index 0000000..3ebc943 --- /dev/null +++ b/0021-vm-Fix-vm-unpausing-during-recovery.patch @@ -0,0 +1,119 @@ +From c56375d5cdbf747405008a592d81f531c37053c3 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Mon, 25 Nov 2013 14:40:37 +0200 +Subject: [PATCH 21/21] vm: Fix vm unpausing during recovery + +Domain monitor thread was not reporting when going from unknown state to +known state. The thread would start with a bogus valid state, before +checking the domain. If the first domain check found the domain as +valid, no notification was emitted. If there were paused vms while +connecting to the pool, they were not unpaused as they should. + +This patch fixes various modules: + +- Domain monitor status lastCheck is initialized now to special + NOT_CHECKED_YET value. The monitor thread use this value to detect the + first sample, and emit the missing notification. + +- To get the new event when monitor thread starts, domain state change + callbacks are registered now *before* the monitor threads are started. + +- To get the vm unpause code to work in recovery mode, the Vm.sdIds is + initialized in Vm._run. This probably fixes other issues with + recovered vms. + +This is a backport of http://gerrit.ovirt.org/21649. + +Change-Id: I56c468edb967de5bcf15259029ace84333fc4b7e +Bug-Url: https://bugzilla.redhat.com/1003588 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21782 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/domainMonitor.py | 10 ++++++++-- + vdsm/storage/hsm.py | 10 +++++++--- + vdsm/vm.py | 4 ++++ + 3 files changed, 19 insertions(+), 5 deletions(-) + +diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py +index a998f80..ffa5e00 100644 +--- a/vdsm/storage/domainMonitor.py ++++ b/vdsm/storage/domainMonitor.py +@@ -27,6 +27,8 @@ import misc + from vdsm.config import config + from sdc import sdCache + ++NOT_CHECKED_YET = -1 ++ + + class DomainMonitorStatus(object): + __slots__ = ( +@@ -41,7 +43,7 @@ class DomainMonitorStatus(object): + + def clear(self): + self.error = None +- self.lastCheck = time() ++ self.lastCheck = NOT_CHECKED_YET + self.valid = True + self.readDelay = 0 + self.diskUtilization = (None, None) +@@ -228,7 +230,7 @@ class DomainMonitorThread(object): + self.nextStatus.lastCheck = time() + self.nextStatus.valid = (self.nextStatus.error is None) + +- if self.status.valid != self.nextStatus.valid: ++ if self._statusDidChange(): + self.log.debug("Domain %s changed its status to %s", self.sdUUID, + "Valid" if self.nextStatus.valid else "Invalid") + +@@ -250,3 +252,7 @@ class DomainMonitorThread(object): + self.sdUUID, exc_info=True) + + self.status.update(self.nextStatus) ++ ++ def _statusDidChange(self): ++ return (self.status.lastCheck == NOT_CHECKED_YET or ++ self.status.valid != self.nextStatus.valid) +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index d4c5dfc..a91ae92 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -1051,12 +1051,16 @@ class HSM: + pool = sp.StoragePool(spUUID, self.taskMng) + if not hostID or not scsiKey or not msdUUID or not masterVersion: + hostID, scsiKey, msdUUID, masterVersion = pool.getPoolParams() ++ ++ # Must register domain state change callbacks *before* connecting ++ # the pool, which starts domain monitor threads. Otherwise we will ++ # miss the first event from the monitor thread. ++ for cb in self.domainStateChangeCallbacks: ++ pool.domainMonitor.onDomainStateChange.register(cb) ++ + res = pool.connect(hostID, scsiKey, msdUUID, masterVersion) + if res: + self.pools[spUUID] = pool +- for callback in self.domainStateChangeCallbacks: +- self.pools[spUUID].domainMonitor.\ +- onDomainStateChange.register(callback) + return res + + @public +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 22d7a2d..b9ab60b 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -2953,6 +2953,10 @@ class Vm(object): + else: + devices = self.getConfDevices() + ++ for drive in devices[DISK_DEVICES]: ++ if drive['device'] == 'disk' and isVdsmImage(drive): ++ self.sdIds.append(drive['domainID']) ++ + devMap = {DISK_DEVICES: Drive, + NIC_DEVICES: NetworkInterfaceDevice, + SOUND_DEVICES: SoundDevice, +-- +1.8.4.2 + diff --git a/0022-Revert-fix-premature-selinux-dependency.patch b/0022-Revert-fix-premature-selinux-dependency.patch new file mode 100644 index 0000000..89deaa5 --- /dev/null +++ b/0022-Revert-fix-premature-selinux-dependency.patch @@ -0,0 +1,45 @@ +From c355df005001a3ed8e7b6b23467bb95bdc7fd199 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Thu, 31 Oct 2013 13:03:37 +0000 +Subject: [PATCH 1/2] Revert "fix premature selinux dependency" + +This reverts commit 6193dbe36d4d5e17a4c5342193e7f20d0bc8bc04 as +selinux-policy-3.7.19-195.el6_4.13 is out. + +Change-Id: Ie1a5225d9f3dde4fe7b394ed25408e29babc2f43 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/20760 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm.spec.in | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 08119d9..3296217 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -156,7 +156,7 @@ Requires: initscripts >= 9.03.31-2.el6_3.1 + Requires: policycoreutils >= 2.0.83-19.30 + Requires: policycoreutils-python >= 2.0.83-19.30 + Requires: python-pthreading +-Requires: selinux-policy-targeted >= 3.7.19-155 ++Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13 + Requires: lvm2 >= 2.02.95-10.el6_3.2 + Requires: logrotate < 3.8.0 + %endif +@@ -657,11 +657,6 @@ if [ "$1" -eq 1 ] ; then + /sbin/chkconfig --add vdsmd + /sbin/chkconfig --add supervdsmd + /sbin/chkconfig --add vdsm-restore-net-config +- +- # drop this ugly hack when selinux-policy-3.7.19-195.el6.13 is released +- /usr/sbin/semanage fcontext -a -s system_u -t virt_var_run_t -r s0 \ +- '/var/run/vdsm(/.*)?' +- /sbin/restorecon /var/run/vdsm + fi + %else + %if 0%{?with_systemd} +-- +1.8.4.2 + diff --git a/0023-vdsm.spec-conditional-to-execute-semanage.patch b/0023-vdsm.spec-conditional-to-execute-semanage.patch new file mode 100644 index 0000000..abff1df --- /dev/null +++ b/0023-vdsm.spec-conditional-to-execute-semanage.patch @@ -0,0 +1,37 @@ +From 16e0b098ff5be2f25d8497a08b6fc2de6022610c Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Thu, 28 Nov 2013 12:14:12 -0500 +Subject: [PATCH 2/2] vdsm.spec: conditional to execute semanage + +To avoid load policy when selinux is disabled, only +execute semanage when selinux is enabled. + +Change-Id: I1d40e6d9dcaac16d74c685e4a6a6d5cb130ac531 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/21830 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm.spec.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 3296217..0bb73b1 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -649,8 +649,11 @@ if grep -q "# VDSM section begin" /etc/sysctl.conf; then + fi + + # hack until we replace core dump with abrt +-/usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' ++if /usr/sbin/selinuxenabled; then ++ /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' ++fi + /sbin/restorecon -R -v /var/log/core ++# hack until we replace core dump with abrt + + %if 0%{?rhel} + if [ "$1" -eq 1 ] ; then +-- +1.8.4.2 + diff --git a/0024-vdsm.spec-conditional-for-hostname-require.patch b/0024-vdsm.spec-conditional-for-hostname-require.patch new file mode 100644 index 0000000..b3d0b30 --- /dev/null +++ b/0024-vdsm.spec-conditional-for-hostname-require.patch @@ -0,0 +1,124 @@ +From 16017316a84e25122e2f32c2732b46c8a5549a57 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Thu, 28 Nov 2013 09:35:20 -0500 +Subject: [PATCH] vdsm.spec: conditional for hostname require + +Fedora rawhide (F21) build is failing because cannot locate /bin/hostname. +It has changed to /usr/bin/hostname as changelog from hostname 3.14-2. + +Koji info: +http://koji.fedoraproject.org/koji/buildinfo?buildID=471302 + +Change-Id: I865d1b84fe646932d3039b131bc236d36b8550ba +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/21194 +Reviewed-by: Bala.FA +Reviewed-by: Yaniv Bronhaim +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21840 +--- + .gitignore | 1 + + configure.ac | 1 + + vdsm.spec.in | 6 ++++++ + vdsm/gluster/Makefile.am | 17 ++++++++++++++++- + vdsm/gluster/{hostname.py => hostname.py.in} | 6 +----- + 5 files changed, 25 insertions(+), 6 deletions(-) + rename vdsm/gluster/{hostname.py => hostname.py.in} (83%) + +diff --git a/configure.ac b/configure.ac +index fac9755..52105e9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -199,6 +199,7 @@ AC_PATH_PROG([FENCE_AGENT_PATH], [fence_ilo], [/usr/sbin/fence_ilo]) + AC_PATH_PROG([FUSER_PATH], [fuser], [/sbin/fuser]) + AC_PATH_PROG([GREP_PATH], [grep], [/bin/grep]) + AC_PATH_PROG([GRUBBY_PATH], [grubby], [/sbin/grubby]) ++AC_PATH_PROG([HOSTNAME_PATH], [hostname], [/usr/bin/hostname]) + AC_PATH_PROG([HWCLOCK_PATH], [hwclock], [/usr/sbin/hwclock]) + AC_PATH_PROG([IFDOWN_PATH], [ifdown], [/sbin/ifdown]) + AC_PATH_PROG([IFUP_PATH], [ifup], [/sbin/ifup]) +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 0bb73b1..00f8c70 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -220,7 +220,13 @@ Requires: %{name}-python = %{version}-%{release} + Requires: pyparted + + Requires(post): /usr/sbin/saslpasswd2 ++ ++%if 0%{?fedora} && 0%{?fedora} >= 21 ++Requires(post): hostname ++%else + Requires(post): /bin/hostname ++%endif ++ + Requires(post): policycoreutils-python + Requires(preun): policycoreutils-python + +diff --git a/vdsm/gluster/Makefile.am b/vdsm/gluster/Makefile.am +index dd5434d..ea36692 100644 +--- a/vdsm/gluster/Makefile.am ++++ b/vdsm/gluster/Makefile.am +@@ -21,16 +21,31 @@ + include $(top_srcdir)/build-aux/Makefile.subs + + vdsmglusterdir = $(vdsmdir)/gluster ++ ++nodist_vdsmgluster_PYTHON = \ ++ hostname.py ++ $(NULL) ++ + dist_vdsmgluster_PYTHON = \ + __init__.py \ + api.py \ + cli.py \ + exception.py \ + hooks.py \ +- hostname.py \ + services.py \ + $(NULL) + + dist_vdsmgluster_DATA = \ + vdsmapi-gluster-schema.json \ + $(NULL) ++ ++EXTRA_DIST = \ ++ hostname.py.in ++ $(NULL) ++ ++CLEANFILES = \ ++ hostname.py ++ $(NULL) ++ ++all-local: \ ++ $(nodist_vdsmgluster_PYTHON) +diff --git a/vdsm/gluster/hostname.py b/vdsm/gluster/hostname.py.in +similarity index 83% +rename from vdsm/gluster/hostname.py +rename to vdsm/gluster/hostname.py.in +index ffcf6c2..c817b0a 100644 +--- a/vdsm/gluster/hostname.py ++++ b/vdsm/gluster/hostname.py.in +@@ -20,10 +20,6 @@ + + from vdsm import utils + +-_hostNameCommandPath = utils.CommandPath("hostname", +- "/bin/hostname", +- ) +- + + class HostNameException(Exception): + def __init__(self, rc): +@@ -35,7 +31,7 @@ class HostNameException(Exception): + + + def getHostNameFqdn(): +- rc, out, err = utils.execCmd([_hostNameCommandPath.cmd, '--fqdn']) ++ rc, out, err = utils.execCmd(['@HOSTNAME_PATH@', '--fqdn']) + if rc: + raise HostNameException(rc) + else: +-- +1.8.4.2 + diff --git a/vdsm.spec b/vdsm.spec index c54173a..a89ac5a 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.13.0 -Release: 13%{?dist}%{?extra_release} +Release: 14%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -60,6 +60,31 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz +# ovirt-3.3.2 patches +Patch0: 0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch +Patch1: 0002-vm-refresh-raw-disk-before-live-extension.patch +Patch2: 0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch +Patch3: 0004-vm-unify-_highWrite-and-_onAbnormalStop.patch +Patch4: 0005-vm-prevent-faulty-volume-extensions.patch +Patch5: 0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch +Patch6: 0007-Report-qemu-kvm-rhev-if-installed.patch +Patch7: 0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch +Patch8: 0009-lvm-Deactivate-lvs-during-bootstrap.patch +Patch9: 0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch +Patch10: 0011-Peform-related-services-restart-after-reconfiguring.patch +Patch11: 0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch +Patch12: 0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch +Patch13: 0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch +Patch14: 0015-Migration-cancellation-replies-wrong-message-format.patch +Patch15: 0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch +Patch16: 0017-fuserTests-fix-for-f20-and-arch.patch +Patch17: 0018-Adding-debian-folder-makefile.patch +Patch18: 0019-Fix-Makefile.am-in-debian-folder.patch +Patch19: 0020-Disable-exception-on-after-hooks-failures.patch +Patch20: 0021-vm-Fix-vm-unpausing-during-recovery.patch +Patch21: 0022-Revert-fix-premature-selinux-dependency.patch +Patch22: 0023-vdsm.spec-conditional-to-execute-semanage.patch +Patch23: 0024-vdsm.spec-conditional-for-hostname-require.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -170,7 +195,7 @@ Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: policycoreutils >= 2.0.83-19.30 Requires: policycoreutils-python >= 2.0.83-19.30 Requires: python-pthreading -Requires: selinux-policy-targeted >= 3.7.19-155 +Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13 Requires: lvm2 >= 2.02.95-10.el6_3.2 Requires: logrotate < 3.8.0 %endif @@ -560,6 +585,32 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +# ovirt-3.3.2 patches +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -663,7 +714,7 @@ export LC_ALL=C # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd -# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm. +# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. # So Remove them if it is played with /etc/sysctl.conf. if grep -q "# VDSM section begin" /etc/sysctl.conf; then /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ @@ -671,19 +722,17 @@ if grep -q "# VDSM section begin" /etc/sysctl.conf; then fi # hack until we replace core dump with abrt -/usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' +if /usr/sbin/selinuxenabled; then + /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' +fi /sbin/restorecon -R -v /var/log/core +# hack until we replace core dump with abrt %if 0%{?rhel} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd /sbin/chkconfig --add supervdsmd /sbin/chkconfig --add vdsm-restore-net-config - - # drop this ugly hack when selinux-policy-3.7.19-195.el6.13 is released - /usr/sbin/semanage fcontext -a -s system_u -t virt_var_run_t -r s0 \ - '/var/run/vdsm(/.*)?' - /sbin/restorecon /var/run/vdsm fi %else %if 0%{?with_systemd} @@ -770,11 +819,9 @@ if [ "$1" -ge 1 ]; then %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 supervdsmd_start_required='yes' fi - if %{_bindir}/vdsm-tool libvirt-configure | grep -q 'is done.'; then - if %{_bindir}/vdsm-tool service-status libvirtd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-restart libvirtd >/dev/null 2>&1 - fi - fi + + %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1 + if [ "${supervdsmd_start_required}" = 'yes' ]; then %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 fi @@ -886,7 +933,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm -%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm +%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf %if 0%{?with_systemd} %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf %endif @@ -917,12 +964,8 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/fileUtils.py* %{_datadir}/%{vdsm_name}/storage/fileVolume.py* %{_datadir}/%{vdsm_name}/storage/fuser.py* -%if 0%{?with_gluster} %{_datadir}/%{vdsm_name}/storage/glusterSD.py* %{_datadir}/%{vdsm_name}/storage/glusterVolume.py* -%else -%exclude %{_datadir}/%{vdsm_name}/storage/gluster* -%endif %{_datadir}/%{vdsm_name}/storage/hba.py* %{_datadir}/%{vdsm_name}/storage/hsm.py* %{_datadir}/%{vdsm_name}/storage/image.py* @@ -1108,14 +1151,10 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out -%if 0%{?with_gluster} %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml -%else -%exclude %{_datadir}/%{vdsm_name}/tests/gluster* -%endif %{_datadir}/%{vdsm_name}/tests/functional/*.py* %{_datadir}/%{vdsm_name}/tests/functional/*.policy @@ -1336,11 +1375,10 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog -* Tue Nov 19 2013 Douglas Schilling Landgraf - 4.13.0-13 -- remove duplicate require hostname - -* Wed Nov 13 2013 Douglas Schilling Landgraf - 4.13.0-12 -- Update spec to fit a new validation for hostname requires. +* Thu Nov 28 2013 Yaniv Bronhaim - 4.13.0-14 +- Adding update patches from branch ovirt-3.3 +- Declaring ovirt-3.3.2 patchsets scope in spec which declares all the merged +new patches * Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 - update from branch ovirt-3.3 which include: From ec83ab33b237014afae05a722a7980b48705f33e Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Wed, 11 Dec 2013 09:11:28 +0200 Subject: [PATCH 059/126] Bumping vdsm version to 4.13.2 - ovirt-3.3.2 tag --- vdsm.spec | 64 +++++++------------------------------------------------ 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index a89ac5a..97c6358 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,8 +45,8 @@ %endif Name: %{vdsm_name} -Version: 4.13.0 -Release: 14%{?dist}%{?extra_release} +Version: 4.13.2 +Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -60,32 +60,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -# ovirt-3.3.2 patches -Patch0: 0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch -Patch1: 0002-vm-refresh-raw-disk-before-live-extension.patch -Patch2: 0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch -Patch3: 0004-vm-unify-_highWrite-and-_onAbnormalStop.patch -Patch4: 0005-vm-prevent-faulty-volume-extensions.patch -Patch5: 0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch -Patch6: 0007-Report-qemu-kvm-rhev-if-installed.patch -Patch7: 0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch -Patch8: 0009-lvm-Deactivate-lvs-during-bootstrap.patch -Patch9: 0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch -Patch10: 0011-Peform-related-services-restart-after-reconfiguring.patch -Patch11: 0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch -Patch12: 0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch -Patch13: 0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch -Patch14: 0015-Migration-cancellation-replies-wrong-message-format.patch -Patch15: 0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch -Patch16: 0017-fuserTests-fix-for-f20-and-arch.patch -Patch17: 0018-Adding-debian-folder-makefile.patch -Patch18: 0019-Fix-Makefile.am-in-debian-folder.patch -Patch19: 0020-Disable-exception-on-after-hooks-failures.patch -Patch20: 0021-vm-Fix-vm-unpausing-during-recovery.patch -Patch21: 0022-Revert-fix-premature-selinux-dependency.patch -Patch22: 0023-vdsm.spec-conditional-to-execute-semanage.patch -Patch23: 0024-vdsm.spec-conditional-for-hostname-require.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -585,31 +559,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -# ovirt-3.3.2 patches -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1375,10 +1324,13 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Tue Dec 10 2013 Yaniv Bronhaim - 4.13.2-0 +- Bumping minor version due to recent merge of ovirt-3.3 patches + * Thu Nov 28 2013 Yaniv Bronhaim - 4.13.0-14 -- Adding update patches from branch ovirt-3.3 -- Declaring ovirt-3.3.2 patchsets scope in spec which declares all the merged -new patches +- Adding update patches from branch ovirt-3.3 starts with + 0001-Invalidate-filters-on-HSMs-before-rescanning-extende till + 0024-vdsm.spec-conditional-for-hostname-require.patch * Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 - update from branch ovirt-3.3 which include: From b745e44cd1b85e32ee5a0a7ed44915b5493714a2 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Wed, 11 Dec 2013 09:12:51 +0200 Subject: [PATCH 060/126] Removing patchset of ovirt-3.3 patches from repository --- ...rs-on-HSMs-before-rescanning-extende.patch | 67 ------- ...fresh-raw-disk-before-live-extension.patch | 41 ----- ...ctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch | 81 --------- ...unify-_highWrite-and-_onAbnormalStop.patch | 109 ----------- ...-vm-prevent-faulty-volume-extensions.patch | 79 -------- ...rse-grain-libvirt.rpm-may-be-missing.patch | 73 -------- 0007-Report-qemu-kvm-rhev-if-installed.patch | 35 ---- ...multiple-LVs-to-be-refreshed-at-once.patch | 63 ------- ...-lvm-Deactivate-lvs-during-bootstrap.patch | 115 ------------ ...ndentation-to-comply-with-pep8-1.3.3.patch | 40 ---- ...services-restart-after-reconfiguring.patch | 118 ------------ ...s-in-the-vm-name-break-the-migration.patch | 36 ---- ...ion-of-migrations-gets-handled-corre.patch | 93 ---------- ...r-modules-when-with_gluster-set-to-0.patch | 104 ----------- ...llation-replies-wrong-message-format.patch | 47 ----- ...fix-linkShowDev-parsing-in-getVlanID.patch | 66 ------- 0017-fuserTests-fix-for-f20-and-arch.patch | 45 ----- 0018-Adding-debian-folder-makefile.patch | 150 --------------- 0019-Fix-Makefile.am-in-debian-folder.patch | 172 ------------------ ...le-exception-on-after-hooks-failures.patch | 79 -------- ...-vm-Fix-vm-unpausing-during-recovery.patch | 119 ------------ ...ert-fix-premature-selinux-dependency.patch | 45 ----- ...spec-conditional-to-execute-semanage.patch | 37 ---- ...pec-conditional-for-hostname-require.patch | 124 ------------- sources | 2 +- vdsm.spec | 6 +- 26 files changed, 4 insertions(+), 1942 deletions(-) delete mode 100644 0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch delete mode 100644 0002-vm-refresh-raw-disk-before-live-extension.patch delete mode 100644 0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch delete mode 100644 0004-vm-unify-_highWrite-and-_onAbnormalStop.patch delete mode 100644 0005-vm-prevent-faulty-volume-extensions.patch delete mode 100644 0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch delete mode 100644 0007-Report-qemu-kvm-rhev-if-installed.patch delete mode 100644 0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch delete mode 100644 0009-lvm-Deactivate-lvs-during-bootstrap.patch delete mode 100644 0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch delete mode 100644 0011-Peform-related-services-restart-after-reconfiguring.patch delete mode 100644 0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch delete mode 100644 0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch delete mode 100644 0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch delete mode 100644 0015-Migration-cancellation-replies-wrong-message-format.patch delete mode 100644 0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch delete mode 100644 0017-fuserTests-fix-for-f20-and-arch.patch delete mode 100644 0018-Adding-debian-folder-makefile.patch delete mode 100644 0019-Fix-Makefile.am-in-debian-folder.patch delete mode 100644 0020-Disable-exception-on-after-hooks-failures.patch delete mode 100644 0021-vm-Fix-vm-unpausing-during-recovery.patch delete mode 100644 0022-Revert-fix-premature-selinux-dependency.patch delete mode 100644 0023-vdsm.spec-conditional-to-execute-semanage.patch delete mode 100644 0024-vdsm.spec-conditional-for-hostname-require.patch diff --git a/0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch b/0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch deleted file mode 100644 index 8127536..0000000 --- a/0001-Invalidate-filters-on-HSMs-before-rescanning-extende.patch +++ /dev/null @@ -1,67 +0,0 @@ -From d6589211bbe9b9b8975faecd6b04ea297bfeea4f Mon Sep 17 00:00:00 2001 -From: Pavel Zhukov -Date: Fri, 25 Oct 2013 11:10:39 +0200 -Subject: [PATCH 01/21] Invalidate filters on HSMs before rescanning extended - VG -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -domainMonitor thread might use stale lvm filters while running vgs -command after extending of the VG (added PV is missed in the filter -set). Since LvmCache doesn't invalidate filters, the volume -group is marked as partial and domainMonitor selftest fails -(host goes to non-operational status). By design filter should be -invalidated if cmd returns nonzero code but vgs returns zero even if -devices are filtered . The patch introduces public method for -filter invalidation and calls it from the getDevicesVisibility -because getDevicesVisibility is called on all DC hosts after -adding new device but before extendSD. - -Change-Id: If1eeed1c203f2c8c73370987048565d665932299 -Bugzilla-Url: https://bugzilla.redhat.com/1022976 -Signed-off-by: Pavel Zhukov -Signed-off-by: Sergey Gotliv -Reviewed-on: http://gerrit.ovirt.org/20552 -Reviewed-by: Tomáš Došek -Reviewed-by: Sergey Gotliv -Reviewed-by: Ayal Baron -Reviewed-by: Nir Soffer -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/21223 -Reviewed-by: Allon Mureinik ---- - vdsm/storage/hsm.py | 1 + - vdsm/storage/lvm.py | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index 1307699..3e0c022 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -1996,6 +1996,7 @@ class HSM: - :rtype: dict - """ - visibility = self.scanDevicesVisibility(guids) -+ lvm.invalidateFilter() - for guid in guids: - if visibility[guid]: - visibility[guid] = (os.stat('/dev/mapper/' + guid).st_mode & -diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py -index 065e1ea..7f87362 100644 ---- a/vdsm/storage/lvm.py -+++ b/vdsm/storage/lvm.py -@@ -1313,6 +1313,10 @@ def lvsByTag(vgName, tag): - return [lv for lv in getLV(vgName) if tag in lv.tags] - - -+def invalidateFilter(): -+ _lvminfo.invalidateFilter() -+ -+ - # Fix me: unify with addTag - def replaceLVTag(vg, lv, deltag, addtag): - """ --- -1.8.4.2 - diff --git a/0002-vm-refresh-raw-disk-before-live-extension.patch b/0002-vm-refresh-raw-disk-before-live-extension.patch deleted file mode 100644 index bac974f..0000000 --- a/0002-vm-refresh-raw-disk-before-live-extension.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 97eeb3f814659ff81bed6b9e5817b6fffa9825a8 Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Tue, 12 Nov 2013 09:02:08 -0500 -Subject: [PATCH 02/21] vm: refresh raw disk before live extension - -As part of the online disk extension (raw format on block domains) flow -the leaf logical volume is extended by the SPM to the new size. -On the HSM host (where the VM is running) we need to refresh the volume -in order to update the volume segments and make the new size visible to -the qemu process. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1029501 -Change-Id: I4fc3b578a865e25586a719f7c5120df12842d046 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/21177 -Reviewed-by: Ayal Baron -Reviewed-on: http://gerrit.ovirt.org/21274 ---- - vdsm/vm.py | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 1a16d53..475f6ce 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -4054,6 +4054,12 @@ class Vm(object): - return {'status': doneCode, 'size': str(sizeRoundedBytes)} - - def _diskSizeExtendRaw(self, drive, newSizeBytes): -+ # Picking up the volume size extension -+ self.__refreshDriveVolume({ -+ 'domainID': drive.domainID, 'poolID': drive.poolID, -+ 'imageID': drive.imageID, 'volumeID': drive.volumeID, -+ }) -+ - volumeInfo = self.cif.irs.getVolumeSize( - drive.domainID, drive.poolID, drive.imageID, drive.volumeID) - --- -1.8.4.2 - diff --git a/0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch b/0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch deleted file mode 100644 index 54e8170..0000000 --- a/0003-Renaming-etc-sysctl.d-vdsm-to-etc-sysctl.d-vdsm.conf.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 03008aac61d426777bd2fc34ba7f9e3f2032a95b Mon Sep 17 00:00:00 2001 -From: Sandro Bonazzola -Date: Tue, 12 Nov 2013 11:14:24 +0100 -Subject: [PATCH 03/21] Renaming /etc/sysctl.d/vdsm to /etc/sysctl.d/vdsm.conf - -Fixing Bug #740887 it has been added the file /etc/sysctl.d/vdsm which -works fine on RHEL and CentOS but it's not read on Fedora because -it should be /etc/sysctl.d/vdsm.conf ( see sysctl --system output ) - -Change-Id: I4ac929db854d7a5f9bd96d144e8ef36070f74126 -Bug-Url: https://bugzilla.redhat.com/1029368 -Signed-off-by: Sandro Bonazzola -Reviewed-on: http://gerrit.ovirt.org/21160 -Reviewed-by: Yaniv Bronhaim -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21202 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Douglas Schilling Landgraf ---- - debian/vdsm.install | 2 +- - debian/vdsm.postinst | 2 +- - init/vdsmd_init_common.sh.in | 2 +- - vdsm.spec.in | 4 ++-- - vdsm/Makefile.am | 4 ++-- - 5 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in -index 38da542..89c60e9 100644 ---- a/init/vdsmd_init_common.sh.in -+++ b/init/vdsmd_init_common.sh.in -@@ -93,7 +93,7 @@ task_load_needed_modules(){ - - - task_tune_system(){ -- "@SYSCTL_PATH@" -q -p "/etc/sysctl.d/vdsm" -+ "@SYSCTL_PATH@" -q -p "/etc/sysctl.d/vdsm.conf" - } - - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index eae38fa..5e306e4 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -641,7 +641,7 @@ export LC_ALL=C - # set the vdsm "secret" password for libvirt - %{_bindir}/vdsm-tool set-saslpasswd - --# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm. -+# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. - # So Remove them if it is played with /etc/sysctl.conf. - if grep -q "# VDSM section begin" /etc/sysctl.conf; then - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ -@@ -864,7 +864,7 @@ exit 0 - %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy - %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm - %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm --%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm -+%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf - %if 0%{?with_systemd} - %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf - %endif -diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am -index 305ef6b..26be4dc 100644 ---- a/vdsm/Makefile.am -+++ b/vdsm/Makefile.am -@@ -239,10 +239,10 @@ uninstall-data-sudoers: - install-data-sysctl: - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d - $(INSTALL_DATA) $(srcdir)/vdsm-sysctl.conf \ -- $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm -+ $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm.conf - - uninstall-data-sysctl: -- $(RM) $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm -+ $(RM) $(DESTDIR)$(sysconfdir)/sysctl.d/vdsm.conf - - install-data-dhclient-hooks: - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/dhcp/dhclient.d --- -1.8.4.2 - diff --git a/0004-vm-unify-_highWrite-and-_onAbnormalStop.patch b/0004-vm-unify-_highWrite-and-_onAbnormalStop.patch deleted file mode 100644 index 3346a4b..0000000 --- a/0004-vm-unify-_highWrite-and-_onAbnormalStop.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 8a34b1055736aa677ce5fcd88f0086c0df6c599c Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Wed, 6 Nov 2013 08:50:57 -0500 -Subject: [PATCH 04/21] vm: unify _highWrite and _onAbnormalStop - -Both _highWrite and _onAbnormalStop should share the same logic about -the volume extension. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998443 -Change-Id: I4fd790986b81402847b06810529841cfd7bae119 -Signed-off-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/20966 -Reviewed-by: Sergey Gotliv -Reviewed-by: Ayal Baron -Reviewed-on: http://gerrit.ovirt.org/21382 -Tested-by: Allon Mureinik -Reviewed-by: Allon Mureinik -Reviewed-by: Dan Kenigsberg ---- - vdsm/vm.py | 59 ++++++++++++++++++++++++----------------------------------- - 1 file changed, 24 insertions(+), 35 deletions(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 475f6ce..2bf9a1e 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -504,22 +504,7 @@ class VmStatsThread(sampling.AdvancedStatsThread): - if not self._vm.isDisksStatsCollectionEnabled(): - # Avoid queries from storage during recovery process - return -- -- for vmDrive in self._vm._devices[DISK_DEVICES]: -- if not vmDrive.blockDev or vmDrive.format != 'cow': -- continue -- -- capacity, alloc, physical = \ -- self._vm._dom.blockInfo(vmDrive.path, 0) -- -- if physical - alloc >= vmDrive.watermarkLimit: -- continue -- -- self._log.info('%s/%s apparent: %s capacity: %s, alloc: %s, ' -- 'phys: %s', vmDrive.domainID, vmDrive.volumeID, -- vmDrive.apparentsize, capacity, alloc, physical) -- -- self._vm.extendDriveVolume(vmDrive) -+ self._vm.extendDrivesIfNeeded() - - def _updateVolumes(self): - if not self._vm.isDisksStatsCollectionEnabled(): -@@ -2272,6 +2257,27 @@ class Vm(object): - with self._confLock: - self.conf['timeOffset'] = timeOffset - -+ def extendDrivesIfNeeded(self): -+ extend = [] -+ -+ for drive in self._devices[DISK_DEVICES]: -+ if not drive.blockDev or drive.format != 'cow': -+ continue -+ -+ capacity, alloc, physical = self._dom.blockInfo(drive.path, 0) -+ if physical - alloc < drive.watermarkLimit: -+ extend.append((drive, capacity, alloc, physical)) -+ -+ for drive, capacity, alloc, physical in extend: -+ self.log.info( -+ "Requesting extension for volume %s on domain %s (apparent: " -+ "%s, capacity: %s, allocated: %s, physical: %s)", -+ drive.volumeID, drive.domainID, drive.apparentsize, capacity, -+ alloc, physical) -+ self.extendDriveVolume(drive) -+ -+ return len(extend) > 0 -+ - def extendDriveVolume(self, vmDrive): - if not vmDrive.blockDev: - return -@@ -4208,25 +4214,8 @@ class Vm(object): - self.conf['pauseCode'] = err.upper() - self._guestCpuRunning = False - if err.upper() == 'ENOSPC': -- for d in self._devices[DISK_DEVICES]: -- if d.alias == blockDevAlias: -- #in the case of a qcow2-like file stored inside a block -- #device 'physical' will give the block device size, while -- #'allocation' will give the qcow2 image size -- #D. Berrange -- capacity, alloc, physical = self._dom.blockInfo(d.path, 0) -- if (physical > -- (alloc + config.getint( -- 'irs', 'volume_utilization_chunk_mb'))): -- self.log.warn('%s = %s/%s error %s phys: %s alloc: %s ' -- 'Ingnoring already managed event.', -- blockDevAlias, d.domainID, d.volumeID, -- err, physical, alloc) -- return -- self.log.info('%s = %s/%s error %s phys: %s alloc: %s', -- blockDevAlias, d.domainID, d.volumeID, err, -- physical, alloc) -- self.extendDriveVolume(d) -+ if not self.extendDrivesIfNeeded(): -+ self.log.info("No VM drives were extended") - - def _acpiShutdown(self): - self._dom.shutdownFlags(libvirt.VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN) --- -1.8.4.2 - diff --git a/0005-vm-prevent-faulty-volume-extensions.patch b/0005-vm-prevent-faulty-volume-extensions.patch deleted file mode 100644 index a1f4d20..0000000 --- a/0005-vm-prevent-faulty-volume-extensions.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 7a5649330298880c9ac2cd80815b0d06dac738df Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Mon, 11 Nov 2013 09:05:05 -0500 -Subject: [PATCH 05/21] vm: prevent faulty volume extensions - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998443 -Change-Id: If7e85c50f375ed7ed0297330b8cd83e38e0986c7 -Signed-off-by: Federico Simoncelli -Signed-off-by: Yeela Kaplan -Reviewed-on: http://gerrit.ovirt.org/21150 -Reviewed-by: Sergey Gotliv -Reviewed-by: Ayal Baron -Reviewed-by: Allon Mureinik -Reviewed-on: http://gerrit.ovirt.org/21383 -Reviewed-by: Dan Kenigsberg ---- - vdsm/vm.py | 35 +++++++++++++++++++++++++++++++++-- - 1 file changed, 33 insertions(+), 2 deletions(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 2bf9a1e..0921fb2 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -2265,6 +2265,36 @@ class Vm(object): - continue - - capacity, alloc, physical = self._dom.blockInfo(drive.path, 0) -+ -+ # Since the check based on nextPhysSize is extremly risky (it -+ # may result in the VM being paused) we can't use the regular -+ # getNextVolumeSize call as it relies on a cached value of the -+ # drive apparentsize. -+ nextPhysSize = physical + drive.VOLWM_CHUNK_MB * constants.MEGAB -+ -+ # NOTE: the intent of this check is to prevent faulty images to -+ # trick qemu in requesting extremely large extensions (BZ#998443). -+ # Probably the definitive check would be comparing the allocated -+ # space with capacity + format_overhead. Anyway given that: -+ # -+ # - format_overhead is tricky to be computed (it depends on few -+ # assumptions that may change in the future e.g. cluster size) -+ # - currently we allow only to extend by one chunk at time -+ # -+ # the current check compares alloc with the next volume size. -+ # It should be noted that alloc cannot be directly compared with -+ # the volume physical size as it includes also the clusters not -+ # written yet (pending). -+ if alloc > nextPhysSize: -+ self.log.error( -+ "Improbable extension request for volume %s on domain " -+ "%s, pausing the VM to avoid corruptions (capacity: %s, " -+ "allocated: %s, physical: %s, next physical size: %s)", -+ drive.volumeID, drive.domainID, capacity, alloc, -+ physical, nextPhysSize) -+ self.pause(pauseCode='EOTHER') -+ return False -+ - if physical - alloc < drive.watermarkLimit: - extend.append((drive, capacity, alloc, physical)) - -@@ -2415,12 +2445,13 @@ class Vm(object): - if not guestCpuLocked: - self._guestCpuLock.release() - -- def pause(self, afterState='Paused', guestCpuLocked=False): -+ def pause(self, afterState='Paused', guestCpuLocked=False, -+ pauseCode='NOERR'): - if not guestCpuLocked: - self._acquireCpuLockWithTimeout() - try: - with self._confLock: -- self.conf['pauseCode'] = 'NOERR' -+ self.conf['pauseCode'] = pauseCode - self._underlyingPause() - if hasattr(self, 'updateGuestCpuRunning'): - self.updateGuestCpuRunning() --- -1.8.4.2 - diff --git a/0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch b/0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch deleted file mode 100644 index 7ebdfd5..0000000 --- a/0006-caps-coarse-grain-libvirt.rpm-may-be-missing.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 9792e7e2ec67bf29bcd2083125792d55f5bfab28 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Mon, 16 Sep 2013 16:02:46 +0100 -Subject: [PATCH 06/21] caps: coarse-grain libvirt.rpm may be missing - -As of http://gerrit.ovirt.org/15761 we no longer require the legacy -libvirt.rpm to be installed on Fedora, so getCaps should not look for -it. Instead, it should report the information of the installed -libvirt-daemon-kvm.rpm. - -Without this patch we get an annoying - (_getKeyPackages) rpm package libvirt not found -log message, and do not report libvirt's version. - -Change-Id: I733a1a2411c910caa030e435c2a7f751a8e4dad4 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/19295 -Reviewed-by: mooli tayer -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/21363 -Tested-by: Yaniv Bronhaim -Reviewed-by: Yaniv Bronhaim ---- - vdsm/caps.py | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/vdsm/caps.py b/vdsm/caps.py -index 3a7a6a2..c5ecadc 100644 ---- a/vdsm/caps.py -+++ b/vdsm/caps.py -@@ -20,6 +20,7 @@ - - """Collect host capabilities""" - -+import itertools - import os - from xml.dom import minidom - import logging -@@ -323,12 +324,12 @@ def _getKeyPackages(): - pkgs = {'kernel': kernelDict()} - - if getos() in (OSName.RHEVH, OSName.OVIRT, OSName.FEDORA, OSName.RHEL): -- KEY_PACKAGES = {'qemu-kvm': 'qemu-kvm', -- 'qemu-img': 'qemu-img', -- 'vdsm': 'vdsm', -- 'spice-server': 'spice-server', -- 'libvirt': 'libvirt', -- 'mom': 'mom', -+ KEY_PACKAGES = {'qemu-kvm': ('qemu-kvm',), -+ 'qemu-img': ('qemu-img',), -+ 'vdsm': ('vdsm',), -+ 'spice-server': ('spice-server',), -+ 'libvirt': ('libvirt', 'libvirt-daemon-kvm'), -+ 'mom': ('mom',), - } - - if _glusterEnabled: -@@ -337,9 +338,10 @@ def _getKeyPackages(): - try: - ts = rpm.TransactionSet() - -- for pkg in KEY_PACKAGES: -+ for pkg, names in KEY_PACKAGES.iteritems(): - try: -- mi = ts.dbMatch('name', KEY_PACKAGES[pkg]).next() -+ mi = itertools.chain(*[ts.dbMatch('name', name) -+ for name in names]).next() - except StopIteration: - logging.debug("rpm package %s not found", - KEY_PACKAGES[pkg]) --- -1.8.4.2 - diff --git a/0007-Report-qemu-kvm-rhev-if-installed.patch b/0007-Report-qemu-kvm-rhev-if-installed.patch deleted file mode 100644 index 3ac4763..0000000 --- a/0007-Report-qemu-kvm-rhev-if-installed.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0150a6ed14787830527adcc5e137e2402569331f Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 13 Nov 2013 13:18:43 +0000 -Subject: [PATCH 07/21] Report qemu-kvm-rhev if installed - -Change-Id: If6b59241bbf38b6cd15fd941e1f68115853d22c1 -Bug-Url: https://bugzilla.redhat.com/1029792 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21226 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/21364 -Tested-by: Yaniv Bronhaim -Reviewed-by: Yaniv Bronhaim ---- - vdsm/caps.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm/caps.py b/vdsm/caps.py -index c5ecadc..a6e22d2 100644 ---- a/vdsm/caps.py -+++ b/vdsm/caps.py -@@ -324,8 +324,8 @@ def _getKeyPackages(): - pkgs = {'kernel': kernelDict()} - - if getos() in (OSName.RHEVH, OSName.OVIRT, OSName.FEDORA, OSName.RHEL): -- KEY_PACKAGES = {'qemu-kvm': ('qemu-kvm',), -- 'qemu-img': ('qemu-img',), -+ KEY_PACKAGES = {'qemu-kvm': ('qemu-kvm', 'qemu-kvm-rhev'), -+ 'qemu-img': ('qemu-img', 'qemu-img-rhev'), - 'vdsm': ('vdsm',), - 'spice-server': ('spice-server',), - 'libvirt': ('libvirt', 'libvirt-daemon-kvm'), --- -1.8.4.2 - diff --git a/0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch b/0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch deleted file mode 100644 index 14d7ef3..0000000 --- a/0008-lvm-Allow-multiple-LVs-to-be-refreshed-at-once.patch +++ /dev/null @@ -1,63 +0,0 @@ -From e789aec721baf6f77a9ac304375d0e170cf63358 Mon Sep 17 00:00:00 2001 -From: Lee Yarwood -Date: Mon, 18 Nov 2013 16:30:51 +0000 -Subject: [PATCH 08/21] lvm: Allow multiple LVs to be refreshed at once - -lvm.refreshLV() function used to accept only single lv, requiring -multiple invocations for refreshing multiple lvs, although lvm allows -refreshing of multiple lvs. This patch rename the function and accept -multiple lvs and invoke lvchange once with given lvs. - -This change is required for patch http://gerrit.ovirt.org/#/c/21501. - -Change-Id: I1ecc64b8ca0133b030ba5bfa37f1a2c55067dd5d -Bug-Url: https://bugzilla.redhat.com/1009812 -Signed-off-by: Lee Yarwood -Reviewed-on: http://gerrit.ovirt.org/19871 -Reviewed-by: Nir Soffer -Reviewed-by: Allon Mureinik -Tested-by: Nir Soffer -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/21500 ---- - vdsm/storage/blockVolume.py | 2 +- - vdsm/storage/lvm.py | 9 +++++---- - 2 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py -index badf2c1..958a04d 100644 ---- a/vdsm/storage/blockVolume.py -+++ b/vdsm/storage/blockVolume.py -@@ -95,7 +95,7 @@ class BlockVolume(volume.Volume): - volume.Volume.validate(self) - - def refreshVolume(self): -- lvm.refreshLV(self.sdUUID, self.volUUID) -+ lvm.refreshLVs(self.sdUUID, (self.volUUID,)) - - @classmethod - def getVSize(cls, sdobj, imgUUID, volUUID, bs=BLOCK_SIZE): -diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py -index 7f87362..b195343 100644 ---- a/vdsm/storage/lvm.py -+++ b/vdsm/storage/lvm.py -@@ -1150,11 +1150,12 @@ def renameLV(vg, oldlv, newlv): - _lvminfo._reloadlvs(vg, newlv) - - --def refreshLV(vgName, lvName): -- # If the logical volume is active, reload its metadata. -- cmd = ['lvchange', '--refresh', "%s/%s" % (vgName, lvName)] -+def refreshLVs(vgName, lvNames): -+ # If the logical volumes are active, reload their metadata. -+ cmd = ['lvchange', '--refresh'] -+ cmd.extend("%s/%s" % (vgName, lv) for lv in lvNames) - rc, out, err = _lvminfo.cmd(cmd, _lvminfo._getVGDevs((vgName, ))) -- _lvminfo._invalidatelvs(vgName, lvName) -+ _lvminfo._invalidatelvs(vgName, lvNames) - if rc != 0: - raise se.LogicalVolumeRefreshError("%s failed" % list2cmdline(cmd)) - --- -1.8.4.2 - diff --git a/0009-lvm-Deactivate-lvs-during-bootstrap.patch b/0009-lvm-Deactivate-lvs-during-bootstrap.patch deleted file mode 100644 index 0e1eb1e..0000000 --- a/0009-lvm-Deactivate-lvs-during-bootstrap.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 08650fe0d462f4d877792c020e26b2fd19c1ccf4 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Fri, 15 Nov 2013 01:19:32 +0200 -Subject: [PATCH 09/21] lvm: Deactivate lvs during bootstrap - -When using FC storage, physical volumes are connected during boot, and vdsm -logical volumes are auto-activated by both /etc/rc.sysinit and -/etc/init.d/netfs startup scripts. These logical volumes do not pick changes -done by the SPM on the storage, which may lead to data corruption sooner or -later, when a vm is trying to write to logical volume with stale meta data. - -This patch check all vdsm logical volumes during lvm bootstrap and -deactivate them if possible. Special logical volumes are refreshed, -since they are accessed early when connecting to storage pool, possibly -before lvm bootstrap is done. Open logical volumes are skipped because -we assume that they use correct meta data when opened. - -To fix the auto-activation during boot, we could perform this only on -the first start of the service and limit the operation to FC storage. -However, we decided to use this on all block storage types, and on every -start of the service, as additional layer of protection from logical -volumes left active after unclean shutdown of the service, or other -failures to deactivate logical volumes. - -Deactivation adds up to two lvchange calls for each volume group with -active logical volumes. After the first service start, logical volumes -are typically inactive and this change adds minimal additional cost, -refreshing active special logical volumes. - -Depends on http://gerrit.ovirt.org/#/c/21500/ for refreshing multiple -logical volumes in one call. - -Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db -Bug-Url: https://bugzilla.redhat.com/1009812 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21291 -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/21501 -Reviewed-by: Allon Mureinik ---- - vdsm/storage/hsm.py | 2 +- - vdsm/storage/lvm.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 45 insertions(+), 1 deletion(-) - -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index 3e0c022..d4c5dfc 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -371,7 +371,7 @@ class HSM: - self.log.warn("Failed to clean Storage Repository.", exc_info=True) - - def storageRefresh(): -- lvm._lvminfo.bootstrap() -+ lvm.bootstrap(refreshlvs=blockSD.SPECIAL_LVS) - sdCache.refreshStorage() - - fileUtils.createdir(self.tasksDir) -diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py -index b195343..52bb8b3 100644 ---- a/vdsm/storage/lvm.py -+++ b/vdsm/storage/lvm.py -@@ -650,6 +650,50 @@ class LVMCache(object): - _lvminfo = LVMCache() - - -+def bootstrap(refreshlvs=()): -+ """ -+ Bootstrap lvm module -+ -+ This function builds the lvm cache and ensure that all unused lvs are -+ deactivated, expect lvs matching refreshlvs, which are refreshed instead. -+ """ -+ _lvminfo.bootstrap() -+ -+ refreshlvs = set(refreshlvs) -+ -+ for vg in _lvminfo.getAllVgs(): -+ deactivate = [] -+ refresh = [] -+ -+ for lv in _lvminfo.getLv(vg.name): -+ if lv.active: -+ if lv.name in refreshlvs: -+ refresh.append(lv.name) -+ elif lv.opened: -+ log.debug("Skipping open lv: vg=%s lv=%s", vg.name, -+ lv.name) -+ else: -+ deactivate.append(lv.name) -+ -+ if deactivate: -+ log.info("Deactivating lvs: vg=%s lvs=%s", vg.name, deactivate) -+ try: -+ _setLVAvailability(vg.name, deactivate, "n") -+ except se.CannotDeactivateLogicalVolume: -+ log.error("Error deactivating lvs: vg=%s lvs=%s", vg.name, -+ deactivate) -+ # Some lvs are inactive now -+ _lvminfo._invalidatelvs(vg.name, deactivate) -+ -+ if refresh: -+ log.info("Refreshing lvs: vg=%s lvs=%s", vg.name, refresh) -+ try: -+ refreshLVs(vg.name, refresh) -+ except se.LogicalVolumeRefreshError: -+ log.error("Error refreshing lvs: vg=%s lvs=%s", vg.name, -+ refresh) -+ -+ - def invalidateCache(): - _lvminfo.invalidateCache() - --- -1.8.4.2 - diff --git a/0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch b/0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch deleted file mode 100644 index 948f77f..0000000 --- a/0010-pep8-Fix-indentation-to-comply-with-pep8-1.3.3.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1114579a64370cdda1b554e90718c1fba90195fd Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Thu, 7 Nov 2013 20:37:14 +0200 -Subject: [PATCH 10/21] pep8: Fix indentation to comply with pep8 1.3.3 - -Commit 2c9f0d66db7795 introduced a pep8 indentation regression, breaking -the build on RHEL using vdsm provided pep8. This patch fixes the -indentation by breaking long statement to multiple lines. - -Change-Id: I3431742f9dbfd86a9816c7b3c6de90e282dbd415 -Relates-To: https://bugzilla.redhat.com/1022975 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21055 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21196 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/imageRepository/formatConverter.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py -index 441f484..c701163 100644 ---- a/vdsm/storage/imageRepository/formatConverter.py -+++ b/vdsm/storage/imageRepository/formatConverter.py -@@ -276,8 +276,8 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): - - for volUUID in imgVolumes: - try: -- v3ResetMetaVolSize( # BZ#811880 -- domain.produceVolume(imgUUID, volUUID)) -+ vol = domain.produceVolume(imgUUID, volUUID) -+ v3ResetMetaVolSize(vol) # BZ#811880 - except qemuImg.QImgError: - log.error("It is not possible to read the volume %s " - "using qemu-img, the content looks damaged", --- -1.8.4.2 - diff --git a/0011-Peform-related-services-restart-after-reconfiguring.patch b/0011-Peform-related-services-restart-after-reconfiguring.patch deleted file mode 100644 index 2fed013..0000000 --- a/0011-Peform-related-services-restart-after-reconfiguring.patch +++ /dev/null @@ -1,118 +0,0 @@ -From e686703f15ca86973d36174e33c18adc9bc3b4e1 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Sun, 24 Nov 2013 14:08:15 +0200 -Subject: [PATCH 11/21] Peform related services restart after reconfiguring - -Although we tried to avoid doing restart to external services as part of -the pre-start of vdsm, the full implementation of vdsm-tool API that allows to -check isconfigured before performing the configuration itself is missing in -ovirt-3.3. - -Currently when running libvirt-configure we return 0 (SUCCESS) on both -reconfigure and if libvirt conf is already configured with vdsm details. -That's lead to a problem to decide when to stop the pre-start part and wait -for manual restart, or continue as it is already working with the right -configurations. - -To avoid more changes, we return the auto restart to allow easy start of -vdsm without more specific tweaks. - -Change-Id: I8216f9556e6ef4df96977db494c5b5169bfae80a -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031592 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/21356 -Reviewed-by: Alon Bar-Lev -Reviewed-by: Dan Kenigsberg ---- - README | 4 +--- - init/systemd/systemd-vdsmd.in | 3 +-- - init/sysvinit/vdsmd.init.in | 3 +-- - lib/vdsm/tool/libvirt_configure.sh.in | 9 ++------- - vdsm.spec.in | 7 +++---- - 5 files changed, 8 insertions(+), 18 deletions(-) - -diff --git a/README b/README -index 7ddce56..e3f70ef 100644 ---- a/README -+++ b/README -@@ -25,11 +25,9 @@ start you can do - make - sudo make install - --Before starting the VDSM service in the first time, you must configure and --restart libvirt service: -+Before starting the VDSM service in the first time, you must configure libvirt - - vdsm-tool libvirt-configure -- vdsm-tool libvirt-configure-services-restart - - Packaging - ========= -diff --git a/init/systemd/systemd-vdsmd.in b/init/systemd/systemd-vdsmd.in -index 692e5eb..cf20b84 100644 ---- a/init/systemd/systemd-vdsmd.in -+++ b/init/systemd/systemd-vdsmd.in -@@ -26,5 +26,4 @@ usage_exit(){ - [ "$1" != "reconfigure" ] && usage_exit - [ -n "$2" -a "$2" != "force" ] && usage_exit - --"@BINDIR@/vdsm-tool" libvirt-configure ${2:+--force} && -- "@BINDIR@/vdsm-tool" libvirt-configure-services-restart -+"@BINDIR@/vdsm-tool" libvirt-configure ${2:+--force} -diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in -index efd9c35..dc7847e 100755 ---- a/init/sysvinit/vdsmd.init.in -+++ b/init/sysvinit/vdsmd.init.in -@@ -117,8 +117,7 @@ test_already_running() - reconfigure_libvirt() { - local force - [ "${1}" = "force" ] && force="--force" -- "$VDSM_TOOL" libvirt-configure ${force} && -- "$VDSM_TOOL" libvirt-configure-services-restart -+ "$VDSM_TOOL" libvirt-configure ${force} - } - - start() { -diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in -index 18ebe60..cf70f59 100755 ---- a/lib/vdsm/tool/libvirt_configure.sh.in -+++ b/lib/vdsm/tool/libvirt_configure.sh.in -@@ -291,15 +291,10 @@ EOF - ovirt_store_config "${lconf}" "${qconf}" "${ldconf}" "${llogr}" - fi - -+ /usr/bin/vdsm-tool libvirt-configure-services-restart || return 1 -+ - echo "Reconfiguration of libvirt is done." - echo -- cat << __EOF__ --To start working with the new configuration, execute: --'vdsm-tool libvirt-configure-services-restart' --This will manage restarting of the following services: --libvirtd, supervdsmd --__EOF__ -- echo - - # - # finished reconfiguration, do not trigger -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 5e306e4..26cf267 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -748,10 +748,9 @@ if [ "$1" -ge 1 ]; then - %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 - supervdsmd_start_required='yes' - fi -- if %{_bindir}/vdsm-tool libvirt-configure | grep -q 'is done.'; then -- if %{_bindir}/vdsm-tool service-status libvirtd >/dev/null 2>&1; then -- %{_bindir}/vdsm-tool service-restart libvirtd >/dev/null 2>&1 -- fi -+ -+ %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1 -+ - fi - if [ "${supervdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 --- -1.8.4.2 - diff --git a/0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch b/0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch deleted file mode 100644 index 142b9dd..0000000 --- a/0012-vdsm-Accents-in-the-vm-name-break-the-migration.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 36d8edd5fe8b0ca13f4e0a4aa2e649e6435373b6 Mon Sep 17 00:00:00 2001 -From: Martin Betak -Date: Mon, 30 Sep 2013 14:35:36 +0200 -Subject: [PATCH 12/21] vdsm: Accents in the vm name break the migration - -Added utf-8 encoding of the configuration xml on the destination to -handle non-ascii characters. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1002246 -Change-Id: I9db5ea4f0745ef42633e3d265bcf40fb4733b2ce -Signed-off-by: Martin Betak -Reviewed-on: http://gerrit.ovirt.org/19684 -Reviewed-by: Federico Simoncelli -Reviewed-by: Michal Skrivanek -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21521 ---- - vdsm/vm.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 0921fb2..7e986a9 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -4910,7 +4910,7 @@ class Vm(object): - if not self._pathsPreparedEvent.isSet(): - self.log.debug('Timeout while waiting for path preparation') - return False -- srcDomXML = self.conf.pop('_srcDomXML') -+ srcDomXML = self.conf.pop('_srcDomXML').encode('utf-8') - self._updateDevicesDomxmlCache(srcDomXML) - - for dev in self._customDevices(): --- -1.8.4.2 - diff --git a/0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch b/0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch deleted file mode 100644 index 4d1992f..0000000 --- a/0013-Ensure-cancellation-of-migrations-gets-handled-corre.patch +++ /dev/null @@ -1,93 +0,0 @@ -From fd7dffbea5f3b2b5510f64f5e748c475ed2df49f Mon Sep 17 00:00:00 2001 -From: Martin Polednik -Date: Wed, 20 Nov 2013 08:17:34 +0100 -Subject: [PATCH 13/21] Ensure cancellation of migrations gets handled - correctly - -If the migration is cancelled before the source calls libvirt.migrateToURI2 -we have to raise an libvirtError with the VIR_ERROR_OPERATION_ABORTED error -code to ensure that _finishSuccessfully() does not get called and we're -correctly reporting that the migration has been cancelled and that we're -destroying the VM on the destination in the process, since we're bailing -out. - -Additionally we'll do the check if the migration has been cancelled -right after the semaphore has been accquired, to avoid doing things -like calling the before_vm_migration_source hook and calling the -destination vdsm to create the VM instance. - -Change-Id: Id271a41466bc355ca505f764206457af419f0edd -Bug-Url: https://bugzilla.redhat.com/1023131 -Signed-off-by: Martin Polednik -Signed-off-by: Vinzenz Feenstra -Reviewed-on: http://gerrit.ovirt.org/21445 -Reviewed-by: Michal Skrivanek -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21536 ---- - vdsm/vm.py | 21 +++++++++++++++++++-- - 1 file changed, 19 insertions(+), 2 deletions(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 7e986a9..f2971fe 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -145,7 +145,7 @@ class MigrationSourceThread(threading.Thread): - 'message': 'Migration in progress'}, - 'progress': 0} - threading.Thread.__init__(self) -- self._preparingMigrationEvt = False -+ self._preparingMigrationEvt = True - self._migrationCanceledEvt = False - self._monitorThread = None - -@@ -288,6 +288,19 @@ class MigrationSourceThread(threading.Thread): - # vdsm < 4.13 expect this to exist - self._machineParams['afterMigrationStatus'] = '' - -+ @staticmethod -+ def _raiseAbortError(): -+ e = libvirt.libvirtError(defmsg='') -+ # we have to override the value to get what we want -+ # err might be None -+ e.err = (libvirt.VIR_ERR_OPERATION_ABORTED, # error code -+ libvirt.VIR_FROM_QEMU, # error domain -+ 'operation aborted', # error message -+ libvirt.VIR_ERR_WARNING, # error level -+ '', '', '', # str1, str2, str3, -+ -1, -1) # int1, int2 -+ raise e -+ - def run(self): - try: - mstate = '' -@@ -296,6 +309,8 @@ class MigrationSourceThread(threading.Thread): - self._prepareGuest() - MigrationSourceThread._ongoingMigrations.acquire() - try: -+ if self._migrationCanceledEvt: -+ self._raiseAbortError() - self.log.debug("migration semaphore acquired") - if not mstate: - self._vm.conf['_migrationParams'] = { -@@ -321,7 +336,6 @@ class MigrationSourceThread(threading.Thread): - self.log.error("Failed to migrate", exc_info=True) - - def _startUnderlyingMigration(self): -- self._preparingMigrationEvt = True - if self._mode == 'file': - hooks.before_vm_hibernate(self._vm._dom.XMLDesc(0), self._vm.conf) - try: -@@ -383,6 +397,9 @@ class MigrationSourceThread(threading.Thread): - (libvirt.VIR_MIGRATE_TUNNELLED if - self._tunneled else 0), - None, maxBandwidth) -+ else: -+ self._raiseAbortError() -+ - finally: - t.cancel() - if MigrationMonitorThread._MIGRATION_MONITOR_INTERVAL: --- -1.8.4.2 - diff --git a/0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch b/0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch deleted file mode 100644 index 0dcc754..0000000 --- a/0014-Keeping-gluster-modules-when-with_gluster-set-to-0.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 3c07e78f63e21b530c897947ddf95b4ceea679d3 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Wed, 20 Nov 2013 18:21:26 +0200 -Subject: [PATCH 14/21] Keeping gluster modules when with_gluster set to 0 - -Currently the code imports and uses gluster modules. Setting -with_gluster=0 brakes the code. With this patch with_gluster=0 will -only drop the vdsm-gluster rpm creation. - -This patch was reviewed on - http://gerrit.ovirt.org/21477 && -http://gerrit.ovirt.org/#/c/21625/ (as a join of both patches) - -Change-Id: I1cdbd8b399652bf0d306308e2d4cfc0014be689c -Signed-off-by: Yaniv Bronhaim -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21577 ---- - vdsm.spec.in | 8 -------- - vdsm/storage/glusterVolume.py | 6 +++++- - vdsm/supervdsmServer | 12 +++++++++--- - 3 files changed, 14 insertions(+), 12 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 26cf267..08119d9 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -894,12 +894,8 @@ exit 0 - %{_datadir}/%{vdsm_name}/storage/fileUtils.py* - %{_datadir}/%{vdsm_name}/storage/fileVolume.py* - %{_datadir}/%{vdsm_name}/storage/fuser.py* --%if 0%{?with_gluster} - %{_datadir}/%{vdsm_name}/storage/glusterSD.py* - %{_datadir}/%{vdsm_name}/storage/glusterVolume.py* --%else --%exclude %{_datadir}/%{vdsm_name}/storage/gluster* --%endif - %{_datadir}/%{vdsm_name}/storage/hba.py* - %{_datadir}/%{vdsm_name}/storage/hsm.py* - %{_datadir}/%{vdsm_name}/storage/image.py* -@@ -1085,14 +1081,10 @@ exit 0 - %{_datadir}/%{vdsm_name}/tests/netmaskconversions - %{_datadir}/%{vdsm_name}/tests/run_tests.sh - %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out --%if 0%{?with_gluster} - %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml - %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml - %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml - %{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml --%else --%exclude %{_datadir}/%{vdsm_name}/tests/gluster* --%endif - %{_datadir}/%{vdsm_name}/tests/functional/*.py* - %{_datadir}/%{vdsm_name}/tests/functional/*.policy - -diff --git a/vdsm/storage/glusterVolume.py b/vdsm/storage/glusterVolume.py -index 3368de3..647b1ec 100644 ---- a/vdsm/storage/glusterVolume.py -+++ b/vdsm/storage/glusterVolume.py -@@ -2,7 +2,11 @@ from volume import VmVolumeInfo - import fileVolume - from sdc import sdCache - import supervdsm as svdsm --from gluster.exception import GlusterException -+try: -+ from gluster.exception import GlusterException -+ _glusterEnabled = True -+except ImportError: -+ _glusterEnabled = False - - - class GlusterVolume(fileVolume.FileVolume): -diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer -index 40ec9df..7fa1c2b 100755 ---- a/vdsm/supervdsmServer -+++ b/vdsm/supervdsmServer -@@ -43,7 +43,12 @@ except: - - from storage import fuser - from multiprocessing import Pipe, Process --from gluster import listPublicFunctions -+try: -+ from gluster import listPublicFunctions -+ _glusterEnabled = True -+except ImportError: -+ _glusterEnabled = False -+ - import storage.misc as misc - from vdsm import utils - from parted_utils import getDevicePartedInfo as _getDevicePartedInfo -@@ -362,8 +367,9 @@ def main(sockfile, pidfile=None): - return func(*args, **kwargs) - return wrapper - -- for name, func in listPublicFunctions(): -- setattr(_SuperVdsm, name, logDecorator(bind(func))) -+ if _glusterEnabled: -+ for name, func in listPublicFunctions(): -+ setattr(_SuperVdsm, name, logDecorator(bind(func))) - - try: - log.debug("Making sure I'm root - SuperVdsm") --- -1.8.4.2 - diff --git a/0015-Migration-cancellation-replies-wrong-message-format.patch b/0015-Migration-cancellation-replies-wrong-message-format.patch deleted file mode 100644 index 0723e6c..0000000 --- a/0015-Migration-cancellation-replies-wrong-message-format.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 618e0d4a8ec3f6b7ca0719d14f8231e0cd50e5f9 Mon Sep 17 00:00:00 2001 -From: Vinzenz Feenstra -Date: Thu, 14 Nov 2013 08:47:55 +0100 -Subject: [PATCH 15/21] Migration cancellation replies wrong message format - -The message currently returns: - -{'status': {'message': 'Migration canceled', - 'code': { 'status': { 'message': 'Migration not in progress', - 'code': 47}}}, - 'progress': 1} - -The content of code is wrong. This commit fixes it so the message will -look like this: - -{'status': {'message': 'Migration canceled', 'code': 47}, 'progress': 1} - -Change-Id: I17a2463154e9f67191a818f137a4e7158a74dbbb -Bug-Url: https://bugzilla.redhat.com/1015887 -Signed-off-by: Vinzenz Feenstra -Reviewed-on: http://gerrit.ovirt.org/21250 -Reviewed-by: Michal Skrivanek -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21700 -Tested-by: Yaniv Bronhaim -Reviewed-by: Yaniv Bronhaim ---- - vdsm/vm.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index f2971fe..22d7a2d 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -324,7 +324,8 @@ class MigrationSourceThread(threading.Thread): - self._finishSuccessfully() - except libvirt.libvirtError as e: - if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED: -- self.status['status']['code'] = errCode['migCancelErr'] -+ self.status['status']['code'] = \ -+ errCode['migCancelErr']['status']['code'] - self.status['status']['message'] = 'Migration canceled' - raise - finally: --- -1.8.4.2 - diff --git a/0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch b/0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch deleted file mode 100644 index 9a738ab..0000000 --- a/0016-F20-netinfo-fix-linkShowDev-parsing-in-getVlanID.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 06a2dbc7c28ea0985ce6166240ba621a924cd3bf Mon Sep 17 00:00:00 2001 -From: "Antoni S. Puimedon" -Date: Wed, 27 Nov 2013 01:35:52 +0100 -Subject: [PATCH 16/21] F20 netinfo: fix linkShowDev parsing in getVlanID - -Newer linux distributions return more detailed information for each -link. Where before we had: - - 3: enp3s0.11@enp3s0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default - link/ether c8:60:00:99:01:37 brd ff:ff:ff:ff:ff:ff promiscuity 0 - vlan id 11 - -Now we have: - - 3: enp3s0.11@enp3s0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default - link/ether c8:60:00:99:01:37 brd ff:ff:ff:ff:ff:ff promiscuity 0 - vlan protocol 802.1Q id 11 - -Thus, since after the vlan type indication we can have several key, value -pairs, it is necessary to change the parsing so that it looks at the keys -to decide if it's the value we want. - -This patch is a very very partial backport of the master branch fix: - http://gerrit.ovirt.org/#/c/21054/ -That patch was very complex and introduced different behaviors that -are not suitable for a backport such as the one this patch is doing. - -Change-Id: I6fbc492d2eee88e856e893ad69fe7552ede30b1a -Signed-off-by: Antoni S. Puimedon -Reviewed-on: http://gerrit.ovirt.org/21759 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Yaniv Bronhaim ---- - lib/vdsm/netinfo.py | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py -index ba78dc9..790c099 100644 ---- a/lib/vdsm/netinfo.py -+++ b/lib/vdsm/netinfo.py -@@ -568,15 +568,15 @@ def getVlanDevice(vlan): - - def getVlanID(vlan): - """ Return the ID of the given VLAN. """ -- vlanId = None - out = linkShowDev(vlan) - -- for item in out: -- if "vlan id" in item: -- vlanId = item.split()[2] -- break -- -- return int(vlanId) -+ vlanPos = out[2].find('vlan') -+ if vlanPos == -1: -+ raise ValueError('device %s does not seem to be a vlan' % vlan) -+ tokens = [token.strip() for token in out[2][vlanPos:].split(' ')] -+ for index, token in enumerate(tokens): -+ if "id" == token: -+ return int(tokens[index + 1]) - - - def getIpAddresses(): --- -1.8.4.2 - diff --git a/0017-fuserTests-fix-for-f20-and-arch.patch b/0017-fuserTests-fix-for-f20-and-arch.patch deleted file mode 100644 index 339a0f0..0000000 --- a/0017-fuserTests-fix-for-f20-and-arch.patch +++ /dev/null @@ -1,45 +0,0 @@ -From df42ad1ec8f78a6c934c539cbe37efbd2d614009 Mon Sep 17 00:00:00 2001 -From: "Antoni S. Puimedon" -Date: Tue, 5 Nov 2013 15:11:19 +0100 -Subject: [PATCH 17/21] fuserTests fix for f20 and arch - -In newer distributions, fuser doesn't report a process as accessing -it's own executable file, making this test fail. We don't know why -this has changed (tried with newer kernels and newer fuser and the -issue persists) but we do not care enough about fuser reporting all -the pids from the processes created and alive of an executable file. -We fix this test for the fuser use case that we have. - -Change-Id: I9ead0d5dbed6a9373f1437f6484ba2f2ce108c2b -Signed-off-by: Antoni S. Puimedon -Reviewed-on: http://gerrit.ovirt.org/20921 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21740 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - tests/fuserTests.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tests/fuserTests.py b/tests/fuserTests.py -index 7473dde..6516758 100644 ---- a/tests/fuserTests.py -+++ b/tests/fuserTests.py -@@ -19,6 +19,7 @@ - # - - import os -+from tempfile import NamedTemporaryFile - from storage import fuser - - from testrunner import VdsmTestCase -@@ -28,4 +29,5 @@ class TestFuser(VdsmTestCase): - - def testSelfExe(self): - pid = os.getpid() -- self.assertTrue(pid in fuser.fuser('/proc/%s/exe' % pid)) -+ with NamedTemporaryFile() as tempFile: -+ self.assertTrue(pid in fuser.fuser(tempFile.name)) --- -1.8.4.2 - diff --git a/0018-Adding-debian-folder-makefile.patch b/0018-Adding-debian-folder-makefile.patch deleted file mode 100644 index 4d504f0..0000000 --- a/0018-Adding-debian-folder-makefile.patch +++ /dev/null @@ -1,150 +0,0 @@ -From c4c8f5c63c4afd3bf0ccde8d0c3e80470310d6fc Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Tue, 26 Nov 2013 11:10:23 +0200 -Subject: [PATCH 18/21] Adding debian folder makefile - -Change-Id: I31dad533c70b501c3d521364bd98eb30517d2f3f -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/21695 -Reviewed-by: Sandro Bonazzola -Reviewed-by: Kiril Nesenko -Reviewed-by: Zhou Zheng Sheng -Tested-by: Zhou Zheng Sheng -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21795 ---- - Makefile.am | 1 + - configure.ac | 1 + - debian/Makefile.am | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 98 insertions(+) - create mode 100644 debian/Makefile.am - -diff --git a/Makefile.am b/Makefile.am -index 195688f..d71ee28 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -20,6 +20,7 @@ - - SUBDIRS = \ - client \ -+ debian \ - init \ - lib \ - vds_bootstrap \ -diff --git a/configure.ac b/configure.ac -index 93b6b96..fac9755 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -247,6 +247,7 @@ AC_PATH_PROG([YUM_PATH], [yum], [/usr/bin/yum]) - AC_OUTPUT([ - Makefile - client/Makefile -+ debian/Makefile - init/Makefile - init/systemd/Makefile - init/sysvinit/Makefile -diff --git a/debian/Makefile.am b/debian/Makefile.am -new file mode 100644 -index 0000000..67cb2d2 ---- /dev/null -+++ b/debian/Makefile.am -@@ -0,0 +1,96 @@ -+# -+# Copyright 2013 Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+# -+# Refer to the README and COPYING files for full details of the license -+# -+include $(top_srcdir)/build-aux/Makefile.subs -+ -+EXTRA_DIST = \ -+ changelog \ -+ compat \ -+ control \ -+ copyright \ -+ dependencyMap.txt \ -+ README.Debian \ -+ rules \ -+ source \ -+ TODO \ -+ vdsm-client.docs \ -+ vdsm-client.install \ -+ vdsm.dirs \ -+ vdsm.docs \ -+ vdsm-gluster.docs \ -+ vdsm-gluster.install \ -+ vdsm-hook-checkimages.docs \ -+ vdsm-hook-checkimages.install \ -+ vdsm-hook-directlun.docs \ -+ vdsm-hook-directlun.install \ -+ vdsm-hook-faqemu.docs \ -+ vdsm-hook-faqemu.install \ -+ vdsm-hook-fileinject.docs \ -+ vdsm-hook-fileinject.install \ -+ vdsm-hook-floppy.docs \ -+ vdsm-hook-floppy.install \ -+ vdsm-hook-hostusb.docs \ -+ vdsm-hook-hostusb.install \ -+ vdsm-hook-hugepages.docs \ -+ vdsm-hook-hugepages.install \ -+ vdsm-hook-isolatedprivatevlan.docs \ -+ vdsm-hook-isolatedprivatevlan.install \ -+ vdsm-hook-macspoof.docs \ -+ vdsm-hook-macspoof.install \ -+ vdsm-hook-nestedvt.docs \ -+ vdsm-hook-nestedvt.install \ -+ vdsm-hook-numa.docs \ -+ vdsm-hook-numa.install \ -+ vdsm-hook-openstacknet.docs \ -+ vdsm-hook-openstacknet.install \ -+ vdsm-hook-pincpu.docs \ -+ vdsm-hook-pincpu.install \ -+ vdsm-hook-promisc.docs \ -+ vdsm-hook-promisc.install \ -+ vdsm-hook-qemucmdline.docs \ -+ vdsm-hook-qemucmdline.install \ -+ vdsm-hook-qos.docs \ -+ vdsm-hook-qos.install \ -+ vdsm-hook-scratchpad.docs \ -+ vdsm-hook-scratchpad.install \ -+ vdsm-hook-smbios.docs \ -+ vdsm-hook-smbios.install \ -+ vdsm-hook-sriov.docs \ -+ vdsm-hook-sriov.install \ -+ vdsm-hook-vhostmd.docs \ -+ vdsm-hook-vhostmd.install \ -+ vdsm-hook-vmdisk.docs \ -+ vdsm-hook-vmdisk.install \ -+ vdsm-hook-vmfex.docs \ -+ vdsm-hook-vmfex.install \ -+ vdsm.install \ -+ vdsm.postinst \ -+ vdsm.postrm \ -+ vdsm.preinst \ -+ vdsm.prerm \ -+ vdsm-python.docs \ -+ vdsm-python.install \ -+ vdsm-python-zombiereaper.docs \ -+ vdsm-python-zombiereaper.install \ -+ vdsm-tests.docs \ -+ vdsm-tests.install \ -+ vdsm-yajsonrpc.docs \ -+ vdsm-yajsonrpc.install \ -+ watch \ -+ $(NULL) --- -1.8.4.2 - diff --git a/0019-Fix-Makefile.am-in-debian-folder.patch b/0019-Fix-Makefile.am-in-debian-folder.patch deleted file mode 100644 index 92a07c1..0000000 --- a/0019-Fix-Makefile.am-in-debian-folder.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 7c493590933bf80e01e0cb87e30a2d1e48ab7f39 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Wed, 27 Nov 2013 17:41:36 +0200 -Subject: [PATCH 19/21] Fix Makefile.am in debian folder. - -Change-Id: I30278a5d8046a1e87896426d2eb8aa6b93863a51 -Signed-off-by: Yaniv Bronhaim -Signed-off-by: Kiril Nesenko -Reviewed-on: http://gerrit.ovirt.org/21798 ---- - debian/Makefile.am | 148 ++++++++++++++++++++++++++--------------------------- - 1 file changed, 74 insertions(+), 74 deletions(-) - -diff --git a/debian/Makefile.am b/debian/Makefile.am -index 67cb2d2..25e79c3 100644 ---- a/debian/Makefile.am -+++ b/debian/Makefile.am -@@ -20,77 +20,77 @@ - include $(top_srcdir)/build-aux/Makefile.subs - - EXTRA_DIST = \ -- changelog \ -- compat \ -- control \ -- copyright \ -- dependencyMap.txt \ -- README.Debian \ -- rules \ -- source \ -- TODO \ -- vdsm-client.docs \ -- vdsm-client.install \ -- vdsm.dirs \ -- vdsm.docs \ -- vdsm-gluster.docs \ -- vdsm-gluster.install \ -- vdsm-hook-checkimages.docs \ -- vdsm-hook-checkimages.install \ -- vdsm-hook-directlun.docs \ -- vdsm-hook-directlun.install \ -- vdsm-hook-faqemu.docs \ -- vdsm-hook-faqemu.install \ -- vdsm-hook-fileinject.docs \ -- vdsm-hook-fileinject.install \ -- vdsm-hook-floppy.docs \ -- vdsm-hook-floppy.install \ -- vdsm-hook-hostusb.docs \ -- vdsm-hook-hostusb.install \ -- vdsm-hook-hugepages.docs \ -- vdsm-hook-hugepages.install \ -- vdsm-hook-isolatedprivatevlan.docs \ -- vdsm-hook-isolatedprivatevlan.install \ -- vdsm-hook-macspoof.docs \ -- vdsm-hook-macspoof.install \ -- vdsm-hook-nestedvt.docs \ -- vdsm-hook-nestedvt.install \ -- vdsm-hook-numa.docs \ -- vdsm-hook-numa.install \ -- vdsm-hook-openstacknet.docs \ -- vdsm-hook-openstacknet.install \ -- vdsm-hook-pincpu.docs \ -- vdsm-hook-pincpu.install \ -- vdsm-hook-promisc.docs \ -- vdsm-hook-promisc.install \ -- vdsm-hook-qemucmdline.docs \ -- vdsm-hook-qemucmdline.install \ -- vdsm-hook-qos.docs \ -- vdsm-hook-qos.install \ -- vdsm-hook-scratchpad.docs \ -- vdsm-hook-scratchpad.install \ -- vdsm-hook-smbios.docs \ -- vdsm-hook-smbios.install \ -- vdsm-hook-sriov.docs \ -- vdsm-hook-sriov.install \ -- vdsm-hook-vhostmd.docs \ -- vdsm-hook-vhostmd.install \ -- vdsm-hook-vmdisk.docs \ -- vdsm-hook-vmdisk.install \ -- vdsm-hook-vmfex.docs \ -- vdsm-hook-vmfex.install \ -- vdsm.install \ -- vdsm.postinst \ -- vdsm.postrm \ -- vdsm.preinst \ -- vdsm.prerm \ -- vdsm-python.docs \ -- vdsm-python.install \ -- vdsm-python-zombiereaper.docs \ -- vdsm-python-zombiereaper.install \ -- vdsm-tests.docs \ -- vdsm-tests.install \ -- vdsm-yajsonrpc.docs \ -- vdsm-yajsonrpc.install \ -- watch \ -- $(NULL) -+ changelog \ -+ compat \ -+ control \ -+ copyright \ -+ dependencyMap.txt \ -+ README.Debian \ -+ rules \ -+ source \ -+ TODO \ -+ vdsm-client.docs \ -+ vdsm-client.install \ -+ vdsm.dirs \ -+ vdsm.docs \ -+ vdsm-gluster.docs \ -+ vdsm-gluster.install \ -+ vdsm-hook-checkimages.docs \ -+ vdsm-hook-checkimages.install \ -+ vdsm-hook-directlun.docs \ -+ vdsm-hook-directlun.install \ -+ vdsm-hook-faqemu.docs \ -+ vdsm-hook-faqemu.install \ -+ vdsm-hook-fileinject.docs \ -+ vdsm-hook-fileinject.install \ -+ vdsm-hook-floppy.docs \ -+ vdsm-hook-floppy.install \ -+ vdsm-hook-hostusb.docs \ -+ vdsm-hook-hostusb.install \ -+ vdsm-hook-hugepages.docs \ -+ vdsm-hook-hugepages.install \ -+ vdsm-hook-isolatedprivatevlan.docs \ -+ vdsm-hook-isolatedprivatevlan.install \ -+ vdsm-hook-macspoof.docs \ -+ vdsm-hook-macspoof.install \ -+ vdsm-hook-nestedvt.docs \ -+ vdsm-hook-nestedvt.install \ -+ vdsm-hook-numa.docs \ -+ vdsm-hook-numa.install \ -+ vdsm-hook-openstacknet.docs \ -+ vdsm-hook-openstacknet.install \ -+ vdsm-hook-pincpu.docs \ -+ vdsm-hook-pincpu.install \ -+ vdsm-hook-promisc.docs \ -+ vdsm-hook-promisc.install \ -+ vdsm-hook-qemucmdline.docs \ -+ vdsm-hook-qemucmdline.install \ -+ vdsm-hook-qos.docs \ -+ vdsm-hook-qos.install \ -+ vdsm-hook-scratchpad.docs \ -+ vdsm-hook-scratchpad.install \ -+ vdsm-hook-smbios.docs \ -+ vdsm-hook-smbios.install \ -+ vdsm-hook-sriov.docs \ -+ vdsm-hook-sriov.install \ -+ vdsm-hook-vhostmd.docs \ -+ vdsm-hook-vhostmd.install \ -+ vdsm-hook-vmdisk.docs \ -+ vdsm-hook-vmdisk.install \ -+ vdsm-hook-vmfex.docs \ -+ vdsm-hook-vmfex.install \ -+ vdsm.install \ -+ vdsm.postinst \ -+ vdsm.postrm \ -+ vdsm.preinst \ -+ vdsm.prerm \ -+ vdsm-python-cpopen.docs \ -+ vdsm-python-cpopen.install \ -+ vdsm-python.docs \ -+ vdsm-python.install \ -+ vdsm-tests.docs \ -+ vdsm-tests.install \ -+ vdsm-yajsonrpc.docs \ -+ vdsm-yajsonrpc.install \ -+ watch \ -+ $(NULL) --- -1.8.4.2 - diff --git a/0020-Disable-exception-on-after-hooks-failures.patch b/0020-Disable-exception-on-after-hooks-failures.patch deleted file mode 100644 index 1cce686..0000000 --- a/0020-Disable-exception-on-after-hooks-failures.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 8dc7063183b4d3d3e0d809214a5df786bdcd105b Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Wed, 20 Nov 2013 16:07:21 +0200 -Subject: [PATCH 20/21] Disable exception on after hooks failures - -Adding to all after hooks - raiseError=False - -Change-Id: Ia3cc7b8e11f0e5b31984aaae9d9c47bd948b80c7 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/21464 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21767 ---- - vdsm/hooks.py | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/vdsm/hooks.py b/vdsm/hooks.py -index a1f8158..8b74907 100644 ---- a/vdsm/hooks.py -+++ b/vdsm/hooks.py -@@ -110,7 +110,7 @@ def before_device_create(devicexml, vmconf={}, customProperties={}): - - def after_device_create(devicexml, vmconf={}, customProperties={}): - return _runHooksDir(devicexml, 'after_device_create', vmconf=vmconf, -- params=customProperties) -+ params=customProperties, raiseError=False) - - - def before_device_destroy(devicexml, vmconf={}, customProperties={}): -@@ -120,7 +120,7 @@ def before_device_destroy(devicexml, vmconf={}, customProperties={}): - - def after_device_destroy(devicexml, vmconf={}, customProperties={}): - return _runHooksDir(devicexml, 'after_device_destroy', vmconf=vmconf, -- params=customProperties) -+ params=customProperties, raiseError=False) - - - def before_vm_start(domxml, vmconf={}): -@@ -157,7 +157,8 @@ def before_device_migrate_source(devicexml, vmconf={}, customProperties={}): - - def after_device_migrate_source(devicexml, vmconf={}, customProperties={}): - return _runHooksDir(devicexml, 'after_device_migrate_source', -- vmconf=vmconf, params=customProperties) -+ vmconf=vmconf, params=customProperties, -+ raiseError=False) - - - def before_device_migrate_destination( -@@ -169,7 +170,8 @@ def before_device_migrate_destination( - def after_device_migrate_destination( - devicexml, vmconf={}, customProperties={}): - return _runHooksDir(devicexml, 'after_device_migrate_destination', -- vmconf=vmconf, params=customProperties) -+ vmconf=vmconf, params=customProperties, -+ raiseError=False) - - - def before_vm_migrate_source(domxml, vmconf={}): -@@ -281,7 +283,7 @@ def before_disk_hotplug(domxml, vmconf={}, params={}): - - def after_disk_hotplug(domxml, vmconf={}, params={}): - return _runHooksDir(domxml, 'after_disk_hotplug', vmconf=vmconf, -- params=params) -+ params=params, raiseError=False) - - - def before_disk_hotunplug(domxml, vmconf={}, params={}): -@@ -291,7 +293,7 @@ def before_disk_hotunplug(domxml, vmconf={}, params={}): - - def after_disk_hotunplug(domxml, vmconf={}, params={}): - return _runHooksDir(domxml, 'after_disk_hotunplug', vmconf=vmconf, -- params=params) -+ params=params, raiseError=False) - - - def before_vdsm_start(): --- -1.8.4.2 - diff --git a/0021-vm-Fix-vm-unpausing-during-recovery.patch b/0021-vm-Fix-vm-unpausing-during-recovery.patch deleted file mode 100644 index 3ebc943..0000000 --- a/0021-vm-Fix-vm-unpausing-during-recovery.patch +++ /dev/null @@ -1,119 +0,0 @@ -From c56375d5cdbf747405008a592d81f531c37053c3 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Mon, 25 Nov 2013 14:40:37 +0200 -Subject: [PATCH 21/21] vm: Fix vm unpausing during recovery - -Domain monitor thread was not reporting when going from unknown state to -known state. The thread would start with a bogus valid state, before -checking the domain. If the first domain check found the domain as -valid, no notification was emitted. If there were paused vms while -connecting to the pool, they were not unpaused as they should. - -This patch fixes various modules: - -- Domain monitor status lastCheck is initialized now to special - NOT_CHECKED_YET value. The monitor thread use this value to detect the - first sample, and emit the missing notification. - -- To get the new event when monitor thread starts, domain state change - callbacks are registered now *before* the monitor threads are started. - -- To get the vm unpause code to work in recovery mode, the Vm.sdIds is - initialized in Vm._run. This probably fixes other issues with - recovered vms. - -This is a backport of http://gerrit.ovirt.org/21649. - -Change-Id: I56c468edb967de5bcf15259029ace84333fc4b7e -Bug-Url: https://bugzilla.redhat.com/1003588 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21782 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/domainMonitor.py | 10 ++++++++-- - vdsm/storage/hsm.py | 10 +++++++--- - vdsm/vm.py | 4 ++++ - 3 files changed, 19 insertions(+), 5 deletions(-) - -diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py -index a998f80..ffa5e00 100644 ---- a/vdsm/storage/domainMonitor.py -+++ b/vdsm/storage/domainMonitor.py -@@ -27,6 +27,8 @@ import misc - from vdsm.config import config - from sdc import sdCache - -+NOT_CHECKED_YET = -1 -+ - - class DomainMonitorStatus(object): - __slots__ = ( -@@ -41,7 +43,7 @@ class DomainMonitorStatus(object): - - def clear(self): - self.error = None -- self.lastCheck = time() -+ self.lastCheck = NOT_CHECKED_YET - self.valid = True - self.readDelay = 0 - self.diskUtilization = (None, None) -@@ -228,7 +230,7 @@ class DomainMonitorThread(object): - self.nextStatus.lastCheck = time() - self.nextStatus.valid = (self.nextStatus.error is None) - -- if self.status.valid != self.nextStatus.valid: -+ if self._statusDidChange(): - self.log.debug("Domain %s changed its status to %s", self.sdUUID, - "Valid" if self.nextStatus.valid else "Invalid") - -@@ -250,3 +252,7 @@ class DomainMonitorThread(object): - self.sdUUID, exc_info=True) - - self.status.update(self.nextStatus) -+ -+ def _statusDidChange(self): -+ return (self.status.lastCheck == NOT_CHECKED_YET or -+ self.status.valid != self.nextStatus.valid) -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index d4c5dfc..a91ae92 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -1051,12 +1051,16 @@ class HSM: - pool = sp.StoragePool(spUUID, self.taskMng) - if not hostID or not scsiKey or not msdUUID or not masterVersion: - hostID, scsiKey, msdUUID, masterVersion = pool.getPoolParams() -+ -+ # Must register domain state change callbacks *before* connecting -+ # the pool, which starts domain monitor threads. Otherwise we will -+ # miss the first event from the monitor thread. -+ for cb in self.domainStateChangeCallbacks: -+ pool.domainMonitor.onDomainStateChange.register(cb) -+ - res = pool.connect(hostID, scsiKey, msdUUID, masterVersion) - if res: - self.pools[spUUID] = pool -- for callback in self.domainStateChangeCallbacks: -- self.pools[spUUID].domainMonitor.\ -- onDomainStateChange.register(callback) - return res - - @public -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 22d7a2d..b9ab60b 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -2953,6 +2953,10 @@ class Vm(object): - else: - devices = self.getConfDevices() - -+ for drive in devices[DISK_DEVICES]: -+ if drive['device'] == 'disk' and isVdsmImage(drive): -+ self.sdIds.append(drive['domainID']) -+ - devMap = {DISK_DEVICES: Drive, - NIC_DEVICES: NetworkInterfaceDevice, - SOUND_DEVICES: SoundDevice, --- -1.8.4.2 - diff --git a/0022-Revert-fix-premature-selinux-dependency.patch b/0022-Revert-fix-premature-selinux-dependency.patch deleted file mode 100644 index 89deaa5..0000000 --- a/0022-Revert-fix-premature-selinux-dependency.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c355df005001a3ed8e7b6b23467bb95bdc7fd199 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Thu, 31 Oct 2013 13:03:37 +0000 -Subject: [PATCH 1/2] Revert "fix premature selinux dependency" - -This reverts commit 6193dbe36d4d5e17a4c5342193e7f20d0bc8bc04 as -selinux-policy-3.7.19-195.el6_4.13 is out. - -Change-Id: Ie1a5225d9f3dde4fe7b394ed25408e29babc2f43 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/20760 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm.spec.in | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 08119d9..3296217 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -156,7 +156,7 @@ Requires: initscripts >= 9.03.31-2.el6_3.1 - Requires: policycoreutils >= 2.0.83-19.30 - Requires: policycoreutils-python >= 2.0.83-19.30 - Requires: python-pthreading --Requires: selinux-policy-targeted >= 3.7.19-155 -+Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13 - Requires: lvm2 >= 2.02.95-10.el6_3.2 - Requires: logrotate < 3.8.0 - %endif -@@ -657,11 +657,6 @@ if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsmd - /sbin/chkconfig --add supervdsmd - /sbin/chkconfig --add vdsm-restore-net-config -- -- # drop this ugly hack when selinux-policy-3.7.19-195.el6.13 is released -- /usr/sbin/semanage fcontext -a -s system_u -t virt_var_run_t -r s0 \ -- '/var/run/vdsm(/.*)?' -- /sbin/restorecon /var/run/vdsm - fi - %else - %if 0%{?with_systemd} --- -1.8.4.2 - diff --git a/0023-vdsm.spec-conditional-to-execute-semanage.patch b/0023-vdsm.spec-conditional-to-execute-semanage.patch deleted file mode 100644 index abff1df..0000000 --- a/0023-vdsm.spec-conditional-to-execute-semanage.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 16e0b098ff5be2f25d8497a08b6fc2de6022610c Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Thu, 28 Nov 2013 12:14:12 -0500 -Subject: [PATCH 2/2] vdsm.spec: conditional to execute semanage - -To avoid load policy when selinux is disabled, only -execute semanage when selinux is enabled. - -Change-Id: I1d40e6d9dcaac16d74c685e4a6a6d5cb130ac531 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/21830 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm.spec.in | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 3296217..0bb73b1 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -649,8 +649,11 @@ if grep -q "# VDSM section begin" /etc/sysctl.conf; then - fi - - # hack until we replace core dump with abrt --/usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' -+if /usr/sbin/selinuxenabled; then -+ /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' -+fi - /sbin/restorecon -R -v /var/log/core -+# hack until we replace core dump with abrt - - %if 0%{?rhel} - if [ "$1" -eq 1 ] ; then --- -1.8.4.2 - diff --git a/0024-vdsm.spec-conditional-for-hostname-require.patch b/0024-vdsm.spec-conditional-for-hostname-require.patch deleted file mode 100644 index b3d0b30..0000000 --- a/0024-vdsm.spec-conditional-for-hostname-require.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 16017316a84e25122e2f32c2732b46c8a5549a57 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Thu, 28 Nov 2013 09:35:20 -0500 -Subject: [PATCH] vdsm.spec: conditional for hostname require - -Fedora rawhide (F21) build is failing because cannot locate /bin/hostname. -It has changed to /usr/bin/hostname as changelog from hostname 3.14-2. - -Koji info: -http://koji.fedoraproject.org/koji/buildinfo?buildID=471302 - -Change-Id: I865d1b84fe646932d3039b131bc236d36b8550ba -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/21194 -Reviewed-by: Bala.FA -Reviewed-by: Yaniv Bronhaim -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21840 ---- - .gitignore | 1 + - configure.ac | 1 + - vdsm.spec.in | 6 ++++++ - vdsm/gluster/Makefile.am | 17 ++++++++++++++++- - vdsm/gluster/{hostname.py => hostname.py.in} | 6 +----- - 5 files changed, 25 insertions(+), 6 deletions(-) - rename vdsm/gluster/{hostname.py => hostname.py.in} (83%) - -diff --git a/configure.ac b/configure.ac -index fac9755..52105e9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -199,6 +199,7 @@ AC_PATH_PROG([FENCE_AGENT_PATH], [fence_ilo], [/usr/sbin/fence_ilo]) - AC_PATH_PROG([FUSER_PATH], [fuser], [/sbin/fuser]) - AC_PATH_PROG([GREP_PATH], [grep], [/bin/grep]) - AC_PATH_PROG([GRUBBY_PATH], [grubby], [/sbin/grubby]) -+AC_PATH_PROG([HOSTNAME_PATH], [hostname], [/usr/bin/hostname]) - AC_PATH_PROG([HWCLOCK_PATH], [hwclock], [/usr/sbin/hwclock]) - AC_PATH_PROG([IFDOWN_PATH], [ifdown], [/sbin/ifdown]) - AC_PATH_PROG([IFUP_PATH], [ifup], [/sbin/ifup]) -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 0bb73b1..00f8c70 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -220,7 +220,13 @@ Requires: %{name}-python = %{version}-%{release} - Requires: pyparted - - Requires(post): /usr/sbin/saslpasswd2 -+ -+%if 0%{?fedora} && 0%{?fedora} >= 21 -+Requires(post): hostname -+%else - Requires(post): /bin/hostname -+%endif -+ - Requires(post): policycoreutils-python - Requires(preun): policycoreutils-python - -diff --git a/vdsm/gluster/Makefile.am b/vdsm/gluster/Makefile.am -index dd5434d..ea36692 100644 ---- a/vdsm/gluster/Makefile.am -+++ b/vdsm/gluster/Makefile.am -@@ -21,16 +21,31 @@ - include $(top_srcdir)/build-aux/Makefile.subs - - vdsmglusterdir = $(vdsmdir)/gluster -+ -+nodist_vdsmgluster_PYTHON = \ -+ hostname.py -+ $(NULL) -+ - dist_vdsmgluster_PYTHON = \ - __init__.py \ - api.py \ - cli.py \ - exception.py \ - hooks.py \ -- hostname.py \ - services.py \ - $(NULL) - - dist_vdsmgluster_DATA = \ - vdsmapi-gluster-schema.json \ - $(NULL) -+ -+EXTRA_DIST = \ -+ hostname.py.in -+ $(NULL) -+ -+CLEANFILES = \ -+ hostname.py -+ $(NULL) -+ -+all-local: \ -+ $(nodist_vdsmgluster_PYTHON) -diff --git a/vdsm/gluster/hostname.py b/vdsm/gluster/hostname.py.in -similarity index 83% -rename from vdsm/gluster/hostname.py -rename to vdsm/gluster/hostname.py.in -index ffcf6c2..c817b0a 100644 ---- a/vdsm/gluster/hostname.py -+++ b/vdsm/gluster/hostname.py.in -@@ -20,10 +20,6 @@ - - from vdsm import utils - --_hostNameCommandPath = utils.CommandPath("hostname", -- "/bin/hostname", -- ) -- - - class HostNameException(Exception): - def __init__(self, rc): -@@ -35,7 +31,7 @@ class HostNameException(Exception): - - - def getHostNameFqdn(): -- rc, out, err = utils.execCmd([_hostNameCommandPath.cmd, '--fqdn']) -+ rc, out, err = utils.execCmd(['@HOSTNAME_PATH@', '--fqdn']) - if rc: - raise HostNameException(rc) - else: --- -1.8.4.2 - diff --git a/sources b/sources index 5427207..933ba21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -84a09ba25f1eaef08ddaf698aff40bfe vdsm-4.13.0.tar.gz +d5bc212655d9ba5255f2b3d2d0fe5c83 vdsm-4.13.2.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 97c6358..14ec16c 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1328,9 +1328,9 @@ exit 0 - Bumping minor version due to recent merge of ovirt-3.3 patches * Thu Nov 28 2013 Yaniv Bronhaim - 4.13.0-14 -- Adding update patches from branch ovirt-3.3 starts with - 0001-Invalidate-filters-on-HSMs-before-rescanning-extende till - 0024-vdsm.spec-conditional-for-hostname-require.patch +- Adding update patches from branch ovirt-3.3 +- Declaring ovirt-3.3.2 patchsets scope in spec which declares all the merged +new patches * Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 - update from branch ovirt-3.3 which include: From 9a160b11f9af0afe1dc4df2016e46150eddfd912 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Wed, 11 Dec 2013 11:34:28 +0200 Subject: [PATCH 061/126] Format in ovirt-3.3.3 patches --- vdsm.spec | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 14ec16c..6163e00 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.13.2 -Release: 0%{?dist}%{?extra_release} +Release: 1%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -60,6 +60,19 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz +# ovirt-3.3.3 patches +Patch0: 0001-Reorder-limit-checks-in-grow-quest.patch +Patch1: 0002-domainMonitor-Improve-logging.patch +Patch2: 0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch +Patch3: 0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch +Patch4: 0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch +Patch5: 0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch +Patch6: 0007-Allow-disable-MOM-KSM-control.patch +Patch7: 0008-Allow-setting-just-a-single-value-in-MoM-policy.patch +Patch8: 0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch +Patch9: 0010-threadPool-Do-not-keep-reference-to-tasks.patch +Patch10: 0011-domainMonitor-Separate-change-detection-from-lastChe.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -326,7 +339,6 @@ Summary: Creates a sub-process in simpler safer manner. BuildRequires: python2-devel Provides: python-cpopen = 1.2.3 -Obsoletes: python-cpopen %description python-cpopen Python package for creating sub-process in simpler and safer manner by using C @@ -559,6 +571,18 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +# ovirt-3.3.3 patches +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -674,7 +698,7 @@ fi if /usr/sbin/selinuxenabled; then /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' fi -/sbin/restorecon -R -v /var/log/core +/sbin/restorecon -R /var/log/core >/dev/null 2>&1 # hack until we replace core dump with abrt %if 0%{?rhel} @@ -1324,6 +1348,13 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Wed Dec 11 2013 Yaniv Bronhaim - 4.13.2-1 +- fix cpopen obsolete loop +- fix threadPool refs +- mom policy fixes +- restorecon hack in spec file +- domainMonitor fixed last check flow + * Tue Dec 10 2013 Yaniv Bronhaim - 4.13.2-0 - Bumping minor version due to recent merge of ovirt-3.3 patches From 3c7e810941b8d1bacd6532aa6bcca0883bb3030d Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Wed, 11 Dec 2013 11:35:25 +0200 Subject: [PATCH 062/126] Imported src.rpm --- 0001-Reorder-limit-checks-in-grow-quest.patch | 42 ++++++ 0002-domainMonitor-Improve-logging.patch | 55 ++++++++ ...-from-restorecon-hack-for-var-log-co.patch | 36 ++++++ ...ect-integer-vlan-id-from-new-netinfo.patch | 37 ++++++ ...parameter-for-creating-hookpath-in-v.patch | 39 ++++++ ....spec-Remove-Obsoletes-python-cpopen.patch | 33 +++++ 0007-Allow-disable-MOM-KSM-control.patch | 53 ++++++++ ...ng-just-a-single-value-in-MoM-policy.patch | 120 ++++++++++++++++++ ...-when-shutdown-called-on-vm-in-Down-.patch | 42 ++++++ ...dPool-Do-not-keep-reference-to-tasks.patch | 55 ++++++++ ...parate-change-detection-from-lastChe.patch | 84 ++++++++++++ 11 files changed, 596 insertions(+) create mode 100644 0001-Reorder-limit-checks-in-grow-quest.patch create mode 100644 0002-domainMonitor-Improve-logging.patch create mode 100644 0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch create mode 100644 0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch create mode 100644 0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch create mode 100644 0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch create mode 100644 0007-Allow-disable-MOM-KSM-control.patch create mode 100644 0008-Allow-setting-just-a-single-value-in-MoM-policy.patch create mode 100644 0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch create mode 100644 0010-threadPool-Do-not-keep-reference-to-tasks.patch create mode 100644 0011-domainMonitor-Separate-change-detection-from-lastChe.patch diff --git a/0001-Reorder-limit-checks-in-grow-quest.patch b/0001-Reorder-limit-checks-in-grow-quest.patch new file mode 100644 index 0000000..4101479 --- /dev/null +++ b/0001-Reorder-limit-checks-in-grow-quest.patch @@ -0,0 +1,42 @@ +From 6791ec2bd94195c711cd719c8021692720fb02fb Mon Sep 17 00:00:00 2001 +From: Martin Sivak +Date: Tue, 26 Nov 2013 16:53:36 +0100 +Subject: [PATCH 01/11] Reorder limit checks in grow quest + +balloon_min is a computed value that can (and will) go over +balloon_max. When the controller tries to use it VDSM reports +exception. + +Reorder the checks so the balloon_max constant check is the latest +one to limit the value. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1034969 +Change-Id: I2a8d19f7fe66bb98d97718da34ec2bad6f7987f2 +Signed-off-by: Martin Sivak +Reviewed-on: http://gerrit.ovirt.org/21765 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/mom.d/02-balloon.policy | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vdsm/mom.d/02-balloon.policy b/vdsm/mom.d/02-balloon.policy +index 26c30e2..c98a231 100644 +--- a/vdsm/mom.d/02-balloon.policy ++++ b/vdsm/mom.d/02-balloon.policy +@@ -87,10 +87,10 @@ + + # Determine the new target for the BalloonController. Only set + # if the value is a large enough for the change to be worth it. +- (if (> balloon_size guest.balloon_max) +- (set balloon_size guest.balloon_max) 0) + (if (< balloon_size balloon_min) + (set balloon_size balloon_min) 0) ++ (if (> balloon_size guest.balloon_max) ++ (set balloon_size guest.balloon_max) 0) + (if (change_big_enough guest balloon_size) + (guest.Control "balloon_target" balloon_size) 0) + } 0) +-- +1.8.4.2 + diff --git a/0002-domainMonitor-Improve-logging.patch b/0002-domainMonitor-Improve-logging.patch new file mode 100644 index 0000000..7a2586b --- /dev/null +++ b/0002-domainMonitor-Improve-logging.patch @@ -0,0 +1,55 @@ +From 3c5f9bb5440ca463b6af9f016178c4bcbc01b165 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Sun, 1 Dec 2013 22:29:25 +0200 +Subject: [PATCH 02/11] domainMonitor: Improve logging + +We have logs in domain monitor thread, and we can see when a monitor +starts or stops, but we don't have any info which thread triggered the +operation. This patch adds info level log messages when starting and +stopping domain monitoring, revealing the caller thread. + +Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029 +Relates-To: https://bugzilla.redhat.com/1032925 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21904 +Reviewed-by: Sergey Gotliv +Reviewed-by: Allon Mureinik +Reviewed-by: Ohad Basan +Reviewed-by: Ayal Baron +Reviewed-on: http://gerrit.ovirt.org/21936 +Reviewed-by: Federico Simoncelli +--- + vdsm/storage/domainMonitor.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py +index ffa5e00..ac01e8b 100644 +--- a/vdsm/storage/domainMonitor.py ++++ b/vdsm/storage/domainMonitor.py +@@ -90,6 +90,7 @@ class DomainMonitor(object): + if sdUUID in self._domains: + return + ++ self.log.info("Start monitoring %s", sdUUID) + domainThread = DomainMonitorThread(weakref.proxy(self), + sdUUID, hostId, self._interval) + domainThread.start() +@@ -102,6 +103,7 @@ class DomainMonitor(object): + # Eg: when a domain is detached the domain monitor is stopped and + # the host id is released. If the monitor didn't actually exit it + # might respawn a new acquire host id. ++ self.log.info("Stop monitoring %s", sdUUID) + try: + self._domains[sdUUID].stop() + except KeyError: +@@ -113,6 +115,7 @@ class DomainMonitor(object): + return self._domains[sdUUID].getStatus() + + def close(self): ++ self.log.info("Stopping domain monitors") + for sdUUID in self._domains.keys(): + self.stopMonitoring(sdUUID) + +-- +1.8.4.2 + diff --git a/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch b/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch new file mode 100644 index 0000000..ba813e0 --- /dev/null +++ b/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch @@ -0,0 +1,36 @@ +From 6ffd5d7e95f9e5351c0b9881ae2a55eed1d6db48 Mon Sep 17 00:00:00 2001 +From: Mooli Tayer +Date: Sun, 1 Dec 2013 14:43:14 +0200 +Subject: [PATCH 03/11] Remove verbosity from restorecon hack for + /var/log/core. + +vebosity spams consoel during installation. + +Change-Id: I862039a6dfeebe38fc5c62276ae98213ef92bd02 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031109 +Signed-off-by: Mooli Tayer +Reviewed-on: http://gerrit.ovirt.org/21888 +Reviewed-by: Yaniv Bronhaim +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22021 +Tested-by: Yaniv Bronhaim +--- + vdsm.spec.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 00f8c70..d03703b 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -658,7 +658,7 @@ fi + if /usr/sbin/selinuxenabled; then + /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' + fi +-/sbin/restorecon -R -v /var/log/core ++/sbin/restorecon -R /var/log/core >/dev/null 2>&1 + # hack until we replace core dump with abrt + + %if 0%{?rhel} +-- +1.8.4.2 + diff --git a/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch b/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch new file mode 100644 index 0000000..cf27456 --- /dev/null +++ b/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch @@ -0,0 +1,37 @@ +From b88d9b90d2458cab2a7ca4fc37d42439bd5774c2 Mon Sep 17 00:00:00 2001 +From: Vladimir Tananko +Date: Tue, 3 Dec 2013 10:24:23 +0000 +Subject: [PATCH 04/11] deployUtil: expect integer vlan id from new netinfo + +Commit 8b2bbe6e5 changed netinfo.getVlanID() to return the vlan id as an +integer, istead of a string. This makes a lot of sense, but breaks +compatibility with ancient deployUtil code. + +Change-Id: Ibc1c5875e0d13b110f61f9eabf6d1964fc4c1237 +Bug-Url: https://bugzilla.redhat.com/1037277 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21948 +Reviewed-by: Amador Pahim +Reviewed-by: Antoni Segura Puimedon +Reviewed-on: http://gerrit.ovirt.org/21982 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm_reg/deployUtil.py.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in +index 2d379f6..ba45d64 100644 +--- a/vdsm_reg/deployUtil.py.in ++++ b/vdsm_reg/deployUtil.py.in +@@ -1061,6 +1061,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None): + else: + vlan, bonding, nic = _getRHELBridgeParams(mgtIface, + bridgeName=bridgeName) ++ vlan = str(vlan) + fReturn = (nic is not None) + + #Delete existing bridge in oVirt +-- +1.8.4.2 + diff --git a/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch b/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch new file mode 100644 index 0000000..1e35b3f --- /dev/null +++ b/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch @@ -0,0 +1,39 @@ +From 39b35ce25e26d0190ba0567e64751d9a55aa8aec Mon Sep 17 00:00:00 2001 +From: ndarshan +Date: Thu, 7 Nov 2013 15:28:55 +0530 +Subject: [PATCH 05/11] gluster: correct parameter for creating hookpath in + verb hookAdd. + +parameter hookLevel must be in lower case for creating correct +path for hook. so that parameter is changed to lower case. + +Change-Id: Ic16885a7f837ccceede2cf1b70b5da3138a12a60 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1028972 +Signed-off-by: ndarshan +Reviewed-on: http://gerrit.ovirt.org/21017 +Reviewed-by: Aravinda VK +Reviewed-by: Bala.FA +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21538 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/gluster/hooks.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/gluster/hooks.py b/vdsm/gluster/hooks.py +index 914d09d..4f1c14d 100644 +--- a/vdsm/gluster/hooks.py ++++ b/vdsm/gluster/hooks.py +@@ -244,7 +244,7 @@ def hookUpdate(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum): + @makePublic + def hookAdd(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum, + enable=False): +- hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel) ++ hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel.lower()) + try: + os.makedirs(hookPath) + if selinux.is_selinux_enabled(): +-- +1.8.4.2 + diff --git a/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch b/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch new file mode 100644 index 0000000..13d3cfb --- /dev/null +++ b/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch @@ -0,0 +1,33 @@ +From af3d4e8792175a3e0360547c44944388022f3b14 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Thu, 5 Dec 2013 21:03:38 -0500 +Subject: [PATCH 06/11] vdsm.spec: Remove Obsoletes: python-cpopen + +python-cpopen spec obsoletes vdsm-python-cpopen, so vdsm.spec don't +need to obsolete python-cpopen. Otherwise, it will generate an +infinity loop during the yum update between these packages. + +Change-Id: If5523c3530cbac667ce5c7db4f78543f21778c54 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/22113 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm.spec.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index d03703b..10fe3f2 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -313,7 +313,6 @@ Summary: Creates a sub-process in simpler safer manner. + + BuildRequires: python2-devel + Provides: python-cpopen = 1.2.3 +-Obsoletes: python-cpopen + + %description python-cpopen + Python package for creating sub-process in simpler and safer manner by using C +-- +1.8.4.2 + diff --git a/0007-Allow-disable-MOM-KSM-control.patch b/0007-Allow-disable-MOM-KSM-control.patch new file mode 100644 index 0000000..43d46c2 --- /dev/null +++ b/0007-Allow-disable-MOM-KSM-control.patch @@ -0,0 +1,53 @@ +From 35019eb333d5dbe6d8c7150a5283ca196f6866df Mon Sep 17 00:00:00 2001 +From: Amador Pahim +Date: Mon, 11 Nov 2013 09:04:47 -0300 +Subject: [PATCH 07/11] Allow disable MOM KSM control. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch add ksmEnabled var to enable/disable mom ksm control. +Now users can use vdsClient to runtime disable/enable +(default enabled) ksm control: + + $ vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False + +Change-Id: Icc4333ce92561e23c062c398e24f876a74056a05 +Bug-Url: http://bugzilla.redhat.com/1025780 +Signed-off-by: Amador Pahim +Reviewed-on: http://gerrit.ovirt.org/20879 +Reviewed-by: Martin Sivák +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22150 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/mom.d/01-parameters.policy | 1 + + vdsm/mom.d/03-ksm.policy | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy +index 980e71c..97803d5 100644 +--- a/vdsm/mom.d/01-parameters.policy ++++ b/vdsm/mom.d/01-parameters.policy +@@ -1 +1,2 @@ + (defvar balloonEnabled 0) ++(defvar ksmEnabled 1) +diff --git a/vdsm/mom.d/03-ksm.policy b/vdsm/mom.d/03-ksm.policy +index 415fcfd..5a3b1bd 100644 +--- a/vdsm/mom.d/03-ksm.policy ++++ b/vdsm/mom.d/03-ksm.policy +@@ -41,8 +41,8 @@ + (defvar ksm_pressure_threshold (* Host.mem_available ksm_free_percent)) + (defvar ksm_committed Host.ksm_shareable) + +-(if (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available) +- (> (Host.StatAvg "mem_free") ksm_pressure_threshold)) ++(if (or (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available) ++ (> (Host.StatAvg "mem_free") ksm_pressure_threshold)) (not ksmEnabled)) + (Host.Control "ksm_run" 0) + { # else + (Host.Control "ksm_run" 1) +-- +1.8.4.2 + diff --git a/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch b/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch new file mode 100644 index 0000000..03be1cc --- /dev/null +++ b/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch @@ -0,0 +1,120 @@ +From 4a60357831d2ef6686f8e0bfebde130f4251c52a Mon Sep 17 00:00:00 2001 +From: Martin Sivak +Date: Wed, 13 Nov 2013 14:10:31 +0100 +Subject: [PATCH 08/11] Allow setting just a single value in MoM policy + +This patch prevents a policy coruption that could have happened +when the 01-parameters policy was updated with just a single +value. If there were more values defined, the variables were lost +and the policy ended up broken. + +This patch defines the variables in a file that is not touched +by the setMOMPolicyParameters and uses (set name value) syntax +in the generated policy part. + +It also remembers the old setting and puts all the values to +the policy part when it is autogenerated. + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1025780 + +Change-Id: I7bb1001a05e670e393b2cc0ab4b271b3b333d2e8 +Signed-off-by: Martin Sivak +Reviewed-on: http://gerrit.ovirt.org/21225 +Reviewed-by: Amador Pahim +Reviewed-by: Doron Fediuck +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/21839 +Reviewed-by: Yaniv Bronhaim +--- + debian/vdsm.install | 2 +- + vdsm/Makefile.am | 2 +- + vdsm/mom.d/{00-python.policy => 00-defines.policy} | 5 +++++ + vdsm/mom.d/01-parameters.policy | 2 -- + vdsm/momIF.py | 9 ++++++--- + 5 files changed, 13 insertions(+), 7 deletions(-) + rename vdsm/mom.d/{00-python.policy => 00-defines.policy} (58%) + +diff --git a/debian/vdsm.install b/debian/vdsm.install +index 6de089e..89b6e6c 100644 +--- a/debian/vdsm.install ++++ b/debian/vdsm.install +@@ -14,7 +14,7 @@ + ./etc/sysctl.d/vdsm.conf + ./etc/vdsm/logger.conf + ./etc/vdsm/mom.conf +-./etc/vdsm/mom.d/00-python.policy ++./etc/vdsm/mom.d/00-defines.policy + ./etc/vdsm/mom.d/01-parameters.policy + ./etc/vdsm/mom.d/02-balloon.policy + ./etc/vdsm/mom.d/03-ksm.policy +diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am +index 26be4dc..5ab291e 100644 +--- a/vdsm/Makefile.am ++++ b/vdsm/Makefile.am +@@ -110,7 +110,7 @@ EXTRA_DIST = \ + logger.conf.in \ + mk_sysprep_floppy.in \ + mom.conf.in \ +- mom.d/00-python.policy \ ++ mom.d/00-defines.policy \ + mom.d/01-parameters.policy \ + mom.d/02-balloon.policy \ + mom.d/03-ksm.policy \ +diff --git a/vdsm/mom.d/00-python.policy b/vdsm/mom.d/00-defines.policy +similarity index 58% +rename from vdsm/mom.d/00-python.policy +rename to vdsm/mom.d/00-defines.policy +index face6fa..93b70ee 100644 +--- a/vdsm/mom.d/00-python.policy ++++ b/vdsm/mom.d/00-defines.policy +@@ -2,3 +2,8 @@ + # received by setMOMPolicyParameters + (defvar False 0) + (defvar True 1) ++ ++# Define variables for configurable options here ++(defvar ksmEnabled 1) ++(defvar balloonEnabled 0) ++ +diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy +index 97803d5..e69de29 100644 +--- a/vdsm/mom.d/01-parameters.policy ++++ b/vdsm/mom.d/01-parameters.policy +@@ -1,2 +0,0 @@ +-(defvar balloonEnabled 0) +-(defvar ksmEnabled 1) +diff --git a/vdsm/momIF.py b/vdsm/momIF.py +index 8b62657..c1e00ef 100644 +--- a/vdsm/momIF.py ++++ b/vdsm/momIF.py +@@ -46,6 +46,7 @@ class MomThread(threading.Thread): + self.log = logging.getLogger("MOM") + self.log.info("Starting up MOM") + self._mom = mom.MOM(momconf) ++ self._policy = {} + threading.Thread.__init__(self, target=self._mom.run, name="MOM") + self.start() + +@@ -64,14 +65,16 @@ class MomThread(threading.Thread): + + def setPolicyParameters(self, key_value_store): + # mom.setNamedPolicy will raise an exception on failure. ++ + # Prepare in-memory policy file with tuning variables + # this might need to convert certain python types to proper MoM + # policy language ++ self._policy.update(key_value_store) + +- # Python bool values are defined in 00-python.policy so need no ++ # Python bool values are defined in 00-defines.policy so need no + # conversion here +- policy_string = "\n".join(["(defvar %s %r)" % (k, v) +- for k, v in key_value_store.iteritems()]) ++ policy_string = "\n".join(["(set %s %r)" % (k, v) ++ for k, v in self._policy.iteritems()]) + + self._mom.setNamedPolicy(config.get("mom", "tuning_policy"), + policy_string) +-- +1.8.4.2 + diff --git a/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch b/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch new file mode 100644 index 0000000..d86e7cc --- /dev/null +++ b/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch @@ -0,0 +1,42 @@ +From c8aab3aa3bedfa8a92d41a8934e9adfa2a7fb89d Mon Sep 17 00:00:00 2001 +From: Greg Padgett +Date: Mon, 2 Dec 2013 23:04:36 -0500 +Subject: [PATCH 09/11] vm: Fix exception when shutdown() called on vm in + 'Down' state + +Attempting to call the shutdown() method on a VM which is in 'Down' +state resulted in an exception if called through xmlrpclib. Instead, +adopt the convention used by similar APIs such as migrate() and return +errCode['noVM']. + +Change-Id: I8b75d0b869354d503e5f187e33370b5837b3c698 +Bug-Url: https://bugzilla.redhat.com/1027297 +Signed-off-by: Greg Padgett +Reviewed-on: http://gerrit.ovirt.org/21937 +Reviewed-by: Sandro Bonazzola +Reviewed-by: Doron Fediuck +Reviewed-by: Federico Simoncelli +Reviewed-by: Michal Skrivanek +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22218 +Reviewed-by: Yaniv Bronhaim +--- + vdsm/vm.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index b9ab60b..59541e7 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -2483,7 +2483,7 @@ class Vm(object): + try: + now = time.time() + if self.lastStatus == 'Down': +- return ++ return errCode['noVM'] + if self.guestAgent and self.guestAgent.isResponsive(): + self._guestEventTime = now + self._guestEvent = 'Powering down' +-- +1.8.4.2 + diff --git a/0010-threadPool-Do-not-keep-reference-to-tasks.patch b/0010-threadPool-Do-not-keep-reference-to-tasks.patch new file mode 100644 index 0000000..07c3572 --- /dev/null +++ b/0010-threadPool-Do-not-keep-reference-to-tasks.patch @@ -0,0 +1,55 @@ +From 9b2d7c22e806ead1c499b1da304bff6da21a5f67 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Sun, 8 Dec 2013 00:49:36 +0200 +Subject: [PATCH 10/11] threadPool: Do not keep reference to tasks + +Worker thread was taking a task from the threadpool queue, run it, and +then hold it until the next task is run. This causes the task and all +objects referenced from it to keep living until the next task is run by +this thread. + +This patch ensure that worker thread does not keep referece to tasks +after they were run. + +Change-Id: Ib6e024e0727e11a4c98f4e5ede20229d148fdc58 +Relates-To: https://bugzilla.redhat.com/1032925 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/22136 +Reviewed-by: Ayal Baron +Reviewed-by: Allon Mureinik +Reviewed-on: http://gerrit.ovirt.org/22208 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/threadPool.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/vdsm/storage/threadPool.py b/vdsm/storage/threadPool.py +index b1f3142..a0e24a2 100644 +--- a/vdsm/storage/threadPool.py ++++ b/vdsm/storage/threadPool.py +@@ -191,8 +191,8 @@ class WorkerThread(threading.Thread): + it, calling the callback if any. """ + + while not self.__isDying: ++ id, cmd, args, callback = self.__pool.getNextTask() + try: +- id, cmd, args, callback = self.__pool.getNextTask() + if id is None: # should retry. + pass + elif self.__isDying: +@@ -212,6 +212,11 @@ class WorkerThread(threading.Thread): + self.__pool.setRunningTask(False) + except Exception: + self.log.error("Task %s failed" % repr(cmd), exc_info=True) ++ finally: ++ # Don't keep reference to objects taken from the pool. ++ # Otherwise this thread may keep those object alive until the ++ # next iteration. See BZ#1032925. ++ del id, cmd, args, callback + + def goAway(self): + +-- +1.8.4.2 + diff --git a/0011-domainMonitor-Separate-change-detection-from-lastChe.patch b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch new file mode 100644 index 0000000..81c0b99 --- /dev/null +++ b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch @@ -0,0 +1,84 @@ +From b33afbee6eec61253f40df655b3c5903dafac617 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Sat, 30 Nov 2013 14:49:08 +0200 +Subject: [PATCH 11/11] domainMonitor: Separate change detection from lastCheck + value + +Since commit 45f3037ca1e, lastCheck value is initialized to special +NOT_CHECKED_YET value, and used for detecting the first monitor status change. +This change caused repoStats to return high lastCheck value until the first +monitor check is done, causing host activation to fail, and host becoming +non-operational. + +Previously, lastCheck value was initialized to monitor thread creation time, +and repoStats was returning valid lastCheck value even before the first domain +check was finished. While somewhat incorrect, this behavior is required for +engine monitoring logic. + +This patch restore the previous lastCheck semantics and use a new +firstChange flag for detecting the first status change. + +Change-Id: I8e0df2ee0333354146b5d9429fd83a4f914ff751 +Relates-To: https://bugzilla.redhat.com/1003588 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21878 +Reviewed-by: Allon Mureinik +Reviewed-by: Liron Ar +Reviewed-by: Ayal Baron +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/22209 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/domainMonitor.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py +index ac01e8b..d95f133 100644 +--- a/vdsm/storage/domainMonitor.py ++++ b/vdsm/storage/domainMonitor.py +@@ -27,8 +27,6 @@ import misc + from vdsm.config import config + from sdc import sdCache + +-NOT_CHECKED_YET = -1 +- + + class DomainMonitorStatus(object): + __slots__ = ( +@@ -43,7 +41,7 @@ class DomainMonitorStatus(object): + + def clear(self): + self.error = None +- self.lastCheck = NOT_CHECKED_YET ++ self.lastCheck = time() + self.valid = True + self.readDelay = 0 + self.diskUtilization = (None, None) +@@ -133,6 +131,7 @@ class DomainMonitorThread(object): + self.sdUUID = sdUUID + self.hostId = hostId + self.interval = interval ++ self.firstChange = True + self.status = DomainMonitorStatus() + self.nextStatus = DomainMonitorStatus() + self.isIsoDomain = None +@@ -244,6 +243,8 @@ class DomainMonitorThread(object): + self.log.warn("Could not emit domain state change event", + exc_info=True) + ++ self.firstChange = False ++ + # An ISO domain can be shared by multiple pools + if (not self.isIsoDomain and self.nextStatus.valid + and self.nextStatus.hasHostId is False): +@@ -257,5 +258,4 @@ class DomainMonitorThread(object): + self.status.update(self.nextStatus) + + def _statusDidChange(self): +- return (self.status.lastCheck == NOT_CHECKED_YET or +- self.status.valid != self.nextStatus.valid) ++ return self.firstChange or self.status.valid != self.nextStatus.valid +-- +1.8.4.2 + From 13a767c4725369d07e6bf9a507be241df906f078 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 12:06:21 +0200 Subject: [PATCH 063/126] Adding 4.13.3 patches of ovirt-3.3 --- ...dPool-Do-not-keep-reference-to-tasks.patch | 2 +- ...parate-change-detection-from-lastChe.patch | 2 +- vdsm.spec | 61 ++++++++++++++++++- 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/0010-threadPool-Do-not-keep-reference-to-tasks.patch b/0010-threadPool-Do-not-keep-reference-to-tasks.patch index 07c3572..216556e 100644 --- a/0010-threadPool-Do-not-keep-reference-to-tasks.patch +++ b/0010-threadPool-Do-not-keep-reference-to-tasks.patch @@ -1,7 +1,7 @@ From 9b2d7c22e806ead1c499b1da304bff6da21a5f67 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sun, 8 Dec 2013 00:49:36 +0200 -Subject: [PATCH 10/11] threadPool: Do not keep reference to tasks +Subject: [PATCH 10/29] threadPool: Do not keep reference to tasks Worker thread was taking a task from the threadpool queue, run it, and then hold it until the next task is run. This causes the task and all diff --git a/0011-domainMonitor-Separate-change-detection-from-lastChe.patch b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch index 81c0b99..3a8a03e 100644 --- a/0011-domainMonitor-Separate-change-detection-from-lastChe.patch +++ b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch @@ -1,7 +1,7 @@ From b33afbee6eec61253f40df655b3c5903dafac617 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 30 Nov 2013 14:49:08 +0200 -Subject: [PATCH 11/11] domainMonitor: Separate change detection from lastCheck +Subject: [PATCH 11/29] domainMonitor: Separate change detection from lastCheck value Since commit 45f3037ca1e, lastCheck value is initialized to special diff --git a/vdsm.spec b/vdsm.spec index 6163e00..e60222a 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,8 +45,8 @@ %endif Name: %{vdsm_name} -Version: 4.13.2 -Release: 1%{?dist}%{?extra_release} +Version: 4.13.3 +Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -72,6 +72,25 @@ Patch7: 0008-Allow-setting-just-a-single-value-in-MoM-policy.patch Patch8: 0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch Patch9: 0010-threadPool-Do-not-keep-reference-to-tasks.patch Patch10: 0011-domainMonitor-Separate-change-detection-from-lastChe.patch +Patch11: 0012-utils-Add-unhandled-exceptions-logging-decorator.patch +Patch12: 0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch +Patch13: 0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch +Patch14: 0015-Fix-syntax-error-in-vdsm.spec.patch +Patch15: 0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch +Patch16: 0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch +Patch17: 0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch +Patch18: 0019-fileSD-Fix-image-deletion-on-gluster-domain.patch +Patch19: 0020-sampling-make-HostStatsThread-a-daemon-thread.patch +Patch20: 0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch +Patch21: 0022-update-NIC-having-no-custom-properies-is-valid.patch +Patch22: 0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch +Patch23: 0024-vm-Bring-back-missing-before_device_migrate_source-h.patch +Patch24: 0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch +Patch25: 0026-Gluster-API-verbs-will-now-be-callable-again.patch +Patch26: 0027-iscsi-Iscsi-rescan-cleanup.patch +Patch27: 0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch +Patch28: 0029-utils-Create-AsyncProcessOperation.patch +Patch29: 0030-Removing-unnecessary-check-local-from-storage-Makefi.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -172,7 +191,7 @@ Requires: python # Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 -Requires: iscsi-initiator-utils >= 6.2.0.872-15 +Requires: iscsi-initiator-utils >= 6.2.0.873-3 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents @@ -583,6 +602,25 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1348,6 +1386,23 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3 +- spec: bumping iscsi-initiator-utils requirement +- removing redundant check-local from storage makefile +- Adding exception handling in external threads +- cleanup of iscsi operations - adding (AsyncProcessOperation) +- fix bridgeless broken network deletion +- gluster api fix +- fix log issues - Changed BrokerLink log level to prevent log flooding +- sampling: make HostStatsThread a daemon thread +- bugfix - BindingXMLRpc - Return lastClientIface for current connection +- vm: Bring back missing before_device_migrate_source hook call +- update NIC: having no custom properies is valid +- prepareVolumePath payload misdetection fix +- fileSD: Fix image deletion on gluster domain +- vm: Update domains list for disks attached to vm after LSM +- prepareVolumePath correct path handling for cdrom + * Wed Dec 11 2013 Yaniv Bronhaim - 4.13.2-1 - fix cpopen obsolete loop - fix threadPool refs From f9deeff504cc8891ead09c577c84fe39d4431e23 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 12:46:12 +0200 Subject: [PATCH 064/126] Adding patch files --- ...handled-exceptions-logging-decorator.patch | 150 ++++++++ ...g-unhandled-exceptions-in-domain-mon.patch | 48 +++ ...d-exceptions-in-storage-refresh-thre.patch | 39 +++ 0015-Fix-syntax-error-in-vdsm.spec.patch | 32 ++ ...nk-log-level-to-prevent-log-flooding.patch | 59 ++++ ...mePath-correct-path-handling-for-cdr.patch | 51 +++ ...s-list-for-disks-attached-to-vm-afte.patch | 34 ++ ...Fix-image-deletion-on-gluster-domain.patch | 75 ++++ ...make-HostStatsThread-a-daemon-thread.patch | 34 ++ ...eVolumePath-payload-misdetection-fix.patch | 50 +++ ...-having-no-custom-properies-is-valid.patch | 38 ++ ...gfix-Fix-netinfo-getIfaceByIP-unit-t.patch | 52 +++ ...ssing-before_device_migrate_source-h.patch | 37 ++ ...gfix-Return-lastClientIface-for-curr.patch | 128 +++++++ ...API-verbs-will-now-be-callable-again.patch | 86 +++++ 0027-iscsi-Iscsi-rescan-cleanup.patch | 324 ++++++++++++++++++ ...x-bridgeless-broken-network-deletion.patch | 111 ++++++ 0029-utils-Create-AsyncProcessOperation.patch | 173 ++++++++++ ...sary-check-local-from-storage-Makefi.patch | 41 +++ 19 files changed, 1562 insertions(+) create mode 100644 0012-utils-Add-unhandled-exceptions-logging-decorator.patch create mode 100644 0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch create mode 100644 0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch create mode 100644 0015-Fix-syntax-error-in-vdsm.spec.patch create mode 100644 0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch create mode 100644 0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch create mode 100644 0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch create mode 100644 0019-fileSD-Fix-image-deletion-on-gluster-domain.patch create mode 100644 0020-sampling-make-HostStatsThread-a-daemon-thread.patch create mode 100644 0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch create mode 100644 0022-update-NIC-having-no-custom-properies-is-valid.patch create mode 100644 0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch create mode 100644 0024-vm-Bring-back-missing-before_device_migrate_source-h.patch create mode 100644 0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch create mode 100644 0026-Gluster-API-verbs-will-now-be-callable-again.patch create mode 100644 0027-iscsi-Iscsi-rescan-cleanup.patch create mode 100644 0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch create mode 100644 0029-utils-Create-AsyncProcessOperation.patch create mode 100644 0030-Removing-unnecessary-check-local-from-storage-Makefi.patch diff --git a/0012-utils-Add-unhandled-exceptions-logging-decorator.patch b/0012-utils-Add-unhandled-exceptions-logging-decorator.patch new file mode 100644 index 0000000..a39d268 --- /dev/null +++ b/0012-utils-Add-unhandled-exceptions-logging-decorator.patch @@ -0,0 +1,150 @@ +From 8c40d80d306d9fb56069ab38ab5df80705d58d63 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Wed, 27 Nov 2013 14:01:58 +0200 +Subject: [PATCH 12/29] utils: Add unhandled exceptions logging decorator + +We have at least two places where exceptions in thread main function are +not handled, making debugging such threads impossible. This patch adds a +new decorator that make it easy to log tracebacks for unhandled +exceptions. + +The recommended use case is to decorate a thread main function. This +ensure that we get a traceback for any error in the thread, including +errors in error handling code. This should be used on all in threads in +the system. + +Note that the decorator only adds logging - it does not change the +program flow. The unhandled exception is raise again so you can safely +use it on script main function, without changing the exit code. Do not +try to use this for ignoring exceptions. + +See utilsTests for example usage. + +Change-Id: I39265bac4f26fefa365bad080dafb6106145f846 +Relates-To: https://bugzilla.redhat.com/1034741 +Relates-To: https://bugzilla.redhat.com/1040164 +Relates-To: https://bugzilla.redhat.com/1040166 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21778 +Reviewed-by: Sergey Gotliv +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22212 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + lib/vdsm/utils.py | 22 ++++++++++++++++++++ + tests/utilsTests.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 82 insertions(+) + +diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py +index d3e0c2b..ef0f512 100644 +--- a/lib/vdsm/utils.py ++++ b/lib/vdsm/utils.py +@@ -599,6 +599,28 @@ def getPidNiceness(pid): + return int(stat.split(') ')[-1].split()[16]) + + ++def traceback(on="", msg="Unhandled exception"): ++ """ ++ Log a traceback for unhandled execptions. ++ ++ :param on: Use specific logger name instead of root logger ++ :type on: str ++ :param msg: Use specified message for the exception ++ :type msg: str ++ """ ++ def decorator(f): ++ @functools.wraps(f) ++ def wrapper(*a, **kw): ++ try: ++ return f(*a, **kw) ++ except Exception: ++ log = logging.getLogger(on) ++ log.exception(msg) ++ raise # Do not swallow ++ return wrapper ++ return decorator ++ ++ + def tobool(s): + try: + if s is None: +diff --git a/tests/utilsTests.py b/tests/utilsTests.py +index a6a222d..5f7c82d 100644 +--- a/tests/utilsTests.py ++++ b/tests/utilsTests.py +@@ -17,7 +17,9 @@ + # + # Refer to the README and COPYING files for full details of the license + # ++import contextlib + import errno ++import logging + + from testrunner import VdsmTestCase as TestCaseBase + from vdsm import utils +@@ -80,3 +82,61 @@ class CommandPathTests(TestCaseBase): + class GeneralUtilsTests(TestCaseBase): + def testPanic(self): + self.assertRaises(AssertionError, utils.panic, "panic test") ++ ++ ++@contextlib.contextmanager ++def loghandler(handler, logger=""): ++ log = logging.getLogger(logger) ++ log.addHandler(handler) ++ try: ++ yield {} ++ finally: ++ log.removeHandler(handler) ++ ++ ++class TracebackTests(TestCaseBase): ++ ++ def __init__(self, *a, **kw): ++ self.record = None ++ super(TestCaseBase, self).__init__(*a, **kw) ++ ++ def testDefaults(self): ++ @utils.traceback() ++ def fail(): ++ raise Exception ++ with loghandler(self): ++ self.assertRaises(Exception, fail) ++ self.assertEquals(self.record.name, "root") ++ self.assertTrue(self.record.exc_text is not None) ++ ++ def testOn(self): ++ logger = "test" ++ ++ @utils.traceback(on=logger) ++ def fail(): ++ raise Exception ++ with loghandler(self, logger=logger): ++ self.assertRaises(Exception, fail) ++ self.assertEquals(self.record.name, logger) ++ ++ def testMsg(self): ++ @utils.traceback(msg="WAT") ++ def fail(): ++ raise Exception ++ with loghandler(self): ++ self.assertRaises(Exception, fail) ++ self.assertEquals(self.record.message, "WAT") ++ ++ # Logging handler interface ++ ++ level = logging.DEBUG ++ ++ def acquire(self): ++ pass ++ ++ def release(self): ++ pass ++ ++ def handle(self, record): ++ assert self.record is None ++ self.record = record +-- +1.8.4.2 + diff --git a/0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch b/0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch new file mode 100644 index 0000000..250fb20 --- /dev/null +++ b/0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch @@ -0,0 +1,48 @@ +From 0ffb19c64f112b38483b5e913093abcf14fe71d7 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Wed, 20 Nov 2013 23:10:51 +0200 +Subject: [PATCH 13/29] domainMonitor: Log unhandled exceptions in domain + monitor thread + +DomainMonitorThread does not handle exceptions in the thread main +function, making it harder to modify the code or understanding +unexpected failures in the field. + +The patch log unhandled exceptions so it will never die silently. + +Change-Id: I743c59bffa99ab9868f1878ca96b7d979a703efb +Bug-Url: https://bugzilla.redhat.com/1040166 +Relates-To: https://bugzilla.redhat.com/1034741 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21487 +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/22214 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/domainMonitor.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py +index d95f133..d995bff 100644 +--- a/vdsm/storage/domainMonitor.py ++++ b/vdsm/storage/domainMonitor.py +@@ -24,6 +24,7 @@ import weakref + + import logging + import misc ++from vdsm import utils + from vdsm.config import config + from sdc import sdCache + +@@ -151,6 +152,7 @@ class DomainMonitorThread(object): + def getStatus(self): + return self.status.copy() + ++ @utils.traceback(on=log.name) + def _monitorLoop(self): + self.log.debug("Starting domain monitor for %s", self.sdUUID) + +-- +1.8.4.2 + diff --git a/0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch b/0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch new file mode 100644 index 0000000..f227f77 --- /dev/null +++ b/0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch @@ -0,0 +1,39 @@ +From e6bbe0fb0f8425f2d0b3a27dd2383ed0122fa884 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Wed, 20 Nov 2013 22:38:07 +0200 +Subject: [PATCH 14/29] hsm: Log unhandled exceptions in storage refresh thread + +hsm's storage refresh background thread does not handle exceptions, +making it harder then it should to debug stupid errors in underlying +calls or debug real errors in the field. + +This patch log a traceback for unhandled exceptions so it will never die +silently again. + +Change-Id: I2e69464ba27b7d522c5ceb3a3099949efe7fbc88 +Bug-Url: https://bugzilla.redhat.com/1040164 +Signed-off-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/21486 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22213 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/hsm.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py +index a91ae92..1d36cee 100644 +--- a/vdsm/storage/hsm.py ++++ b/vdsm/storage/hsm.py +@@ -370,6 +370,7 @@ class HSM: + except Exception: + self.log.warn("Failed to clean Storage Repository.", exc_info=True) + ++ @utils.traceback(on=self.log.name) + def storageRefresh(): + lvm.bootstrap(refreshlvs=blockSD.SPECIAL_LVS) + sdCache.refreshStorage() +-- +1.8.4.2 + diff --git a/0015-Fix-syntax-error-in-vdsm.spec.patch b/0015-Fix-syntax-error-in-vdsm.spec.patch new file mode 100644 index 0000000..e4abb60 --- /dev/null +++ b/0015-Fix-syntax-error-in-vdsm.spec.patch @@ -0,0 +1,32 @@ +From ef8880aac1f3ec5d6437a3922dea334480b63f71 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Thu, 12 Dec 2013 02:00:22 +0200 +Subject: [PATCH 15/29] Fix syntax error in vdsm.spec + +Which introduced since http://gerrit.ovirt.org/21356 + +Change-Id: Ib636c00a6b9670584b5a862ac4496e74915fbe04 +Signed-off-by: Yaniv Bronhaim +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1040232 +Reviewed-on: http://gerrit.ovirt.org/22310 +Reviewed-by: Douglas Schilling Landgraf +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 10fe3f2..9aeb607 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -754,7 +754,6 @@ if [ "$1" -ge 1 ]; then + + %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1 + +- fi + if [ "${supervdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 + fi +-- +1.8.4.2 + diff --git a/0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch b/0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch new file mode 100644 index 0000000..c0b84fe --- /dev/null +++ b/0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch @@ -0,0 +1,59 @@ +From 2d798a07c7142d464ed89b2b9ffcf019c9c7300f Mon Sep 17 00:00:00 2001 +From: Jiri Moskovcak +Date: Tue, 10 Dec 2013 13:47:59 +0100 +Subject: [PATCH 16/29] Changed BrokerLink log level to prevent log flooding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- vdsm imports the BrokerLink lib with ovirt_hosted_engine_ha, + unfortunatelly it's logger generates a lot of debug output + in the default configuration, so this patch sets the level + of the whole ovirt_hosted_engine_ha package to ERROR + to limit the amount of the logs + +- NOTE: this patch needs some changes in the ovirt_hosted_engine_ha + logging, without these changes it does not have any + effect + +Depends-On: I40fb7aca813800dd445e858406034736817cac9c +Change-Id: Icc470175d785d216fe75837e5cb3572adf340fe6 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1040884 +Signed-off-by: Jiri Moskovcak +Reviewed-on: http://gerrit.ovirt.org/21947 +Reviewed-by: Martin Sivák +Reviewed-by: Doron Fediuck +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22424 +Reviewed-by: Yaniv Bronhaim +--- + vdsm/logger.conf.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/vdsm/logger.conf.in b/vdsm/logger.conf.in +index 824e169..e7ff032 100644 +--- a/vdsm/logger.conf.in ++++ b/vdsm/logger.conf.in +@@ -1,5 +1,5 @@ + [loggers] +-keys=root,vds,Storage,metadata ++keys=root,vds,Storage,metadata,ovirt_hosted_engine_ha + + [handlers] + keys=console,syslog,logfile,metadata +@@ -30,6 +30,12 @@ handlers=metadata + qualname=irs.metadata + propagate=0 + ++[logger_ovirt_hosted_engine_ha] ++level=ERROR ++handlers= ++qualname=ovirt_hosted_engine_ha ++propagate=1 ++ + [handler_syslog] + level=WARNING + class=handlers.SysLogHandler +-- +1.8.4.2 + diff --git a/0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch b/0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch new file mode 100644 index 0000000..f74ee3e --- /dev/null +++ b/0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch @@ -0,0 +1,51 @@ +From 1d5fa9407ae308358ae01363e23fba5865588fb0 Mon Sep 17 00:00:00 2001 +From: Martin Polednik +Date: Thu, 10 Oct 2013 12:26:24 +0200 +Subject: [PATCH 17/29] vdsm: prepareVolumePath correct path handling for cdrom + +prepareVolumePath looked for 'path' key in specParams +without looking at path in device itself, causing empty +path in specParams to override device path. This patch +adds device.path to checking mechanism to avoid overriding +valid path + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1009469 +Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 +Signed-off-by: Martin Polednik +Reviewed-on: http://gerrit.ovirt.org/20074 +Reviewed-by: Michal Skrivanek +Reviewed-by: Federico Simoncelli +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22324 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/clientIF.py | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py +index 47851b1..e8fb8d1 100644 +--- a/vdsm/clientIF.py ++++ b/vdsm/clientIF.py +@@ -303,11 +303,13 @@ class clientIF: + volPath = self._getUUIDSpecPath(drive["UUID"]) + + # leave path == '' for empty cdrom and floppy drives ... +- elif drive['device'] in ('cdrom', 'floppy') and \ +- 'specParams' in drive and \ +- 'path' in drive['specParams'] and \ +- drive['specParams']['path'] == '': +- volPath = '' ++ elif (drive['device'] in ('cdrom', 'floppy') and ++ 'specParams' in drive and ++ # next line can be removed in future, when < 3.3 engine ++ # is not supported ++ drive['specParams'].get('path', '') == '' and ++ drive.get('path', '') == ''): ++ volPath = '' + + # ... or load the drive from vmPayload: + elif drive['device'] in ('cdrom', 'floppy') and \ +-- +1.8.4.2 + diff --git a/0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch b/0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch new file mode 100644 index 0000000..2687a7c --- /dev/null +++ b/0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch @@ -0,0 +1,34 @@ +From 32825e60ad4e4a8b8ca63ee2b58d26464e1d6d0d Mon Sep 17 00:00:00 2001 +From: Yeela Kaplan +Date: Thu, 19 Dec 2013 15:28:09 +0200 +Subject: [PATCH 18/29] vm: Update domains list for disks attached to vm after + LSM + +Change-Id: I6cda08eea5e94f4cb9039ce08eac2bfe0861e260 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036680 +Signed-off-by: Yeela Kaplan +Reviewed-on: http://gerrit.ovirt.org/22536 +Reviewed-by: Federico Simoncelli +Reviewed-on: http://gerrit.ovirt.org/22562 +Reviewed-by: Allon Mureinik +--- + vdsm/vm.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 59541e7..8f48bca 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -4069,6 +4069,9 @@ class Vm(object): + self.log.error("Unable to teardown the previous chain: %s", + diskToTeardown, exc_info=True) + self.updateDriveParameters(dstDiskCopy) ++ if "domainID" in srcDisk: ++ self.sdIds.append(dstDiskCopy['domainID']) ++ self.sdIds.remove(srcDisk['domainID']) + finally: + self._delDiskReplica(srcDrive) + self.startDisksStatsCollection() +-- +1.8.4.2 + diff --git a/0019-fileSD-Fix-image-deletion-on-gluster-domain.patch b/0019-fileSD-Fix-image-deletion-on-gluster-domain.patch new file mode 100644 index 0000000..678820e --- /dev/null +++ b/0019-fileSD-Fix-image-deletion-on-gluster-domain.patch @@ -0,0 +1,75 @@ +From e2b555ef44ad2429a8f3b12c59f61581a6ad37e4 Mon Sep 17 00:00:00 2001 +From: huntxu +Date: Fri, 13 Dec 2013 11:11:18 +0800 +Subject: [PATCH 19/29] fileSD: Fix image deletion on gluster domain + +getImagePath() does not work for glusterSD. The problem is caused by +that domaindir's base paths of glusterSD and other file-based SD are not +the same. For glusterSD, it's sd.storage_repository/mnt/glusterSD, +while it's sd.storage_repository/mnt/ for other file-based storage +domains. This makes the deletion fail on gluster domain. + +With this patch we use the storage domain's domaindir to get the image's +directory correctly. + +Reference: + * http://lists.ovirt.org/pipermail/users/2013-December/018653.html + +Change-Id: I8ee6cb963a428f18b6e43f0585d461d0975c377a +Signed-off-by: huntxu +Bug-Url: https://bugzilla.redhat.com/1046600 +Reviewed-on: http://gerrit.ovirt.org/22359 +Reviewed-by: Nir Soffer +Reviewed-by: Federico Simoncelli +Tested-by: Nir Soffer +Reviewed-on: http://gerrit.ovirt.org/22563 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/storage/fileSD.py | 22 ++++------------------ + 1 file changed, 4 insertions(+), 18 deletions(-) + +diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py +index 0186bd2..0baa845 100644 +--- a/vdsm/storage/fileSD.py ++++ b/vdsm/storage/fileSD.py +@@ -81,23 +81,6 @@ def validateFileSystemFeatures(sdUUID, mountDir): + raise + + +-def getDomPath(sdUUID): +- pattern = os.path.join(sd.StorageDomain.storage_repository, +- sd.DOMAIN_MNT_POINT, '*', sdUUID) +- # Warning! You need a global proc pool big as the number of NFS domains. +- domPaths = getProcPool().glob.glob(pattern) +- if len(domPaths) == 0: +- raise se.StorageDomainDoesNotExist(sdUUID) +- elif len(domPaths) > 1: +- raise se.StorageDomainLayoutError(sdUUID) +- else: +- return domPaths[0] +- +- +-def getImagePath(sdUUID, imgUUID): +- return os.path.join(getDomPath(sdUUID), 'images', imgUUID) +- +- + def getDomUuidFromMetafilePath(metafile): + # Metafile path has pattern: + # /rhev/data-center/mnt/export-path/sdUUID/dom_md/metadata +@@ -339,8 +322,11 @@ class FileStorageDomain(sd.StorageDomain): + images.add(os.path.basename(i)) + return images + ++ def getImagePath(self, imgUUID): ++ return os.path.join(self.domaindir, sd.DOMAIN_IMAGES, imgUUID) ++ + def deleteImage(self, sdUUID, imgUUID, volsImgs): +- currImgDir = getImagePath(sdUUID, imgUUID) ++ currImgDir = self.getImagePath(imgUUID) + dirName, baseName = os.path.split(currImgDir) + toDelDir = os.tempnam(dirName, sd.REMOVED_IMAGE_PREFIX + baseName) + try: +-- +1.8.4.2 + diff --git a/0020-sampling-make-HostStatsThread-a-daemon-thread.patch b/0020-sampling-make-HostStatsThread-a-daemon-thread.patch new file mode 100644 index 0000000..32d0dd1 --- /dev/null +++ b/0020-sampling-make-HostStatsThread-a-daemon-thread.patch @@ -0,0 +1,34 @@ +From 65c168023bfe78e5e26a6e9d09d7ad2d99736c41 Mon Sep 17 00:00:00 2001 +From: Saggi Mizrahi +Date: Tue, 10 Dec 2013 13:57:35 +0200 +Subject: [PATCH 20/29] sampling: make HostStatsThread a daemon thread + +It can cause VDSM to hang when being improperly shut down. + +Change-Id: Ia20ded74241bac631fd177f4d7f0b0cda2c4fcbc +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022036 +Signed-off-by: Saggi Mizrahi +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/22237 +Reviewed-by: Antoni Segura Puimedon +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22815 +--- + vdsm/sampling.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vdsm/sampling.py b/vdsm/sampling.py +index dd446c4..d82cb16 100644 +--- a/vdsm/sampling.py ++++ b/vdsm/sampling.py +@@ -368,6 +368,7 @@ class StatsThread(threading.Thread): + + def __init__(self, log, ifids, ifrates): + threading.Thread.__init__(self) ++ self.daemon = True + self._log = log + self._lastCheckTime = 0 + self._stopEvent = threading.Event() +-- +1.8.4.2 + diff --git a/0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch b/0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch new file mode 100644 index 0000000..d5eb8d5 --- /dev/null +++ b/0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch @@ -0,0 +1,50 @@ +From 144814746ee9ff936285cd212f8f91a1c9a85dbd Mon Sep 17 00:00:00 2001 +From: Francesco Romani +Date: Thu, 2 Jan 2014 16:09:34 +0100 +Subject: [PATCH 21/29] vdsm: prepareVolumePath payload misdetection fix + +The changeset http://gerrit.ovirt.org/#/c/22324/3 +used a condition too broad for its check, causing +a device path misdetection when cloud-init is used. + +It is triggered in the following case: +specParams vmPayload attribute has +"file"(with content), path" non existent. +Device's (drive's) "path" is set to ''. +The code then consider the cdrom with vmPayload +a case of empty CDROM and creating it as such. +It did work before because the condition results +false when there is no 'path' in drive['specParams'] +(which is the case here) and goes to the +next condition section (the right one with payload handling) + +This patch provides a band-aid fix to the issue +by tightening the prepareVolumePath check. + +Change-Id: Ie847eb92f28d24f4d8189e03a47cd64cc6597363 +Bug-Url: https://bugzilla.redhat.com/1047356 +Signed-off-by: Francesco Romani +Reviewed-on: http://gerrit.ovirt.org/22935 +Reviewed-by: Vinzenz Feenstra +Reviewed-by: Dan Kenigsberg +--- + vdsm/clientIF.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py +index e8fb8d1..b101896 100644 +--- a/vdsm/clientIF.py ++++ b/vdsm/clientIF.py +@@ -308,7 +308,8 @@ class clientIF: + # next line can be removed in future, when < 3.3 engine + # is not supported + drive['specParams'].get('path', '') == '' and +- drive.get('path', '') == ''): ++ drive.get('path', '') == '' and ++ 'vmPayload' not in drive['specParams']): + volPath = '' + + # ... or load the drive from vmPayload: +-- +1.8.4.2 + diff --git a/0022-update-NIC-having-no-custom-properies-is-valid.patch b/0022-update-NIC-having-no-custom-properies-is-valid.patch new file mode 100644 index 0000000..fbf9bd2 --- /dev/null +++ b/0022-update-NIC-having-no-custom-properies-is-valid.patch @@ -0,0 +1,38 @@ +From f3a138ab93722855cf77662bc8b1af70057cc53b Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +Date: Thu, 2 Jan 2014 14:58:58 +0000 +Subject: [PATCH 22/29] update NIC: having no custom properies is valid + +Older Engines, that preceded per-vNIC custom properties (Vdsm commit +38b1f8fb) do not send the "custom" element at all. This has to be +interpreted exactly as an empty custom element. + +Bug-Url: https://bugzilla.redhat.com/1047646 +Change-Id: If510f012039304ad16000d46d9d72a3e035539f5 +Signed-off-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22922 +Reviewed-by: Francesco Romani +Reviewed-by: Vinzenz Feenstra +Reviewed-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/22950 +Reviewed-by: Yaniv Bronhaim +--- + vdsm/vm.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 8f48bca..6b2de55 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -3161,7 +3161,7 @@ class Vm(object): + if network == '': + network = DUMMY_BRIDGE + linkValue = 'down' +- custom = params.get('custom') ++ custom = params.get('custom', {}) + + netsToMirror = params.get('portMirroring', + netConf.get('portMirroring', [])) +-- +1.8.4.2 + diff --git a/0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch b/0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch new file mode 100644 index 0000000..f9bc894 --- /dev/null +++ b/0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch @@ -0,0 +1,52 @@ +From 6073972e4205ced109538b4c2aeddb22ac06e393 Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Sun, 5 Jan 2014 17:06:11 +0200 +Subject: [PATCH 23/29] BindingXMLRPC bugfix: Fix netinfo:getIfaceByIP unit + test + +testGetIfaceByIP fails on machines that have an updated +ethtool, because the test now iterates on devices +that were previously not iterated over. + +The test now ignores IPv6 link-local addresses (Which may +be shared with several network devices), and checks +if the device has an ipv4 address configured before +checking it. + +Change-Id: Iee4757958ea5554043c6dc7169a8df05b1887687 +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/22968 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + tests/netinfoTests.py | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/tests/netinfoTests.py b/tests/netinfoTests.py +index 18e71c3..fb8c584 100644 +--- a/tests/netinfoTests.py ++++ b/tests/netinfoTests.py +@@ -98,10 +98,15 @@ class TestNetinfo(TestCaseBase): + + def testGetIfaceByIP(self): + for dev in ethtool.get_interfaces_info(ethtool.get_active_devices()): +- ipaddrs = map( +- lambda etherinfo_ipv6addr: etherinfo_ipv6addr.address, +- dev.get_ipv6_addresses()) +- ipaddrs.append(dev.ipv4_address) ++ # Link-local IPv6 addresses are generated from the MAC address, ++ # which is shared between a nic and its bridge. Since We don't ++ # support having the same IP address on two different NICs, and ++ # link-local IPv6 addresses aren't interesting for 'getDeviceByIP' ++ # then ignore them in the test ++ ipaddrs = [ipv6.address for ipv6 in dev.get_ipv6_addresses() ++ if ipv6.scope != 'link'] ++ if dev.ipv4_address is not None: ++ ipaddrs.append(dev.ipv4_address) + for ip in ipaddrs: + self.assertEqual(dev.device, netinfo.getIfaceByIP(ip)) + +-- +1.8.4.2 + diff --git a/0024-vm-Bring-back-missing-before_device_migrate_source-h.patch b/0024-vm-Bring-back-missing-before_device_migrate_source-h.patch new file mode 100644 index 0000000..313c368 --- /dev/null +++ b/0024-vm-Bring-back-missing-before_device_migrate_source-h.patch @@ -0,0 +1,37 @@ +From 3a8579708d6223a037192c124a7ed8d391cc4d1f Mon Sep 17 00:00:00 2001 +From: Vinzenz Feenstra +Date: Mon, 6 Jan 2014 09:24:53 +0100 +Subject: [PATCH 24/29] vm: Bring back missing before_device_migrate_source + hook call + +During the merge of libvirtvm.py and vm.py this section of the code +somehow got removed, this patch brings it back. + +Change-Id: I317ae6b0ed5a7a6fa0f959169b27339c4451b35a +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1048763 +Signed-off-by: Vinzenz Feenstra +Reviewed-on: http://gerrit.ovirt.org/23006 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/23012 +Reviewed-by: Yaniv Bronhaim +--- + vdsm/vm.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/vdsm/vm.py b/vdsm/vm.py +index 6b2de55..f9b241e 100644 +--- a/vdsm/vm.py ++++ b/vdsm/vm.py +@@ -350,6 +350,9 @@ class MigrationSourceThread(threading.Thread): + self._vm._vmStats.cont() + raise + else: ++ for dev in self._vm._customDevices(): ++ hooks.before_device_migrate_source( ++ dev._deviceXML, self._vm.conf, dev.custom) + hooks.before_vm_migrate_source(self._vm._dom.XMLDesc(0), + self._vm.conf) + response = self.destServer.migrationCreate(self._machineParams) +-- +1.8.4.2 + diff --git a/0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch b/0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch new file mode 100644 index 0000000..9e189df --- /dev/null +++ b/0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch @@ -0,0 +1,128 @@ +From 4302dc7ff77fd7d20c9457fe1aebb32aea1d7661 Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Tue, 31 Dec 2013 14:02:49 +0200 +Subject: [PATCH 25/29] BindingXMLRPC bugfix: Return lastClientIface for + current connection + +The patch does three things: +1) Fixes a bug where lastClientIface was for the previous + connection, and not the current one. The method to retrieve + the last client was through a log_request LoggingMixIn + which is invoked at the end of a response, not at the beginning. + The patch removes the usage of that MixIn, and instead uses + values that are updated at the beginning of the connection +2) Simplifies the 'LoggingMixin' out of the picture as its no + longer needed +3) Remove unused variables: + server.lastClientTime + server.lastClient + server.lastServerIP + +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1048596 +Change-Id: I36e48cc07a27f44a2b413f0e9159110404f1b0ca +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/22837 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22967 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/BindingXMLRPC.py | 40 +++++++++++++++------------------------- + 1 file changed, 15 insertions(+), 25 deletions(-) + +diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py +index 20aaee1..c4b4737 100644 +--- a/vdsm/BindingXMLRPC.py ++++ b/vdsm/BindingXMLRPC.py +@@ -18,7 +18,6 @@ + # Refer to the README and COPYING files for full details of the license + # + +-import time + from errno import EINTR + import SimpleXMLRPCServer + from vdsm import SecureXMLRPCServer +@@ -85,11 +84,18 @@ class BindingXMLRPC(object): + """ + Return the IP address and last client information + """ +- last = self.server.lastClient +- lastserver = self.server.lastServerIP + return {'management_ip': self.serverIP, +- 'lastClient': last, +- 'lastClientIface': getIfaceByIP(lastserver)} ++ 'lastClient': self.cif.threadLocal.client, ++ 'lastClientIface': getIfaceByIP(self.cif.threadLocal.server)} ++ ++ def updateTimestamp(self): ++ # FIXME: The setup+editNetwork API uses this log file to ++ # determine if this host is still accessible. We use a ++ # file (rather than an event) because setup+editNetwork is ++ # performed by a separate, root process. To clean this ++ # up we need to move this to an API wrapper that is only ++ # run for real clients (not vdsm internal API calls). ++ file(constants.P_VDSM_CLIENT_LOG, 'w') + + def _getKeyCertFilenames(self): + """ +@@ -108,30 +114,16 @@ class BindingXMLRPC(object): + + threadLocal = self.cif.threadLocal + +- class LoggingMixIn: +- +- def log_request(self, code='-', size='-'): +- """Track from where client connections are coming.""" +- self.server.lastClient = self.client_address[0] +- self.server.lastClientTime = time.time() +- self.server.lastServerIP = self.request.getsockname()[0] +- # FIXME: The editNetwork API uses this log file to +- # determine if this host is still accessible. We use a +- # file (rather than an event) because editNetwork is +- # performed by a separate, root process. To clean this +- # up we need to move this to an API wrapper that is only +- # run for real clients (not vdsm internal API calls). +- file(constants.P_VDSM_CLIENT_LOG, 'w') +- + server_address = (self.serverIP, int(self.serverPort)) + if self.enableSSL: + basehandler = SecureXMLRPCServer.SecureXMLRPCRequestHandler + else: + basehandler = SimpleXMLRPCServer.SimpleXMLRPCRequestHandler + +- class LoggingHandler(LoggingMixIn, basehandler): ++ class LoggingHandler(basehandler): + def setup(self): + threadLocal.client = self.client_address[0] ++ threadLocal.server = self.request.getsockname()[0] + return basehandler.setup(self) + + def parse_request(self): +@@ -153,15 +145,12 @@ class BindingXMLRPC(object): + requestHandler=LoggingHandler, logRequests=True) + utils.closeOnExec(server.socket.fileno()) + +- server.lastClientTime = 0 +- server.lastClient = '0.0.0.0' +- server.lastServerIP = '0.0.0.0' +- + return server + + def _registerFunctions(self): + def wrapIrsMethod(f): + def wrapper(*args, **kwargs): ++ self.updateTimestamp() + fmt = "" + logargs = [] + +@@ -951,6 +940,7 @@ class BindingXMLRPC(object): + def wrapApiMethod(f): + def wrapper(*args, **kwargs): + try: ++ f.im_self.updateTimestamp() + logLevel = logging.DEBUG + if f.__name__ in ('getVMList', 'getAllVmStats', 'getStats', + 'fenceNode'): +-- +1.8.4.2 + diff --git a/0026-Gluster-API-verbs-will-now-be-callable-again.patch b/0026-Gluster-API-verbs-will-now-be-callable-again.patch new file mode 100644 index 0000000..af3d4da --- /dev/null +++ b/0026-Gluster-API-verbs-will-now-be-callable-again.patch @@ -0,0 +1,86 @@ +From 26f1cf1e50e3e6dcba885d3f5ed7fd0e58a28b04 Mon Sep 17 00:00:00 2001 +From: Assaf Muller +Date: Tue, 7 Jan 2014 16:40:31 +0200 +Subject: [PATCH 26/29] Gluster API verbs will now be callable again + +Fix regression introduced in #22967. + +When wrapping GlusterAPI methods via wrapApiMethod, +wrapApiMethod was accessing a GlusterAPI method's im_self, +(If f is the wrapped method, then f.im_self), which +is an alias to an GlusterAPI instance, but the glusterAPI class +doesn't define updateTimestamp. + +This patch moves 'updateTimestamp' to be a module function, +which will be available no matter what method wrapApiMethod +is wrapping. + +Relates-To: https://bugzilla.redhat.com/1048596 +Change-Id: I1513a5dca444c3e176fb31a9425da85980401b0f +Signed-off-by: Assaf Muller +Reviewed-on: http://gerrit.ovirt.org/23045 +Tested-by: Dan Kenigsberg +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + vdsm/BindingXMLRPC.py | 23 ++++++++++++----------- + 1 file changed, 12 insertions(+), 11 deletions(-) + +diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py +index c4b4737..02bc9fc 100644 +--- a/vdsm/BindingXMLRPC.py ++++ b/vdsm/BindingXMLRPC.py +@@ -38,6 +38,16 @@ except ImportError: + _glusterEnabled = False + + ++def _updateTimestamp(): ++ # FIXME: The setup+editNetwork API uses this log file to ++ # determine if this host is still accessible. We use a ++ # file (rather than an event) because setup+editNetwork is ++ # performed by a separate, root process. To clean this ++ # up we need to move this to an API wrapper that is only ++ # run for real clients (not vdsm internal API calls). ++ file(constants.P_VDSM_CLIENT_LOG, 'w') ++ ++ + class BindingXMLRPC(object): + def __init__(self, cif, log, ip, port, ssl, vds_resp_timeout, + trust_store_path, default_bridge): +@@ -88,15 +98,6 @@ class BindingXMLRPC(object): + 'lastClient': self.cif.threadLocal.client, + 'lastClientIface': getIfaceByIP(self.cif.threadLocal.server)} + +- def updateTimestamp(self): +- # FIXME: The setup+editNetwork API uses this log file to +- # determine if this host is still accessible. We use a +- # file (rather than an event) because setup+editNetwork is +- # performed by a separate, root process. To clean this +- # up we need to move this to an API wrapper that is only +- # run for real clients (not vdsm internal API calls). +- file(constants.P_VDSM_CLIENT_LOG, 'w') +- + def _getKeyCertFilenames(self): + """ + Get the locations of key and certificate files. +@@ -150,7 +151,7 @@ class BindingXMLRPC(object): + def _registerFunctions(self): + def wrapIrsMethod(f): + def wrapper(*args, **kwargs): +- self.updateTimestamp() ++ _updateTimestamp() + fmt = "" + logargs = [] + +@@ -940,7 +941,7 @@ class BindingXMLRPC(object): + def wrapApiMethod(f): + def wrapper(*args, **kwargs): + try: +- f.im_self.updateTimestamp() ++ _updateTimestamp() + logLevel = logging.DEBUG + if f.__name__ in ('getVMList', 'getAllVmStats', 'getStats', + 'fenceNode'): +-- +1.8.4.2 + diff --git a/0027-iscsi-Iscsi-rescan-cleanup.patch b/0027-iscsi-Iscsi-rescan-cleanup.patch new file mode 100644 index 0000000..4b78177 --- /dev/null +++ b/0027-iscsi-Iscsi-rescan-cleanup.patch @@ -0,0 +1,324 @@ +From 9df615a98ef98a3111f691c0f1dd47a979b48032 Mon Sep 17 00:00:00 2001 +From: Saggi Mizrahi +Date: Sun, 15 Sep 2013 16:15:25 +0300 +Subject: [PATCH 27/29] iscsi: Iscsi rescan cleanup + +* Remove forceIscsiScan(): iscsiadm already does that when refreshing + sessions +* Cleanup iscsi.rescan(): Replace complex logic with a simpler + implementation since new iscsiadm takes care of all of this itself +* Make iscsi.rescan() more testable +* Test confusing timeout semantics of iscsi.rescan() + +Bug-Url: https://bugzilla.redhat.com/964595 +Change-Id: I842eb37cea3bd5e8cd357a310dd966081b242abd +Signed-off-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/21136 +Reviewed-by: Dan Kenigsberg +Reviewed-by: Yaniv Bronhaim +--- + tests/Makefile.am | 1 + + tests/iscsiTests.py | 80 +++++++++++++++++++++++++++++++++++++++++++++++ + vdsm.spec.in | 2 +- + vdsm/storage/iscsi.py | 59 +++++++--------------------------- + vdsm/storage/iscsiadm.py | 24 +++++++++----- + vdsm/storage/multipath.py | 2 -- + vdsm/supervdsmServer | 5 --- + 7 files changed, 111 insertions(+), 62 deletions(-) + create mode 100644 tests/iscsiTests.py + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index f87eddd..5efae38 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -37,6 +37,7 @@ test_modules = \ + guestIFTests.py \ + hooksTests.py \ + ipwrapperTests.py \ ++ iscsiTests.py \ + jsonRpcTests.py \ + jsonRpcUtils.py \ + libvirtconnectionTests.py \ +diff --git a/tests/iscsiTests.py b/tests/iscsiTests.py +new file mode 100644 +index 0000000..44f6962 +--- /dev/null ++++ b/tests/iscsiTests.py +@@ -0,0 +1,80 @@ ++import threading ++import time ++from contextlib import contextmanager ++ ++from testrunner import VdsmTestCase as TestCaseBase ++ ++from storage import iscsi ++ ++ ++class AsyncStubOperation(object): ++ def __init__(self, timeout): ++ self._evt = threading.Event() ++ if timeout == 0: ++ self._evt.set() ++ else: ++ threading.Timer(timeout, self._evt.set) ++ ++ def wait(self, timeout=None, cond=None): ++ if cond is not None: ++ raise Exception("TODO!!!") ++ ++ self._evt.wait(timeout) ++ ++ def stop(self): ++ self._evt.set() ++ ++ def result(self): ++ if self._evt.is_set(): ++ return (None, None) ++ else: ++ return None ++ ++ ++class RescanTimeoutTests(TestCaseBase): ++ def setUp(self): ++ self._iscsiadm_rescan_async = \ ++ iscsi.iscsiadm.session_rescan_async ++ iscsi.iscsiadm.session_rescan_async = self._iscsi_stub ++ self._timeout = 0 ++ ++ def tearDown(self): ++ iscsi.iscsiadm.session_rescan_async = \ ++ self._iscsiadm_rescan_async ++ ++ def _iscsi_stub(self): ++ return AsyncStubOperation(self._timeout) ++ ++ @contextmanager ++ def assertMaxDuration(self, maxtime): ++ start = time.time() ++ try: ++ yield ++ finally: ++ end = time.time() ++ elapsed = end - start ++ if maxtime < elapsed: ++ self.fail("Operation was too slow %fs > %fs" % ++ (elapsed, maxtime)) ++ ++ @contextmanager ++ def assertMinDuration(self, mintime): ++ start = time.time() ++ try: ++ yield ++ finally: ++ end = time.time() ++ elapsed = end - start ++ if mintime > elapsed: ++ self.fail("Operation was too fast %fs > %fs" % ++ (elapsed, mintime)) ++ ++ def testFast(self): ++ self._timeout = 0 ++ with self.assertMinDuration(2): ++ iscsi.rescan(2, 4) ++ ++ def testSlow(self): ++ self._timeout = 60 ++ with self.assertMaxDuration(3): ++ iscsi.rescan(1, 2) +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 9aeb607..8d3ba09 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -146,7 +146,7 @@ Requires: python + # Update the qemu-kvm requires when block_stream will be included + Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 + Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 +-Requires: iscsi-initiator-utils >= 6.2.0.872-15 ++Requires: iscsi-initiator-utils >= 6.2.0.873-3 + Requires: device-mapper-multipath >= 0.4.9-52 + Requires: e2fsprogs >= 1.41.12-11 + Requires: fence-agents +diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py +index 7da94ab..f4fdceb 100644 +--- a/vdsm/storage/iscsi.py ++++ b/vdsm/storage/iscsi.py +@@ -30,7 +30,6 @@ import errno + import time + from collections import namedtuple + +-from vdsm import constants + import misc + from vdsm.config import config + import devicemapper +@@ -373,38 +372,15 @@ def iterateIscsiInterfaces(): + + + @misc.samplingmethod +-def rescan(): +- try: +- iscsiadm.session_rescan() +- except iscsiadm.IscsiError: +- pass +- ++def rescan(minTimeout=None, maxTimeout=None): ++ # FIXME: This whole thing is wrong from the core. We need to make rescan ++ # completely async and have methods timeout on their own if they ++ # can't find the devices they are looking for ++ if minTimeout is None: ++ minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') ++ if maxTimeout is None: ++ maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') + +-@misc.samplingmethod +-def forceScsiScan(): +- processes = [] +- minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') +- maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') +- for hba in glob.glob(SCAN_PATTERN): +- cmd = [constants.EXT_DD, 'of=' + hba] +- p = misc.execCmd(cmd, sudo=False, sync=False) +- try: +- p.stdin.write("- - -") +- p.stdin.flush() +- p.stdin.close() +- except OSError as e: +- if p.wait(0) is False: +- log.error("pid %s still running", p.pid) +- log.warning("Error in rescan of hba:%s with returncode:%s and " +- "error message: %s", hba, p.returncode, +- p.stderr.read(1000)) +- if e.errno != errno.EPIPE: +- raise +- else: +- log.warning("Ignoring error in rescan of hba %s: ", +- hba, exc_info=True) +- continue +- processes.append((hba, p)) + if (minTimeout > maxTimeout or minTimeout < 0): + minTimeout = 2 + maxTimeout = 30 +@@ -412,24 +388,13 @@ def forceScsiScan(): + "illegal value: scsi_rescan_minimal_timeout or " + "scsi_rescan_maximal_timeout. Set to %s and %s seconds " + "respectively.", minTimeout, maxTimeout) ++ + log.debug("Performing SCSI scan, this will take up to %s seconds", + maxTimeout) ++ ++ rescanOp = iscsiadm.session_rescan_async() + time.sleep(minTimeout) +- for i in xrange(maxTimeout - minTimeout): +- for p in processes[:]: +- (hba, proc) = p +- if proc.wait(0): +- if proc.returncode != 0: +- log.warning('returncode for: %s is: %s', hba, +- proc.returncode) +- processes.remove(p) +- if not processes: +- break +- else: +- time.sleep(1) +- else: +- log.warning("Still waiting for scsi scan of hbas: %s", +- tuple(hba for p in processes)) ++ rescanOp.wait(timeout=(maxTimeout - minTimeout)) + + + def devIsiSCSI(dev): +diff --git a/vdsm/storage/iscsiadm.py b/vdsm/storage/iscsiadm.py +index cd28db8..9bb27ea 100644 +--- a/vdsm/storage/iscsiadm.py ++++ b/vdsm/storage/iscsiadm.py +@@ -1,6 +1,7 @@ + from threading import Lock + import misc + from vdsm import constants ++from vdsm.utils import AsyncProcessOperation + + # iscsiadm exit statuses + ISCSI_ERR_SESS_EXISTS = 15 +@@ -71,7 +72,7 @@ _RESERVED_INTERFACES = ("default", "tcp", "iser") + _iscsiadmLock = Lock() + + +-def _runCmd(args, hideValue=False): ++def _runCmd(args, hideValue=False, sync=True): + # FIXME: I don't use supervdsm because this entire module has to just be + # run as root and there is no such feature yet in supervdsm. When such + # feature exists please change this. +@@ -88,7 +89,7 @@ def _runCmd(args, hideValue=False): + if i < (len(printCmd) - 1): + printCmd[i + 1] = "****" + +- return misc.execCmd(cmd, printable=printCmd, sudo=True) ++ return misc.execCmd(cmd, printable=printCmd, sudo=True, sync=sync) + + + def iface_exists(interfaceName): +@@ -294,12 +295,21 @@ def node_login(iface, portal, targetName): + raise IscsiNodeError(rc, out, err) + + +-def session_rescan(): +- rc, out, err = _runCmd(["-m", "session", "-R"]) +- if rc == 0: +- return ++def session_rescan_async(): ++ proc = _runCmd(["-m", "session", "-R"], sync=False) + +- raise IscsiSessionError(rc, out, err) ++ def parse_result(rc, out, err): ++ if rc == 0: ++ return ++ ++ raise IscsiSessionError(rc, out, err) ++ ++ return AsyncProcessOperation(proc, parse_result) ++ ++ ++def session_rescan(): ++ aop = session_rescan_async() ++ return aop.result() + + + def session_logout(sessionId): +diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py +index 1f9773c..29851f3 100644 +--- a/vdsm/storage/multipath.py ++++ b/vdsm/storage/multipath.py +@@ -105,8 +105,6 @@ def rescan(): + # First ask iSCSI to rescan all its sessions + iscsi.rescan() + +- supervdsm.getProxy().forceScsiScan() +- + # Now let multipath daemon pick up new devices + cmd = [constants.EXT_MULTIPATH, "-r"] + misc.execCmd(cmd, sudo=True) +diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer +index 7fa1c2b..6ad3875 100755 +--- a/vdsm/supervdsmServer ++++ b/vdsm/supervdsmServer +@@ -56,7 +56,6 @@ from md_utils import getMdDeviceUuidMap as _getMdDeviceUuidMap + + from lsblk import getLsBlk as _getLsBlk + from storage.multipath import getScsiSerial as _getScsiSerial +-from storage.iscsi import forceScsiScan as _forceScsiScan + from storage.iscsi import getDevIscsiInfo as _getdeviSCSIinfo + from storage.iscsi import readSessionInfo as _readSessionInfo + from supervdsm import _SuperVdsmManager +@@ -149,10 +148,6 @@ class _SuperVdsm(object): + return _getScsiSerial(*args, **kwargs) + + @logDecorator +- def forceScsiScan(self, *args, **kwargs): +- return _forceScsiScan(*args, **kwargs) +- +- @logDecorator + def removeDeviceMapping(self, devName): + return _removeMapping(devName) + +-- +1.8.4.2 + diff --git a/0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch b/0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch new file mode 100644 index 0000000..0c283e6 --- /dev/null +++ b/0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch @@ -0,0 +1,111 @@ +From e49175b3627fefb9d39d3323e008aeadde2b14de Mon Sep 17 00:00:00 2001 +From: "Antoni S. Puimedon" +Date: Thu, 12 Dec 2013 17:38:46 +0100 +Subject: [PATCH 28/29] configNetwork: Fix bridgeless broken network deletion + +When trying to delete a broken bridgeless vdsm network, if the iface +referenced by the network definition was missing, delNetwork would +not get any device on its call for vlan, nic and bonds, but +objectivize would be called nonetheless, failing with a: + +ERR_BAD_PARAMS: 'Network defined without devices.' + +The fix consists on just removing the network from libvirt when the +backing device is missing. + +Change-Id: I92c641d91da9ef7eab876ed8c77fff7a9becb503 +Bug-Url: https://bugzilla.redhat.com/1044024 +Signed-off-by: Antoni S. Puimedon +Reviewed-on: http://gerrit.ovirt.org/22354 +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/22436 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + tests/functional/networkTests.py | 26 +++++++++++++++++++++++++- + tests/functional/utils.py | 4 ++++ + vdsm/configNetwork.py | 5 +++++ + 3 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py +index 3e0eed8..f4d29eb 100644 +--- a/tests/functional/networkTests.py ++++ b/tests/functional/networkTests.py +@@ -28,7 +28,7 @@ from testValidation import RequireDummyMod, ValidateRunningAsRoot + + import dummy + from utils import cleanupNet, restoreNetConfig, SUCCESS, VdsProxy, cleanupRules +- ++from vdsm import ipwrapper + from vdsm.ipwrapper import (ruleAdd, ruleDel, routeAdd, routeDel, routeExists, + ruleExists, Route, Rule, addrFlush) + +@@ -1405,3 +1405,27 @@ class NetworkTest(TestCaseBase): + status, msg = self.vdsm_net.setupNetworks(delete_networks, + {}, {}) + self.assertEqual(status, SUCCESS, msg) ++ ++ @RequireDummyMod ++ @ValidateRunningAsRoot ++ def testBrokenBridgelessNetReplacement(self): ++ with dummyIf(1) as nics: ++ nic, = nics ++ network = {NETWORK_NAME: {'nic': nic, 'vlan': VLAN_ID, ++ 'bridged': False}} ++ status, msg = self.vdsm_net.setupNetworks(network, {}, ++ {'connectivityCheck': 0}) ++ self.assertEqual(status, SUCCESS, msg) ++ self.assertTrue(self.vdsm_net.networkExists(NETWORK_NAME)) ++ ipwrapper.linkDel(nic + '.' + VLAN_ID) ++ self.vdsm_net.refreshNetinfo() ++ self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME)) ++ status, msg = self.vdsm_net.setupNetworks(network, {}, ++ {'connectivityCheck': 0}) ++ self.assertEqual(status, SUCCESS, msg) ++ self.assertTrue(self.vdsm_net.networkExists(NETWORK_NAME)) ++ network[NETWORK_NAME] = {'remove': True} ++ status, msg = self.vdsm_net.setupNetworks(network, {}, ++ {'connectivityCheck': 0}) ++ self.assertEqual(status, SUCCESS, msg) ++ self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME)) +diff --git a/tests/functional/utils.py b/tests/functional/utils.py +index f80175e..d8bc939 100644 +--- a/tests/functional/utils.py ++++ b/tests/functional/utils.py +@@ -139,6 +139,10 @@ class VdsProxy(object): + self.vdscli.setSafeNetworkConfig() + + @netinfo_altering ++ def refreshNetinfo(self): ++ pass ++ ++ @netinfo_altering + def restoreNetConfig(self): + restoreNetConfig() + +diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py +index 28c1200..97d3f09 100755 +--- a/vdsm/configNetwork.py ++++ b/vdsm/configNetwork.py +@@ -27,6 +27,7 @@ from vdsm import constants + from vdsm import utils + from storage.misc import execCmd + import neterrors as ne ++from netconf import libvirtCfg + from neterrors import ConfigNetworkError + from vdsm import netinfo + from netconf.ifcfg import ConfigWriter +@@ -263,6 +264,10 @@ def _delBrokenNetwork(network, netAttr, configurator): + _netinfo.networks[network] = netAttr + if _netinfo.networks[network]['bridged']: + _netinfo.networks[network]['ports'] = ConfigWriter.ifcfgPorts(network) ++ elif not os.path.exists('/sys/class/net/' + netAttr['iface']): ++ # Bridgeless broken network without underlying device ++ libvirtCfg.removeNetwork(network) ++ return + delNetwork(network, configurator=configurator, force=True, + implicitBonding=False, _netinfo=_netinfo) + +-- +1.8.4.2 + diff --git a/0029-utils-Create-AsyncProcessOperation.patch b/0029-utils-Create-AsyncProcessOperation.patch new file mode 100644 index 0000000..e59c85c --- /dev/null +++ b/0029-utils-Create-AsyncProcessOperation.patch @@ -0,0 +1,173 @@ +From ed426e5590df421bace0aef9fc802baf2a24a5f2 Mon Sep 17 00:00:00 2001 +From: Saggi Mizrahi +Date: Sun, 15 Sep 2013 14:50:27 +0300 +Subject: [PATCH 29/29] utils: Create AsyncProcessOperation + +This is an object to wrap a process so it can be treated as an +AsyncOperation. + +Features: +* Takes care of pid collection +* Has pluggable output parsing +* Process appropriate implementation of wait() and stop() + +Related-Bug-Url: http://bugzilla.redhat.com/964595 +Change-Id: I79d0eefc9d917a4a93916d52867fb4f1e793c60e +Signed-off-by: Saggi Mizrahi +Reviewed-on: http://gerrit.ovirt.org/21135 +Reviewed-by: Yaniv Bronhaim +Tested-by: Yaniv Bronhaim +--- + lib/vdsm/utils.py | 50 ++++++++++++++++++++++++++++++++++++++++++ + tests/utilsTests.py | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 113 insertions(+) + +diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py +index ef0f512..5a2f746 100644 +--- a/lib/vdsm/utils.py ++++ b/lib/vdsm/utils.py +@@ -48,6 +48,7 @@ import stat + import subprocess + import threading + import time ++import zombiereaper + + from cpopen import CPopen as BetterPopen + from config import config +@@ -936,6 +937,55 @@ def retry(func, expectedException=Exception, tries=None, + time.sleep(sleep) + + ++class AsyncProcessOperation(object): ++ def __init__(self, proc, resultParser=None): ++ """Wraps a running process operation. ++ ++ resultParser should be of type callback(rc, out, err) and can return ++ anything or throw exceptions.""" ++ self._lock = threading.Lock() ++ ++ self._result = None ++ self._resultParser = resultParser ++ ++ self._proc = proc ++ ++ def wait(self, timeout=None, cond=None): ++ """Waits until the process has exited, the timeout has been reached or ++ the condition has been met""" ++ return self._proc.wait(timeout, cond) ++ ++ def stop(self): ++ """Stops the running operation, effectively sending a kill signal to ++ the process""" ++ self._proc.kill() ++ ++ def result(self): ++ """Returns the result in the as a tuple of (result, error). ++ If the operation is still running it will block until it returns. ++ ++ If no resultParser has been set the default result ++ is (rc, out, err) """ ++ with self._lock: ++ if self._result is None: ++ out, err = self._proc.communicate() ++ rc = self._proc.returncode ++ if self._resultParser is not None: ++ try: ++ self._result = (self._resultParser(rc, out, err), ++ None) ++ except Exception as e: ++ self._result = (None, e) ++ else: ++ self._result = ((rc, out, err), None) ++ ++ return self._result ++ ++ def __del__(self): ++ if self._proc.returncode is None: ++ zombiereaper.autoReapPID(self._proc.pid) ++ ++ + def panic(msg): + logging.error("Panic: %s", msg, exc_info=True) + os.killpg(0, 9) +diff --git a/tests/utilsTests.py b/tests/utilsTests.py +index 5f7c82d..4dc6579 100644 +--- a/tests/utilsTests.py ++++ b/tests/utilsTests.py +@@ -24,6 +24,7 @@ import logging + from testrunner import VdsmTestCase as TestCaseBase + from vdsm import utils + from storage import misc ++import time + + + class RetryTests(TestCaseBase): +@@ -140,3 +141,65 @@ class TracebackTests(TestCaseBase): + def handle(self, record): + assert self.record is None + self.record = record ++ ++ ++class AsyncProcessOperationTests(TestCaseBase): ++ def _echo(self, text): ++ proc = misc.execCmd(["echo", "-n", "test"], sync=False) ++ ++ def parse(rc, out, err): ++ return out ++ ++ return utils.AsyncProcessOperation(proc, parse) ++ ++ def _sleep(self, t): ++ proc = misc.execCmd(["sleep", str(t)], sync=False) ++ return utils.AsyncProcessOperation(proc) ++ ++ def _fail(self, t): ++ proc = misc.execCmd(["sleep", str(t)], sync=False) ++ ++ def parse(rc, out, err): ++ raise Exception("TEST!!!") ++ ++ return utils.AsyncProcessOperation(proc, parse) ++ ++ def test(self): ++ aop = self._sleep(1) ++ self.assertEquals(aop.result(), ((0, "", ""), None)) ++ ++ def testAlreadyExitedSuccess(self): ++ aop = self._sleep(0) ++ time.sleep(1) ++ self.assertEquals(aop.result(), ((0, "", ""), None)) ++ ++ def testAlreadyExitedFail(self): ++ aop = self._sleep("hello") ++ time.sleep(1) ++ ((rc, out, err), err) = aop.result() ++ self.assertEquals(err, None) ++ self.assertEquals(rc, 1) ++ ++ def testWait(self): ++ aop = self._sleep(1) ++ aop.wait(timeout=2) ++ ++ def testParser(self): ++ aop = self._echo("test") ++ self.assertEquals(aop.result(), ("test", None)) ++ ++ def testStop(self): ++ aop = self._sleep(10) ++ aop.stop() ++ ++ start = time.time() ++ aop.result() ++ end = time.time() ++ duration = end - start ++ self.assertTrue(duration < 2) ++ ++ def testException(self): ++ aop = self._fail(1) ++ res, err = aop.result() ++ self.assertEquals(res, None) ++ self.assertNotEquals(err, None) +-- +1.8.4.2 + diff --git a/0030-Removing-unnecessary-check-local-from-storage-Makefi.patch b/0030-Removing-unnecessary-check-local-from-storage-Makefi.patch new file mode 100644 index 0000000..17cf170 --- /dev/null +++ b/0030-Removing-unnecessary-check-local-from-storage-Makefi.patch @@ -0,0 +1,41 @@ +From 18e0bfd5eb053d1381ed2551de69b7d631ab71b6 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Sun, 12 Jan 2014 15:13:57 +0200 +Subject: [PATCH] Removing unnecessary check-local from storage Makefile.am + +We used that to run storage_exception main [1] to verify the numeration of +the error code numbers. This section was removed from storage_exception +and is not needed anymore. Therefore this patch omits the redundant +check-local scope. + +[1] http://gerrit.ovirt.org/#/c/2356/4/vdsm/storage/storage_exception.py + +This fixes a regression introduced in commit ed426e5 which adds import +to zombiereaper in utils.py. With the removal of this check-local we +don't require zombiereaper during build time. + +Change-Id: I81c634c3218ca6d21bce57fc9c500a906f8f0775 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/23183 +Reviewed-by: Nir Soffer +Reviewed-by: Dan Kenigsberg +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/23202 +--- + vdsm/storage/Makefile.am | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am +index 2d3e9a6..f9cf9b3 100644 +--- a/vdsm/storage/Makefile.am ++++ b/vdsm/storage/Makefile.am +@@ -70,6 +70,3 @@ dist_vdsmstorage_PYTHON = \ + + dist_vdsmexec_SCRIPTS = \ + curl-img-wrap +- +-check-local: +- PYTHONPATH="$(top_srcdir)/lib:$$PYTHONPATH" PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(srcdir)/storage_exception.py +-- +1.8.4.2 + From 0375459d8f4138b7fbd1349b9b47017989a481a8 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 13:45:28 +0200 Subject: [PATCH 065/126] Removing additional patches and replacing tarball --- vdsm.spec | 63 ------------------------------------------------------- 1 file changed, 63 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index e60222a..a7f6320 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -60,38 +60,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -# ovirt-3.3.3 patches -Patch0: 0001-Reorder-limit-checks-in-grow-quest.patch -Patch1: 0002-domainMonitor-Improve-logging.patch -Patch2: 0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch -Patch3: 0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch -Patch4: 0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch -Patch5: 0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch -Patch6: 0007-Allow-disable-MOM-KSM-control.patch -Patch7: 0008-Allow-setting-just-a-single-value-in-MoM-policy.patch -Patch8: 0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch -Patch9: 0010-threadPool-Do-not-keep-reference-to-tasks.patch -Patch10: 0011-domainMonitor-Separate-change-detection-from-lastChe.patch -Patch11: 0012-utils-Add-unhandled-exceptions-logging-decorator.patch -Patch12: 0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch -Patch13: 0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch -Patch14: 0015-Fix-syntax-error-in-vdsm.spec.patch -Patch15: 0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch -Patch16: 0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch -Patch17: 0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch -Patch18: 0019-fileSD-Fix-image-deletion-on-gluster-domain.patch -Patch19: 0020-sampling-make-HostStatsThread-a-daemon-thread.patch -Patch20: 0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch -Patch21: 0022-update-NIC-having-no-custom-properies-is-valid.patch -Patch22: 0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch -Patch23: 0024-vm-Bring-back-missing-before_device_migrate_source-h.patch -Patch24: 0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch -Patch25: 0026-Gluster-API-verbs-will-now-be-callable-again.patch -Patch26: 0027-iscsi-Iscsi-rescan-cleanup.patch -Patch27: 0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch -Patch28: 0029-utils-Create-AsyncProcessOperation.patch -Patch29: 0030-Removing-unnecessary-check-local-from-storage-Makefi.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -590,37 +558,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -# ovirt-3.3.3 patches -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in From 088eb71d57c7551b628e29f7acd8b3289aead21b Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 15:50:39 +0200 Subject: [PATCH 066/126] Removing patches from ovirt-3.3, using new 4.13.3 tag Additional fix for import error --- 0001-Reorder-limit-checks-in-grow-quest.patch | 42 --- 0001-Using-old-form-of-zombiereaper.patch | 45 +++ 0002-domainMonitor-Improve-logging.patch | 55 --- ...-from-restorecon-hack-for-var-log-co.patch | 36 -- ...ect-integer-vlan-id-from-new-netinfo.patch | 37 -- ...parameter-for-creating-hookpath-in-v.patch | 39 --- ....spec-Remove-Obsoletes-python-cpopen.patch | 33 -- 0007-Allow-disable-MOM-KSM-control.patch | 53 --- ...ng-just-a-single-value-in-MoM-policy.patch | 120 ------- ...-when-shutdown-called-on-vm-in-Down-.patch | 42 --- ...dPool-Do-not-keep-reference-to-tasks.patch | 55 --- ...parate-change-detection-from-lastChe.patch | 84 ----- ...handled-exceptions-logging-decorator.patch | 150 -------- ...g-unhandled-exceptions-in-domain-mon.patch | 48 --- ...d-exceptions-in-storage-refresh-thre.patch | 39 --- 0015-Fix-syntax-error-in-vdsm.spec.patch | 32 -- ...nk-log-level-to-prevent-log-flooding.patch | 59 ---- ...mePath-correct-path-handling-for-cdr.patch | 51 --- ...s-list-for-disks-attached-to-vm-afte.patch | 34 -- ...Fix-image-deletion-on-gluster-domain.patch | 75 ---- ...make-HostStatsThread-a-daemon-thread.patch | 34 -- ...eVolumePath-payload-misdetection-fix.patch | 50 --- ...-having-no-custom-properies-is-valid.patch | 38 -- ...gfix-Fix-netinfo-getIfaceByIP-unit-t.patch | 52 --- ...ssing-before_device_migrate_source-h.patch | 37 -- ...gfix-Return-lastClientIface-for-curr.patch | 128 ------- ...API-verbs-will-now-be-callable-again.patch | 86 ----- 0027-iscsi-Iscsi-rescan-cleanup.patch | 324 ------------------ ...x-bridgeless-broken-network-deletion.patch | 111 ------ 0029-utils-Create-AsyncProcessOperation.patch | 173 ---------- ...sary-check-local-from-storage-Makefi.patch | 41 --- vdsm.spec | 5 + 32 files changed, 50 insertions(+), 2158 deletions(-) delete mode 100644 0001-Reorder-limit-checks-in-grow-quest.patch create mode 100644 0001-Using-old-form-of-zombiereaper.patch delete mode 100644 0002-domainMonitor-Improve-logging.patch delete mode 100644 0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch delete mode 100644 0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch delete mode 100644 0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch delete mode 100644 0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch delete mode 100644 0007-Allow-disable-MOM-KSM-control.patch delete mode 100644 0008-Allow-setting-just-a-single-value-in-MoM-policy.patch delete mode 100644 0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch delete mode 100644 0010-threadPool-Do-not-keep-reference-to-tasks.patch delete mode 100644 0011-domainMonitor-Separate-change-detection-from-lastChe.patch delete mode 100644 0012-utils-Add-unhandled-exceptions-logging-decorator.patch delete mode 100644 0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch delete mode 100644 0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch delete mode 100644 0015-Fix-syntax-error-in-vdsm.spec.patch delete mode 100644 0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch delete mode 100644 0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch delete mode 100644 0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch delete mode 100644 0019-fileSD-Fix-image-deletion-on-gluster-domain.patch delete mode 100644 0020-sampling-make-HostStatsThread-a-daemon-thread.patch delete mode 100644 0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch delete mode 100644 0022-update-NIC-having-no-custom-properies-is-valid.patch delete mode 100644 0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch delete mode 100644 0024-vm-Bring-back-missing-before_device_migrate_source-h.patch delete mode 100644 0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch delete mode 100644 0026-Gluster-API-verbs-will-now-be-callable-again.patch delete mode 100644 0027-iscsi-Iscsi-rescan-cleanup.patch delete mode 100644 0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch delete mode 100644 0029-utils-Create-AsyncProcessOperation.patch delete mode 100644 0030-Removing-unnecessary-check-local-from-storage-Makefi.patch diff --git a/0001-Reorder-limit-checks-in-grow-quest.patch b/0001-Reorder-limit-checks-in-grow-quest.patch deleted file mode 100644 index 4101479..0000000 --- a/0001-Reorder-limit-checks-in-grow-quest.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 6791ec2bd94195c711cd719c8021692720fb02fb Mon Sep 17 00:00:00 2001 -From: Martin Sivak -Date: Tue, 26 Nov 2013 16:53:36 +0100 -Subject: [PATCH 01/11] Reorder limit checks in grow quest - -balloon_min is a computed value that can (and will) go over -balloon_max. When the controller tries to use it VDSM reports -exception. - -Reorder the checks so the balloon_max constant check is the latest -one to limit the value. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1034969 -Change-Id: I2a8d19f7fe66bb98d97718da34ec2bad6f7987f2 -Signed-off-by: Martin Sivak -Reviewed-on: http://gerrit.ovirt.org/21765 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/mom.d/02-balloon.policy | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vdsm/mom.d/02-balloon.policy b/vdsm/mom.d/02-balloon.policy -index 26c30e2..c98a231 100644 ---- a/vdsm/mom.d/02-balloon.policy -+++ b/vdsm/mom.d/02-balloon.policy -@@ -87,10 +87,10 @@ - - # Determine the new target for the BalloonController. Only set - # if the value is a large enough for the change to be worth it. -- (if (> balloon_size guest.balloon_max) -- (set balloon_size guest.balloon_max) 0) - (if (< balloon_size balloon_min) - (set balloon_size balloon_min) 0) -+ (if (> balloon_size guest.balloon_max) -+ (set balloon_size guest.balloon_max) 0) - (if (change_big_enough guest balloon_size) - (guest.Control "balloon_target" balloon_size) 0) - } 0) --- -1.8.4.2 - diff --git a/0001-Using-old-form-of-zombiereaper.patch b/0001-Using-old-form-of-zombiereaper.patch new file mode 100644 index 0000000..cbe38ed --- /dev/null +++ b/0001-Using-old-form-of-zombiereaper.patch @@ -0,0 +1,45 @@ +From d1bb20a892d32822e8f04488fb12df0ffea76a04 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Mon, 13 Jan 2014 14:55:35 +0200 +Subject: [PATCH] Using old form of zombiereaper + +In ovirt-3.3 we don't include the change [1] that modifies zombieReaper +to zombiereaper. + +The import in utils.py cause an import error without having [1]. + +[1] http://gerrit.ovirt.org/#/c/19253/ + +Change-Id: I7483e09df69d07b8396e075726dd14efb42a5551 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/23215 +Reviewed-by: Dan Kenigsberg +--- + lib/vdsm/utils.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py +index 5a2f746..0d3ec91 100644 +--- a/lib/vdsm/utils.py ++++ b/lib/vdsm/utils.py +@@ -48,7 +48,7 @@ import stat + import subprocess + import threading + import time +-import zombiereaper ++import zombieReaper + + from cpopen import CPopen as BetterPopen + from config import config +@@ -983,7 +983,7 @@ class AsyncProcessOperation(object): + + def __del__(self): + if self._proc.returncode is None: +- zombiereaper.autoReapPID(self._proc.pid) ++ zombieReaper.autoReapPID(self._proc.pid) + + + def panic(msg): +-- +1.8.4.2 + diff --git a/0002-domainMonitor-Improve-logging.patch b/0002-domainMonitor-Improve-logging.patch deleted file mode 100644 index 7a2586b..0000000 --- a/0002-domainMonitor-Improve-logging.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 3c5f9bb5440ca463b6af9f016178c4bcbc01b165 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Sun, 1 Dec 2013 22:29:25 +0200 -Subject: [PATCH 02/11] domainMonitor: Improve logging - -We have logs in domain monitor thread, and we can see when a monitor -starts or stops, but we don't have any info which thread triggered the -operation. This patch adds info level log messages when starting and -stopping domain monitoring, revealing the caller thread. - -Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029 -Relates-To: https://bugzilla.redhat.com/1032925 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21904 -Reviewed-by: Sergey Gotliv -Reviewed-by: Allon Mureinik -Reviewed-by: Ohad Basan -Reviewed-by: Ayal Baron -Reviewed-on: http://gerrit.ovirt.org/21936 -Reviewed-by: Federico Simoncelli ---- - vdsm/storage/domainMonitor.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py -index ffa5e00..ac01e8b 100644 ---- a/vdsm/storage/domainMonitor.py -+++ b/vdsm/storage/domainMonitor.py -@@ -90,6 +90,7 @@ class DomainMonitor(object): - if sdUUID in self._domains: - return - -+ self.log.info("Start monitoring %s", sdUUID) - domainThread = DomainMonitorThread(weakref.proxy(self), - sdUUID, hostId, self._interval) - domainThread.start() -@@ -102,6 +103,7 @@ class DomainMonitor(object): - # Eg: when a domain is detached the domain monitor is stopped and - # the host id is released. If the monitor didn't actually exit it - # might respawn a new acquire host id. -+ self.log.info("Stop monitoring %s", sdUUID) - try: - self._domains[sdUUID].stop() - except KeyError: -@@ -113,6 +115,7 @@ class DomainMonitor(object): - return self._domains[sdUUID].getStatus() - - def close(self): -+ self.log.info("Stopping domain monitors") - for sdUUID in self._domains.keys(): - self.stopMonitoring(sdUUID) - --- -1.8.4.2 - diff --git a/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch b/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch deleted file mode 100644 index ba813e0..0000000 --- a/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6ffd5d7e95f9e5351c0b9881ae2a55eed1d6db48 Mon Sep 17 00:00:00 2001 -From: Mooli Tayer -Date: Sun, 1 Dec 2013 14:43:14 +0200 -Subject: [PATCH 03/11] Remove verbosity from restorecon hack for - /var/log/core. - -vebosity spams consoel during installation. - -Change-Id: I862039a6dfeebe38fc5c62276ae98213ef92bd02 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031109 -Signed-off-by: Mooli Tayer -Reviewed-on: http://gerrit.ovirt.org/21888 -Reviewed-by: Yaniv Bronhaim -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22021 -Tested-by: Yaniv Bronhaim ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 00f8c70..d03703b 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -658,7 +658,7 @@ fi - if /usr/sbin/selinuxenabled; then - /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' - fi --/sbin/restorecon -R -v /var/log/core -+/sbin/restorecon -R /var/log/core >/dev/null 2>&1 - # hack until we replace core dump with abrt - - %if 0%{?rhel} --- -1.8.4.2 - diff --git a/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch b/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch deleted file mode 100644 index cf27456..0000000 --- a/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b88d9b90d2458cab2a7ca4fc37d42439bd5774c2 Mon Sep 17 00:00:00 2001 -From: Vladimir Tananko -Date: Tue, 3 Dec 2013 10:24:23 +0000 -Subject: [PATCH 04/11] deployUtil: expect integer vlan id from new netinfo - -Commit 8b2bbe6e5 changed netinfo.getVlanID() to return the vlan id as an -integer, istead of a string. This makes a lot of sense, but breaks -compatibility with ancient deployUtil code. - -Change-Id: Ibc1c5875e0d13b110f61f9eabf6d1964fc4c1237 -Bug-Url: https://bugzilla.redhat.com/1037277 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21948 -Reviewed-by: Amador Pahim -Reviewed-by: Antoni Segura Puimedon -Reviewed-on: http://gerrit.ovirt.org/21982 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm_reg/deployUtil.py.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 2d379f6..ba45d64 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1061,6 +1061,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None): - else: - vlan, bonding, nic = _getRHELBridgeParams(mgtIface, - bridgeName=bridgeName) -+ vlan = str(vlan) - fReturn = (nic is not None) - - #Delete existing bridge in oVirt --- -1.8.4.2 - diff --git a/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch b/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch deleted file mode 100644 index 1e35b3f..0000000 --- a/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 39b35ce25e26d0190ba0567e64751d9a55aa8aec Mon Sep 17 00:00:00 2001 -From: ndarshan -Date: Thu, 7 Nov 2013 15:28:55 +0530 -Subject: [PATCH 05/11] gluster: correct parameter for creating hookpath in - verb hookAdd. - -parameter hookLevel must be in lower case for creating correct -path for hook. so that parameter is changed to lower case. - -Change-Id: Ic16885a7f837ccceede2cf1b70b5da3138a12a60 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1028972 -Signed-off-by: ndarshan -Reviewed-on: http://gerrit.ovirt.org/21017 -Reviewed-by: Aravinda VK -Reviewed-by: Bala.FA -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21538 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/gluster/hooks.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/gluster/hooks.py b/vdsm/gluster/hooks.py -index 914d09d..4f1c14d 100644 ---- a/vdsm/gluster/hooks.py -+++ b/vdsm/gluster/hooks.py -@@ -244,7 +244,7 @@ def hookUpdate(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum): - @makePublic - def hookAdd(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum, - enable=False): -- hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel) -+ hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel.lower()) - try: - os.makedirs(hookPath) - if selinux.is_selinux_enabled(): --- -1.8.4.2 - diff --git a/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch b/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch deleted file mode 100644 index 13d3cfb..0000000 --- a/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch +++ /dev/null @@ -1,33 +0,0 @@ -From af3d4e8792175a3e0360547c44944388022f3b14 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Thu, 5 Dec 2013 21:03:38 -0500 -Subject: [PATCH 06/11] vdsm.spec: Remove Obsoletes: python-cpopen - -python-cpopen spec obsoletes vdsm-python-cpopen, so vdsm.spec don't -need to obsolete python-cpopen. Otherwise, it will generate an -infinity loop during the yum update between these packages. - -Change-Id: If5523c3530cbac667ce5c7db4f78543f21778c54 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/22113 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm.spec.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index d03703b..10fe3f2 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -313,7 +313,6 @@ Summary: Creates a sub-process in simpler safer manner. - - BuildRequires: python2-devel - Provides: python-cpopen = 1.2.3 --Obsoletes: python-cpopen - - %description python-cpopen - Python package for creating sub-process in simpler and safer manner by using C --- -1.8.4.2 - diff --git a/0007-Allow-disable-MOM-KSM-control.patch b/0007-Allow-disable-MOM-KSM-control.patch deleted file mode 100644 index 43d46c2..0000000 --- a/0007-Allow-disable-MOM-KSM-control.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 35019eb333d5dbe6d8c7150a5283ca196f6866df Mon Sep 17 00:00:00 2001 -From: Amador Pahim -Date: Mon, 11 Nov 2013 09:04:47 -0300 -Subject: [PATCH 07/11] Allow disable MOM KSM control. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch add ksmEnabled var to enable/disable mom ksm control. -Now users can use vdsClient to runtime disable/enable -(default enabled) ksm control: - - $ vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False - -Change-Id: Icc4333ce92561e23c062c398e24f876a74056a05 -Bug-Url: http://bugzilla.redhat.com/1025780 -Signed-off-by: Amador Pahim -Reviewed-on: http://gerrit.ovirt.org/20879 -Reviewed-by: Martin Sivák -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22150 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/mom.d/01-parameters.policy | 1 + - vdsm/mom.d/03-ksm.policy | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy -index 980e71c..97803d5 100644 ---- a/vdsm/mom.d/01-parameters.policy -+++ b/vdsm/mom.d/01-parameters.policy -@@ -1 +1,2 @@ - (defvar balloonEnabled 0) -+(defvar ksmEnabled 1) -diff --git a/vdsm/mom.d/03-ksm.policy b/vdsm/mom.d/03-ksm.policy -index 415fcfd..5a3b1bd 100644 ---- a/vdsm/mom.d/03-ksm.policy -+++ b/vdsm/mom.d/03-ksm.policy -@@ -41,8 +41,8 @@ - (defvar ksm_pressure_threshold (* Host.mem_available ksm_free_percent)) - (defvar ksm_committed Host.ksm_shareable) - --(if (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available) -- (> (Host.StatAvg "mem_free") ksm_pressure_threshold)) -+(if (or (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available) -+ (> (Host.StatAvg "mem_free") ksm_pressure_threshold)) (not ksmEnabled)) - (Host.Control "ksm_run" 0) - { # else - (Host.Control "ksm_run" 1) --- -1.8.4.2 - diff --git a/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch b/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch deleted file mode 100644 index 03be1cc..0000000 --- a/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 4a60357831d2ef6686f8e0bfebde130f4251c52a Mon Sep 17 00:00:00 2001 -From: Martin Sivak -Date: Wed, 13 Nov 2013 14:10:31 +0100 -Subject: [PATCH 08/11] Allow setting just a single value in MoM policy - -This patch prevents a policy coruption that could have happened -when the 01-parameters policy was updated with just a single -value. If there were more values defined, the variables were lost -and the policy ended up broken. - -This patch defines the variables in a file that is not touched -by the setMOMPolicyParameters and uses (set name value) syntax -in the generated policy part. - -It also remembers the old setting and puts all the values to -the policy part when it is autogenerated. - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1025780 - -Change-Id: I7bb1001a05e670e393b2cc0ab4b271b3b333d2e8 -Signed-off-by: Martin Sivak -Reviewed-on: http://gerrit.ovirt.org/21225 -Reviewed-by: Amador Pahim -Reviewed-by: Doron Fediuck -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/21839 -Reviewed-by: Yaniv Bronhaim ---- - debian/vdsm.install | 2 +- - vdsm/Makefile.am | 2 +- - vdsm/mom.d/{00-python.policy => 00-defines.policy} | 5 +++++ - vdsm/mom.d/01-parameters.policy | 2 -- - vdsm/momIF.py | 9 ++++++--- - 5 files changed, 13 insertions(+), 7 deletions(-) - rename vdsm/mom.d/{00-python.policy => 00-defines.policy} (58%) - -diff --git a/debian/vdsm.install b/debian/vdsm.install -index 6de089e..89b6e6c 100644 ---- a/debian/vdsm.install -+++ b/debian/vdsm.install -@@ -14,7 +14,7 @@ - ./etc/sysctl.d/vdsm.conf - ./etc/vdsm/logger.conf - ./etc/vdsm/mom.conf --./etc/vdsm/mom.d/00-python.policy -+./etc/vdsm/mom.d/00-defines.policy - ./etc/vdsm/mom.d/01-parameters.policy - ./etc/vdsm/mom.d/02-balloon.policy - ./etc/vdsm/mom.d/03-ksm.policy -diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am -index 26be4dc..5ab291e 100644 ---- a/vdsm/Makefile.am -+++ b/vdsm/Makefile.am -@@ -110,7 +110,7 @@ EXTRA_DIST = \ - logger.conf.in \ - mk_sysprep_floppy.in \ - mom.conf.in \ -- mom.d/00-python.policy \ -+ mom.d/00-defines.policy \ - mom.d/01-parameters.policy \ - mom.d/02-balloon.policy \ - mom.d/03-ksm.policy \ -diff --git a/vdsm/mom.d/00-python.policy b/vdsm/mom.d/00-defines.policy -similarity index 58% -rename from vdsm/mom.d/00-python.policy -rename to vdsm/mom.d/00-defines.policy -index face6fa..93b70ee 100644 ---- a/vdsm/mom.d/00-python.policy -+++ b/vdsm/mom.d/00-defines.policy -@@ -2,3 +2,8 @@ - # received by setMOMPolicyParameters - (defvar False 0) - (defvar True 1) -+ -+# Define variables for configurable options here -+(defvar ksmEnabled 1) -+(defvar balloonEnabled 0) -+ -diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy -index 97803d5..e69de29 100644 ---- a/vdsm/mom.d/01-parameters.policy -+++ b/vdsm/mom.d/01-parameters.policy -@@ -1,2 +0,0 @@ --(defvar balloonEnabled 0) --(defvar ksmEnabled 1) -diff --git a/vdsm/momIF.py b/vdsm/momIF.py -index 8b62657..c1e00ef 100644 ---- a/vdsm/momIF.py -+++ b/vdsm/momIF.py -@@ -46,6 +46,7 @@ class MomThread(threading.Thread): - self.log = logging.getLogger("MOM") - self.log.info("Starting up MOM") - self._mom = mom.MOM(momconf) -+ self._policy = {} - threading.Thread.__init__(self, target=self._mom.run, name="MOM") - self.start() - -@@ -64,14 +65,16 @@ class MomThread(threading.Thread): - - def setPolicyParameters(self, key_value_store): - # mom.setNamedPolicy will raise an exception on failure. -+ - # Prepare in-memory policy file with tuning variables - # this might need to convert certain python types to proper MoM - # policy language -+ self._policy.update(key_value_store) - -- # Python bool values are defined in 00-python.policy so need no -+ # Python bool values are defined in 00-defines.policy so need no - # conversion here -- policy_string = "\n".join(["(defvar %s %r)" % (k, v) -- for k, v in key_value_store.iteritems()]) -+ policy_string = "\n".join(["(set %s %r)" % (k, v) -+ for k, v in self._policy.iteritems()]) - - self._mom.setNamedPolicy(config.get("mom", "tuning_policy"), - policy_string) --- -1.8.4.2 - diff --git a/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch b/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch deleted file mode 100644 index d86e7cc..0000000 --- a/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c8aab3aa3bedfa8a92d41a8934e9adfa2a7fb89d Mon Sep 17 00:00:00 2001 -From: Greg Padgett -Date: Mon, 2 Dec 2013 23:04:36 -0500 -Subject: [PATCH 09/11] vm: Fix exception when shutdown() called on vm in - 'Down' state - -Attempting to call the shutdown() method on a VM which is in 'Down' -state resulted in an exception if called through xmlrpclib. Instead, -adopt the convention used by similar APIs such as migrate() and return -errCode['noVM']. - -Change-Id: I8b75d0b869354d503e5f187e33370b5837b3c698 -Bug-Url: https://bugzilla.redhat.com/1027297 -Signed-off-by: Greg Padgett -Reviewed-on: http://gerrit.ovirt.org/21937 -Reviewed-by: Sandro Bonazzola -Reviewed-by: Doron Fediuck -Reviewed-by: Federico Simoncelli -Reviewed-by: Michal Skrivanek -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22218 -Reviewed-by: Yaniv Bronhaim ---- - vdsm/vm.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index b9ab60b..59541e7 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -2483,7 +2483,7 @@ class Vm(object): - try: - now = time.time() - if self.lastStatus == 'Down': -- return -+ return errCode['noVM'] - if self.guestAgent and self.guestAgent.isResponsive(): - self._guestEventTime = now - self._guestEvent = 'Powering down' --- -1.8.4.2 - diff --git a/0010-threadPool-Do-not-keep-reference-to-tasks.patch b/0010-threadPool-Do-not-keep-reference-to-tasks.patch deleted file mode 100644 index 216556e..0000000 --- a/0010-threadPool-Do-not-keep-reference-to-tasks.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9b2d7c22e806ead1c499b1da304bff6da21a5f67 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Sun, 8 Dec 2013 00:49:36 +0200 -Subject: [PATCH 10/29] threadPool: Do not keep reference to tasks - -Worker thread was taking a task from the threadpool queue, run it, and -then hold it until the next task is run. This causes the task and all -objects referenced from it to keep living until the next task is run by -this thread. - -This patch ensure that worker thread does not keep referece to tasks -after they were run. - -Change-Id: Ib6e024e0727e11a4c98f4e5ede20229d148fdc58 -Relates-To: https://bugzilla.redhat.com/1032925 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/22136 -Reviewed-by: Ayal Baron -Reviewed-by: Allon Mureinik -Reviewed-on: http://gerrit.ovirt.org/22208 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/threadPool.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/vdsm/storage/threadPool.py b/vdsm/storage/threadPool.py -index b1f3142..a0e24a2 100644 ---- a/vdsm/storage/threadPool.py -+++ b/vdsm/storage/threadPool.py -@@ -191,8 +191,8 @@ class WorkerThread(threading.Thread): - it, calling the callback if any. """ - - while not self.__isDying: -+ id, cmd, args, callback = self.__pool.getNextTask() - try: -- id, cmd, args, callback = self.__pool.getNextTask() - if id is None: # should retry. - pass - elif self.__isDying: -@@ -212,6 +212,11 @@ class WorkerThread(threading.Thread): - self.__pool.setRunningTask(False) - except Exception: - self.log.error("Task %s failed" % repr(cmd), exc_info=True) -+ finally: -+ # Don't keep reference to objects taken from the pool. -+ # Otherwise this thread may keep those object alive until the -+ # next iteration. See BZ#1032925. -+ del id, cmd, args, callback - - def goAway(self): - --- -1.8.4.2 - diff --git a/0011-domainMonitor-Separate-change-detection-from-lastChe.patch b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch deleted file mode 100644 index 3a8a03e..0000000 --- a/0011-domainMonitor-Separate-change-detection-from-lastChe.patch +++ /dev/null @@ -1,84 +0,0 @@ -From b33afbee6eec61253f40df655b3c5903dafac617 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Sat, 30 Nov 2013 14:49:08 +0200 -Subject: [PATCH 11/29] domainMonitor: Separate change detection from lastCheck - value - -Since commit 45f3037ca1e, lastCheck value is initialized to special -NOT_CHECKED_YET value, and used for detecting the first monitor status change. -This change caused repoStats to return high lastCheck value until the first -monitor check is done, causing host activation to fail, and host becoming -non-operational. - -Previously, lastCheck value was initialized to monitor thread creation time, -and repoStats was returning valid lastCheck value even before the first domain -check was finished. While somewhat incorrect, this behavior is required for -engine monitoring logic. - -This patch restore the previous lastCheck semantics and use a new -firstChange flag for detecting the first status change. - -Change-Id: I8e0df2ee0333354146b5d9429fd83a4f914ff751 -Relates-To: https://bugzilla.redhat.com/1003588 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21878 -Reviewed-by: Allon Mureinik -Reviewed-by: Liron Ar -Reviewed-by: Ayal Baron -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/22209 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/domainMonitor.py | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py -index ac01e8b..d95f133 100644 ---- a/vdsm/storage/domainMonitor.py -+++ b/vdsm/storage/domainMonitor.py -@@ -27,8 +27,6 @@ import misc - from vdsm.config import config - from sdc import sdCache - --NOT_CHECKED_YET = -1 -- - - class DomainMonitorStatus(object): - __slots__ = ( -@@ -43,7 +41,7 @@ class DomainMonitorStatus(object): - - def clear(self): - self.error = None -- self.lastCheck = NOT_CHECKED_YET -+ self.lastCheck = time() - self.valid = True - self.readDelay = 0 - self.diskUtilization = (None, None) -@@ -133,6 +131,7 @@ class DomainMonitorThread(object): - self.sdUUID = sdUUID - self.hostId = hostId - self.interval = interval -+ self.firstChange = True - self.status = DomainMonitorStatus() - self.nextStatus = DomainMonitorStatus() - self.isIsoDomain = None -@@ -244,6 +243,8 @@ class DomainMonitorThread(object): - self.log.warn("Could not emit domain state change event", - exc_info=True) - -+ self.firstChange = False -+ - # An ISO domain can be shared by multiple pools - if (not self.isIsoDomain and self.nextStatus.valid - and self.nextStatus.hasHostId is False): -@@ -257,5 +258,4 @@ class DomainMonitorThread(object): - self.status.update(self.nextStatus) - - def _statusDidChange(self): -- return (self.status.lastCheck == NOT_CHECKED_YET or -- self.status.valid != self.nextStatus.valid) -+ return self.firstChange or self.status.valid != self.nextStatus.valid --- -1.8.4.2 - diff --git a/0012-utils-Add-unhandled-exceptions-logging-decorator.patch b/0012-utils-Add-unhandled-exceptions-logging-decorator.patch deleted file mode 100644 index a39d268..0000000 --- a/0012-utils-Add-unhandled-exceptions-logging-decorator.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 8c40d80d306d9fb56069ab38ab5df80705d58d63 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Wed, 27 Nov 2013 14:01:58 +0200 -Subject: [PATCH 12/29] utils: Add unhandled exceptions logging decorator - -We have at least two places where exceptions in thread main function are -not handled, making debugging such threads impossible. This patch adds a -new decorator that make it easy to log tracebacks for unhandled -exceptions. - -The recommended use case is to decorate a thread main function. This -ensure that we get a traceback for any error in the thread, including -errors in error handling code. This should be used on all in threads in -the system. - -Note that the decorator only adds logging - it does not change the -program flow. The unhandled exception is raise again so you can safely -use it on script main function, without changing the exit code. Do not -try to use this for ignoring exceptions. - -See utilsTests for example usage. - -Change-Id: I39265bac4f26fefa365bad080dafb6106145f846 -Relates-To: https://bugzilla.redhat.com/1034741 -Relates-To: https://bugzilla.redhat.com/1040164 -Relates-To: https://bugzilla.redhat.com/1040166 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21778 -Reviewed-by: Sergey Gotliv -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22212 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - lib/vdsm/utils.py | 22 ++++++++++++++++++++ - tests/utilsTests.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 82 insertions(+) - -diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py -index d3e0c2b..ef0f512 100644 ---- a/lib/vdsm/utils.py -+++ b/lib/vdsm/utils.py -@@ -599,6 +599,28 @@ def getPidNiceness(pid): - return int(stat.split(') ')[-1].split()[16]) - - -+def traceback(on="", msg="Unhandled exception"): -+ """ -+ Log a traceback for unhandled execptions. -+ -+ :param on: Use specific logger name instead of root logger -+ :type on: str -+ :param msg: Use specified message for the exception -+ :type msg: str -+ """ -+ def decorator(f): -+ @functools.wraps(f) -+ def wrapper(*a, **kw): -+ try: -+ return f(*a, **kw) -+ except Exception: -+ log = logging.getLogger(on) -+ log.exception(msg) -+ raise # Do not swallow -+ return wrapper -+ return decorator -+ -+ - def tobool(s): - try: - if s is None: -diff --git a/tests/utilsTests.py b/tests/utilsTests.py -index a6a222d..5f7c82d 100644 ---- a/tests/utilsTests.py -+++ b/tests/utilsTests.py -@@ -17,7 +17,9 @@ - # - # Refer to the README and COPYING files for full details of the license - # -+import contextlib - import errno -+import logging - - from testrunner import VdsmTestCase as TestCaseBase - from vdsm import utils -@@ -80,3 +82,61 @@ class CommandPathTests(TestCaseBase): - class GeneralUtilsTests(TestCaseBase): - def testPanic(self): - self.assertRaises(AssertionError, utils.panic, "panic test") -+ -+ -+@contextlib.contextmanager -+def loghandler(handler, logger=""): -+ log = logging.getLogger(logger) -+ log.addHandler(handler) -+ try: -+ yield {} -+ finally: -+ log.removeHandler(handler) -+ -+ -+class TracebackTests(TestCaseBase): -+ -+ def __init__(self, *a, **kw): -+ self.record = None -+ super(TestCaseBase, self).__init__(*a, **kw) -+ -+ def testDefaults(self): -+ @utils.traceback() -+ def fail(): -+ raise Exception -+ with loghandler(self): -+ self.assertRaises(Exception, fail) -+ self.assertEquals(self.record.name, "root") -+ self.assertTrue(self.record.exc_text is not None) -+ -+ def testOn(self): -+ logger = "test" -+ -+ @utils.traceback(on=logger) -+ def fail(): -+ raise Exception -+ with loghandler(self, logger=logger): -+ self.assertRaises(Exception, fail) -+ self.assertEquals(self.record.name, logger) -+ -+ def testMsg(self): -+ @utils.traceback(msg="WAT") -+ def fail(): -+ raise Exception -+ with loghandler(self): -+ self.assertRaises(Exception, fail) -+ self.assertEquals(self.record.message, "WAT") -+ -+ # Logging handler interface -+ -+ level = logging.DEBUG -+ -+ def acquire(self): -+ pass -+ -+ def release(self): -+ pass -+ -+ def handle(self, record): -+ assert self.record is None -+ self.record = record --- -1.8.4.2 - diff --git a/0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch b/0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch deleted file mode 100644 index 250fb20..0000000 --- a/0013-domainMonitor-Log-unhandled-exceptions-in-domain-mon.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 0ffb19c64f112b38483b5e913093abcf14fe71d7 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Wed, 20 Nov 2013 23:10:51 +0200 -Subject: [PATCH 13/29] domainMonitor: Log unhandled exceptions in domain - monitor thread - -DomainMonitorThread does not handle exceptions in the thread main -function, making it harder to modify the code or understanding -unexpected failures in the field. - -The patch log unhandled exceptions so it will never die silently. - -Change-Id: I743c59bffa99ab9868f1878ca96b7d979a703efb -Bug-Url: https://bugzilla.redhat.com/1040166 -Relates-To: https://bugzilla.redhat.com/1034741 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21487 -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/22214 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/domainMonitor.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py -index d95f133..d995bff 100644 ---- a/vdsm/storage/domainMonitor.py -+++ b/vdsm/storage/domainMonitor.py -@@ -24,6 +24,7 @@ import weakref - - import logging - import misc -+from vdsm import utils - from vdsm.config import config - from sdc import sdCache - -@@ -151,6 +152,7 @@ class DomainMonitorThread(object): - def getStatus(self): - return self.status.copy() - -+ @utils.traceback(on=log.name) - def _monitorLoop(self): - self.log.debug("Starting domain monitor for %s", self.sdUUID) - --- -1.8.4.2 - diff --git a/0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch b/0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch deleted file mode 100644 index f227f77..0000000 --- a/0014-hsm-Log-unhandled-exceptions-in-storage-refresh-thre.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e6bbe0fb0f8425f2d0b3a27dd2383ed0122fa884 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Wed, 20 Nov 2013 22:38:07 +0200 -Subject: [PATCH 14/29] hsm: Log unhandled exceptions in storage refresh thread - -hsm's storage refresh background thread does not handle exceptions, -making it harder then it should to debug stupid errors in underlying -calls or debug real errors in the field. - -This patch log a traceback for unhandled exceptions so it will never die -silently again. - -Change-Id: I2e69464ba27b7d522c5ceb3a3099949efe7fbc88 -Bug-Url: https://bugzilla.redhat.com/1040164 -Signed-off-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/21486 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22213 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/hsm.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py -index a91ae92..1d36cee 100644 ---- a/vdsm/storage/hsm.py -+++ b/vdsm/storage/hsm.py -@@ -370,6 +370,7 @@ class HSM: - except Exception: - self.log.warn("Failed to clean Storage Repository.", exc_info=True) - -+ @utils.traceback(on=self.log.name) - def storageRefresh(): - lvm.bootstrap(refreshlvs=blockSD.SPECIAL_LVS) - sdCache.refreshStorage() --- -1.8.4.2 - diff --git a/0015-Fix-syntax-error-in-vdsm.spec.patch b/0015-Fix-syntax-error-in-vdsm.spec.patch deleted file mode 100644 index e4abb60..0000000 --- a/0015-Fix-syntax-error-in-vdsm.spec.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ef8880aac1f3ec5d6437a3922dea334480b63f71 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Thu, 12 Dec 2013 02:00:22 +0200 -Subject: [PATCH 15/29] Fix syntax error in vdsm.spec - -Which introduced since http://gerrit.ovirt.org/21356 - -Change-Id: Ib636c00a6b9670584b5a862ac4496e74915fbe04 -Signed-off-by: Yaniv Bronhaim -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1040232 -Reviewed-on: http://gerrit.ovirt.org/22310 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 10fe3f2..9aeb607 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -754,7 +754,6 @@ if [ "$1" -ge 1 ]; then - - %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1 - -- fi - if [ "${supervdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 - fi --- -1.8.4.2 - diff --git a/0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch b/0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch deleted file mode 100644 index c0b84fe..0000000 --- a/0016-Changed-BrokerLink-log-level-to-prevent-log-flooding.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 2d798a07c7142d464ed89b2b9ffcf019c9c7300f Mon Sep 17 00:00:00 2001 -From: Jiri Moskovcak -Date: Tue, 10 Dec 2013 13:47:59 +0100 -Subject: [PATCH 16/29] Changed BrokerLink log level to prevent log flooding -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- vdsm imports the BrokerLink lib with ovirt_hosted_engine_ha, - unfortunatelly it's logger generates a lot of debug output - in the default configuration, so this patch sets the level - of the whole ovirt_hosted_engine_ha package to ERROR - to limit the amount of the logs - -- NOTE: this patch needs some changes in the ovirt_hosted_engine_ha - logging, without these changes it does not have any - effect - -Depends-On: I40fb7aca813800dd445e858406034736817cac9c -Change-Id: Icc470175d785d216fe75837e5cb3572adf340fe6 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1040884 -Signed-off-by: Jiri Moskovcak -Reviewed-on: http://gerrit.ovirt.org/21947 -Reviewed-by: Martin Sivák -Reviewed-by: Doron Fediuck -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22424 -Reviewed-by: Yaniv Bronhaim ---- - vdsm/logger.conf.in | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/vdsm/logger.conf.in b/vdsm/logger.conf.in -index 824e169..e7ff032 100644 ---- a/vdsm/logger.conf.in -+++ b/vdsm/logger.conf.in -@@ -1,5 +1,5 @@ - [loggers] --keys=root,vds,Storage,metadata -+keys=root,vds,Storage,metadata,ovirt_hosted_engine_ha - - [handlers] - keys=console,syslog,logfile,metadata -@@ -30,6 +30,12 @@ handlers=metadata - qualname=irs.metadata - propagate=0 - -+[logger_ovirt_hosted_engine_ha] -+level=ERROR -+handlers= -+qualname=ovirt_hosted_engine_ha -+propagate=1 -+ - [handler_syslog] - level=WARNING - class=handlers.SysLogHandler --- -1.8.4.2 - diff --git a/0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch b/0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch deleted file mode 100644 index f74ee3e..0000000 --- a/0017-vdsm-prepareVolumePath-correct-path-handling-for-cdr.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1d5fa9407ae308358ae01363e23fba5865588fb0 Mon Sep 17 00:00:00 2001 -From: Martin Polednik -Date: Thu, 10 Oct 2013 12:26:24 +0200 -Subject: [PATCH 17/29] vdsm: prepareVolumePath correct path handling for cdrom - -prepareVolumePath looked for 'path' key in specParams -without looking at path in device itself, causing empty -path in specParams to override device path. This patch -adds device.path to checking mechanism to avoid overriding -valid path - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1009469 -Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 -Signed-off-by: Martin Polednik -Reviewed-on: http://gerrit.ovirt.org/20074 -Reviewed-by: Michal Skrivanek -Reviewed-by: Federico Simoncelli -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22324 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/clientIF.py | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py -index 47851b1..e8fb8d1 100644 ---- a/vdsm/clientIF.py -+++ b/vdsm/clientIF.py -@@ -303,11 +303,13 @@ class clientIF: - volPath = self._getUUIDSpecPath(drive["UUID"]) - - # leave path == '' for empty cdrom and floppy drives ... -- elif drive['device'] in ('cdrom', 'floppy') and \ -- 'specParams' in drive and \ -- 'path' in drive['specParams'] and \ -- drive['specParams']['path'] == '': -- volPath = '' -+ elif (drive['device'] in ('cdrom', 'floppy') and -+ 'specParams' in drive and -+ # next line can be removed in future, when < 3.3 engine -+ # is not supported -+ drive['specParams'].get('path', '') == '' and -+ drive.get('path', '') == ''): -+ volPath = '' - - # ... or load the drive from vmPayload: - elif drive['device'] in ('cdrom', 'floppy') and \ --- -1.8.4.2 - diff --git a/0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch b/0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch deleted file mode 100644 index 2687a7c..0000000 --- a/0018-vm-Update-domains-list-for-disks-attached-to-vm-afte.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 32825e60ad4e4a8b8ca63ee2b58d26464e1d6d0d Mon Sep 17 00:00:00 2001 -From: Yeela Kaplan -Date: Thu, 19 Dec 2013 15:28:09 +0200 -Subject: [PATCH 18/29] vm: Update domains list for disks attached to vm after - LSM - -Change-Id: I6cda08eea5e94f4cb9039ce08eac2bfe0861e260 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036680 -Signed-off-by: Yeela Kaplan -Reviewed-on: http://gerrit.ovirt.org/22536 -Reviewed-by: Federico Simoncelli -Reviewed-on: http://gerrit.ovirt.org/22562 -Reviewed-by: Allon Mureinik ---- - vdsm/vm.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 59541e7..8f48bca 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -4069,6 +4069,9 @@ class Vm(object): - self.log.error("Unable to teardown the previous chain: %s", - diskToTeardown, exc_info=True) - self.updateDriveParameters(dstDiskCopy) -+ if "domainID" in srcDisk: -+ self.sdIds.append(dstDiskCopy['domainID']) -+ self.sdIds.remove(srcDisk['domainID']) - finally: - self._delDiskReplica(srcDrive) - self.startDisksStatsCollection() --- -1.8.4.2 - diff --git a/0019-fileSD-Fix-image-deletion-on-gluster-domain.patch b/0019-fileSD-Fix-image-deletion-on-gluster-domain.patch deleted file mode 100644 index 678820e..0000000 --- a/0019-fileSD-Fix-image-deletion-on-gluster-domain.patch +++ /dev/null @@ -1,75 +0,0 @@ -From e2b555ef44ad2429a8f3b12c59f61581a6ad37e4 Mon Sep 17 00:00:00 2001 -From: huntxu -Date: Fri, 13 Dec 2013 11:11:18 +0800 -Subject: [PATCH 19/29] fileSD: Fix image deletion on gluster domain - -getImagePath() does not work for glusterSD. The problem is caused by -that domaindir's base paths of glusterSD and other file-based SD are not -the same. For glusterSD, it's sd.storage_repository/mnt/glusterSD, -while it's sd.storage_repository/mnt/ for other file-based storage -domains. This makes the deletion fail on gluster domain. - -With this patch we use the storage domain's domaindir to get the image's -directory correctly. - -Reference: - * http://lists.ovirt.org/pipermail/users/2013-December/018653.html - -Change-Id: I8ee6cb963a428f18b6e43f0585d461d0975c377a -Signed-off-by: huntxu -Bug-Url: https://bugzilla.redhat.com/1046600 -Reviewed-on: http://gerrit.ovirt.org/22359 -Reviewed-by: Nir Soffer -Reviewed-by: Federico Simoncelli -Tested-by: Nir Soffer -Reviewed-on: http://gerrit.ovirt.org/22563 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/storage/fileSD.py | 22 ++++------------------ - 1 file changed, 4 insertions(+), 18 deletions(-) - -diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py -index 0186bd2..0baa845 100644 ---- a/vdsm/storage/fileSD.py -+++ b/vdsm/storage/fileSD.py -@@ -81,23 +81,6 @@ def validateFileSystemFeatures(sdUUID, mountDir): - raise - - --def getDomPath(sdUUID): -- pattern = os.path.join(sd.StorageDomain.storage_repository, -- sd.DOMAIN_MNT_POINT, '*', sdUUID) -- # Warning! You need a global proc pool big as the number of NFS domains. -- domPaths = getProcPool().glob.glob(pattern) -- if len(domPaths) == 0: -- raise se.StorageDomainDoesNotExist(sdUUID) -- elif len(domPaths) > 1: -- raise se.StorageDomainLayoutError(sdUUID) -- else: -- return domPaths[0] -- -- --def getImagePath(sdUUID, imgUUID): -- return os.path.join(getDomPath(sdUUID), 'images', imgUUID) -- -- - def getDomUuidFromMetafilePath(metafile): - # Metafile path has pattern: - # /rhev/data-center/mnt/export-path/sdUUID/dom_md/metadata -@@ -339,8 +322,11 @@ class FileStorageDomain(sd.StorageDomain): - images.add(os.path.basename(i)) - return images - -+ def getImagePath(self, imgUUID): -+ return os.path.join(self.domaindir, sd.DOMAIN_IMAGES, imgUUID) -+ - def deleteImage(self, sdUUID, imgUUID, volsImgs): -- currImgDir = getImagePath(sdUUID, imgUUID) -+ currImgDir = self.getImagePath(imgUUID) - dirName, baseName = os.path.split(currImgDir) - toDelDir = os.tempnam(dirName, sd.REMOVED_IMAGE_PREFIX + baseName) - try: --- -1.8.4.2 - diff --git a/0020-sampling-make-HostStatsThread-a-daemon-thread.patch b/0020-sampling-make-HostStatsThread-a-daemon-thread.patch deleted file mode 100644 index 32d0dd1..0000000 --- a/0020-sampling-make-HostStatsThread-a-daemon-thread.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 65c168023bfe78e5e26a6e9d09d7ad2d99736c41 Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Tue, 10 Dec 2013 13:57:35 +0200 -Subject: [PATCH 20/29] sampling: make HostStatsThread a daemon thread - -It can cause VDSM to hang when being improperly shut down. - -Change-Id: Ia20ded74241bac631fd177f4d7f0b0cda2c4fcbc -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022036 -Signed-off-by: Saggi Mizrahi -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/22237 -Reviewed-by: Antoni Segura Puimedon -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22815 ---- - vdsm/sampling.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vdsm/sampling.py b/vdsm/sampling.py -index dd446c4..d82cb16 100644 ---- a/vdsm/sampling.py -+++ b/vdsm/sampling.py -@@ -368,6 +368,7 @@ class StatsThread(threading.Thread): - - def __init__(self, log, ifids, ifrates): - threading.Thread.__init__(self) -+ self.daemon = True - self._log = log - self._lastCheckTime = 0 - self._stopEvent = threading.Event() --- -1.8.4.2 - diff --git a/0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch b/0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch deleted file mode 100644 index d5eb8d5..0000000 --- a/0021-vdsm-prepareVolumePath-payload-misdetection-fix.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 144814746ee9ff936285cd212f8f91a1c9a85dbd Mon Sep 17 00:00:00 2001 -From: Francesco Romani -Date: Thu, 2 Jan 2014 16:09:34 +0100 -Subject: [PATCH 21/29] vdsm: prepareVolumePath payload misdetection fix - -The changeset http://gerrit.ovirt.org/#/c/22324/3 -used a condition too broad for its check, causing -a device path misdetection when cloud-init is used. - -It is triggered in the following case: -specParams vmPayload attribute has -"file"(with content), path" non existent. -Device's (drive's) "path" is set to ''. -The code then consider the cdrom with vmPayload -a case of empty CDROM and creating it as such. -It did work before because the condition results -false when there is no 'path' in drive['specParams'] -(which is the case here) and goes to the -next condition section (the right one with payload handling) - -This patch provides a band-aid fix to the issue -by tightening the prepareVolumePath check. - -Change-Id: Ie847eb92f28d24f4d8189e03a47cd64cc6597363 -Bug-Url: https://bugzilla.redhat.com/1047356 -Signed-off-by: Francesco Romani -Reviewed-on: http://gerrit.ovirt.org/22935 -Reviewed-by: Vinzenz Feenstra -Reviewed-by: Dan Kenigsberg ---- - vdsm/clientIF.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py -index e8fb8d1..b101896 100644 ---- a/vdsm/clientIF.py -+++ b/vdsm/clientIF.py -@@ -308,7 +308,8 @@ class clientIF: - # next line can be removed in future, when < 3.3 engine - # is not supported - drive['specParams'].get('path', '') == '' and -- drive.get('path', '') == ''): -+ drive.get('path', '') == '' and -+ 'vmPayload' not in drive['specParams']): - volPath = '' - - # ... or load the drive from vmPayload: --- -1.8.4.2 - diff --git a/0022-update-NIC-having-no-custom-properies-is-valid.patch b/0022-update-NIC-having-no-custom-properies-is-valid.patch deleted file mode 100644 index fbf9bd2..0000000 --- a/0022-update-NIC-having-no-custom-properies-is-valid.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f3a138ab93722855cf77662bc8b1af70057cc53b Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Thu, 2 Jan 2014 14:58:58 +0000 -Subject: [PATCH 22/29] update NIC: having no custom properies is valid - -Older Engines, that preceded per-vNIC custom properties (Vdsm commit -38b1f8fb) do not send the "custom" element at all. This has to be -interpreted exactly as an empty custom element. - -Bug-Url: https://bugzilla.redhat.com/1047646 -Change-Id: If510f012039304ad16000d46d9d72a3e035539f5 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22922 -Reviewed-by: Francesco Romani -Reviewed-by: Vinzenz Feenstra -Reviewed-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/22950 -Reviewed-by: Yaniv Bronhaim ---- - vdsm/vm.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 8f48bca..6b2de55 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -3161,7 +3161,7 @@ class Vm(object): - if network == '': - network = DUMMY_BRIDGE - linkValue = 'down' -- custom = params.get('custom') -+ custom = params.get('custom', {}) - - netsToMirror = params.get('portMirroring', - netConf.get('portMirroring', [])) --- -1.8.4.2 - diff --git a/0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch b/0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch deleted file mode 100644 index f9bc894..0000000 --- a/0023-BindingXMLRPC-bugfix-Fix-netinfo-getIfaceByIP-unit-t.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 6073972e4205ced109538b4c2aeddb22ac06e393 Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Sun, 5 Jan 2014 17:06:11 +0200 -Subject: [PATCH 23/29] BindingXMLRPC bugfix: Fix netinfo:getIfaceByIP unit - test - -testGetIfaceByIP fails on machines that have an updated -ethtool, because the test now iterates on devices -that were previously not iterated over. - -The test now ignores IPv6 link-local addresses (Which may -be shared with several network devices), and checks -if the device has an ipv4 address configured before -checking it. - -Change-Id: Iee4757958ea5554043c6dc7169a8df05b1887687 -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/22968 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - tests/netinfoTests.py | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/tests/netinfoTests.py b/tests/netinfoTests.py -index 18e71c3..fb8c584 100644 ---- a/tests/netinfoTests.py -+++ b/tests/netinfoTests.py -@@ -98,10 +98,15 @@ class TestNetinfo(TestCaseBase): - - def testGetIfaceByIP(self): - for dev in ethtool.get_interfaces_info(ethtool.get_active_devices()): -- ipaddrs = map( -- lambda etherinfo_ipv6addr: etherinfo_ipv6addr.address, -- dev.get_ipv6_addresses()) -- ipaddrs.append(dev.ipv4_address) -+ # Link-local IPv6 addresses are generated from the MAC address, -+ # which is shared between a nic and its bridge. Since We don't -+ # support having the same IP address on two different NICs, and -+ # link-local IPv6 addresses aren't interesting for 'getDeviceByIP' -+ # then ignore them in the test -+ ipaddrs = [ipv6.address for ipv6 in dev.get_ipv6_addresses() -+ if ipv6.scope != 'link'] -+ if dev.ipv4_address is not None: -+ ipaddrs.append(dev.ipv4_address) - for ip in ipaddrs: - self.assertEqual(dev.device, netinfo.getIfaceByIP(ip)) - --- -1.8.4.2 - diff --git a/0024-vm-Bring-back-missing-before_device_migrate_source-h.patch b/0024-vm-Bring-back-missing-before_device_migrate_source-h.patch deleted file mode 100644 index 313c368..0000000 --- a/0024-vm-Bring-back-missing-before_device_migrate_source-h.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3a8579708d6223a037192c124a7ed8d391cc4d1f Mon Sep 17 00:00:00 2001 -From: Vinzenz Feenstra -Date: Mon, 6 Jan 2014 09:24:53 +0100 -Subject: [PATCH 24/29] vm: Bring back missing before_device_migrate_source - hook call - -During the merge of libvirtvm.py and vm.py this section of the code -somehow got removed, this patch brings it back. - -Change-Id: I317ae6b0ed5a7a6fa0f959169b27339c4451b35a -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1048763 -Signed-off-by: Vinzenz Feenstra -Reviewed-on: http://gerrit.ovirt.org/23006 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/23012 -Reviewed-by: Yaniv Bronhaim ---- - vdsm/vm.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/vdsm/vm.py b/vdsm/vm.py -index 6b2de55..f9b241e 100644 ---- a/vdsm/vm.py -+++ b/vdsm/vm.py -@@ -350,6 +350,9 @@ class MigrationSourceThread(threading.Thread): - self._vm._vmStats.cont() - raise - else: -+ for dev in self._vm._customDevices(): -+ hooks.before_device_migrate_source( -+ dev._deviceXML, self._vm.conf, dev.custom) - hooks.before_vm_migrate_source(self._vm._dom.XMLDesc(0), - self._vm.conf) - response = self.destServer.migrationCreate(self._machineParams) --- -1.8.4.2 - diff --git a/0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch b/0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch deleted file mode 100644 index 9e189df..0000000 --- a/0025-BindingXMLRPC-bugfix-Return-lastClientIface-for-curr.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 4302dc7ff77fd7d20c9457fe1aebb32aea1d7661 Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Tue, 31 Dec 2013 14:02:49 +0200 -Subject: [PATCH 25/29] BindingXMLRPC bugfix: Return lastClientIface for - current connection - -The patch does three things: -1) Fixes a bug where lastClientIface was for the previous - connection, and not the current one. The method to retrieve - the last client was through a log_request LoggingMixIn - which is invoked at the end of a response, not at the beginning. - The patch removes the usage of that MixIn, and instead uses - values that are updated at the beginning of the connection -2) Simplifies the 'LoggingMixin' out of the picture as its no - longer needed -3) Remove unused variables: - server.lastClientTime - server.lastClient - server.lastServerIP - -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1048596 -Change-Id: I36e48cc07a27f44a2b413f0e9159110404f1b0ca -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/22837 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22967 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/BindingXMLRPC.py | 40 +++++++++++++++------------------------- - 1 file changed, 15 insertions(+), 25 deletions(-) - -diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py -index 20aaee1..c4b4737 100644 ---- a/vdsm/BindingXMLRPC.py -+++ b/vdsm/BindingXMLRPC.py -@@ -18,7 +18,6 @@ - # Refer to the README and COPYING files for full details of the license - # - --import time - from errno import EINTR - import SimpleXMLRPCServer - from vdsm import SecureXMLRPCServer -@@ -85,11 +84,18 @@ class BindingXMLRPC(object): - """ - Return the IP address and last client information - """ -- last = self.server.lastClient -- lastserver = self.server.lastServerIP - return {'management_ip': self.serverIP, -- 'lastClient': last, -- 'lastClientIface': getIfaceByIP(lastserver)} -+ 'lastClient': self.cif.threadLocal.client, -+ 'lastClientIface': getIfaceByIP(self.cif.threadLocal.server)} -+ -+ def updateTimestamp(self): -+ # FIXME: The setup+editNetwork API uses this log file to -+ # determine if this host is still accessible. We use a -+ # file (rather than an event) because setup+editNetwork is -+ # performed by a separate, root process. To clean this -+ # up we need to move this to an API wrapper that is only -+ # run for real clients (not vdsm internal API calls). -+ file(constants.P_VDSM_CLIENT_LOG, 'w') - - def _getKeyCertFilenames(self): - """ -@@ -108,30 +114,16 @@ class BindingXMLRPC(object): - - threadLocal = self.cif.threadLocal - -- class LoggingMixIn: -- -- def log_request(self, code='-', size='-'): -- """Track from where client connections are coming.""" -- self.server.lastClient = self.client_address[0] -- self.server.lastClientTime = time.time() -- self.server.lastServerIP = self.request.getsockname()[0] -- # FIXME: The editNetwork API uses this log file to -- # determine if this host is still accessible. We use a -- # file (rather than an event) because editNetwork is -- # performed by a separate, root process. To clean this -- # up we need to move this to an API wrapper that is only -- # run for real clients (not vdsm internal API calls). -- file(constants.P_VDSM_CLIENT_LOG, 'w') -- - server_address = (self.serverIP, int(self.serverPort)) - if self.enableSSL: - basehandler = SecureXMLRPCServer.SecureXMLRPCRequestHandler - else: - basehandler = SimpleXMLRPCServer.SimpleXMLRPCRequestHandler - -- class LoggingHandler(LoggingMixIn, basehandler): -+ class LoggingHandler(basehandler): - def setup(self): - threadLocal.client = self.client_address[0] -+ threadLocal.server = self.request.getsockname()[0] - return basehandler.setup(self) - - def parse_request(self): -@@ -153,15 +145,12 @@ class BindingXMLRPC(object): - requestHandler=LoggingHandler, logRequests=True) - utils.closeOnExec(server.socket.fileno()) - -- server.lastClientTime = 0 -- server.lastClient = '0.0.0.0' -- server.lastServerIP = '0.0.0.0' -- - return server - - def _registerFunctions(self): - def wrapIrsMethod(f): - def wrapper(*args, **kwargs): -+ self.updateTimestamp() - fmt = "" - logargs = [] - -@@ -951,6 +940,7 @@ class BindingXMLRPC(object): - def wrapApiMethod(f): - def wrapper(*args, **kwargs): - try: -+ f.im_self.updateTimestamp() - logLevel = logging.DEBUG - if f.__name__ in ('getVMList', 'getAllVmStats', 'getStats', - 'fenceNode'): --- -1.8.4.2 - diff --git a/0026-Gluster-API-verbs-will-now-be-callable-again.patch b/0026-Gluster-API-verbs-will-now-be-callable-again.patch deleted file mode 100644 index af3d4da..0000000 --- a/0026-Gluster-API-verbs-will-now-be-callable-again.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 26f1cf1e50e3e6dcba885d3f5ed7fd0e58a28b04 Mon Sep 17 00:00:00 2001 -From: Assaf Muller -Date: Tue, 7 Jan 2014 16:40:31 +0200 -Subject: [PATCH 26/29] Gluster API verbs will now be callable again - -Fix regression introduced in #22967. - -When wrapping GlusterAPI methods via wrapApiMethod, -wrapApiMethod was accessing a GlusterAPI method's im_self, -(If f is the wrapped method, then f.im_self), which -is an alias to an GlusterAPI instance, but the glusterAPI class -doesn't define updateTimestamp. - -This patch moves 'updateTimestamp' to be a module function, -which will be available no matter what method wrapApiMethod -is wrapping. - -Relates-To: https://bugzilla.redhat.com/1048596 -Change-Id: I1513a5dca444c3e176fb31a9425da85980401b0f -Signed-off-by: Assaf Muller -Reviewed-on: http://gerrit.ovirt.org/23045 -Tested-by: Dan Kenigsberg -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - vdsm/BindingXMLRPC.py | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - -diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py -index c4b4737..02bc9fc 100644 ---- a/vdsm/BindingXMLRPC.py -+++ b/vdsm/BindingXMLRPC.py -@@ -38,6 +38,16 @@ except ImportError: - _glusterEnabled = False - - -+def _updateTimestamp(): -+ # FIXME: The setup+editNetwork API uses this log file to -+ # determine if this host is still accessible. We use a -+ # file (rather than an event) because setup+editNetwork is -+ # performed by a separate, root process. To clean this -+ # up we need to move this to an API wrapper that is only -+ # run for real clients (not vdsm internal API calls). -+ file(constants.P_VDSM_CLIENT_LOG, 'w') -+ -+ - class BindingXMLRPC(object): - def __init__(self, cif, log, ip, port, ssl, vds_resp_timeout, - trust_store_path, default_bridge): -@@ -88,15 +98,6 @@ class BindingXMLRPC(object): - 'lastClient': self.cif.threadLocal.client, - 'lastClientIface': getIfaceByIP(self.cif.threadLocal.server)} - -- def updateTimestamp(self): -- # FIXME: The setup+editNetwork API uses this log file to -- # determine if this host is still accessible. We use a -- # file (rather than an event) because setup+editNetwork is -- # performed by a separate, root process. To clean this -- # up we need to move this to an API wrapper that is only -- # run for real clients (not vdsm internal API calls). -- file(constants.P_VDSM_CLIENT_LOG, 'w') -- - def _getKeyCertFilenames(self): - """ - Get the locations of key and certificate files. -@@ -150,7 +151,7 @@ class BindingXMLRPC(object): - def _registerFunctions(self): - def wrapIrsMethod(f): - def wrapper(*args, **kwargs): -- self.updateTimestamp() -+ _updateTimestamp() - fmt = "" - logargs = [] - -@@ -940,7 +941,7 @@ class BindingXMLRPC(object): - def wrapApiMethod(f): - def wrapper(*args, **kwargs): - try: -- f.im_self.updateTimestamp() -+ _updateTimestamp() - logLevel = logging.DEBUG - if f.__name__ in ('getVMList', 'getAllVmStats', 'getStats', - 'fenceNode'): --- -1.8.4.2 - diff --git a/0027-iscsi-Iscsi-rescan-cleanup.patch b/0027-iscsi-Iscsi-rescan-cleanup.patch deleted file mode 100644 index 4b78177..0000000 --- a/0027-iscsi-Iscsi-rescan-cleanup.patch +++ /dev/null @@ -1,324 +0,0 @@ -From 9df615a98ef98a3111f691c0f1dd47a979b48032 Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Sun, 15 Sep 2013 16:15:25 +0300 -Subject: [PATCH 27/29] iscsi: Iscsi rescan cleanup - -* Remove forceIscsiScan(): iscsiadm already does that when refreshing - sessions -* Cleanup iscsi.rescan(): Replace complex logic with a simpler - implementation since new iscsiadm takes care of all of this itself -* Make iscsi.rescan() more testable -* Test confusing timeout semantics of iscsi.rescan() - -Bug-Url: https://bugzilla.redhat.com/964595 -Change-Id: I842eb37cea3bd5e8cd357a310dd966081b242abd -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/21136 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Yaniv Bronhaim ---- - tests/Makefile.am | 1 + - tests/iscsiTests.py | 80 +++++++++++++++++++++++++++++++++++++++++++++++ - vdsm.spec.in | 2 +- - vdsm/storage/iscsi.py | 59 +++++++--------------------------- - vdsm/storage/iscsiadm.py | 24 +++++++++----- - vdsm/storage/multipath.py | 2 -- - vdsm/supervdsmServer | 5 --- - 7 files changed, 111 insertions(+), 62 deletions(-) - create mode 100644 tests/iscsiTests.py - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index f87eddd..5efae38 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -37,6 +37,7 @@ test_modules = \ - guestIFTests.py \ - hooksTests.py \ - ipwrapperTests.py \ -+ iscsiTests.py \ - jsonRpcTests.py \ - jsonRpcUtils.py \ - libvirtconnectionTests.py \ -diff --git a/tests/iscsiTests.py b/tests/iscsiTests.py -new file mode 100644 -index 0000000..44f6962 ---- /dev/null -+++ b/tests/iscsiTests.py -@@ -0,0 +1,80 @@ -+import threading -+import time -+from contextlib import contextmanager -+ -+from testrunner import VdsmTestCase as TestCaseBase -+ -+from storage import iscsi -+ -+ -+class AsyncStubOperation(object): -+ def __init__(self, timeout): -+ self._evt = threading.Event() -+ if timeout == 0: -+ self._evt.set() -+ else: -+ threading.Timer(timeout, self._evt.set) -+ -+ def wait(self, timeout=None, cond=None): -+ if cond is not None: -+ raise Exception("TODO!!!") -+ -+ self._evt.wait(timeout) -+ -+ def stop(self): -+ self._evt.set() -+ -+ def result(self): -+ if self._evt.is_set(): -+ return (None, None) -+ else: -+ return None -+ -+ -+class RescanTimeoutTests(TestCaseBase): -+ def setUp(self): -+ self._iscsiadm_rescan_async = \ -+ iscsi.iscsiadm.session_rescan_async -+ iscsi.iscsiadm.session_rescan_async = self._iscsi_stub -+ self._timeout = 0 -+ -+ def tearDown(self): -+ iscsi.iscsiadm.session_rescan_async = \ -+ self._iscsiadm_rescan_async -+ -+ def _iscsi_stub(self): -+ return AsyncStubOperation(self._timeout) -+ -+ @contextmanager -+ def assertMaxDuration(self, maxtime): -+ start = time.time() -+ try: -+ yield -+ finally: -+ end = time.time() -+ elapsed = end - start -+ if maxtime < elapsed: -+ self.fail("Operation was too slow %fs > %fs" % -+ (elapsed, maxtime)) -+ -+ @contextmanager -+ def assertMinDuration(self, mintime): -+ start = time.time() -+ try: -+ yield -+ finally: -+ end = time.time() -+ elapsed = end - start -+ if mintime > elapsed: -+ self.fail("Operation was too fast %fs > %fs" % -+ (elapsed, mintime)) -+ -+ def testFast(self): -+ self._timeout = 0 -+ with self.assertMinDuration(2): -+ iscsi.rescan(2, 4) -+ -+ def testSlow(self): -+ self._timeout = 60 -+ with self.assertMaxDuration(3): -+ iscsi.rescan(1, 2) -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 9aeb607..8d3ba09 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -146,7 +146,7 @@ Requires: python - # Update the qemu-kvm requires when block_stream will be included - Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 - Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 --Requires: iscsi-initiator-utils >= 6.2.0.872-15 -+Requires: iscsi-initiator-utils >= 6.2.0.873-3 - Requires: device-mapper-multipath >= 0.4.9-52 - Requires: e2fsprogs >= 1.41.12-11 - Requires: fence-agents -diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py -index 7da94ab..f4fdceb 100644 ---- a/vdsm/storage/iscsi.py -+++ b/vdsm/storage/iscsi.py -@@ -30,7 +30,6 @@ import errno - import time - from collections import namedtuple - --from vdsm import constants - import misc - from vdsm.config import config - import devicemapper -@@ -373,38 +372,15 @@ def iterateIscsiInterfaces(): - - - @misc.samplingmethod --def rescan(): -- try: -- iscsiadm.session_rescan() -- except iscsiadm.IscsiError: -- pass -- -+def rescan(minTimeout=None, maxTimeout=None): -+ # FIXME: This whole thing is wrong from the core. We need to make rescan -+ # completely async and have methods timeout on their own if they -+ # can't find the devices they are looking for -+ if minTimeout is None: -+ minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') -+ if maxTimeout is None: -+ maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') - --@misc.samplingmethod --def forceScsiScan(): -- processes = [] -- minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') -- maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') -- for hba in glob.glob(SCAN_PATTERN): -- cmd = [constants.EXT_DD, 'of=' + hba] -- p = misc.execCmd(cmd, sudo=False, sync=False) -- try: -- p.stdin.write("- - -") -- p.stdin.flush() -- p.stdin.close() -- except OSError as e: -- if p.wait(0) is False: -- log.error("pid %s still running", p.pid) -- log.warning("Error in rescan of hba:%s with returncode:%s and " -- "error message: %s", hba, p.returncode, -- p.stderr.read(1000)) -- if e.errno != errno.EPIPE: -- raise -- else: -- log.warning("Ignoring error in rescan of hba %s: ", -- hba, exc_info=True) -- continue -- processes.append((hba, p)) - if (minTimeout > maxTimeout or minTimeout < 0): - minTimeout = 2 - maxTimeout = 30 -@@ -412,24 +388,13 @@ def forceScsiScan(): - "illegal value: scsi_rescan_minimal_timeout or " - "scsi_rescan_maximal_timeout. Set to %s and %s seconds " - "respectively.", minTimeout, maxTimeout) -+ - log.debug("Performing SCSI scan, this will take up to %s seconds", - maxTimeout) -+ -+ rescanOp = iscsiadm.session_rescan_async() - time.sleep(minTimeout) -- for i in xrange(maxTimeout - minTimeout): -- for p in processes[:]: -- (hba, proc) = p -- if proc.wait(0): -- if proc.returncode != 0: -- log.warning('returncode for: %s is: %s', hba, -- proc.returncode) -- processes.remove(p) -- if not processes: -- break -- else: -- time.sleep(1) -- else: -- log.warning("Still waiting for scsi scan of hbas: %s", -- tuple(hba for p in processes)) -+ rescanOp.wait(timeout=(maxTimeout - minTimeout)) - - - def devIsiSCSI(dev): -diff --git a/vdsm/storage/iscsiadm.py b/vdsm/storage/iscsiadm.py -index cd28db8..9bb27ea 100644 ---- a/vdsm/storage/iscsiadm.py -+++ b/vdsm/storage/iscsiadm.py -@@ -1,6 +1,7 @@ - from threading import Lock - import misc - from vdsm import constants -+from vdsm.utils import AsyncProcessOperation - - # iscsiadm exit statuses - ISCSI_ERR_SESS_EXISTS = 15 -@@ -71,7 +72,7 @@ _RESERVED_INTERFACES = ("default", "tcp", "iser") - _iscsiadmLock = Lock() - - --def _runCmd(args, hideValue=False): -+def _runCmd(args, hideValue=False, sync=True): - # FIXME: I don't use supervdsm because this entire module has to just be - # run as root and there is no such feature yet in supervdsm. When such - # feature exists please change this. -@@ -88,7 +89,7 @@ def _runCmd(args, hideValue=False): - if i < (len(printCmd) - 1): - printCmd[i + 1] = "****" - -- return misc.execCmd(cmd, printable=printCmd, sudo=True) -+ return misc.execCmd(cmd, printable=printCmd, sudo=True, sync=sync) - - - def iface_exists(interfaceName): -@@ -294,12 +295,21 @@ def node_login(iface, portal, targetName): - raise IscsiNodeError(rc, out, err) - - --def session_rescan(): -- rc, out, err = _runCmd(["-m", "session", "-R"]) -- if rc == 0: -- return -+def session_rescan_async(): -+ proc = _runCmd(["-m", "session", "-R"], sync=False) - -- raise IscsiSessionError(rc, out, err) -+ def parse_result(rc, out, err): -+ if rc == 0: -+ return -+ -+ raise IscsiSessionError(rc, out, err) -+ -+ return AsyncProcessOperation(proc, parse_result) -+ -+ -+def session_rescan(): -+ aop = session_rescan_async() -+ return aop.result() - - - def session_logout(sessionId): -diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py -index 1f9773c..29851f3 100644 ---- a/vdsm/storage/multipath.py -+++ b/vdsm/storage/multipath.py -@@ -105,8 +105,6 @@ def rescan(): - # First ask iSCSI to rescan all its sessions - iscsi.rescan() - -- supervdsm.getProxy().forceScsiScan() -- - # Now let multipath daemon pick up new devices - cmd = [constants.EXT_MULTIPATH, "-r"] - misc.execCmd(cmd, sudo=True) -diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer -index 7fa1c2b..6ad3875 100755 ---- a/vdsm/supervdsmServer -+++ b/vdsm/supervdsmServer -@@ -56,7 +56,6 @@ from md_utils import getMdDeviceUuidMap as _getMdDeviceUuidMap - - from lsblk import getLsBlk as _getLsBlk - from storage.multipath import getScsiSerial as _getScsiSerial --from storage.iscsi import forceScsiScan as _forceScsiScan - from storage.iscsi import getDevIscsiInfo as _getdeviSCSIinfo - from storage.iscsi import readSessionInfo as _readSessionInfo - from supervdsm import _SuperVdsmManager -@@ -149,10 +148,6 @@ class _SuperVdsm(object): - return _getScsiSerial(*args, **kwargs) - - @logDecorator -- def forceScsiScan(self, *args, **kwargs): -- return _forceScsiScan(*args, **kwargs) -- -- @logDecorator - def removeDeviceMapping(self, devName): - return _removeMapping(devName) - --- -1.8.4.2 - diff --git a/0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch b/0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch deleted file mode 100644 index 0c283e6..0000000 --- a/0028-configNetwork-Fix-bridgeless-broken-network-deletion.patch +++ /dev/null @@ -1,111 +0,0 @@ -From e49175b3627fefb9d39d3323e008aeadde2b14de Mon Sep 17 00:00:00 2001 -From: "Antoni S. Puimedon" -Date: Thu, 12 Dec 2013 17:38:46 +0100 -Subject: [PATCH 28/29] configNetwork: Fix bridgeless broken network deletion - -When trying to delete a broken bridgeless vdsm network, if the iface -referenced by the network definition was missing, delNetwork would -not get any device on its call for vlan, nic and bonds, but -objectivize would be called nonetheless, failing with a: - -ERR_BAD_PARAMS: 'Network defined without devices.' - -The fix consists on just removing the network from libvirt when the -backing device is missing. - -Change-Id: I92c641d91da9ef7eab876ed8c77fff7a9becb503 -Bug-Url: https://bugzilla.redhat.com/1044024 -Signed-off-by: Antoni S. Puimedon -Reviewed-on: http://gerrit.ovirt.org/22354 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/22436 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - tests/functional/networkTests.py | 26 +++++++++++++++++++++++++- - tests/functional/utils.py | 4 ++++ - vdsm/configNetwork.py | 5 +++++ - 3 files changed, 34 insertions(+), 1 deletion(-) - -diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py -index 3e0eed8..f4d29eb 100644 ---- a/tests/functional/networkTests.py -+++ b/tests/functional/networkTests.py -@@ -28,7 +28,7 @@ from testValidation import RequireDummyMod, ValidateRunningAsRoot - - import dummy - from utils import cleanupNet, restoreNetConfig, SUCCESS, VdsProxy, cleanupRules -- -+from vdsm import ipwrapper - from vdsm.ipwrapper import (ruleAdd, ruleDel, routeAdd, routeDel, routeExists, - ruleExists, Route, Rule, addrFlush) - -@@ -1405,3 +1405,27 @@ class NetworkTest(TestCaseBase): - status, msg = self.vdsm_net.setupNetworks(delete_networks, - {}, {}) - self.assertEqual(status, SUCCESS, msg) -+ -+ @RequireDummyMod -+ @ValidateRunningAsRoot -+ def testBrokenBridgelessNetReplacement(self): -+ with dummyIf(1) as nics: -+ nic, = nics -+ network = {NETWORK_NAME: {'nic': nic, 'vlan': VLAN_ID, -+ 'bridged': False}} -+ status, msg = self.vdsm_net.setupNetworks(network, {}, -+ {'connectivityCheck': 0}) -+ self.assertEqual(status, SUCCESS, msg) -+ self.assertTrue(self.vdsm_net.networkExists(NETWORK_NAME)) -+ ipwrapper.linkDel(nic + '.' + VLAN_ID) -+ self.vdsm_net.refreshNetinfo() -+ self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME)) -+ status, msg = self.vdsm_net.setupNetworks(network, {}, -+ {'connectivityCheck': 0}) -+ self.assertEqual(status, SUCCESS, msg) -+ self.assertTrue(self.vdsm_net.networkExists(NETWORK_NAME)) -+ network[NETWORK_NAME] = {'remove': True} -+ status, msg = self.vdsm_net.setupNetworks(network, {}, -+ {'connectivityCheck': 0}) -+ self.assertEqual(status, SUCCESS, msg) -+ self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME)) -diff --git a/tests/functional/utils.py b/tests/functional/utils.py -index f80175e..d8bc939 100644 ---- a/tests/functional/utils.py -+++ b/tests/functional/utils.py -@@ -139,6 +139,10 @@ class VdsProxy(object): - self.vdscli.setSafeNetworkConfig() - - @netinfo_altering -+ def refreshNetinfo(self): -+ pass -+ -+ @netinfo_altering - def restoreNetConfig(self): - restoreNetConfig() - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 28c1200..97d3f09 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -27,6 +27,7 @@ from vdsm import constants - from vdsm import utils - from storage.misc import execCmd - import neterrors as ne -+from netconf import libvirtCfg - from neterrors import ConfigNetworkError - from vdsm import netinfo - from netconf.ifcfg import ConfigWriter -@@ -263,6 +264,10 @@ def _delBrokenNetwork(network, netAttr, configurator): - _netinfo.networks[network] = netAttr - if _netinfo.networks[network]['bridged']: - _netinfo.networks[network]['ports'] = ConfigWriter.ifcfgPorts(network) -+ elif not os.path.exists('/sys/class/net/' + netAttr['iface']): -+ # Bridgeless broken network without underlying device -+ libvirtCfg.removeNetwork(network) -+ return - delNetwork(network, configurator=configurator, force=True, - implicitBonding=False, _netinfo=_netinfo) - --- -1.8.4.2 - diff --git a/0029-utils-Create-AsyncProcessOperation.patch b/0029-utils-Create-AsyncProcessOperation.patch deleted file mode 100644 index e59c85c..0000000 --- a/0029-utils-Create-AsyncProcessOperation.patch +++ /dev/null @@ -1,173 +0,0 @@ -From ed426e5590df421bace0aef9fc802baf2a24a5f2 Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Sun, 15 Sep 2013 14:50:27 +0300 -Subject: [PATCH 29/29] utils: Create AsyncProcessOperation - -This is an object to wrap a process so it can be treated as an -AsyncOperation. - -Features: -* Takes care of pid collection -* Has pluggable output parsing -* Process appropriate implementation of wait() and stop() - -Related-Bug-Url: http://bugzilla.redhat.com/964595 -Change-Id: I79d0eefc9d917a4a93916d52867fb4f1e793c60e -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/21135 -Reviewed-by: Yaniv Bronhaim -Tested-by: Yaniv Bronhaim ---- - lib/vdsm/utils.py | 50 ++++++++++++++++++++++++++++++++++++++++++ - tests/utilsTests.py | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 113 insertions(+) - -diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py -index ef0f512..5a2f746 100644 ---- a/lib/vdsm/utils.py -+++ b/lib/vdsm/utils.py -@@ -48,6 +48,7 @@ import stat - import subprocess - import threading - import time -+import zombiereaper - - from cpopen import CPopen as BetterPopen - from config import config -@@ -936,6 +937,55 @@ def retry(func, expectedException=Exception, tries=None, - time.sleep(sleep) - - -+class AsyncProcessOperation(object): -+ def __init__(self, proc, resultParser=None): -+ """Wraps a running process operation. -+ -+ resultParser should be of type callback(rc, out, err) and can return -+ anything or throw exceptions.""" -+ self._lock = threading.Lock() -+ -+ self._result = None -+ self._resultParser = resultParser -+ -+ self._proc = proc -+ -+ def wait(self, timeout=None, cond=None): -+ """Waits until the process has exited, the timeout has been reached or -+ the condition has been met""" -+ return self._proc.wait(timeout, cond) -+ -+ def stop(self): -+ """Stops the running operation, effectively sending a kill signal to -+ the process""" -+ self._proc.kill() -+ -+ def result(self): -+ """Returns the result in the as a tuple of (result, error). -+ If the operation is still running it will block until it returns. -+ -+ If no resultParser has been set the default result -+ is (rc, out, err) """ -+ with self._lock: -+ if self._result is None: -+ out, err = self._proc.communicate() -+ rc = self._proc.returncode -+ if self._resultParser is not None: -+ try: -+ self._result = (self._resultParser(rc, out, err), -+ None) -+ except Exception as e: -+ self._result = (None, e) -+ else: -+ self._result = ((rc, out, err), None) -+ -+ return self._result -+ -+ def __del__(self): -+ if self._proc.returncode is None: -+ zombiereaper.autoReapPID(self._proc.pid) -+ -+ - def panic(msg): - logging.error("Panic: %s", msg, exc_info=True) - os.killpg(0, 9) -diff --git a/tests/utilsTests.py b/tests/utilsTests.py -index 5f7c82d..4dc6579 100644 ---- a/tests/utilsTests.py -+++ b/tests/utilsTests.py -@@ -24,6 +24,7 @@ import logging - from testrunner import VdsmTestCase as TestCaseBase - from vdsm import utils - from storage import misc -+import time - - - class RetryTests(TestCaseBase): -@@ -140,3 +141,65 @@ class TracebackTests(TestCaseBase): - def handle(self, record): - assert self.record is None - self.record = record -+ -+ -+class AsyncProcessOperationTests(TestCaseBase): -+ def _echo(self, text): -+ proc = misc.execCmd(["echo", "-n", "test"], sync=False) -+ -+ def parse(rc, out, err): -+ return out -+ -+ return utils.AsyncProcessOperation(proc, parse) -+ -+ def _sleep(self, t): -+ proc = misc.execCmd(["sleep", str(t)], sync=False) -+ return utils.AsyncProcessOperation(proc) -+ -+ def _fail(self, t): -+ proc = misc.execCmd(["sleep", str(t)], sync=False) -+ -+ def parse(rc, out, err): -+ raise Exception("TEST!!!") -+ -+ return utils.AsyncProcessOperation(proc, parse) -+ -+ def test(self): -+ aop = self._sleep(1) -+ self.assertEquals(aop.result(), ((0, "", ""), None)) -+ -+ def testAlreadyExitedSuccess(self): -+ aop = self._sleep(0) -+ time.sleep(1) -+ self.assertEquals(aop.result(), ((0, "", ""), None)) -+ -+ def testAlreadyExitedFail(self): -+ aop = self._sleep("hello") -+ time.sleep(1) -+ ((rc, out, err), err) = aop.result() -+ self.assertEquals(err, None) -+ self.assertEquals(rc, 1) -+ -+ def testWait(self): -+ aop = self._sleep(1) -+ aop.wait(timeout=2) -+ -+ def testParser(self): -+ aop = self._echo("test") -+ self.assertEquals(aop.result(), ("test", None)) -+ -+ def testStop(self): -+ aop = self._sleep(10) -+ aop.stop() -+ -+ start = time.time() -+ aop.result() -+ end = time.time() -+ duration = end - start -+ self.assertTrue(duration < 2) -+ -+ def testException(self): -+ aop = self._fail(1) -+ res, err = aop.result() -+ self.assertEquals(res, None) -+ self.assertNotEquals(err, None) --- -1.8.4.2 - diff --git a/0030-Removing-unnecessary-check-local-from-storage-Makefi.patch b/0030-Removing-unnecessary-check-local-from-storage-Makefi.patch deleted file mode 100644 index 17cf170..0000000 --- a/0030-Removing-unnecessary-check-local-from-storage-Makefi.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 18e0bfd5eb053d1381ed2551de69b7d631ab71b6 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Sun, 12 Jan 2014 15:13:57 +0200 -Subject: [PATCH] Removing unnecessary check-local from storage Makefile.am - -We used that to run storage_exception main [1] to verify the numeration of -the error code numbers. This section was removed from storage_exception -and is not needed anymore. Therefore this patch omits the redundant -check-local scope. - -[1] http://gerrit.ovirt.org/#/c/2356/4/vdsm/storage/storage_exception.py - -This fixes a regression introduced in commit ed426e5 which adds import -to zombiereaper in utils.py. With the removal of this check-local we -don't require zombiereaper during build time. - -Change-Id: I81c634c3218ca6d21bce57fc9c500a906f8f0775 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/23183 -Reviewed-by: Nir Soffer -Reviewed-by: Dan Kenigsberg -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/23202 ---- - vdsm/storage/Makefile.am | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am -index 2d3e9a6..f9cf9b3 100644 ---- a/vdsm/storage/Makefile.am -+++ b/vdsm/storage/Makefile.am -@@ -70,6 +70,3 @@ dist_vdsmstorage_PYTHON = \ - - dist_vdsmexec_SCRIPTS = \ - curl-img-wrap -- --check-local: -- PYTHONPATH="$(top_srcdir)/lib:$$PYTHONPATH" PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(srcdir)/storage_exception.py --- -1.8.4.2 - diff --git a/vdsm.spec b/vdsm.spec index a7f6320..3e22b8c 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -60,6 +60,9 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz +# ovirt-3.3.3 patches +Patch0: 0001-Reorder-limit-checks-in-grow-quest.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python @@ -558,6 +561,8 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +# ovirt-3.3.3 patches +%patch0 -p1 %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in From 7017ead39dfdd7561abf4e98948ccd7f628d2a05 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 16:02:19 +0200 Subject: [PATCH 067/126] Fix patch name in spec to 0001-Using-old-form-of-zombiereaper.patch --- vdsm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 3e22b8c..39ccc08 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -61,7 +61,7 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz # ovirt-3.3.3 patches -Patch0: 0001-Reorder-limit-checks-in-grow-quest.patch +Patch0: 0001-Using-old-form-of-zombiereaper.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) From e07e184375582618840389b95a31cf6b3d257e3b Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 16:20:33 +0200 Subject: [PATCH 068/126] Adding 4.13.3 tar --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 933ba21..89af15a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d5bc212655d9ba5255f2b3d2d0fe5c83 vdsm-4.13.2.tar.gz +bb47fc8c9413620e1227a2c28a5aba0b vdsm-4.13.3.tar.gz From 2b68010b9cd5e90f4a901cfc1cb988e9c1a35b89 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 20:15:21 +0200 Subject: [PATCH 069/126] Bumping release --- 0001-Using-old-form-of-zombiereaper.patch | 2 +- vdsm.spec | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/0001-Using-old-form-of-zombiereaper.patch b/0001-Using-old-form-of-zombiereaper.patch index cbe38ed..1615ae5 100644 --- a/0001-Using-old-form-of-zombiereaper.patch +++ b/0001-Using-old-form-of-zombiereaper.patch @@ -1,7 +1,7 @@ From d1bb20a892d32822e8f04488fb12df0ffea76a04 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 14:55:35 +0200 -Subject: [PATCH] Using old form of zombiereaper +Subject: [PATCH 1/4] Using old form of zombiereaper In ovirt-3.3 we don't include the change [1] that modifies zombieReaper to zombiereaper. diff --git a/vdsm.spec b/vdsm.spec index 39ccc08..99598e0 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -46,7 +46,7 @@ Name: %{vdsm_name} Version: 4.13.3 -Release: 0%{?dist}%{?extra_release} +Release: 1%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -62,6 +62,9 @@ Url: http://www.ovirt.org/wiki/Vdsm Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz # ovirt-3.3.3 patches Patch0: 0001-Using-old-form-of-zombiereaper.patch +Patch1: 0002-Revert-Using-old-form-of-zombiereaper.patch +Patch2: 0003-Revert-utils-Create-AsyncProcessOperation.patch +Patch3: 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -563,6 +566,10 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %setup -q # ovirt-3.3.3 patches %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in @@ -1328,11 +1335,14 @@ exit 0 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* %changelog +* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3-1 +- Reverting iscsi changes that caused a regression by importing +zombieReaper package which was not backported + * Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3 - spec: bumping iscsi-initiator-utils requirement - removing redundant check-local from storage makefile - Adding exception handling in external threads -- cleanup of iscsi operations - adding (AsyncProcessOperation) - fix bridgeless broken network deletion - gluster api fix - fix log issues - Changed BrokerLink log level to prevent log flooding From bd475bad2009168f310c6a2cf275e30fe739ec9b Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 13 Jan 2014 20:16:33 +0200 Subject: [PATCH 070/126] Adding new revert patches --- ...evert-Using-old-form-of-zombiereaper.patch | 47 +++ ...t-utils-Create-AsyncProcessOperation.patch | 164 +++++++++ 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch | 316 ++++++++++++++++++ 3 files changed, 527 insertions(+) create mode 100644 0002-Revert-Using-old-form-of-zombiereaper.patch create mode 100644 0003-Revert-utils-Create-AsyncProcessOperation.patch create mode 100644 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch diff --git a/0002-Revert-Using-old-form-of-zombiereaper.patch b/0002-Revert-Using-old-form-of-zombiereaper.patch new file mode 100644 index 0000000..e8de0ea --- /dev/null +++ b/0002-Revert-Using-old-form-of-zombiereaper.patch @@ -0,0 +1,47 @@ +From d3c7870167cdab24be231756f0753a83728fcf32 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Mon, 13 Jan 2014 17:44:05 +0200 +Subject: [PATCH 2/4] Revert "Using old form of zombiereaper" + +This reverts commit d1bb20a892d32822e8f04488fb12df0ffea76a04. + +This patch didn't resolve the problem, it just fixed the build errors. +Still the import is invalid as zombieReaper located under +/usr/share/vdsm and utils.py runs for site-packages and cannot locate +it. This revert comes aside to backport of +http://gerrit.ovirt.org/#/c/23213/ that arrange the issue. + +Change-Id: If6a970cdd17c9dbf5544f68e406e6667344df900 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/23228 +Reviewed-by: Dan Kenigsberg +Tested-by: Dan Kenigsberg +--- + lib/vdsm/utils.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py +index 0d3ec91..5a2f746 100644 +--- a/lib/vdsm/utils.py ++++ b/lib/vdsm/utils.py +@@ -48,7 +48,7 @@ import stat + import subprocess + import threading + import time +-import zombieReaper ++import zombiereaper + + from cpopen import CPopen as BetterPopen + from config import config +@@ -983,7 +983,7 @@ class AsyncProcessOperation(object): + + def __del__(self): + if self._proc.returncode is None: +- zombieReaper.autoReapPID(self._proc.pid) ++ zombiereaper.autoReapPID(self._proc.pid) + + + def panic(msg): +-- +1.8.4.2 + diff --git a/0003-Revert-utils-Create-AsyncProcessOperation.patch b/0003-Revert-utils-Create-AsyncProcessOperation.patch new file mode 100644 index 0000000..a7332a0 --- /dev/null +++ b/0003-Revert-utils-Create-AsyncProcessOperation.patch @@ -0,0 +1,164 @@ +From c0239063a8ecc595beff62d6e6f3795146771a45 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Mon, 13 Jan 2014 18:45:36 +0200 +Subject: [PATCH 3/4] Revert "utils: Create AsyncProcessOperation" + +This reverts commit ed426e5590df421bace0aef9fc802baf2a24a5f2. + +Change-Id: I4a4d42db21d4541d955af415898d9cdedd83275b +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/23234 +--- + lib/vdsm/utils.py | 50 ------------------------------------------ + tests/utilsTests.py | 63 ----------------------------------------------------- + 2 files changed, 113 deletions(-) + +diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py +index 5a2f746..ef0f512 100644 +--- a/lib/vdsm/utils.py ++++ b/lib/vdsm/utils.py +@@ -48,7 +48,6 @@ import stat + import subprocess + import threading + import time +-import zombiereaper + + from cpopen import CPopen as BetterPopen + from config import config +@@ -937,55 +936,6 @@ def retry(func, expectedException=Exception, tries=None, + time.sleep(sleep) + + +-class AsyncProcessOperation(object): +- def __init__(self, proc, resultParser=None): +- """Wraps a running process operation. +- +- resultParser should be of type callback(rc, out, err) and can return +- anything or throw exceptions.""" +- self._lock = threading.Lock() +- +- self._result = None +- self._resultParser = resultParser +- +- self._proc = proc +- +- def wait(self, timeout=None, cond=None): +- """Waits until the process has exited, the timeout has been reached or +- the condition has been met""" +- return self._proc.wait(timeout, cond) +- +- def stop(self): +- """Stops the running operation, effectively sending a kill signal to +- the process""" +- self._proc.kill() +- +- def result(self): +- """Returns the result in the as a tuple of (result, error). +- If the operation is still running it will block until it returns. +- +- If no resultParser has been set the default result +- is (rc, out, err) """ +- with self._lock: +- if self._result is None: +- out, err = self._proc.communicate() +- rc = self._proc.returncode +- if self._resultParser is not None: +- try: +- self._result = (self._resultParser(rc, out, err), +- None) +- except Exception as e: +- self._result = (None, e) +- else: +- self._result = ((rc, out, err), None) +- +- return self._result +- +- def __del__(self): +- if self._proc.returncode is None: +- zombiereaper.autoReapPID(self._proc.pid) +- +- + def panic(msg): + logging.error("Panic: %s", msg, exc_info=True) + os.killpg(0, 9) +diff --git a/tests/utilsTests.py b/tests/utilsTests.py +index 4dc6579..5f7c82d 100644 +--- a/tests/utilsTests.py ++++ b/tests/utilsTests.py +@@ -24,7 +24,6 @@ import logging + from testrunner import VdsmTestCase as TestCaseBase + from vdsm import utils + from storage import misc +-import time + + + class RetryTests(TestCaseBase): +@@ -141,65 +140,3 @@ class TracebackTests(TestCaseBase): + def handle(self, record): + assert self.record is None + self.record = record +- +- +-class AsyncProcessOperationTests(TestCaseBase): +- def _echo(self, text): +- proc = misc.execCmd(["echo", "-n", "test"], sync=False) +- +- def parse(rc, out, err): +- return out +- +- return utils.AsyncProcessOperation(proc, parse) +- +- def _sleep(self, t): +- proc = misc.execCmd(["sleep", str(t)], sync=False) +- return utils.AsyncProcessOperation(proc) +- +- def _fail(self, t): +- proc = misc.execCmd(["sleep", str(t)], sync=False) +- +- def parse(rc, out, err): +- raise Exception("TEST!!!") +- +- return utils.AsyncProcessOperation(proc, parse) +- +- def test(self): +- aop = self._sleep(1) +- self.assertEquals(aop.result(), ((0, "", ""), None)) +- +- def testAlreadyExitedSuccess(self): +- aop = self._sleep(0) +- time.sleep(1) +- self.assertEquals(aop.result(), ((0, "", ""), None)) +- +- def testAlreadyExitedFail(self): +- aop = self._sleep("hello") +- time.sleep(1) +- ((rc, out, err), err) = aop.result() +- self.assertEquals(err, None) +- self.assertEquals(rc, 1) +- +- def testWait(self): +- aop = self._sleep(1) +- aop.wait(timeout=2) +- +- def testParser(self): +- aop = self._echo("test") +- self.assertEquals(aop.result(), ("test", None)) +- +- def testStop(self): +- aop = self._sleep(10) +- aop.stop() +- +- start = time.time() +- aop.result() +- end = time.time() +- duration = end - start +- self.assertTrue(duration < 2) +- +- def testException(self): +- aop = self._fail(1) +- res, err = aop.result() +- self.assertEquals(res, None) +- self.assertNotEquals(err, None) +-- +1.8.4.2 + diff --git a/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch b/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch new file mode 100644 index 0000000..178891a --- /dev/null +++ b/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch @@ -0,0 +1,316 @@ +From fb564a48f76a38575df56df5dde2e3cf00f586e6 Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Mon, 13 Jan 2014 18:45:24 +0200 +Subject: [PATCH 4/4] Revert "iscsi: Iscsi rescan cleanup" + +This reverts commit 9df615a98ef98a3111f691c0f1dd47a979b48032. + +Change-Id: Ie28d733ac86d0b7379bbe406bfcdc7779bc0402a +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/23233 +--- + tests/Makefile.am | 1 - + tests/iscsiTests.py | 80 ----------------------------------------------- + vdsm.spec.in | 2 +- + vdsm/storage/iscsi.py | 59 +++++++++++++++++++++++++++------- + vdsm/storage/iscsiadm.py | 24 +++++--------- + vdsm/storage/multipath.py | 2 ++ + vdsm/supervdsmServer | 5 +++ + 7 files changed, 62 insertions(+), 111 deletions(-) + delete mode 100644 tests/iscsiTests.py + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 5efae38..f87eddd 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -37,7 +37,6 @@ test_modules = \ + guestIFTests.py \ + hooksTests.py \ + ipwrapperTests.py \ +- iscsiTests.py \ + jsonRpcTests.py \ + jsonRpcUtils.py \ + libvirtconnectionTests.py \ +diff --git a/tests/iscsiTests.py b/tests/iscsiTests.py +deleted file mode 100644 +index 44f6962..0000000 +--- a/tests/iscsiTests.py ++++ /dev/null +@@ -1,80 +0,0 @@ +-import threading +-import time +-from contextlib import contextmanager +- +-from testrunner import VdsmTestCase as TestCaseBase +- +-from storage import iscsi +- +- +-class AsyncStubOperation(object): +- def __init__(self, timeout): +- self._evt = threading.Event() +- if timeout == 0: +- self._evt.set() +- else: +- threading.Timer(timeout, self._evt.set) +- +- def wait(self, timeout=None, cond=None): +- if cond is not None: +- raise Exception("TODO!!!") +- +- self._evt.wait(timeout) +- +- def stop(self): +- self._evt.set() +- +- def result(self): +- if self._evt.is_set(): +- return (None, None) +- else: +- return None +- +- +-class RescanTimeoutTests(TestCaseBase): +- def setUp(self): +- self._iscsiadm_rescan_async = \ +- iscsi.iscsiadm.session_rescan_async +- iscsi.iscsiadm.session_rescan_async = self._iscsi_stub +- self._timeout = 0 +- +- def tearDown(self): +- iscsi.iscsiadm.session_rescan_async = \ +- self._iscsiadm_rescan_async +- +- def _iscsi_stub(self): +- return AsyncStubOperation(self._timeout) +- +- @contextmanager +- def assertMaxDuration(self, maxtime): +- start = time.time() +- try: +- yield +- finally: +- end = time.time() +- elapsed = end - start +- if maxtime < elapsed: +- self.fail("Operation was too slow %fs > %fs" % +- (elapsed, maxtime)) +- +- @contextmanager +- def assertMinDuration(self, mintime): +- start = time.time() +- try: +- yield +- finally: +- end = time.time() +- elapsed = end - start +- if mintime > elapsed: +- self.fail("Operation was too fast %fs > %fs" % +- (elapsed, mintime)) +- +- def testFast(self): +- self._timeout = 0 +- with self.assertMinDuration(2): +- iscsi.rescan(2, 4) +- +- def testSlow(self): +- self._timeout = 60 +- with self.assertMaxDuration(3): +- iscsi.rescan(1, 2) +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 8d3ba09..9aeb607 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -146,7 +146,7 @@ Requires: python + # Update the qemu-kvm requires when block_stream will be included + Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 + Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 +-Requires: iscsi-initiator-utils >= 6.2.0.873-3 ++Requires: iscsi-initiator-utils >= 6.2.0.872-15 + Requires: device-mapper-multipath >= 0.4.9-52 + Requires: e2fsprogs >= 1.41.12-11 + Requires: fence-agents +diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py +index f4fdceb..7da94ab 100644 +--- a/vdsm/storage/iscsi.py ++++ b/vdsm/storage/iscsi.py +@@ -30,6 +30,7 @@ import errno + import time + from collections import namedtuple + ++from vdsm import constants + import misc + from vdsm.config import config + import devicemapper +@@ -372,15 +373,38 @@ def iterateIscsiInterfaces(): + + + @misc.samplingmethod +-def rescan(minTimeout=None, maxTimeout=None): +- # FIXME: This whole thing is wrong from the core. We need to make rescan +- # completely async and have methods timeout on their own if they +- # can't find the devices they are looking for +- if minTimeout is None: +- minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') +- if maxTimeout is None: +- maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') ++def rescan(): ++ try: ++ iscsiadm.session_rescan() ++ except iscsiadm.IscsiError: ++ pass ++ + ++@misc.samplingmethod ++def forceScsiScan(): ++ processes = [] ++ minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') ++ maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') ++ for hba in glob.glob(SCAN_PATTERN): ++ cmd = [constants.EXT_DD, 'of=' + hba] ++ p = misc.execCmd(cmd, sudo=False, sync=False) ++ try: ++ p.stdin.write("- - -") ++ p.stdin.flush() ++ p.stdin.close() ++ except OSError as e: ++ if p.wait(0) is False: ++ log.error("pid %s still running", p.pid) ++ log.warning("Error in rescan of hba:%s with returncode:%s and " ++ "error message: %s", hba, p.returncode, ++ p.stderr.read(1000)) ++ if e.errno != errno.EPIPE: ++ raise ++ else: ++ log.warning("Ignoring error in rescan of hba %s: ", ++ hba, exc_info=True) ++ continue ++ processes.append((hba, p)) + if (minTimeout > maxTimeout or minTimeout < 0): + minTimeout = 2 + maxTimeout = 30 +@@ -388,13 +412,24 @@ def rescan(minTimeout=None, maxTimeout=None): + "illegal value: scsi_rescan_minimal_timeout or " + "scsi_rescan_maximal_timeout. Set to %s and %s seconds " + "respectively.", minTimeout, maxTimeout) +- + log.debug("Performing SCSI scan, this will take up to %s seconds", + maxTimeout) +- +- rescanOp = iscsiadm.session_rescan_async() + time.sleep(minTimeout) +- rescanOp.wait(timeout=(maxTimeout - minTimeout)) ++ for i in xrange(maxTimeout - minTimeout): ++ for p in processes[:]: ++ (hba, proc) = p ++ if proc.wait(0): ++ if proc.returncode != 0: ++ log.warning('returncode for: %s is: %s', hba, ++ proc.returncode) ++ processes.remove(p) ++ if not processes: ++ break ++ else: ++ time.sleep(1) ++ else: ++ log.warning("Still waiting for scsi scan of hbas: %s", ++ tuple(hba for p in processes)) + + + def devIsiSCSI(dev): +diff --git a/vdsm/storage/iscsiadm.py b/vdsm/storage/iscsiadm.py +index 9bb27ea..cd28db8 100644 +--- a/vdsm/storage/iscsiadm.py ++++ b/vdsm/storage/iscsiadm.py +@@ -1,7 +1,6 @@ + from threading import Lock + import misc + from vdsm import constants +-from vdsm.utils import AsyncProcessOperation + + # iscsiadm exit statuses + ISCSI_ERR_SESS_EXISTS = 15 +@@ -72,7 +71,7 @@ _RESERVED_INTERFACES = ("default", "tcp", "iser") + _iscsiadmLock = Lock() + + +-def _runCmd(args, hideValue=False, sync=True): ++def _runCmd(args, hideValue=False): + # FIXME: I don't use supervdsm because this entire module has to just be + # run as root and there is no such feature yet in supervdsm. When such + # feature exists please change this. +@@ -89,7 +88,7 @@ def _runCmd(args, hideValue=False, sync=True): + if i < (len(printCmd) - 1): + printCmd[i + 1] = "****" + +- return misc.execCmd(cmd, printable=printCmd, sudo=True, sync=sync) ++ return misc.execCmd(cmd, printable=printCmd, sudo=True) + + + def iface_exists(interfaceName): +@@ -295,21 +294,12 @@ def node_login(iface, portal, targetName): + raise IscsiNodeError(rc, out, err) + + +-def session_rescan_async(): +- proc = _runCmd(["-m", "session", "-R"], sync=False) +- +- def parse_result(rc, out, err): +- if rc == 0: +- return +- +- raise IscsiSessionError(rc, out, err) +- +- return AsyncProcessOperation(proc, parse_result) +- +- + def session_rescan(): +- aop = session_rescan_async() +- return aop.result() ++ rc, out, err = _runCmd(["-m", "session", "-R"]) ++ if rc == 0: ++ return ++ ++ raise IscsiSessionError(rc, out, err) + + + def session_logout(sessionId): +diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py +index 29851f3..1f9773c 100644 +--- a/vdsm/storage/multipath.py ++++ b/vdsm/storage/multipath.py +@@ -105,6 +105,8 @@ def rescan(): + # First ask iSCSI to rescan all its sessions + iscsi.rescan() + ++ supervdsm.getProxy().forceScsiScan() ++ + # Now let multipath daemon pick up new devices + cmd = [constants.EXT_MULTIPATH, "-r"] + misc.execCmd(cmd, sudo=True) +diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer +index 6ad3875..7fa1c2b 100755 +--- a/vdsm/supervdsmServer ++++ b/vdsm/supervdsmServer +@@ -56,6 +56,7 @@ from md_utils import getMdDeviceUuidMap as _getMdDeviceUuidMap + + from lsblk import getLsBlk as _getLsBlk + from storage.multipath import getScsiSerial as _getScsiSerial ++from storage.iscsi import forceScsiScan as _forceScsiScan + from storage.iscsi import getDevIscsiInfo as _getdeviSCSIinfo + from storage.iscsi import readSessionInfo as _readSessionInfo + from supervdsm import _SuperVdsmManager +@@ -148,6 +149,10 @@ class _SuperVdsm(object): + return _getScsiSerial(*args, **kwargs) + + @logDecorator ++ def forceScsiScan(self, *args, **kwargs): ++ return _forceScsiScan(*args, **kwargs) ++ ++ @logDecorator + def removeDeviceMapping(self, devName): + return _removeMapping(devName) + +-- +1.8.4.2 + From ca6e46d4dfb30e054eca211652137aa566fc60fb Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 20 Jan 2014 15:05:31 -0500 Subject: [PATCH 071/126] vdsm 4.14.1-0 --- 0001-Using-old-form-of-zombiereaper.patch | 45 --- ...evert-Using-old-form-of-zombiereaper.patch | 47 --- ...t-utils-Create-AsyncProcessOperation.patch | 164 --------- 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch | 316 ------------------ sources | 2 +- vdsm.spec | 231 +++++++++---- 6 files changed, 161 insertions(+), 644 deletions(-) delete mode 100644 0001-Using-old-form-of-zombiereaper.patch delete mode 100644 0002-Revert-Using-old-form-of-zombiereaper.patch delete mode 100644 0003-Revert-utils-Create-AsyncProcessOperation.patch delete mode 100644 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch diff --git a/0001-Using-old-form-of-zombiereaper.patch b/0001-Using-old-form-of-zombiereaper.patch deleted file mode 100644 index 1615ae5..0000000 --- a/0001-Using-old-form-of-zombiereaper.patch +++ /dev/null @@ -1,45 +0,0 @@ -From d1bb20a892d32822e8f04488fb12df0ffea76a04 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Mon, 13 Jan 2014 14:55:35 +0200 -Subject: [PATCH 1/4] Using old form of zombiereaper - -In ovirt-3.3 we don't include the change [1] that modifies zombieReaper -to zombiereaper. - -The import in utils.py cause an import error without having [1]. - -[1] http://gerrit.ovirt.org/#/c/19253/ - -Change-Id: I7483e09df69d07b8396e075726dd14efb42a5551 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/23215 -Reviewed-by: Dan Kenigsberg ---- - lib/vdsm/utils.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py -index 5a2f746..0d3ec91 100644 ---- a/lib/vdsm/utils.py -+++ b/lib/vdsm/utils.py -@@ -48,7 +48,7 @@ import stat - import subprocess - import threading - import time --import zombiereaper -+import zombieReaper - - from cpopen import CPopen as BetterPopen - from config import config -@@ -983,7 +983,7 @@ class AsyncProcessOperation(object): - - def __del__(self): - if self._proc.returncode is None: -- zombiereaper.autoReapPID(self._proc.pid) -+ zombieReaper.autoReapPID(self._proc.pid) - - - def panic(msg): --- -1.8.4.2 - diff --git a/0002-Revert-Using-old-form-of-zombiereaper.patch b/0002-Revert-Using-old-form-of-zombiereaper.patch deleted file mode 100644 index e8de0ea..0000000 --- a/0002-Revert-Using-old-form-of-zombiereaper.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d3c7870167cdab24be231756f0753a83728fcf32 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Mon, 13 Jan 2014 17:44:05 +0200 -Subject: [PATCH 2/4] Revert "Using old form of zombiereaper" - -This reverts commit d1bb20a892d32822e8f04488fb12df0ffea76a04. - -This patch didn't resolve the problem, it just fixed the build errors. -Still the import is invalid as zombieReaper located under -/usr/share/vdsm and utils.py runs for site-packages and cannot locate -it. This revert comes aside to backport of -http://gerrit.ovirt.org/#/c/23213/ that arrange the issue. - -Change-Id: If6a970cdd17c9dbf5544f68e406e6667344df900 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/23228 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - lib/vdsm/utils.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py -index 0d3ec91..5a2f746 100644 ---- a/lib/vdsm/utils.py -+++ b/lib/vdsm/utils.py -@@ -48,7 +48,7 @@ import stat - import subprocess - import threading - import time --import zombieReaper -+import zombiereaper - - from cpopen import CPopen as BetterPopen - from config import config -@@ -983,7 +983,7 @@ class AsyncProcessOperation(object): - - def __del__(self): - if self._proc.returncode is None: -- zombieReaper.autoReapPID(self._proc.pid) -+ zombiereaper.autoReapPID(self._proc.pid) - - - def panic(msg): --- -1.8.4.2 - diff --git a/0003-Revert-utils-Create-AsyncProcessOperation.patch b/0003-Revert-utils-Create-AsyncProcessOperation.patch deleted file mode 100644 index a7332a0..0000000 --- a/0003-Revert-utils-Create-AsyncProcessOperation.patch +++ /dev/null @@ -1,164 +0,0 @@ -From c0239063a8ecc595beff62d6e6f3795146771a45 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Mon, 13 Jan 2014 18:45:36 +0200 -Subject: [PATCH 3/4] Revert "utils: Create AsyncProcessOperation" - -This reverts commit ed426e5590df421bace0aef9fc802baf2a24a5f2. - -Change-Id: I4a4d42db21d4541d955af415898d9cdedd83275b -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/23234 ---- - lib/vdsm/utils.py | 50 ------------------------------------------ - tests/utilsTests.py | 63 ----------------------------------------------------- - 2 files changed, 113 deletions(-) - -diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py -index 5a2f746..ef0f512 100644 ---- a/lib/vdsm/utils.py -+++ b/lib/vdsm/utils.py -@@ -48,7 +48,6 @@ import stat - import subprocess - import threading - import time --import zombiereaper - - from cpopen import CPopen as BetterPopen - from config import config -@@ -937,55 +936,6 @@ def retry(func, expectedException=Exception, tries=None, - time.sleep(sleep) - - --class AsyncProcessOperation(object): -- def __init__(self, proc, resultParser=None): -- """Wraps a running process operation. -- -- resultParser should be of type callback(rc, out, err) and can return -- anything or throw exceptions.""" -- self._lock = threading.Lock() -- -- self._result = None -- self._resultParser = resultParser -- -- self._proc = proc -- -- def wait(self, timeout=None, cond=None): -- """Waits until the process has exited, the timeout has been reached or -- the condition has been met""" -- return self._proc.wait(timeout, cond) -- -- def stop(self): -- """Stops the running operation, effectively sending a kill signal to -- the process""" -- self._proc.kill() -- -- def result(self): -- """Returns the result in the as a tuple of (result, error). -- If the operation is still running it will block until it returns. -- -- If no resultParser has been set the default result -- is (rc, out, err) """ -- with self._lock: -- if self._result is None: -- out, err = self._proc.communicate() -- rc = self._proc.returncode -- if self._resultParser is not None: -- try: -- self._result = (self._resultParser(rc, out, err), -- None) -- except Exception as e: -- self._result = (None, e) -- else: -- self._result = ((rc, out, err), None) -- -- return self._result -- -- def __del__(self): -- if self._proc.returncode is None: -- zombiereaper.autoReapPID(self._proc.pid) -- -- - def panic(msg): - logging.error("Panic: %s", msg, exc_info=True) - os.killpg(0, 9) -diff --git a/tests/utilsTests.py b/tests/utilsTests.py -index 4dc6579..5f7c82d 100644 ---- a/tests/utilsTests.py -+++ b/tests/utilsTests.py -@@ -24,7 +24,6 @@ import logging - from testrunner import VdsmTestCase as TestCaseBase - from vdsm import utils - from storage import misc --import time - - - class RetryTests(TestCaseBase): -@@ -141,65 +140,3 @@ class TracebackTests(TestCaseBase): - def handle(self, record): - assert self.record is None - self.record = record -- -- --class AsyncProcessOperationTests(TestCaseBase): -- def _echo(self, text): -- proc = misc.execCmd(["echo", "-n", "test"], sync=False) -- -- def parse(rc, out, err): -- return out -- -- return utils.AsyncProcessOperation(proc, parse) -- -- def _sleep(self, t): -- proc = misc.execCmd(["sleep", str(t)], sync=False) -- return utils.AsyncProcessOperation(proc) -- -- def _fail(self, t): -- proc = misc.execCmd(["sleep", str(t)], sync=False) -- -- def parse(rc, out, err): -- raise Exception("TEST!!!") -- -- return utils.AsyncProcessOperation(proc, parse) -- -- def test(self): -- aop = self._sleep(1) -- self.assertEquals(aop.result(), ((0, "", ""), None)) -- -- def testAlreadyExitedSuccess(self): -- aop = self._sleep(0) -- time.sleep(1) -- self.assertEquals(aop.result(), ((0, "", ""), None)) -- -- def testAlreadyExitedFail(self): -- aop = self._sleep("hello") -- time.sleep(1) -- ((rc, out, err), err) = aop.result() -- self.assertEquals(err, None) -- self.assertEquals(rc, 1) -- -- def testWait(self): -- aop = self._sleep(1) -- aop.wait(timeout=2) -- -- def testParser(self): -- aop = self._echo("test") -- self.assertEquals(aop.result(), ("test", None)) -- -- def testStop(self): -- aop = self._sleep(10) -- aop.stop() -- -- start = time.time() -- aop.result() -- end = time.time() -- duration = end - start -- self.assertTrue(duration < 2) -- -- def testException(self): -- aop = self._fail(1) -- res, err = aop.result() -- self.assertEquals(res, None) -- self.assertNotEquals(err, None) --- -1.8.4.2 - diff --git a/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch b/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch deleted file mode 100644 index 178891a..0000000 --- a/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch +++ /dev/null @@ -1,316 +0,0 @@ -From fb564a48f76a38575df56df5dde2e3cf00f586e6 Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Mon, 13 Jan 2014 18:45:24 +0200 -Subject: [PATCH 4/4] Revert "iscsi: Iscsi rescan cleanup" - -This reverts commit 9df615a98ef98a3111f691c0f1dd47a979b48032. - -Change-Id: Ie28d733ac86d0b7379bbe406bfcdc7779bc0402a -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/23233 ---- - tests/Makefile.am | 1 - - tests/iscsiTests.py | 80 ----------------------------------------------- - vdsm.spec.in | 2 +- - vdsm/storage/iscsi.py | 59 +++++++++++++++++++++++++++------- - vdsm/storage/iscsiadm.py | 24 +++++--------- - vdsm/storage/multipath.py | 2 ++ - vdsm/supervdsmServer | 5 +++ - 7 files changed, 62 insertions(+), 111 deletions(-) - delete mode 100644 tests/iscsiTests.py - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 5efae38..f87eddd 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -37,7 +37,6 @@ test_modules = \ - guestIFTests.py \ - hooksTests.py \ - ipwrapperTests.py \ -- iscsiTests.py \ - jsonRpcTests.py \ - jsonRpcUtils.py \ - libvirtconnectionTests.py \ -diff --git a/tests/iscsiTests.py b/tests/iscsiTests.py -deleted file mode 100644 -index 44f6962..0000000 ---- a/tests/iscsiTests.py -+++ /dev/null -@@ -1,80 +0,0 @@ --import threading --import time --from contextlib import contextmanager -- --from testrunner import VdsmTestCase as TestCaseBase -- --from storage import iscsi -- -- --class AsyncStubOperation(object): -- def __init__(self, timeout): -- self._evt = threading.Event() -- if timeout == 0: -- self._evt.set() -- else: -- threading.Timer(timeout, self._evt.set) -- -- def wait(self, timeout=None, cond=None): -- if cond is not None: -- raise Exception("TODO!!!") -- -- self._evt.wait(timeout) -- -- def stop(self): -- self._evt.set() -- -- def result(self): -- if self._evt.is_set(): -- return (None, None) -- else: -- return None -- -- --class RescanTimeoutTests(TestCaseBase): -- def setUp(self): -- self._iscsiadm_rescan_async = \ -- iscsi.iscsiadm.session_rescan_async -- iscsi.iscsiadm.session_rescan_async = self._iscsi_stub -- self._timeout = 0 -- -- def tearDown(self): -- iscsi.iscsiadm.session_rescan_async = \ -- self._iscsiadm_rescan_async -- -- def _iscsi_stub(self): -- return AsyncStubOperation(self._timeout) -- -- @contextmanager -- def assertMaxDuration(self, maxtime): -- start = time.time() -- try: -- yield -- finally: -- end = time.time() -- elapsed = end - start -- if maxtime < elapsed: -- self.fail("Operation was too slow %fs > %fs" % -- (elapsed, maxtime)) -- -- @contextmanager -- def assertMinDuration(self, mintime): -- start = time.time() -- try: -- yield -- finally: -- end = time.time() -- elapsed = end - start -- if mintime > elapsed: -- self.fail("Operation was too fast %fs > %fs" % -- (elapsed, mintime)) -- -- def testFast(self): -- self._timeout = 0 -- with self.assertMinDuration(2): -- iscsi.rescan(2, 4) -- -- def testSlow(self): -- self._timeout = 60 -- with self.assertMaxDuration(3): -- iscsi.rescan(1, 2) -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 8d3ba09..9aeb607 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -146,7 +146,7 @@ Requires: python - # Update the qemu-kvm requires when block_stream will be included - Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 - Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 --Requires: iscsi-initiator-utils >= 6.2.0.873-3 -+Requires: iscsi-initiator-utils >= 6.2.0.872-15 - Requires: device-mapper-multipath >= 0.4.9-52 - Requires: e2fsprogs >= 1.41.12-11 - Requires: fence-agents -diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py -index f4fdceb..7da94ab 100644 ---- a/vdsm/storage/iscsi.py -+++ b/vdsm/storage/iscsi.py -@@ -30,6 +30,7 @@ import errno - import time - from collections import namedtuple - -+from vdsm import constants - import misc - from vdsm.config import config - import devicemapper -@@ -372,15 +373,38 @@ def iterateIscsiInterfaces(): - - - @misc.samplingmethod --def rescan(minTimeout=None, maxTimeout=None): -- # FIXME: This whole thing is wrong from the core. We need to make rescan -- # completely async and have methods timeout on their own if they -- # can't find the devices they are looking for -- if minTimeout is None: -- minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') -- if maxTimeout is None: -- maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') -+def rescan(): -+ try: -+ iscsiadm.session_rescan() -+ except iscsiadm.IscsiError: -+ pass -+ - -+@misc.samplingmethod -+def forceScsiScan(): -+ processes = [] -+ minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout') -+ maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout') -+ for hba in glob.glob(SCAN_PATTERN): -+ cmd = [constants.EXT_DD, 'of=' + hba] -+ p = misc.execCmd(cmd, sudo=False, sync=False) -+ try: -+ p.stdin.write("- - -") -+ p.stdin.flush() -+ p.stdin.close() -+ except OSError as e: -+ if p.wait(0) is False: -+ log.error("pid %s still running", p.pid) -+ log.warning("Error in rescan of hba:%s with returncode:%s and " -+ "error message: %s", hba, p.returncode, -+ p.stderr.read(1000)) -+ if e.errno != errno.EPIPE: -+ raise -+ else: -+ log.warning("Ignoring error in rescan of hba %s: ", -+ hba, exc_info=True) -+ continue -+ processes.append((hba, p)) - if (minTimeout > maxTimeout or minTimeout < 0): - minTimeout = 2 - maxTimeout = 30 -@@ -388,13 +412,24 @@ def rescan(minTimeout=None, maxTimeout=None): - "illegal value: scsi_rescan_minimal_timeout or " - "scsi_rescan_maximal_timeout. Set to %s and %s seconds " - "respectively.", minTimeout, maxTimeout) -- - log.debug("Performing SCSI scan, this will take up to %s seconds", - maxTimeout) -- -- rescanOp = iscsiadm.session_rescan_async() - time.sleep(minTimeout) -- rescanOp.wait(timeout=(maxTimeout - minTimeout)) -+ for i in xrange(maxTimeout - minTimeout): -+ for p in processes[:]: -+ (hba, proc) = p -+ if proc.wait(0): -+ if proc.returncode != 0: -+ log.warning('returncode for: %s is: %s', hba, -+ proc.returncode) -+ processes.remove(p) -+ if not processes: -+ break -+ else: -+ time.sleep(1) -+ else: -+ log.warning("Still waiting for scsi scan of hbas: %s", -+ tuple(hba for p in processes)) - - - def devIsiSCSI(dev): -diff --git a/vdsm/storage/iscsiadm.py b/vdsm/storage/iscsiadm.py -index 9bb27ea..cd28db8 100644 ---- a/vdsm/storage/iscsiadm.py -+++ b/vdsm/storage/iscsiadm.py -@@ -1,7 +1,6 @@ - from threading import Lock - import misc - from vdsm import constants --from vdsm.utils import AsyncProcessOperation - - # iscsiadm exit statuses - ISCSI_ERR_SESS_EXISTS = 15 -@@ -72,7 +71,7 @@ _RESERVED_INTERFACES = ("default", "tcp", "iser") - _iscsiadmLock = Lock() - - --def _runCmd(args, hideValue=False, sync=True): -+def _runCmd(args, hideValue=False): - # FIXME: I don't use supervdsm because this entire module has to just be - # run as root and there is no such feature yet in supervdsm. When such - # feature exists please change this. -@@ -89,7 +88,7 @@ def _runCmd(args, hideValue=False, sync=True): - if i < (len(printCmd) - 1): - printCmd[i + 1] = "****" - -- return misc.execCmd(cmd, printable=printCmd, sudo=True, sync=sync) -+ return misc.execCmd(cmd, printable=printCmd, sudo=True) - - - def iface_exists(interfaceName): -@@ -295,21 +294,12 @@ def node_login(iface, portal, targetName): - raise IscsiNodeError(rc, out, err) - - --def session_rescan_async(): -- proc = _runCmd(["-m", "session", "-R"], sync=False) -- -- def parse_result(rc, out, err): -- if rc == 0: -- return -- -- raise IscsiSessionError(rc, out, err) -- -- return AsyncProcessOperation(proc, parse_result) -- -- - def session_rescan(): -- aop = session_rescan_async() -- return aop.result() -+ rc, out, err = _runCmd(["-m", "session", "-R"]) -+ if rc == 0: -+ return -+ -+ raise IscsiSessionError(rc, out, err) - - - def session_logout(sessionId): -diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py -index 29851f3..1f9773c 100644 ---- a/vdsm/storage/multipath.py -+++ b/vdsm/storage/multipath.py -@@ -105,6 +105,8 @@ def rescan(): - # First ask iSCSI to rescan all its sessions - iscsi.rescan() - -+ supervdsm.getProxy().forceScsiScan() -+ - # Now let multipath daemon pick up new devices - cmd = [constants.EXT_MULTIPATH, "-r"] - misc.execCmd(cmd, sudo=True) -diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer -index 6ad3875..7fa1c2b 100755 ---- a/vdsm/supervdsmServer -+++ b/vdsm/supervdsmServer -@@ -56,6 +56,7 @@ from md_utils import getMdDeviceUuidMap as _getMdDeviceUuidMap - - from lsblk import getLsBlk as _getLsBlk - from storage.multipath import getScsiSerial as _getScsiSerial -+from storage.iscsi import forceScsiScan as _forceScsiScan - from storage.iscsi import getDevIscsiInfo as _getdeviSCSIinfo - from storage.iscsi import readSessionInfo as _readSessionInfo - from supervdsm import _SuperVdsmManager -@@ -148,6 +149,10 @@ class _SuperVdsm(object): - return _getScsiSerial(*args, **kwargs) - - @logDecorator -+ def forceScsiScan(self, *args, **kwargs): -+ return _forceScsiScan(*args, **kwargs) -+ -+ @logDecorator - def removeDeviceMapping(self, devName): - return _removeMapping(devName) - --- -1.8.4.2 - diff --git a/sources b/sources index 89af15a..a97c188 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb47fc8c9413620e1227a2c28a5aba0b vdsm-4.13.3.tar.gz +68f23321af8632a882eaab6cc9031d55 vdsm-4.14.1.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 99598e0..f435f72 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -35,6 +35,10 @@ %global with_gluster 1 %endif +%if ! 0%{?rhel} +%global with_vhostmd 1 +%endif + %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 %global with_systemd 1 %endif @@ -45,8 +49,8 @@ %endif Name: %{vdsm_name} -Version: 4.13.3 -Release: 1%{?dist}%{?extra_release} +Version: 4.14.1 +Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -60,22 +64,22 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -# ovirt-3.3.3 patches -Patch0: 0001-Using-old-form-of-zombiereaper.patch -Patch1: 0002-Revert-Using-old-form-of-zombiereaper.patch -Patch2: 0003-Revert-utils-Create-AsyncProcessOperation.patch -Patch3: 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: gcc BuildRequires: python BuildRequires: python-devel BuildRequires: python-nose BuildRequires: python-netaddr +BuildRequires: rpm-build # BuildRequires needed by the tests during the build +BuildRequires: dosfstools +BuildRequires: psmisc BuildRequires: python-ethtool +BuildRequires: python-inotify BuildRequires: python-pthreading +BuildRequires: python-cpopen >= 1.3 BuildRequires: libselinux-python BuildRequires: libvirt-python BuildRequires: genisoimage @@ -106,6 +110,7 @@ BuildRequires: python-pep8 BuildRequires: systemd-units %endif +Requires: ethtool Requires: which Requires: sudo >= 1.7.3 Requires: logrotate @@ -116,11 +121,14 @@ Requires: iproute Requires: python-netaddr Requires: python-inotify Requires: python-argparse +Requires: python-cpopen >= 1.3 Requires: python-ethtool >= 0.6-3 +Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: rpm-python Requires: nfs-utils Requires: m2crypto Requires: libguestfs-tools-c +Requires: libnl Requires: %{name}-xmlrpc = %{version}-%{release} Requires: mom >= 0.3.2-3 @@ -137,13 +145,24 @@ Requires: libvirt-daemon-driver-nwfilter Requires: libvirt-daemon-driver-qemu %else %if 0%{?rhel} -Requires: libvirt >= 0.10.2-18.el6_4.10 +Requires: libvirt >= 0.10.2-18.el6_4.15 %else Requires: libvirt >= 1.0.2-1 %endif %endif Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client +# iscsi-intiator versions +%if 0%{?rhel} +%if 0%{?rhel} >= 7 +Requires: iscsi-initiator-utils +%else +Requires: iscsi-initiator-utils >= 6.2.0.872-15 +%endif # rhel 7 +%else # fedora +Requires: iscsi-initiator-utils >= 6.2.0.873-3 +%endif + %if 0%{?rhel} Requires: python-ethtool >= 0.6-3 %if 0%{?rhel} >= 7 @@ -151,13 +170,12 @@ ExclusiveArch: x86_64 Requires: device-mapper-multipath Requires: e2fsprogs Requires: fence-agents-all -Requires: iscsi-initiator-utils Requires: lvm2 Requires: python Requires: policycoreutils-python Requires: python-pthreading >= 0.1.2 Requires: qemu-kvm -Requires: qemu-kvm-img +Requires: qemu-img Requires: sanlock, sanlock-python Requires: selinux-policy-targeted %else @@ -165,7 +183,6 @@ Requires: python # Update the qemu-kvm requires when block_stream will be included Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 -Requires: iscsi-initiator-utils >= 6.2.0.873-3 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents @@ -183,9 +200,11 @@ Requires: logrotate < 3.8.0 %if 0%{?fedora} >= 19 Requires: python-pthreading >= 0.1.2 Requires: fence-agents-all +Requires: kernel >= 3.11.3-201 %else Requires: python-pthreading Requires: fence-agents +Requires: kernel >= 3.6 %endif # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 @@ -195,10 +214,8 @@ Requires: python-ethtool >= 0.8-1 %if 0%{?fedora} >= 18 Requires: initscripts >= 9.42.2-1 %endif -Requires: iscsi-initiator-utils >= 6.2.0.872-14 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 -Requires: kernel >= 3.6 Requires: sanlock >= 2.4-2, sanlock-python Requires: policycoreutils-python Requires: sed >= 4.2.1-10 @@ -221,7 +238,7 @@ Requires: systemd >= 197-1.fc18.2 # GlusterFS client-side RPMs needed for Gluster SD %if 0%{?with_gluster} -Requires: glusterfs >= 3.4.0 +Requires: glusterfs >= 3.4.2 Requires: glusterfs-cli Requires: glusterfs-api Requires: glusterfs-fuse @@ -261,7 +278,6 @@ BuildArch: noarch Requires: %{name}-python = %{version}-%{release} Requires: %{name}-xmlrpc = %{version}-%{release} -Requires: %{name}-python-cpopen %description cli Call VDSM commands from the command line. Used for testing and debugging. @@ -271,7 +287,6 @@ Summary: VDSM xmlrpc API BuildArch: noarch Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-python-cpopen %description xmlrpc @@ -307,6 +322,15 @@ Requires: python >= 2.6 %description yajsonrpc A JSON RPC server and client implementation. +%package python-zombiereaper +Summary: Collects zombie processes automatically +BuildArch: noarch + +Requires: python >= 2.6 + +%description python-zombiereaper +Collects zombie processes automatically so you don't have to + %package bootstrap Summary: VDSM bootstrapping package BuildArch: noarch @@ -327,18 +351,9 @@ Requires: openssl VDSM registration package. Used to register a Linux host to a Virtualization Manager. -%package python-cpopen -Summary: Creates a sub-process in simpler safer manner. - -BuildRequires: python2-devel -Provides: python-cpopen = 1.2.3 - -%description python-cpopen -Python package for creating sub-process in simpler and safer manner by using C -code. - %package python Summary: VDSM python libraries +Requires: %{name}-python-zombiereaper = %{version}-%{release} %description python Shared libraries between the various VDSM packages. @@ -371,6 +386,7 @@ Requires: vdsm VDSM hook used to perform consistency check on a qcow2 format disk image using the QEMU disk image utility. +%if 0%{?with_vhostmd} %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd Requires: vhostmd @@ -378,6 +394,7 @@ BuildArch: noarch %description hook-vhostmd VDSM hook to use vhostmd per VM according to Virtualization Manager requests. +%endif %package hook-faqemu Summary: Fake qemu process for VDSM quality assurance @@ -407,6 +424,15 @@ VDSM hooks which allow to disable mac spoof filtering either on all the of the VM's interfaces or on specific vnics. +%package hook-extnet +Summary: Force a vNIC to connect to a specific libvirt network +BuildArch: noarch +Requires: vdsm = %{version}-%{release} + +%description hook-extnet +VDSM hook which allows to connect a vNIC to a libvirt network that is managed +outside of oVirt, such as an openvswitch network. + %package hook-fileinject Summary: Allow uploading file to VMs disk BuildArch: noarch @@ -538,10 +564,21 @@ directly to a virtual machine. %package hook-vmfex Summary: vmfex support for VDSM BuildArch: noarch +Conflicts: hook-vmfex-dev %description hook-vmfex Hook for vmfex. +%package hook-vmfex-dev +Summary: VM-FEX vNIC support for VDSM +BuildArch: noarch +Requires: vdsm = %{version}-%{release} +Conflicts: hook-vmfex + +%description hook-vmfex-dev +Allows to use custom device properties to connect a guest vNIC to a host +VM-FEX Virtual Function (SR-IOV with macvtap mode). + %package hook-vmdisk Summary: External disk support for VDSM BuildArch: noarch @@ -564,13 +601,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -# ovirt-3.3.3 patches -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - - %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -609,8 +639,6 @@ install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/lib/systemd/systemd-vds install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service -install -Dm 0644 init/systemd/vdsm-restore-net-config.service \ - %{buildroot}%{_unitdir}/vdsm-restore-net-config.service install -Dm 0755 vdsm_reg/vdsm-reg.init \ %{buildroot}/lib/systemd/systemd-vdsm-reg install -Dm 0644 vdsm_reg/vdsm-reg.service \ @@ -623,8 +651,6 @@ install -Dm 0755 init/sysvinit/vdsmd.init %{buildroot}%{_initrddir}/vdsmd install -Dm 0755 init/sysvinit/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg -install -Dm 0755 init/sysvinit/vdsm-restore-net-config.init \ - %{buildroot}%{_initrddir}/vdsm-restore-net-config %endif %if 0%{?with_tmpfiles_macro} @@ -667,7 +693,6 @@ export LC_ALL=C /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} -/usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user} %post %{_bindir}/vdsm-tool sebool-config || : @@ -688,24 +713,20 @@ fi /sbin/restorecon -R /var/log/core >/dev/null 2>&1 # hack until we replace core dump with abrt -%if 0%{?rhel} +%if ! 0%{?with_systemd} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsmd /sbin/chkconfig --add supervdsmd - /sbin/chkconfig --add vdsm-restore-net-config fi %else -%if 0%{?with_systemd} /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : - /bin/systemctl enable vdsm-restore-net-config.service >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi exit 0 %endif -%endif %preun if [ "$1" -eq 0 ]; then @@ -726,14 +747,13 @@ if [ "$1" -eq 0 ]; then /bin/sed -i -e 's/# VDSM backup//' %{_sysconfdir}/logrotate.d/libvirtd fi -%if 0%{?rhel} +%if ! 0%{?with_systemd} if [ "$1" -eq 0 ] then /sbin/service vdsmd stop > /dev/null 2>&1 || : /sbin/chkconfig --del vdsmd /sbin/service supervdsmd stop > /dev/null 2>&1 || : /sbin/chkconfig --del supervdsmd - /sbin/chkconfig --del vdsm-restore-net-config /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf @@ -754,12 +774,10 @@ fi %if 0%{?with_systemd_macros} %systemd_preun vdsmd.service %systemd_preun supervdsmd.service -%systemd_preun vdsm-restore-net-config.service %else if [ "$1" -eq 0 ]; then /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : /bin/systemctl --no-reload disable supervdsmd.service > /dev/null 2>&1 || : - /bin/systemctl --no-reload disable vdsm-restore-net-config.service > /dev/null 2>&1 || : /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : /bin/systemctl stop supervdsmd.service > /dev/null 2>&1 || : fi @@ -771,27 +789,46 @@ exit 0 if [ "$1" -ge 1 ]; then supervdsmd_start_required='no' vdsmd_start_required='no' + + # Both vdsm and supervdsm should be managed here and must be restarted if + # ran before (code might changed) if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 + %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 || : vdsmd_start_required='yes' fi if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 + %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 || : supervdsmd_start_required='yes' fi - %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1 + if ! %{_bindir}/vdsm-tool is-configured --module libvirt >/dev/null 2>&1; + then + if ! %{_bindir}/vdsm-tool configure --module libvirt --force \ + >/dev/null 2>&1; then + # fallback to vdsmd reconfigure api - This change may be removed + # when vdsm won't support any downgrade\upgrade to versions that + # don't include vdsm-tool configure api (vdsm <= 3.3) + for f in '/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do + if [ -f "${f}" ]; then + "${f}" reconfigure >/dev/null 2>&1 || : + fi + done + fi + fi if [ "${supervdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 + %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 || : fi if [ "${vdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 + %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 || : fi fi exit 0 -%if 0%{?rhel} +%if 0%{?rhel} == 6 +# In el6, We configure libvirt to use upstart without the libvirt.rpm's +# awareness. Thus, we must stop/restart libvirt ourselves when the +# libvirt.rpm is removed/upgraded. %triggerun -- libvirt if [ "$2" -eq "0" ]; then /sbin/initctl stop libvirtd > /dev/null 2>&1 || : @@ -804,7 +841,7 @@ fi %endif %post reg -%if 0%{?rhel} +%if ! 0%{?with_systemd} if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsm-reg fi @@ -821,7 +858,7 @@ exit 0 %endif %preun reg -%if 0%{?rhel} +%if ! 0%{?with_systemd} if [ "$1" -eq 0 ] then /sbin/service vdsm-reg stop > /dev/null 2>&1 || : @@ -846,11 +883,9 @@ exit 0 /lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service %{_unitdir}/supervdsmd.service -%{_unitdir}/vdsm-restore-net-config.service %else %{_initrddir}/vdsmd %{_initrddir}/supervdsmd -%{_initrddir}/vdsm-restore-net-config %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center @@ -860,6 +895,7 @@ exit 0 %dir %{_sysconfdir}/%{vdsm_name} %dir %{_sysconfdir}/%{vdsm_name}/mom.d %dir %{_datadir}/%{vdsm_name} +%dir %{_datadir}/%{vdsm_name}/netconf %dir %{_datadir}/%{vdsm_name}/storage %dir %{_datadir}/%{vdsm_name}/storage/imageRepository %{_datadir}/%{vdsm_name}/alignmentScan.py* @@ -876,6 +912,7 @@ exit 0 %{_datadir}/%{vdsm_name}/mk_sysprep_floppy %{_datadir}/%{vdsm_name}/parted_utils.py* %{_datadir}/%{vdsm_name}/mkimage.py* +%{_datadir}/%{vdsm_name}/ppc64HardwareInfo.py* %{_datadir}/%{vdsm_name}/sourceRoute.py* %{_datadir}/%{vdsm_name}/sourceRouteThread.py* %{_datadir}/%{vdsm_name}/supervdsm.py* @@ -886,9 +923,10 @@ exit 0 %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config %{_datadir}/%{vdsm_name}/vm.py* -%{_datadir}/%{vdsm_name}/zombieReaper.py* + %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/upgrade.logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm @@ -933,6 +971,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/iscsiadm.py* %{_datadir}/%{vdsm_name}/storage/iscsi.py* %{_datadir}/%{vdsm_name}/storage/localFsSD.py* +%{_datadir}/%{vdsm_name}/storage/lvm.env %{_datadir}/%{vdsm_name}/storage/lvm.py* %{_datadir}/%{vdsm_name}/storage/misc.py* %{_datadir}/%{vdsm_name}/storage/mount.py* @@ -948,6 +987,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/sd.py* %{_datadir}/%{vdsm_name}/storage/securable.py* %{_datadir}/%{vdsm_name}/storage/sp.py* +%{_datadir}/%{vdsm_name}/storage/spbackends.py* %{_datadir}/%{vdsm_name}/storage/storageConstants.py* %{_datadir}/%{vdsm_name}/storage/storage_exception.py* %{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* @@ -963,6 +1003,7 @@ exit 0 %{_libexecdir}/%{vdsm_name}/safelease %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh +%dir %{_libexecdir}/%{vdsm_name}/hooks %dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create %dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create %dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_destroy @@ -1004,6 +1045,10 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotunplug %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus %{_datadir}/%{vdsm_name}/addNetwork %{_datadir}/%{vdsm_name}/configNetwork.py* %{_datadir}/%{vdsm_name}/delNetwork @@ -1013,6 +1058,7 @@ exit 0 %{_datadir}/%{vdsm_name}/ksm.py* %{_datadir}/%{vdsm_name}/momIF.py* %{_datadir}/%{vdsm_name}/netconf/__init__.py* +%{_datadir}/%{vdsm_name}/netconf/dhclient.py* %{_datadir}/%{vdsm_name}/netconf/ifcfg.py* %{_datadir}/%{vdsm_name}/netconf/libvirtCfg.py* %{_datadir}/%{vdsm_name}/netconf/iproute2.py* @@ -1055,10 +1101,11 @@ exit 0 %config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password %dir %{_localstatedir}/lib/%{vdsm_name} %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback +%dir %{_localstatedir}/lib/%{vdsm_name}/persistence +%dir %{_localstatedir}/lib/%{vdsm_name}/upgrade %dir %{_localstatedir}/run/%{vdsm_name} %dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes %dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces -%ghost %dir %{_localstatedir}/run/%{vdsm_name}/pools %ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload %dir %{_localstatedir}/log/%{vdsm_name} %dir %{_localstatedir}/log/%{vdsm_name}/backup @@ -1069,6 +1116,8 @@ exit 0 %if !0%{?rhel} %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %endif +%dir %{python_sitearch}/%{vdsm_name} +%dir %{python_sitearch}/%{vdsm_name}/tool %{python_sitearch}/%{vdsm_name}/__init__.py* %{python_sitearch}/%{vdsm_name}/config.py* %{python_sitearch}/%{vdsm_name}/constants.py* @@ -1077,8 +1126,10 @@ exit 0 %{python_sitearch}/%{vdsm_name}/ipwrapper.py* %{python_sitearch}/%{vdsm_name}/libvirtconnection.py* %{python_sitearch}/%{vdsm_name}/netinfo.py* +%{python_sitearch}/%{vdsm_name}/netlink.py* %{python_sitearch}/%{vdsm_name}/qemuImg.py* %{python_sitearch}/%{vdsm_name}/SecureXMLRPCServer.py* +%{python_sitearch}/%{vdsm_name}/netconfpersistence.py* %{python_sitearch}/%{vdsm_name}/utils.py* %{python_sitearch}/%{vdsm_name}/vdscli.py* %{python_sitearch}/%{vdsm_name}/tool/__init__.py* @@ -1089,25 +1140,34 @@ exit 0 %endif %{python_sitearch}/%{vdsm_name}/tool/dummybr.py* %{python_sitearch}/%{vdsm_name}/tool/nwfilter.py* -%{python_sitearch}/%{vdsm_name}/tool/libvirt_configure.py* +%{python_sitearch}/%{vdsm_name}/tool/configurator.py* %{_libexecdir}/%{vdsm_name}/libvirt_configure.sh %{python_sitearch}/%{vdsm_name}/tool/passwd.py* -%{python_sitearch}/%{vdsm_name}/tool/sanlock.py* +%{python_sitearch}/%{vdsm_name}/tool/restore_nets.py* %{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py* %{python_sitearch}/%{vdsm_name}/tool/service.py* +%{python_sitearch}/%{vdsm_name}/tool/transient.py* +%{python_sitearch}/%{vdsm_name}/tool/unified_persistence.py* +%{python_sitearch}/%{vdsm_name}/tool/upgrade.py* +%{python_sitearch}/%{vdsm_name}/tool/upgrade_300_networks.py* %{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py* %{python_sitearch}/%{vdsm_name}/tool/vdsm-id.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README %defattr(-, root, root, -) +%dir %{_datadir}/%{vdsm_name}/tests +%dir %{_datadir}/%{vdsm_name}/tests/functional %{_datadir}/%{vdsm_name}/tests/*.py* %{_datadir}/%{vdsm_name}/tests/cpu_info.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out +%{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_1_4_4.out +%{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_2_4_8.out %{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out %{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out +%{_datadir}/%{vdsm_name}/tests/mem_info.out %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out @@ -1115,6 +1175,7 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeTasks.xml %{_datadir}/%{vdsm_name}/tests/functional/*.py* %{_datadir}/%{vdsm_name}/tests/functional/*.policy @@ -1122,16 +1183,21 @@ exit 0 %defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_consts.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* +%if 0%{?with_vhostmd} %files hook-vhostmd %defattr(-, root, root, -) %doc COPYING @@ -1140,6 +1206,13 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%else +%exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%endif %files hook-qemucmdline %defattr(-, root, root, -) @@ -1192,6 +1265,11 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof +%files hook-extnet +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet + %files hook-nestedvt %defattr(-, root, root, -) %{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf @@ -1240,6 +1318,12 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex + +%files hook-vmfex-dev +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex %endif %files debug-plugin @@ -1258,6 +1342,7 @@ exit 0 %files xmlrpc %defattr(-, root, root, -) +%dir %{_datadir}/%{vdsm_name} %{_datadir}/%{vdsm_name}/BindingXMLRPC.py* %files api @@ -1270,11 +1355,15 @@ exit 0 %{_datadir}/%{vdsm_name}/Bridge.py* %files yajsonrpc +%dir %{python_sitelib}/yajsonrpc %{python_sitelib}/yajsonrpc/__init__.py* %{python_sitelib}/yajsonrpc/asyncoreReactor.py* %{python_sitelib}/yajsonrpc/protonReactor.py* %{python_sitelib}/yajsonrpc/client.py* +%files python-zombiereaper +%{python_sitelib}/zombiereaper/__init__.py* + %files bootstrap %defattr(-, root, root, -) %doc COPYING @@ -1328,13 +1417,13 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/vdsmapi-gluster-schema.json %{_datadir}/%{vdsm_name}/gluster/hooks.py* %{_datadir}/%{vdsm_name}/gluster/services.py* +%{_datadir}/%{vdsm_name}/gluster/tasks.py* %endif -%files python-cpopen -%{python_sitearch}/cpopen/__init__.py* -%attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so* - %changelog +* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-0 +- Build 4.14.1-0 + * Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3-1 - Reverting iscsi changes that caused a regression by importing zombieReaper package which was not backported From 1e0c1c2a5bebe54c70ee8aed2873c062ec6be46d Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 20 Jan 2014 15:58:25 -0500 Subject: [PATCH 072/126] vdsm 4.14.1-1 Rebuild 4.14.1 from ovirt-3.4 branch --- sources | 2 +- vdsm.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index a97c188..5c03119 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -68f23321af8632a882eaab6cc9031d55 vdsm-4.14.1.tar.gz +b84739d65cc80cd1e94cad29fff0cad4 vdsm-4.14.1.tar.gz diff --git a/vdsm.spec b/vdsm.spec index f435f72..d1254eb 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -50,7 +50,7 @@ Name: %{vdsm_name} Version: 4.14.1 -Release: 0%{?dist}%{?extra_release} +Release: 1%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1421,6 +1421,9 @@ exit 0 %endif %changelog +* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-1 +- Rebuild 4.14.1 from ovirt-3.4 + * Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-0 - Build 4.14.1-0 From 1e2a95d3c3566092dce4bb0d8cf426ca8dce9a78 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 21 Jan 2014 07:36:50 -0500 Subject: [PATCH 073/126] vdsm-4.14.1-2 - vdsm.spec: Add BuildRequires to python-argparse --- ...Add-BuildRequires-to-python-argparse.patch | 33 +++++++++++++++++++ vdsm.spec | 14 +++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch diff --git a/0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch b/0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch new file mode 100644 index 0000000..12662bb --- /dev/null +++ b/0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch @@ -0,0 +1,33 @@ +From 9e1e1b9bfc8d01a1504e28787e31aa4bc49832b3 Mon Sep 17 00:00:00 2001 +From: Douglas Schilling Landgraf +Date: Tue, 21 Jan 2014 06:02:02 -0500 +Subject: [PATCH] vdsm.spec: Add BuildRequires to python-argparse + +EL6 build is failing because configure.ac says argparse is fatal error +in case we don't have it in build system. This patch includes python-argparse as +BuildRequires. On the other hand, >= F19 contains python-2.7 which has +python-argparse integrated into the stdlib and don't generate such error. + +Change-Id: Ie3dc596f13e934760906f43a0f16ca6c06086878 +Signed-off-by: Douglas Schilling Landgraf +Reviewed-on: http://gerrit.ovirt.org/23475 +Reviewed-by: Dan Kenigsberg +--- + vdsm.spec.in | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/vdsm.spec.in b/vdsm.spec.in +index 7912635..920c57f 100644 +--- a/vdsm.spec.in ++++ b/vdsm.spec.in +@@ -76,6 +76,7 @@ BuildRequires: m2crypto + BuildRequires: python-dmidecode + %endif + %if 0%{?rhel} == 6 ++BuildRequires: python-argparse + BuildRequires: python-ordereddict + %endif + BuildRequires: python-ethtool +-- +1.7.1 + diff --git a/vdsm.spec b/vdsm.spec index d1254eb..1f8a2dc 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -50,7 +50,7 @@ Name: %{vdsm_name} Version: 4.14.1 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -64,6 +64,10 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz + +# ovirt-3.4 patches +Patch0: 0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc @@ -89,6 +93,7 @@ BuildRequires: m2crypto BuildRequires: python-dmidecode %endif %if 0%{?rhel} == 6 +BuildRequires: python-argparse BuildRequires: python-ordereddict %endif BuildRequires: python-ethtool @@ -601,6 +606,10 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q + +# ovirt-3.4 patches +%patch0 -p1 + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1421,6 +1430,9 @@ exit 0 %endif %changelog +* Tue Jan 21 2014 Douglas Schilling Landgraf - 4.14.1-2 +- vdsm.spec: Add BuildRequires to python-argparse + * Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-1 - Rebuild 4.14.1 from ovirt-3.4 From 47cae72e9a83a6bae364f21f5b6ee7c6beac33ec Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 5 Feb 2014 22:56:32 -0500 Subject: [PATCH 074/126] vdsm 4.14.1-3 - execCmd with sudo=root raise require tty fault when running as root - sysvinit: Ensure that iscsid is started (BZ#1056948) - Add missing libnl buildrequires dependency - vdsm.spec: vdsm-python requires python-cpopen - netconfig: set ETHTOOL_OPTS when a NIC goes up (BZ#1059680) - sos: plugin should ignore /var/run/vdsm/storage - vdsm.spec: vdsm should own vdsm.log (BZ#1055153) - vdsm.spec: own metadata supervdsm mom logs (BZ#1055153) - spec: do not remove vdsm logs when pkg removed (BZ#1055153) - gluster: add host uuid in volume status - gluster: interpret and use correct xml elements - gluster: adopt xml changes of rebalance and remove-brick status - vm: do not pause during refreshVolume (BZ#889097) - spec: vdsm pkg for EL distro must include pkla (BZ#1060524) --- ...Add-BuildRequires-to-python-argparse.patch | 33 ----------- sources | 2 +- vdsm.spec | 59 ++++++++++++++----- 3 files changed, 45 insertions(+), 49 deletions(-) delete mode 100644 0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch diff --git a/0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch b/0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch deleted file mode 100644 index 12662bb..0000000 --- a/0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9e1e1b9bfc8d01a1504e28787e31aa4bc49832b3 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 21 Jan 2014 06:02:02 -0500 -Subject: [PATCH] vdsm.spec: Add BuildRequires to python-argparse - -EL6 build is failing because configure.ac says argparse is fatal error -in case we don't have it in build system. This patch includes python-argparse as -BuildRequires. On the other hand, >= F19 contains python-2.7 which has -python-argparse integrated into the stdlib and don't generate such error. - -Change-Id: Ie3dc596f13e934760906f43a0f16ca6c06086878 -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/23475 -Reviewed-by: Dan Kenigsberg ---- - vdsm.spec.in | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index 7912635..920c57f 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -76,6 +76,7 @@ BuildRequires: m2crypto - BuildRequires: python-dmidecode - %endif - %if 0%{?rhel} == 6 -+BuildRequires: python-argparse - BuildRequires: python-ordereddict - %endif - BuildRequires: python-ethtool --- -1.7.1 - diff --git a/sources b/sources index 5c03119..69c5458 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b84739d65cc80cd1e94cad29fff0cad4 vdsm-4.14.1.tar.gz +d944f1ddf6c8f6045486ed5efda65eab vdsm-4.14.1.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 1f8a2dc..2f16ef1 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -50,7 +50,7 @@ Name: %{vdsm_name} Version: 4.14.1 -Release: 2%{?dist}%{?extra_release} +Release: 3%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -65,9 +65,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -# ovirt-3.4 patches -Patch0: 0001-vdsm.spec-Add-BuildRequires-to-python-argparse.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc @@ -84,6 +81,7 @@ BuildRequires: python-ethtool BuildRequires: python-inotify BuildRequires: python-pthreading BuildRequires: python-cpopen >= 1.3 +BuildRequires: libnl BuildRequires: libselinux-python BuildRequires: libvirt-python BuildRequires: genisoimage @@ -359,6 +357,7 @@ Manager. %package python Summary: VDSM python libraries Requires: %{name}-python-zombiereaper = %{version}-%{release} +Requires: python-cpopen >= 1.2.3-5 %description python Shared libraries between the various VDSM packages. @@ -606,10 +605,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q - -# ovirt-3.4 patches -%patch0 -p1 - %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -632,6 +627,11 @@ sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ rm -rf %{buildroot} make DESTDIR=%{buildroot} install +# Creating VDSM logs in this session to avoid rpmbuild +# complain during the build +install -dDm 0755 %{buildroot}/var/log/vdsm +touch %{buildroot}/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} + # Install the respawn utility install -Dm 0755 init/sysvinit/respawn \ %{buildroot}%{_datadir}/%{vdsm_name}/respawn @@ -671,20 +671,22 @@ install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ # This is not commonplace, but we want /var/log/core to be a world-writable # dropbox for core dumps install -dDm 1777 %{buildroot}%{_localstatedir}/log/core -%else +%endif + +%if !0%{?rhel} # Install the configuration sample install -Dm 0644 lib/vdsm/vdsm.conf.sample \ - %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf + %{buildroot}%{_sysconfdir}/%{vdsm_name}/vdsm.conf +%endif # Install the polkit for libvirt -%if 0%{?fedora} >= 18 +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules %else install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla %endif -%endif %check # Disabling the nose tests until they'll all succeed in koji. @@ -708,6 +710,14 @@ export LC_ALL=C # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd +# After vdsm install we should create the logs files. +# In the install session we create it but since we use +# the ghost macro (in files session) the files are not included +touch /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +chmod 0644 /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /var/log/vdsm/{metadata.log,mom.log,vdsm.log} +chown root:root /var/log/vdsm/supervdsm.log + # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. # So Remove them if it is played with /etc/sysctl.conf. if grep -q "# VDSM section begin" /etc/sysctl.conf; then @@ -898,6 +908,10 @@ exit 0 %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/metadata.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log +%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} @@ -1091,13 +1105,12 @@ exit 0 %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} %dir %{_localstatedir}/log/core -%else -%if 0%{?fedora} >= 18 +%endif +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %{_polkitdir}/10-vdsm-libvirt-access.rules %else %{_polkitdir}/10-vdsm-libvirt-access.pkla %endif -%endif %defattr(-, %{vdsm_user}, %{qemu_group}, -) %dir %{_localstatedir}/lib/libvirt/qemu/channels @@ -1430,6 +1443,22 @@ exit 0 %endif %changelog +* Wed Feb 05 2014 Douglas Schilling Landgraf - 4.14.1-3 +- execCmd with sudo=root raise require tty fault when running as root +- sysvinit: Ensure that iscsid is started (BZ#1056948) +- Add missing libnl buildrequires dependency +- vdsm.spec: vdsm-python requires python-cpopen +- netconfig: set ETHTOOL_OPTS when a NIC goes up (BZ#1059680) +- sos: plugin should ignore /var/run/vdsm/storage +- vdsm.spec: vdsm should own vdsm.log (BZ#1055153) +- vdsm.spec: own metadata supervdsm mom logs (BZ#1055153) +- spec: do not remove vdsm logs when pkg removed (BZ#1055153) +- gluster: add host uuid in volume status +- gluster: interpret and use correct xml elements +- gluster: adopt xml changes of rebalance and remove-brick status +- vm: do not pause during refreshVolume (BZ#889097) +- spec: vdsm pkg for EL distro must include pkla (BZ#1060524) + * Tue Jan 21 2014 Douglas Schilling Landgraf - 4.14.1-2 - vdsm.spec: Add BuildRequires to python-argparse From f41b6ad56e09357b204f3150bbf763f1959a8942 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Thu, 6 Feb 2014 17:36:00 +0200 Subject: [PATCH 075/126] Adding configure sanlock on force patch and bump the release --- vdsm.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 2f16ef1..91bd2db 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -50,7 +50,7 @@ Name: %{vdsm_name} Version: 4.14.1 -Release: 3%{?dist}%{?extra_release} +Release: 4%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -64,6 +64,8 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz +# ovirt-3.4 patches +Patch0: 0001-Adding-configure-sanlock-on-force.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -605,6 +607,9 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +# ovirt-3.4 patches +%patch0 -p1 + %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1443,6 +1448,9 @@ exit 0 %endif %changelog +* Thu Feb 06 2014 Yaniv Bronhaim - 4.14.1-3 - execCmd with sudo=root raise require tty fault when running as root - sysvinit: Ensure that iscsid is started (BZ#1056948) From f7ccd98b6e2ec70e5cad01376fa0f6e7d97ce01c Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Thu, 6 Feb 2014 17:41:27 +0200 Subject: [PATCH 076/126] Adding patch 0001-Adding-configure-sanlock-on-force.patch --- 0001-Adding-configure-sanlock-on-force.patch | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 0001-Adding-configure-sanlock-on-force.patch diff --git a/0001-Adding-configure-sanlock-on-force.patch b/0001-Adding-configure-sanlock-on-force.patch new file mode 100644 index 0000000..8ebef51 --- /dev/null +++ b/0001-Adding-configure-sanlock-on-force.patch @@ -0,0 +1,42 @@ +From 3a1895662d4a82d531b6ca7333874a579410f22f Mon Sep 17 00:00:00 2001 +From: Yaniv Bronhaim +Date: Mon, 3 Feb 2014 18:13:43 +0200 +Subject: [PATCH] Adding configure sanlock on force + +If sanlock is down we cannot check sanlock process, so isconfigure return that +sanlock process is already related to the supplementary group. +Configure verb won't configure sanlock if isconfigure return True currently. +Therefore, this patch change the ConfigureOnForce to True so +'vdsm-tool configure --force' will perform the usermod action as the +user expected. + +Change-Id: I0bb3125e64cf02e55738f5978fd81d605dd84d38 +Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057225 +Signed-off-by: Yaniv Bronhaim +Reviewed-on: http://gerrit.ovirt.org/24007 +Reviewed-by: Sandro Bonazzola +Reviewed-by: Dan Kenigsberg +Reviewed-on: http://gerrit.ovirt.org/24153 +--- + lib/vdsm/tool/configurator.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py +index dfc4115..29172e4 100644 +--- a/lib/vdsm/tool/configurator.py ++++ b/lib/vdsm/tool/configurator.py +@@ -175,7 +175,10 @@ class SanlockModuleConfigure(_ModuleConfigure): + return configured + + def reconfigureOnForce(self): +- return False ++ # If sanlock is down isconfigure returns True and configure will skip ++ # sanlock configure. on force users expected to run configure even if ++ # isconfigure returned True. ++ return True + + + __configurers = ( +-- +1.8.5.3 + From 49358b3055787fd4923fcbefb6d03fe91541a08a Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 10 Feb 2014 10:38:12 -0500 Subject: [PATCH 077/126] vdsm-4.14.2-0 --- 0001-Adding-configure-sanlock-on-force.patch | 42 -------------------- sources | 2 +- vdsm.spec | 17 ++++---- 3 files changed, 8 insertions(+), 53 deletions(-) delete mode 100644 0001-Adding-configure-sanlock-on-force.patch diff --git a/0001-Adding-configure-sanlock-on-force.patch b/0001-Adding-configure-sanlock-on-force.patch deleted file mode 100644 index 8ebef51..0000000 --- a/0001-Adding-configure-sanlock-on-force.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3a1895662d4a82d531b6ca7333874a579410f22f Mon Sep 17 00:00:00 2001 -From: Yaniv Bronhaim -Date: Mon, 3 Feb 2014 18:13:43 +0200 -Subject: [PATCH] Adding configure sanlock on force - -If sanlock is down we cannot check sanlock process, so isconfigure return that -sanlock process is already related to the supplementary group. -Configure verb won't configure sanlock if isconfigure return True currently. -Therefore, this patch change the ConfigureOnForce to True so -'vdsm-tool configure --force' will perform the usermod action as the -user expected. - -Change-Id: I0bb3125e64cf02e55738f5978fd81d605dd84d38 -Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057225 -Signed-off-by: Yaniv Bronhaim -Reviewed-on: http://gerrit.ovirt.org/24007 -Reviewed-by: Sandro Bonazzola -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/24153 ---- - lib/vdsm/tool/configurator.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py -index dfc4115..29172e4 100644 ---- a/lib/vdsm/tool/configurator.py -+++ b/lib/vdsm/tool/configurator.py -@@ -175,7 +175,10 @@ class SanlockModuleConfigure(_ModuleConfigure): - return configured - - def reconfigureOnForce(self): -- return False -+ # If sanlock is down isconfigure returns True and configure will skip -+ # sanlock configure. on force users expected to run configure even if -+ # isconfigure returned True. -+ return True - - - __configurers = ( --- -1.8.5.3 - diff --git a/sources b/sources index 69c5458..7136736 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d944f1ddf6c8f6045486ed5efda65eab vdsm-4.14.1.tar.gz +e09f800e3e503cb7c59830efa1f8ee97 vdsm-4.14.2.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 91bd2db..9e0f61f 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -49,8 +49,8 @@ %endif Name: %{vdsm_name} -Version: 4.14.1 -Release: 4%{?dist}%{?extra_release} +Version: 4.14.2 +Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -64,8 +64,6 @@ Url: http://www.ovirt.org/wiki/Vdsm # ./autogen.sh --system # make VERSION={version}-{vdsm_release} dist Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz -# ovirt-3.4 patches -Patch0: 0001-Adding-configure-sanlock-on-force.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -181,7 +179,6 @@ Requires: policycoreutils-python Requires: python-pthreading >= 0.1.2 Requires: qemu-kvm Requires: qemu-img -Requires: sanlock, sanlock-python Requires: selinux-policy-targeted %else Requires: python @@ -192,7 +189,7 @@ Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents Requires: kernel >= 2.6.32-279.9.1 -Requires: sanlock >= 2.3-4, sanlock-python +Requires: sanlock >= 2.8, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: policycoreutils >= 2.0.83-19.30 Requires: policycoreutils-python >= 2.0.83-19.30 @@ -221,7 +218,7 @@ Requires: initscripts >= 9.42.2-1 %endif Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 -Requires: sanlock >= 2.4-2, sanlock-python +Requires: sanlock >= 2.8, sanlock-python Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: ed @@ -607,9 +604,6 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -# ovirt-3.4 patches -%patch0 -p1 - %if 0%{?rhel} == 6 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %endif @@ -1448,6 +1442,9 @@ exit 0 %endif %changelog +* Mon Feb 10 2014 Douglas Schilling Landgraf - 4.14.2-0 +- vdsm 4.14.2-0 + * Thu Feb 06 2014 Yaniv Bronhaim Date: Sun, 9 Mar 2014 08:33:06 +0200 Subject: [PATCH 078/126] Tag 4.14.5 --- sources | 2 +- vdsm.spec | 383 +++--------------------------------------------------- 2 files changed, 22 insertions(+), 363 deletions(-) diff --git a/sources b/sources index 7136736..5da9493 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e09f800e3e503cb7c59830efa1f8ee97 vdsm-4.14.2.tar.gz +335c526a486037a5686aa61fafc21b49 vdsm-4.14.5.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 9e0f61f..6836515 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -10,19 +10,13 @@ %global snlk_group sanlock %global snlk_user sanlock -# Upstream git release -# % global vdsm_release gf2f6683 -# % global vdsm_relvtag .git%{vdsm_release} -# % global vdsm_relttag -%{vdsm_release} - # Fedora official build -%global fedora_koji_build 1 -%global with_hooks 1 +%global fedora_koji_build 0 # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 1} +%{!?enable_autotools:%define enable_autotools 0} # Required paths %if 0%{?fedora} >= 18 @@ -49,22 +43,14 @@ %endif Name: %{vdsm_name} -Version: 4.14.2 +Version: 4.14.5 Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/wiki/Vdsm -# The source for this package was pulled from upstream's vcs. -# Use the following commands to generate the tarball: -# git clone http://gerrit.ovirt.org/p/vdsm -# cd vdsm -# git reset --hard {vdsm_release} -# ./autogen.sh --system -# make VERSION={version}-{vdsm_release} dist -Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz - +Source0: %{vdsm_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc @@ -628,8 +614,8 @@ make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build -install -dDm 0755 %{buildroot}/var/log/vdsm -touch %{buildroot}/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +install -dDm 0755 %{buildroot}/usr/local/var/log/vdsm +touch %{buildroot}/usr/local/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} # Install the respawn utility install -Dm 0755 init/sysvinit/respawn \ @@ -688,9 +674,7 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %endif %check -# Disabling the nose tests until they'll all succeed in koji. -# make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 -# make check NOSE_EXCLUDE=".*" +make check %clean rm -rf %{buildroot} @@ -712,10 +696,10 @@ export LC_ALL=C # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included -touch /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} -chmod 0644 /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /var/log/vdsm/{metadata.log,mom.log,vdsm.log} -chown root:root /var/log/vdsm/supervdsm.log +touch /usr/local/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +chmod 0644 /usr/local/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /usr/local/var/log/vdsm/{metadata.log,mom.log,vdsm.log} +chown root:root /usr/local/var/log/vdsm/supervdsm.log # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. # So Remove them if it is played with /etc/sysctl.conf. @@ -741,8 +725,8 @@ fi if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi +/bin/systemctl daemon-reload >/dev/null 2>&1 || : exit 0 %endif @@ -907,10 +891,10 @@ exit 0 %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/metadata.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log -%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/metadata.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/mom.log +%ghost %config %attr(0644, root, root) /usr/local/var/log/vdsm/supervdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/vdsm.log %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} @@ -1442,337 +1426,12 @@ exit 0 %endif %changelog -* Mon Feb 10 2014 Douglas Schilling Landgraf - 4.14.2-0 -- vdsm 4.14.2-0 +* Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 +- Removing vdsm-python-cpopen from the spec +- Adding dependency on formal cpopen package -* Thu Feb 06 2014 Yaniv Bronhaim - 4.14.1-3 -- execCmd with sudo=root raise require tty fault when running as root -- sysvinit: Ensure that iscsid is started (BZ#1056948) -- Add missing libnl buildrequires dependency -- vdsm.spec: vdsm-python requires python-cpopen -- netconfig: set ETHTOOL_OPTS when a NIC goes up (BZ#1059680) -- sos: plugin should ignore /var/run/vdsm/storage -- vdsm.spec: vdsm should own vdsm.log (BZ#1055153) -- vdsm.spec: own metadata supervdsm mom logs (BZ#1055153) -- spec: do not remove vdsm logs when pkg removed (BZ#1055153) -- gluster: add host uuid in volume status -- gluster: interpret and use correct xml elements -- gluster: adopt xml changes of rebalance and remove-brick status -- vm: do not pause during refreshVolume (BZ#889097) -- spec: vdsm pkg for EL distro must include pkla (BZ#1060524) - -* Tue Jan 21 2014 Douglas Schilling Landgraf - 4.14.1-2 -- vdsm.spec: Add BuildRequires to python-argparse - -* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-1 -- Rebuild 4.14.1 from ovirt-3.4 - -* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-0 -- Build 4.14.1-0 - -* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3-1 -- Reverting iscsi changes that caused a regression by importing -zombieReaper package which was not backported - -* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3 -- spec: bumping iscsi-initiator-utils requirement -- removing redundant check-local from storage makefile -- Adding exception handling in external threads -- fix bridgeless broken network deletion -- gluster api fix -- fix log issues - Changed BrokerLink log level to prevent log flooding -- sampling: make HostStatsThread a daemon thread -- bugfix - BindingXMLRpc - Return lastClientIface for current connection -- vm: Bring back missing before_device_migrate_source hook call -- update NIC: having no custom properies is valid -- prepareVolumePath payload misdetection fix -- fileSD: Fix image deletion on gluster domain -- vm: Update domains list for disks attached to vm after LSM -- prepareVolumePath correct path handling for cdrom - -* Wed Dec 11 2013 Yaniv Bronhaim - 4.13.2-1 -- fix cpopen obsolete loop -- fix threadPool refs -- mom policy fixes -- restorecon hack in spec file -- domainMonitor fixed last check flow - -* Tue Dec 10 2013 Yaniv Bronhaim - 4.13.2-0 -- Bumping minor version due to recent merge of ovirt-3.3 patches - -* Thu Nov 28 2013 Yaniv Bronhaim - 4.13.0-14 -- Adding update patches from branch ovirt-3.3 -- Declaring ovirt-3.3.2 patchsets scope in spec which declares all the merged -new patches - -* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 -- update from branch ovirt-3.3 which include: - upgrade-fix-v3ResetMetaVolSize-argument - lvm-Do-not-use-udev-cache-for-obtaining-device-list - Fix-ballooning-rules-for-computing-the-minimum-avail - Avoid-M2Crypto-races - spec-declare-we-provide-an-existing-python-cpopen - configuring-selinux-allowing-qemu-kvm-to-generate-co - -* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-10 -- Fix requires on post for hostname. - -* Tue Nov 05 2013 Douglas Schilling Landgraf - 4.13.0-9 -- Build 4.13.0-9 from branch ovirt-3.3 - -* Wed Oct 30 2013 Cole Robinson - 4.12.1-5 -- Fix broken hostname dep on rawhide - -* Thu Oct 10 2013 Douglas Schilling Landgraf 4.12.1-4 -- remoteFileHandler: Add create exclusive option for truncateFile (BZ#979193) -- oop: improve safety for truncateFile - -* Tue Oct 08 2013 Douglas Schilling Landgraf 4.12.1-3 -- vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks (BZ#1007980) -- Require libvirt that allows vmUpdateDevice (BZ#1001001) -- imageSharing: return proper size in httpGetSize -- vdsmd.init: Add service-is-managed in shutdown_conflicting_srv (BZ#1006842) - -* Tue Sep 10 2013 Federico Simoncelli 4.12.1-2 -- systemd init: no need to stop conflicting services (BZ#999664) - -* Tue Aug 27 2013 Federico Simoncelli 4.12.1-1 -- update to 4.12.1 - -* Thu Aug 22 2013 Federico Simoncelli 4.12.0-2 -- Fix GlusterFS RPM dep to support GlusterFS SD (BZ#988299) - -* Tue Aug 13 2013 Federico Simoncelli 4.12.0-1 -- update to 4.12.0 final release -- mom: Require latest mom -- Mark ksmtuned as conflicting service in the init file -- spec: vdsm-hook-sriov on el6 should not require -- Crash fix for migrations that involve devices with no aliases (BZ#988065) -- vdsm: Always retrieve alias for Balloon and Console (BZ#988065) -- vdsm: Fix regression introduced by refactoring (BZ#985735) -- VDSM now writes its version number in VDSM-generated -- Bump requires version of selinux-policy-targeted -- vdsm_reg: fix ovirt_node without default bridge (BZ#988990) -- Source Route script now checks that the DHCP response (BZ#994600) -- Management network is now kept in main routing table (BZ#984028) -- Only remove dhcp source routing if the removal reason (BZ#995142) -- image: use successor volume size when merging - -* Sun Aug 04 2013 Fedora Release Engineering - 4.12.0-0.2.rc3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 23 2013 Federico Simoncelli 4.12.0-0.1.rc3 -- update to vdsm-4.12.0-rc3 - -* Wed Jul 10 2013 Douglas Schilling Landgraf 4.10.3-18 -- vdsm.spec: update python-pthreading -- service: make iscsid a systemd dependency - -* Tue Jun 4 2013 Douglas Schilling Landgraf 4.10.3-17 -- Makefile.am: ignore false positive pyflakes lvm.py -- Deactivate libvirtVM.Drives() -- vdsm: fix Vm cleanup routine -- Support teardownVolumePath(None) - -* Tue Apr 23 2013 Federico Simoncelli 4.10.3-16 -- Don't user sudo in fuser -- svdsm: fix fuser import in supervdsmServer -- Removing vdsm configuration when removing vdsm service -- Seperating supervdsm log to supervdsm.log file -- vdsm.spec: Adding with_systemd macro -- spec: use the fedora systemd macros -- spec: enable gluster upstream and on fedora 19 - -* Tue Apr 9 2013 Federico Simoncelli 4.10.3-15 -- fix the patches backported to ovirt-3.2 -- resync the fedora spec file with the upstream one - -* Mon Apr 8 2013 Federico Simoncelli 4.10.3-14 -- fix storage.fuser -- Bump up libvirt version to fix network linking. - -* Wed Apr 3 2013 Douglas Schilling Landgraf 4.10.3-13 -- Temporarily deactivate Gluster sub-package. - -* Tue Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 -- Applying direct to spec the fence-agents changes and removing the patch. - -* Mon Mar 25 2013 Douglas Schilling Landgraf 4.10.3-11 -- adapt vdsm.spec to new fence-agents package name. - -* Thu Mar 14 2013 Federico Simoncelli 4.10.3-10 -- gluster: Handling Attribute error in Python 2.6 -- bootstrap: remove glusterfs packages -- gluster: set glusterfs dependency version -- Do not delete the template when zeroing a dependant - -* Wed Feb 27 2013 Federico Simoncelli 4.10.3-9 -- packaging: add load_needed_modules.py.in -- tool: _enable_bond_dev: reopen bonding_masters per bond - -* Tue Feb 19 2013 Federico Simoncelli 4.10.3-8 -- configNet: allow delete/update of devices with no ifcfg (#906383) -- Requires policycoreutils-2.1.13-55 to avoid another -- After fail to connect to supervdsm more than 3 time - -* Thu Feb 14 2013 Federico Simoncelli 4.10.3-7 -- Fedora 18: require a newer udev (applied properly to the fedora specfile) - -* Wed Jan 30 2013 Federico Simoncelli 4.10.3-6 -- Explicitly shutdown m2crypto socket -- spec: require policycoreutils and skip sebool errors -- spec: requires selinux-policy to avoid selinux failure -- vdsmd.service: require either ntpd or chronyd -- isRunning didn't check local variable before reading -- udev: Race fix- load and trigger dev rule (#891300) -- Change scsi_id command path to be configured at runtime (#886087) -- upgrade: force upgrade to v2 before upgrading to v3 (#893184) -- misc: rename safelease to clusterlock -- domain: select the cluster lock using makeClusterLock -- clusterlock: add the local locking implementation (#877715) -- upgrade: catch MetaDataKeyNotFoundError when preparing -- vdsm.spec: Require openssl (#905728) -- Fedora 18: require a newer udev -- fix sloppy backport of safelease rename -- removing the use of zombie reaper from supervdsm - -* Fri Jan 18 2013 Douglas Schilling Landgraf 4.10.3-5 -- Searching for both py and pyc file to start super vdsm -- adding getHardwareInfo API to vdsm - -* Tue Jan 15 2013 Douglas Schilling Landgraf 4.10.3-4 -- python-ordereddict only for rhel more then 7 -- dont require python ordereddict on fedora -- BuildRequires python-pthreading - -* Wed Jan 02 2013 Federico Simoncelli 4.10.3-3 -- caps.py: osversion() validate OVIRT -- restarting libvirtd didn't work over allinone setup -- Integrate Smartcard support - -* Thu Dec 27 2012 Federico Simoncelli 4.10.3-2 -- api: Report CPU thread info in getVdsCapabilities -- schema: Missing comment for new VmDeviceType -- schema: Fix schema for VM.updateDevice - -* Wed Dec 12 2012 Federico Simoncelli 4.10.3-1 -- vdsm-4.10.3 - -* Mon Nov 5 2012 Douglas Schilling Landgraf 4.10.1-100.gf2f6683 -- vdsm-4.10.1-100-gf2f6683 - -* Wed Oct 31 2012 Douglas Schilling Landgraf 4.10.1-1 -- vdsm-4.10.1 -- merged vdsm.spec from f17 with last upstream vdsm.spec - -* Wed Oct 24 2012 Federico Simoncelli 4.10.0-12 -- configure selinux for sanlock on nfs - -* Sat Oct 20 2012 Peter Robinson 4.10.0-11 -- Merge F17 changes into F18+ and disable make check due to pep8 issues -- Add pyparted dependency - -* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10 -- BZ#845660 Use buffer size in multiplies of the recommended transfer size - -* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9 -- BZ#845660 Use the recommended alignment instead of using pagesize - -* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8 -- add the autotools support - -* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7 -- enable all the vdsm hooks - -* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6 -- BZ#842948: deployUtil - safely remove bridge - -* Tue Jul 17 2012 Federico Simoncelli 4.10.0-5 -- configNet: atomicBackup: remove new files upon restore -- configNet: clear up atomicBackup arg -- Remove redundant 'explicitBonding' parameter from setupNetworks -- BZ#837054 - Do not detach network from the bond during bond resize -- BZ#836954 - Allow to break bond and create a new network on its interface in single action. -- BZ#837443: remove bridge before add VDSM bridge -- BZ#837443: removeVlan() drop/remove interface -- configNetwork: fix NetInfo call -- BZ#837443: replace the netinfo import -- BZ#837443: removeBridge() drop/remove interface -- ovirt_functions: fix elif statement -- BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option passed -- BZ#832199: move selinux from init to spec -- bump libvirt version to fix readonly lease unsupported issue - -* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4 -- deployUtil: use os.uname instead of /bin/uname -- deployUtil: slightly saner kernel version comparison -- BZ#835784 - Allow to create a network on top of existing bond in additional - to create a new bond and network -- BZ#833119 - Allow to create VLANed network on top of existing bond -- BZ#833803 - Avoid bond breaking after network detach -- Handle bond properly if connectivity check fail. -- BZ#806555 having /etc/ovirt-node-* means it is a node - -* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3 -- BZ#832577: node can't be approved -- BZ#824298 fix typo in keyword argument exc_info - -* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2 -- deployUtil.yumFind: rename and simplify semantics -- drop deployUtil.yumSearch -- deployUtil.yumSearchVersion: compare versions sanely -- Iterates over delete candidates networks only once -- 'options' translation in setupNetworks is not relevant -- Minor optimization for delNetwork -- Don't ignore bridgeless networks in ifaceUsers -- Minor optimization for addNetwork -- Use already known iface in addNetwork -- Use proper MTU on bonding when add network -- Add bridge on top of VLAN if exists -- BZ#830485 - Add netConfigDirty bit to getVdsCaps report -- remove flag skipLibvirt -- BZ#826873 - Allow to change bond without network attached to it -- BZ#830486 - Allow to change network according the diffs from previous state -- BZ#826467 - Allow to remove bond and attach network to NIC -- Related to BZ#826873 - Allow to create bond without network - -* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1 -- vdsm-4.10.0 - -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471 -- BZ#822158 Report version-release in a short format - -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471 -- vdsm-4.9.6-ge952471 - -* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249 -- vdsm-4.9.6-g1b07249 - -* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5 -- vdsm-4.9.4-0.gb3642e5 - -* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0 -- vdsm-4.9.3.2 -- Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." - -* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0 -- vdsm-4.9.3.1 - -* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929 -- vdsm-4.9.2-g1d7b929 - -* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d -- vdsm-4.9.2-g951b41d - -* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e -- add the revision control comments to the specfile - -* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c -- require iscsi-initiator-utils >= 6.2.0.872-14 bz442980 -- fix the rpmlint errors +* Sun Apr 07 2013 Yaniv Bronhaim - 4.9.0-1 +- Adding cpopen package * Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 - Initial upstream release From e4fea062a973c644b788c82e7d2906cbe2e54e06 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sun, 9 Mar 2014 08:35:13 +0200 Subject: [PATCH 079/126] Updating changelog --- vdsm.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vdsm.spec b/vdsm.spec index 6836515..ffca1c9 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1426,6 +1426,11 @@ exit 0 %endif %changelog +* Sun Mar 09 2014 Yaniv Bronhaim - 4.14.5 +- Adding missing 4.14.4 patches to ovirt-3.4 build +- Adding urgent fix to http-1.1 - xmlrpc: [Fix] Use correct +base class for parsing reques + * Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 - Removing vdsm-python-cpopen from the spec - Adding dependency on formal cpopen package From 8ed99246eb23d3963eb56d92030f9a87e9029dbb Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sun, 9 Mar 2014 08:55:11 +0200 Subject: [PATCH 080/126] Build for vdsm 4.14.5 --- vdsm.spec | 389 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 365 insertions(+), 24 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index ffca1c9..444b458 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -10,13 +10,19 @@ %global snlk_group sanlock %global snlk_user sanlock +# Upstream git release +# % global vdsm_release gf2f6683 +# % global vdsm_relvtag .git%{vdsm_release} +# % global vdsm_relttag -%{vdsm_release} + # Fedora official build -%global fedora_koji_build 0 +%global fedora_koji_build 1 +%global with_hooks 1 # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 0} +%{!?enable_autotools:%define enable_autotools 1} # Required paths %if 0%{?fedora} >= 18 @@ -50,7 +56,15 @@ Summary: Virtual Desktop Server Manager Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/wiki/Vdsm -Source0: %{vdsm_name}-%{version}.tar.gz +# The source for this package was pulled from upstream's vcs. +# Use the following commands to generate the tarball: +# git clone http://gerrit.ovirt.org/p/vdsm +# cd vdsm +# git reset --hard {vdsm_release} +# ./autogen.sh --system +# make VERSION={version}-{vdsm_release} dist +Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc @@ -614,8 +628,8 @@ make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build -install -dDm 0755 %{buildroot}/usr/local/var/log/vdsm -touch %{buildroot}/usr/local/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +install -dDm 0755 %{buildroot}/var/log/vdsm +touch %{buildroot}/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} # Install the respawn utility install -Dm 0755 init/sysvinit/respawn \ @@ -674,7 +688,9 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %endif %check -make check +# Disabling the nose tests until they'll all succeed in koji. +# make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 +# make check NOSE_EXCLUDE=".*" %clean rm -rf %{buildroot} @@ -696,10 +712,10 @@ export LC_ALL=C # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included -touch /usr/local/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} -chmod 0644 /usr/local/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /usr/local/var/log/vdsm/{metadata.log,mom.log,vdsm.log} -chown root:root /usr/local/var/log/vdsm/supervdsm.log +touch /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +chmod 0644 /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /var/log/vdsm/{metadata.log,mom.log,vdsm.log} +chown root:root /var/log/vdsm/supervdsm.log # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. # So Remove them if it is played with /etc/sysctl.conf. @@ -725,8 +741,8 @@ fi if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : + /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi -/bin/systemctl daemon-reload >/dev/null 2>&1 || : exit 0 %endif @@ -891,10 +907,10 @@ exit 0 %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/metadata.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/mom.log -%ghost %config %attr(0644, root, root) /usr/local/var/log/vdsm/supervdsm.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/vdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/metadata.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log +%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} @@ -1426,17 +1442,342 @@ exit 0 %endif %changelog -* Sun Mar 09 2014 Yaniv Bronhaim - 4.14.5 -- Adding missing 4.14.4 patches to ovirt-3.4 build -- Adding urgent fix to http-1.1 - xmlrpc: [Fix] Use correct -base class for parsing reques +* Sun Mar 09 2014 Yaniv Bronhaim - 4.14.5-0 +- Adding patches until 4.14.5 tag +- Urgent fix for 4.14.4 that included http-1.1 support for python 2.6 - +xmlrpc: [Fix] Use correct base class for parsing request -* Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 -- Removing vdsm-python-cpopen from the spec -- Adding dependency on formal cpopen package +* Mon Feb 10 2014 Douglas Schilling Landgraf - 4.14.2-0 +- vdsm 4.14.2-0 -* Sun Apr 07 2013 Yaniv Bronhaim - 4.9.0-1 -- Adding cpopen package +* Thu Feb 06 2014 Yaniv Bronhaim - 4.14.1-3 +- execCmd with sudo=root raise require tty fault when running as root +- sysvinit: Ensure that iscsid is started (BZ#1056948) +- Add missing libnl buildrequires dependency +- vdsm.spec: vdsm-python requires python-cpopen +- netconfig: set ETHTOOL_OPTS when a NIC goes up (BZ#1059680) +- sos: plugin should ignore /var/run/vdsm/storage +- vdsm.spec: vdsm should own vdsm.log (BZ#1055153) +- vdsm.spec: own metadata supervdsm mom logs (BZ#1055153) +- spec: do not remove vdsm logs when pkg removed (BZ#1055153) +- gluster: add host uuid in volume status +- gluster: interpret and use correct xml elements +- gluster: adopt xml changes of rebalance and remove-brick status +- vm: do not pause during refreshVolume (BZ#889097) +- spec: vdsm pkg for EL distro must include pkla (BZ#1060524) + +* Tue Jan 21 2014 Douglas Schilling Landgraf - 4.14.1-2 +- vdsm.spec: Add BuildRequires to python-argparse + +* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-1 +- Rebuild 4.14.1 from ovirt-3.4 + +* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-0 +- Build 4.14.1-0 + +* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3-1 +- Reverting iscsi changes that caused a regression by importing +zombieReaper package which was not backported + +* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3 +- spec: bumping iscsi-initiator-utils requirement +- removing redundant check-local from storage makefile +- Adding exception handling in external threads +- fix bridgeless broken network deletion +- gluster api fix +- fix log issues - Changed BrokerLink log level to prevent log flooding +- sampling: make HostStatsThread a daemon thread +- bugfix - BindingXMLRpc - Return lastClientIface for current connection +- vm: Bring back missing before_device_migrate_source hook call +- update NIC: having no custom properies is valid +- prepareVolumePath payload misdetection fix +- fileSD: Fix image deletion on gluster domain +- vm: Update domains list for disks attached to vm after LSM +- prepareVolumePath correct path handling for cdrom + +* Wed Dec 11 2013 Yaniv Bronhaim - 4.13.2-1 +- fix cpopen obsolete loop +- fix threadPool refs +- mom policy fixes +- restorecon hack in spec file +- domainMonitor fixed last check flow + +* Tue Dec 10 2013 Yaniv Bronhaim - 4.13.2-0 +- Bumping minor version due to recent merge of ovirt-3.3 patches + +* Thu Nov 28 2013 Yaniv Bronhaim - 4.13.0-14 +- Adding update patches from branch ovirt-3.3 +- Declaring ovirt-3.3.2 patchsets scope in spec which declares all the merged +new patches + +* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 +- update from branch ovirt-3.3 which include: + upgrade-fix-v3ResetMetaVolSize-argument + lvm-Do-not-use-udev-cache-for-obtaining-device-list + Fix-ballooning-rules-for-computing-the-minimum-avail + Avoid-M2Crypto-races + spec-declare-we-provide-an-existing-python-cpopen + configuring-selinux-allowing-qemu-kvm-to-generate-co + +* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-10 +- Fix requires on post for hostname. + +* Tue Nov 05 2013 Douglas Schilling Landgraf - 4.13.0-9 +- Build 4.13.0-9 from branch ovirt-3.3 + +* Wed Oct 30 2013 Cole Robinson - 4.12.1-5 +- Fix broken hostname dep on rawhide + +* Thu Oct 10 2013 Douglas Schilling Landgraf 4.12.1-4 +- remoteFileHandler: Add create exclusive option for truncateFile (BZ#979193) +- oop: improve safety for truncateFile + +* Tue Oct 08 2013 Douglas Schilling Landgraf 4.12.1-3 +- vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks (BZ#1007980) +- Require libvirt that allows vmUpdateDevice (BZ#1001001) +- imageSharing: return proper size in httpGetSize +- vdsmd.init: Add service-is-managed in shutdown_conflicting_srv (BZ#1006842) + +* Tue Sep 10 2013 Federico Simoncelli 4.12.1-2 +- systemd init: no need to stop conflicting services (BZ#999664) + +* Tue Aug 27 2013 Federico Simoncelli 4.12.1-1 +- update to 4.12.1 + +* Thu Aug 22 2013 Federico Simoncelli 4.12.0-2 +- Fix GlusterFS RPM dep to support GlusterFS SD (BZ#988299) + +* Tue Aug 13 2013 Federico Simoncelli 4.12.0-1 +- update to 4.12.0 final release +- mom: Require latest mom +- Mark ksmtuned as conflicting service in the init file +- spec: vdsm-hook-sriov on el6 should not require +- Crash fix for migrations that involve devices with no aliases (BZ#988065) +- vdsm: Always retrieve alias for Balloon and Console (BZ#988065) +- vdsm: Fix regression introduced by refactoring (BZ#985735) +- VDSM now writes its version number in VDSM-generated +- Bump requires version of selinux-policy-targeted +- vdsm_reg: fix ovirt_node without default bridge (BZ#988990) +- Source Route script now checks that the DHCP response (BZ#994600) +- Management network is now kept in main routing table (BZ#984028) +- Only remove dhcp source routing if the removal reason (BZ#995142) +- image: use successor volume size when merging + +* Sun Aug 04 2013 Fedora Release Engineering - 4.12.0-0.2.rc3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 23 2013 Federico Simoncelli 4.12.0-0.1.rc3 +- update to vdsm-4.12.0-rc3 + +* Wed Jul 10 2013 Douglas Schilling Landgraf 4.10.3-18 +- vdsm.spec: update python-pthreading +- service: make iscsid a systemd dependency + +* Tue Jun 4 2013 Douglas Schilling Landgraf 4.10.3-17 +- Makefile.am: ignore false positive pyflakes lvm.py +- Deactivate libvirtVM.Drives() +- vdsm: fix Vm cleanup routine +- Support teardownVolumePath(None) + +* Tue Apr 23 2013 Federico Simoncelli 4.10.3-16 +- Don't user sudo in fuser +- svdsm: fix fuser import in supervdsmServer +- Removing vdsm configuration when removing vdsm service +- Seperating supervdsm log to supervdsm.log file +- vdsm.spec: Adding with_systemd macro +- spec: use the fedora systemd macros +- spec: enable gluster upstream and on fedora 19 + +* Tue Apr 9 2013 Federico Simoncelli 4.10.3-15 +- fix the patches backported to ovirt-3.2 +- resync the fedora spec file with the upstream one + +* Mon Apr 8 2013 Federico Simoncelli 4.10.3-14 +- fix storage.fuser +- Bump up libvirt version to fix network linking. + +* Wed Apr 3 2013 Douglas Schilling Landgraf 4.10.3-13 +- Temporarily deactivate Gluster sub-package. + +* Tue Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 +- Applying direct to spec the fence-agents changes and removing the patch. + +* Mon Mar 25 2013 Douglas Schilling Landgraf 4.10.3-11 +- adapt vdsm.spec to new fence-agents package name. + +* Thu Mar 14 2013 Federico Simoncelli 4.10.3-10 +- gluster: Handling Attribute error in Python 2.6 +- bootstrap: remove glusterfs packages +- gluster: set glusterfs dependency version +- Do not delete the template when zeroing a dependant + +* Wed Feb 27 2013 Federico Simoncelli 4.10.3-9 +- packaging: add load_needed_modules.py.in +- tool: _enable_bond_dev: reopen bonding_masters per bond + +* Tue Feb 19 2013 Federico Simoncelli 4.10.3-8 +- configNet: allow delete/update of devices with no ifcfg (#906383) +- Requires policycoreutils-2.1.13-55 to avoid another +- After fail to connect to supervdsm more than 3 time + +* Thu Feb 14 2013 Federico Simoncelli 4.10.3-7 +- Fedora 18: require a newer udev (applied properly to the fedora specfile) + +* Wed Jan 30 2013 Federico Simoncelli 4.10.3-6 +- Explicitly shutdown m2crypto socket +- spec: require policycoreutils and skip sebool errors +- spec: requires selinux-policy to avoid selinux failure +- vdsmd.service: require either ntpd or chronyd +- isRunning didn't check local variable before reading +- udev: Race fix- load and trigger dev rule (#891300) +- Change scsi_id command path to be configured at runtime (#886087) +- upgrade: force upgrade to v2 before upgrading to v3 (#893184) +- misc: rename safelease to clusterlock +- domain: select the cluster lock using makeClusterLock +- clusterlock: add the local locking implementation (#877715) +- upgrade: catch MetaDataKeyNotFoundError when preparing +- vdsm.spec: Require openssl (#905728) +- Fedora 18: require a newer udev +- fix sloppy backport of safelease rename +- removing the use of zombie reaper from supervdsm + +* Fri Jan 18 2013 Douglas Schilling Landgraf 4.10.3-5 +- Searching for both py and pyc file to start super vdsm +- adding getHardwareInfo API to vdsm + +* Tue Jan 15 2013 Douglas Schilling Landgraf 4.10.3-4 +- python-ordereddict only for rhel more then 7 +- dont require python ordereddict on fedora +- BuildRequires python-pthreading + +* Wed Jan 02 2013 Federico Simoncelli 4.10.3-3 +- caps.py: osversion() validate OVIRT +- restarting libvirtd didn't work over allinone setup +- Integrate Smartcard support + +* Thu Dec 27 2012 Federico Simoncelli 4.10.3-2 +- api: Report CPU thread info in getVdsCapabilities +- schema: Missing comment for new VmDeviceType +- schema: Fix schema for VM.updateDevice + +* Wed Dec 12 2012 Federico Simoncelli 4.10.3-1 +- vdsm-4.10.3 + +* Mon Nov 5 2012 Douglas Schilling Landgraf 4.10.1-100.gf2f6683 +- vdsm-4.10.1-100-gf2f6683 + +* Wed Oct 31 2012 Douglas Schilling Landgraf 4.10.1-1 +- vdsm-4.10.1 +- merged vdsm.spec from f17 with last upstream vdsm.spec + +* Wed Oct 24 2012 Federico Simoncelli 4.10.0-12 +- configure selinux for sanlock on nfs + +* Sat Oct 20 2012 Peter Robinson 4.10.0-11 +- Merge F17 changes into F18+ and disable make check due to pep8 issues +- Add pyparted dependency + +* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10 +- BZ#845660 Use buffer size in multiplies of the recommended transfer size + +* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9 +- BZ#845660 Use the recommended alignment instead of using pagesize + +* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8 +- add the autotools support + +* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7 +- enable all the vdsm hooks + +* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6 +- BZ#842948: deployUtil - safely remove bridge + +* Tue Jul 17 2012 Federico Simoncelli 4.10.0-5 +- configNet: atomicBackup: remove new files upon restore +- configNet: clear up atomicBackup arg +- Remove redundant 'explicitBonding' parameter from setupNetworks +- BZ#837054 - Do not detach network from the bond during bond resize +- BZ#836954 - Allow to break bond and create a new network on its interface in single action. +- BZ#837443: remove bridge before add VDSM bridge +- BZ#837443: removeVlan() drop/remove interface +- configNetwork: fix NetInfo call +- BZ#837443: replace the netinfo import +- BZ#837443: removeBridge() drop/remove interface +- ovirt_functions: fix elif statement +- BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option passed +- BZ#832199: move selinux from init to spec +- bump libvirt version to fix readonly lease unsupported issue + +* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4 +- deployUtil: use os.uname instead of /bin/uname +- deployUtil: slightly saner kernel version comparison +- BZ#835784 - Allow to create a network on top of existing bond in additional + to create a new bond and network +- BZ#833119 - Allow to create VLANed network on top of existing bond +- BZ#833803 - Avoid bond breaking after network detach +- Handle bond properly if connectivity check fail. +- BZ#806555 having /etc/ovirt-node-* means it is a node + +* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3 +- BZ#832577: node can't be approved +- BZ#824298 fix typo in keyword argument exc_info + +* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2 +- deployUtil.yumFind: rename and simplify semantics +- drop deployUtil.yumSearch +- deployUtil.yumSearchVersion: compare versions sanely +- Iterates over delete candidates networks only once +- 'options' translation in setupNetworks is not relevant +- Minor optimization for delNetwork +- Don't ignore bridgeless networks in ifaceUsers +- Minor optimization for addNetwork +- Use already known iface in addNetwork +- Use proper MTU on bonding when add network +- Add bridge on top of VLAN if exists +- BZ#830485 - Add netConfigDirty bit to getVdsCaps report +- remove flag skipLibvirt +- BZ#826873 - Allow to change bond without network attached to it +- BZ#830486 - Allow to change network according the diffs from previous state +- BZ#826467 - Allow to remove bond and attach network to NIC +- Related to BZ#826873 - Allow to create bond without network + +* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1 +- vdsm-4.10.0 + +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471 +- BZ#822158 Report version-release in a short format + +* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471 +- vdsm-4.9.6-ge952471 + +* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249 +- vdsm-4.9.6-g1b07249 + +* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5 +- vdsm-4.9.4-0.gb3642e5 + +* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0 +- vdsm-4.9.3.2 +- Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." + +* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0 +- vdsm-4.9.3.1 + +* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929 +- vdsm-4.9.2-g1d7b929 + +* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d +- vdsm-4.9.2-g951b41d + +* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e +- add the revision control comments to the specfile + +* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c +- require iscsi-initiator-utils >= 6.2.0.872-14 bz442980 +- fix the rpmlint errors * Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 - Initial upstream release From 9c52fef553f884e0bb2b838b9ca67916798c573c Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Tue, 25 Mar 2014 22:47:57 -0400 Subject: [PATCH 081/126] vdsm tag 4.14.6-0 --- sources | 2 +- vdsm.spec | 36 ++++++++++++++++-------------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/sources b/sources index 5da9493..6d70f7b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -335c526a486037a5686aa61fafc21b49 vdsm-4.14.5.tar.gz +eba94d3b7cc56f5226350e1995ee5ad5 vdsm-4.14.6.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 444b458..141ab1f 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -49,7 +49,7 @@ %endif Name: %{vdsm_name} -Version: 4.14.5 +Version: 4.14.6 Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -166,6 +166,8 @@ Requires: iscsi-initiator-utils >= 6.2.0.872-15 Requires: iscsi-initiator-utils >= 6.2.0.873-3 %endif +Requires: sanlock >= 2.8, sanlock-python + %if 0%{?rhel} Requires: python-ethtool >= 0.6-3 %if 0%{?rhel} >= 7 @@ -189,7 +191,6 @@ Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents Requires: kernel >= 2.6.32-279.9.1 -Requires: sanlock >= 2.8, sanlock-python Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: policycoreutils >= 2.0.83-19.30 Requires: policycoreutils-python >= 2.0.83-19.30 @@ -218,7 +219,6 @@ Requires: initscripts >= 9.42.2-1 %endif Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 -Requires: sanlock >= 2.8, sanlock-python Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: ed @@ -363,7 +363,7 @@ Shared libraries between the various VDSM packages. %package debug-plugin Summary: VDSM Debug Plugin -Requires: vdsm +Requires: %{name} Requires: %{name}-xmlrpc = %{version}-%{release} BuildArch: noarch @@ -372,7 +372,7 @@ Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. %package tests Summary: VDSM Test Suite -Requires: vdsm = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: dracut Requires: python-nose BuildArch: noarch @@ -383,7 +383,7 @@ A test suite for verifying the functionality of a running vdsm instance %package hook-checkimages Summary: Qcow2 disk image format check hook for VDSM BuildArch: noarch -Requires: vdsm +Requires: %{name} %description hook-checkimages VDSM hook used to perform consistency check on a qcow2 format disk image @@ -402,7 +402,7 @@ VDSM hook to use vhostmd per VM according to Virtualization Manager requests. %package hook-faqemu Summary: Fake qemu process for VDSM quality assurance BuildArch: noarch -Requires: vdsm +Requires: %{name} %description hook-faqemu VDSM hook used for testing VDSM with multiple fake virtual machines without @@ -430,7 +430,7 @@ specific vnics. %package hook-extnet Summary: Force a vNIC to connect to a specific libvirt network BuildArch: noarch -Requires: vdsm = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description hook-extnet VDSM hook which allows to connect a vNIC to a libvirt network that is managed @@ -521,7 +521,7 @@ all network traffic. %package hook-qemucmdline Summary: QEMU cmdline hook for VDSM BuildArch: noarch -Requires: vdsm +Requires: %{name} %description hook-qemucmdline Provides support for injecting QEMU cmdline via VDSM hook. @@ -575,7 +575,7 @@ Hook for vmfex. %package hook-vmfex-dev Summary: VM-FEX vNIC support for VDSM BuildArch: noarch -Requires: vdsm = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Conflicts: hook-vmfex %description hook-vmfex-dev @@ -672,12 +672,6 @@ install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ install -dDm 1777 %{buildroot}%{_localstatedir}/log/core %endif -%if !0%{?rhel} -# Install the configuration sample -install -Dm 0644 lib/vdsm/vdsm.conf.sample \ - %{buildroot}%{_sysconfdir}/%{vdsm_name}/vdsm.conf -%endif - # Install the polkit for libvirt %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ @@ -705,6 +699,7 @@ export LC_ALL=C /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} %post +%{_bindir}/vdsm-tool configure --module sanlock --force %{_bindir}/vdsm-tool sebool-config || : # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd @@ -741,8 +736,8 @@ fi if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi +/bin/systemctl daemon-reload >/dev/null 2>&1 || : exit 0 %endif @@ -946,6 +941,7 @@ exit 0 %{_datadir}/%{vdsm_name}/vdsm-store-net-config %{_datadir}/%{vdsm_name}/vm.py* +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/upgrade.logger.conf @@ -1134,9 +1130,6 @@ exit 0 %files python %defattr(-, root, root, -) %{_bindir}/vdsm-tool -%if !0%{?rhel} -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf -%endif %dir %{python_sitearch}/%{vdsm_name} %dir %{python_sitearch}/%{vdsm_name}/tool %{python_sitearch}/%{vdsm_name}/__init__.py* @@ -1442,6 +1435,9 @@ exit 0 %endif %changelog +* Tue Mar 25 2014 Douglas Schilling Landgraf - 4.14.6-0 +- vdsm tag 4.14.6-0 + * Sun Mar 09 2014 Yaniv Bronhaim - 4.14.5-0 - Adding patches until 4.14.5 tag - Urgent fix for 4.14.4 that included http-1.1 support for python 2.6 - From abcc2f188edef05f1e4c43c85293d25a02f79a8b Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 24 Apr 2014 01:54:58 -0400 Subject: [PATCH 082/126] vdsm 4.14.7-0 --- sources | 2 +- vdsm.spec | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 6d70f7b..04a02b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eba94d3b7cc56f5226350e1995ee5ad5 vdsm-4.14.6.tar.gz +bb46837722540200a66dd86e9fb6eaad vdsm-4.14.7.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 141ab1f..98d0cbd 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -6,6 +6,7 @@ # Required users and groups %global vdsm_user vdsm %global vdsm_group kvm +%global qemu_user qemu %global qemu_group qemu %global snlk_group sanlock %global snlk_user sanlock @@ -15,6 +16,8 @@ # % global vdsm_relvtag .git%{vdsm_release} # % global vdsm_relttag -%{vdsm_release} +%global cdrom_group cdrom + # Fedora official build %global fedora_koji_build 1 %global with_hooks 1 @@ -49,7 +52,7 @@ %endif Name: %{vdsm_name} -Version: 4.14.6 +Version: 4.14.7 Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -148,7 +151,7 @@ Requires: libvirt-daemon-driver-nwfilter Requires: libvirt-daemon-driver-qemu %else %if 0%{?rhel} -Requires: libvirt >= 0.10.2-18.el6_4.15 +Requires: libvirt >= 0.10.2-29.el6_5.4 %else Requires: libvirt >= 1.0.2-1 %endif @@ -697,6 +700,7 @@ export LC_ALL=C /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} +/usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} %post %{_bindir}/vdsm-tool configure --module sanlock --force @@ -1435,6 +1439,9 @@ exit 0 %endif %changelog +* Thu Apr 24 2014 Douglas Schilling Landgraf - 4.14.7-0 +- vdsm tag 4.14.7-0 + * Tue Mar 25 2014 Douglas Schilling Landgraf - 4.14.6-0 - vdsm tag 4.14.6-0 From ed1a10e3c8e68587c8589972999c5d4935b6474b Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 7 May 2014 10:54:13 -0400 Subject: [PATCH 083/126] vdsm 4.14.8.1-0 --- sources | 2 +- vdsm.spec | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 04a02b8..4d3d185 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb46837722540200a66dd86e9fb6eaad vdsm-4.14.7.tar.gz +06930dfa60e27d3a418179b6edd40cd7 vdsm-4.14.8.1.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 98d0cbd..561b408 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -10,14 +10,13 @@ %global qemu_group qemu %global snlk_group sanlock %global snlk_user sanlock +%global cdrom_group cdrom # Upstream git release # % global vdsm_release gf2f6683 # % global vdsm_relvtag .git%{vdsm_release} # % global vdsm_relttag -%{vdsm_release} -%global cdrom_group cdrom - # Fedora official build %global fedora_koji_build 1 %global with_hooks 1 @@ -52,7 +51,7 @@ %endif Name: %{vdsm_name} -Version: 4.14.7 +Version: 4.14.8.1 Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager @@ -84,6 +83,7 @@ BuildRequires: python-ethtool BuildRequires: python-inotify BuildRequires: python-pthreading BuildRequires: python-cpopen >= 1.3 +BuildRequires: rpm-python BuildRequires: libnl BuildRequires: libselinux-python BuildRequires: libvirt-python @@ -97,7 +97,6 @@ BuildRequires: python-dmidecode BuildRequires: python-argparse BuildRequires: python-ordereddict %endif -BuildRequires: python-ethtool # Autotools BuildRequires %if 0%{?enable_autotools} @@ -1439,6 +1438,9 @@ exit 0 %endif %changelog +* Wed May 07 2014 Douglas Schilling Landgraf - 4.14.8.1-0 +- vdsm tag 4.14.8.1 + * Thu Apr 24 2014 Douglas Schilling Landgraf - 4.14.7-0 - vdsm tag 4.14.7-0 From 427b5e468e74697094e5329afa9196356f7b8981 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:30:39 -0500 Subject: [PATCH 084/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 561b408..dcf3cbb 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -52,7 +52,7 @@ Name: %{vdsm_name} Version: 4.14.8.1 -Release: 0%{?dist}%{?extra_release} +Release: 1%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1438,6 +1438,9 @@ exit 0 %endif %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 4.14.8.1-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed May 07 2014 Douglas Schilling Landgraf - 4.14.8.1-0 - vdsm tag 4.14.8.1 From bffb143da2059783f4e989752f686255322a6ecd Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Mon, 30 Jun 2014 20:57:12 -0400 Subject: [PATCH 085/126] vdsm-4.16.0-6.git5d3ed2d.fc20 --- sources | 2 +- vdsm.spec | 221 +++++++++++++++++++++++++++++++++--------------------- 2 files changed, 138 insertions(+), 85 deletions(-) diff --git a/sources b/sources index 4d3d185..b64362a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -06930dfa60e27d3a418179b6edd40cd7 vdsm-4.14.8.1.tar.gz +8c6163cbfeb369ebfbd6c4f3ba5b814f vdsm-4.16.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index dcf3cbb..af198e7 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -51,8 +51,8 @@ %endif Name: %{vdsm_name} -Version: 4.14.8.1 -Release: 1%{?dist}%{?extra_release} +Version: 4.16.0 +Release: 6.git5d3ed2d%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -83,6 +83,7 @@ BuildRequires: python-ethtool BuildRequires: python-inotify BuildRequires: python-pthreading BuildRequires: python-cpopen >= 1.3 +BuildRequires: python-ioprocess >= 0.5-1 BuildRequires: rpm-python BuildRequires: libnl BuildRequires: libselinux-python @@ -119,7 +120,6 @@ Requires: ethtool Requires: which Requires: sudo >= 1.7.3 Requires: logrotate -Requires: rsyslog Requires: xz Requires: ntp Requires: iproute @@ -127,6 +127,7 @@ Requires: python-netaddr Requires: python-inotify Requires: python-argparse Requires: python-cpopen >= 1.3 +Requires: python-ioprocess >= 0.5-1 Requires: python-ethtool >= 0.6-3 Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: rpm-python @@ -135,7 +136,9 @@ Requires: m2crypto Requires: libguestfs-tools-c Requires: libnl Requires: %{name}-xmlrpc = %{version}-%{release} -Requires: mom >= 0.3.2-3 +Requires: %{name}-jsonrpc = %{version}-%{release} +Requires: mom >= 0.4.1 +Requires: numactl %ifarch x86_64 Requires: python-dmidecode @@ -165,7 +168,7 @@ Requires: iscsi-initiator-utils Requires: iscsi-initiator-utils >= 6.2.0.872-15 %endif # rhel 7 %else # fedora -Requires: iscsi-initiator-utils >= 6.2.0.873-3 +Requires: iscsi-initiator-utils >= 6.2.0.873-21 %endif Requires: sanlock >= 2.8, sanlock-python @@ -198,48 +201,32 @@ Requires: policycoreutils >= 2.0.83-19.30 Requires: policycoreutils-python >= 2.0.83-19.30 Requires: python-pthreading Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13 -Requires: lvm2 >= 2.02.95-10.el6_3.2 +Requires: lvm2 >= 2.02.100-5 Requires: logrotate < 3.8.0 %endif %else -%if 0%{?fedora} >= 19 Requires: python-pthreading >= 0.1.2 Requires: fence-agents-all Requires: kernel >= 3.11.3-201 -%else -Requires: python-pthreading -Requires: fence-agents -Requires: kernel >= 3.6 -%endif # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 Requires: qemu-kvm >= 2:0.15.0-4 Requires: qemu-img >= 2:0.15.0-4 Requires: python-ethtool >= 0.8-1 -%if 0%{?fedora} >= 18 Requires: initscripts >= 9.42.2-1 -%endif Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: ed -Requires: lvm2 >= 2.02.95 - -%if 0%{?fedora} >= 18 -%if 0%{?fedora} >= 19 +Requires: lvm2 >= 2.02.98-15 Requires: selinux-policy-targeted >= 3.12.1-71 -%else -Requires: selinux-policy-targeted >= 3.11.1-103 -%endif # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is # disabled we now require the version 2.1.13-55 (or newer) of Fedora. Requires: policycoreutils >= 2.1.13-55 Requires: systemd >= 197-1.fc18.2 %endif -%endif - # GlusterFS client-side RPMs needed for Gluster SD %if 0%{?with_gluster} Requires: glusterfs >= 3.4.2 @@ -297,19 +284,12 @@ Requires: %{name}-python = %{version}-%{release} An XMLRPC interface for interacting with vdsmd. Primary control interface for ovirt-engine and vdsClient. -%package api -Summary: VDSM API definition -BuildArch: noarch - -%description api -Provides the VDSM API schema and documentation. - %package jsonrpc Summary: VDSM API Server BuildArch: noarch Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-api = %{version}-%{release} +Requires: %{name}-yajsonrpc = %{version}-%{release} %if 0%{?rhel} == 6 Requires: python-ordereddict %endif @@ -350,6 +330,7 @@ BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: m2crypto Requires: openssl +Conflicts: ovirt-node < 3.0.4 %description reg VDSM registration package. Used to register a Linux host to a Virtualization @@ -359,6 +340,8 @@ Manager. Summary: VDSM python libraries Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: python-cpopen >= 1.2.3-5 +Requires: m2crypto +Requires: python-ioprocess >= 0.5-1 %description python Shared libraries between the various VDSM packages. @@ -391,6 +374,15 @@ Requires: %{name} VDSM hook used to perform consistency check on a qcow2 format disk image using the QEMU disk image utility. +%package hook-ethtool-options +Summary: Allow setting custom ethtool options for vdsm controlled nics +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description hook-ethtool-options +VDSM hook used for applying custom network properties that define ethtool +options for vdsm network nics + %if 0%{?with_vhostmd} %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd @@ -420,6 +412,14 @@ BuildArch: noarch VDSM hook enable user to add storage LUN for VDSM without the sharing and storage handling of VDSM. +%package hook-macbind +Summary: Bind a vNIC to a Bridge +BuildArch: noarch +Requires: %{name} >= 4.14 + +%description hook-macbind +VDSM hooks which allow to bind a vNIC to a Bridge, managed or not by engine. + %package hook-macspoof Summary: Disables MAC spoofing filtering BuildArch: noarch @@ -438,6 +438,14 @@ Requires: %{name} = %{version}-%{release} VDSM hook which allows to connect a vNIC to a libvirt network that is managed outside of oVirt, such as an openvswitch network. +%package hook-fakevmstats +Summary: Generate random VM statistics +BuildArch: noarch +Requires: %{name} + +%description hook-fakevmstats +Hook intercepts VM's stats and randomizes various fields. + %package hook-fileinject Summary: Allow uploading file to VMs disk BuildArch: noarch @@ -566,6 +574,15 @@ BuildArch: noarch sr-iov hook enable to add virtual functions exposed by the device directly to a virtual machine. + +%package hook-spiceoptions +Summary: To configure spice options for vm +BuildArch: noarch + +%description hook-spiceoptions +This vdsm hook can be used to configure some of +the spice optimization attributes and values.. + %package hook-vmfex Summary: vmfex support for VDSM BuildArch: noarch @@ -631,7 +648,7 @@ make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build install -dDm 0755 %{buildroot}/var/log/vdsm -touch %{buildroot}/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} +touch %{buildroot}/var/log/vdsm/{mom.log,supervdsm.log,vdsm.log} # Install the respawn utility install -Dm 0755 init/sysvinit/respawn \ @@ -687,6 +704,7 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ # Disabling the nose tests until they'll all succeed in koji. # make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 # make check NOSE_EXCLUDE=".*" +#make check %clean rm -rf %{buildroot} @@ -710,9 +728,9 @@ export LC_ALL=C # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included -touch /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} -chmod 0644 /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /var/log/vdsm/{metadata.log,mom.log,vdsm.log} +touch /var/log/vdsm/{mom.log,supervdsm.log,vdsm.log} +chmod 0644 /var/log/vdsm/{mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /var/log/vdsm/{mom.log,vdsm.log} chown root:root /var/log/vdsm/supervdsm.log # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. @@ -746,21 +764,7 @@ exit 0 %preun if [ "$1" -eq 0 ]; then - start_conf_section="## beginning of configuration section by vdsm" - end_conf_section="## end of configuration section by vdsm" - by_vdsm="by vdsm" - - /bin/sed -i -e "/${start_conf_section}/,/${end_conf_section}/d" \ - -e "/${by_vdsm}/d" \ - %{_sysconfdir}/libvirt/libvirtd.conf \ - %{_sysconfdir}/logrotate.d/libvirtd \ - %{_sysconfdir}/libvirt/qemu.conf \ - %{_sysconfdir}/sysconfig/libvirtd \ - %{_sysconfdir}/sysctl.conf \ - %{_sysconfdir}/libvirt/qemu-sanlock.conf - - # Restoring backuped logrotate.d/libvirtd - /bin/sed -i -e 's/# VDSM backup//' %{_sysconfdir}/logrotate.d/libvirtd + %{_bindir}/vdsm-tool remove-config fi %if ! 0%{?with_systemd} @@ -776,7 +780,7 @@ then %{_bindir}/vdsm-tool sebool-unconfig || : - /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt + %{_bindir}/vdsm-tool remove-saslpasswd if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then /sbin/initctl stop libvirtd >/dev/null 2>/dev/null @@ -905,7 +909,6 @@ exit 0 %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/metadata.log %ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log %ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log %ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log @@ -915,9 +918,11 @@ exit 0 %dir %{_sysconfdir}/%{vdsm_name} %dir %{_sysconfdir}/%{vdsm_name}/mom.d %dir %{_datadir}/%{vdsm_name} -%dir %{_datadir}/%{vdsm_name}/netconf +%dir %{_datadir}/%{vdsm_name}/network +%dir %{_datadir}/%{vdsm_name}/network/configurators %dir %{_datadir}/%{vdsm_name}/storage %dir %{_datadir}/%{vdsm_name}/storage/imageRepository +%dir %{_datadir}/%{vdsm_name}/virt %{_datadir}/%{vdsm_name}/alignmentScan.py* %{_datadir}/%{vdsm_name}/blkid.py* %{_datadir}/%{vdsm_name}/caps.py* @@ -932,22 +937,28 @@ exit 0 %{_datadir}/%{vdsm_name}/mk_sysprep_floppy %{_datadir}/%{vdsm_name}/parted_utils.py* %{_datadir}/%{vdsm_name}/mkimage.py* +%{_datadir}/%{vdsm_name}/numaUtils.py* %{_datadir}/%{vdsm_name}/ppc64HardwareInfo.py* -%{_datadir}/%{vdsm_name}/sourceRoute.py* -%{_datadir}/%{vdsm_name}/sourceRouteThread.py* +%{_datadir}/%{vdsm_name}/protocoldetector.py* %{_datadir}/%{vdsm_name}/supervdsm.py* %{_datadir}/%{vdsm_name}/supervdsmServer -%{_datadir}/%{vdsm_name}/vmChannels.py* -%{_datadir}/%{vdsm_name}/tc.py* %{_datadir}/%{vdsm_name}/vdsm %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config -%{_datadir}/%{vdsm_name}/vm.py* +%{_datadir}/%{vdsm_name}/virt/__init__.py* +%{_datadir}/%{vdsm_name}/virt/guestagent.py* +%{_datadir}/%{vdsm_name}/virt/migration.py* +%{_datadir}/%{vdsm_name}/virt/vmchannels.py* +%{_datadir}/%{vdsm_name}/virt/vmstatus.py* +%{_datadir}/%{vdsm_name}/virt/vm.py* +%{_datadir}/%{vdsm_name}/virt/vmexitreason.py* +%{_datadir}/%{vdsm_name}/virt/vmpowerdown.py* +%{_datadir}/%{vdsm_name}/virt/sampling.py* +%{_datadir}/%{vdsm_name}/tool %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/upgrade.logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm @@ -963,7 +974,6 @@ exit 0 %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/cron.d/vdsm-libvirt-logrotate -%{_datadir}/%{vdsm_name}/guestIF.py* %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* %{_libexecdir}/%{vdsm_name}/curl-img-wrap @@ -972,6 +982,18 @@ exit 0 %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh %{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh %{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh +%{_datadir}/%{vdsm_name}/network/__init__.py* +%{_datadir}/%{vdsm_name}/network/api.py* +%{_datadir}/%{vdsm_name}/network/errors.py* +%{_datadir}/%{vdsm_name}/network/models.py* +%{_datadir}/%{vdsm_name}/network/sourceroute.py* +%{_datadir}/%{vdsm_name}/network/sourceroutethread.py* +%{_datadir}/%{vdsm_name}/network/tc.py* +%{_datadir}/%{vdsm_name}/network/configurators/__init__.py* +%{_datadir}/%{vdsm_name}/network/configurators/dhclient.py* +%{_datadir}/%{vdsm_name}/network/configurators/ifcfg.py* +%{_datadir}/%{vdsm_name}/network/configurators/libvirt.py* +%{_datadir}/%{vdsm_name}/network/configurators/iproute2.py* %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* @@ -1070,23 +1092,20 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup %dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus %dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_all_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_caps +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps %{_datadir}/%{vdsm_name}/addNetwork -%{_datadir}/%{vdsm_name}/configNetwork.py* %{_datadir}/%{vdsm_name}/delNetwork %{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/get-conf-item %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* %{_datadir}/%{vdsm_name}/ksm.py* %{_datadir}/%{vdsm_name}/momIF.py* -%{_datadir}/%{vdsm_name}/netconf/__init__.py* -%{_datadir}/%{vdsm_name}/netconf/dhclient.py* -%{_datadir}/%{vdsm_name}/netconf/ifcfg.py* -%{_datadir}/%{vdsm_name}/netconf/libvirtCfg.py* -%{_datadir}/%{vdsm_name}/netconf/iproute2.py* -%{_datadir}/%{vdsm_name}/neterrors.py* -%{_datadir}/%{vdsm_name}/netmodels.py* %{_datadir}/%{vdsm_name}/respawn -%{_datadir}/%{vdsm_name}/sampling.py* %{_datadir}/%{vdsm_name}/set-conf-item %if 0%{?with_gluster} %dir %{_datadir}/%{vdsm_name}/gluster @@ -1132,10 +1151,12 @@ exit 0 %files python %defattr(-, root, root, -) +%{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool %dir %{python_sitearch}/%{vdsm_name} %dir %{python_sitearch}/%{vdsm_name}/tool %{python_sitearch}/%{vdsm_name}/__init__.py* +%{python_sitearch}/%{vdsm_name}/compat.py* %{python_sitearch}/%{vdsm_name}/config.py* %{python_sitearch}/%{vdsm_name}/constants.py* %{python_sitearch}/%{vdsm_name}/define.py* @@ -1144,9 +1165,11 @@ exit 0 %{python_sitearch}/%{vdsm_name}/libvirtconnection.py* %{python_sitearch}/%{vdsm_name}/netinfo.py* %{python_sitearch}/%{vdsm_name}/netlink.py* -%{python_sitearch}/%{vdsm_name}/qemuImg.py* +%{python_sitearch}/%{vdsm_name}/profile.py* +%{python_sitearch}/%{vdsm_name}/qemuimg.py* %{python_sitearch}/%{vdsm_name}/SecureXMLRPCServer.py* %{python_sitearch}/%{vdsm_name}/netconfpersistence.py* +%{python_sitearch}/%{vdsm_name}/sslutils.py* %{python_sitearch}/%{vdsm_name}/utils.py* %{python_sitearch}/%{vdsm_name}/vdscli.py* %{python_sitearch}/%{vdsm_name}/tool/__init__.py* @@ -1158,7 +1181,7 @@ exit 0 %{python_sitearch}/%{vdsm_name}/tool/dummybr.py* %{python_sitearch}/%{vdsm_name}/tool/nwfilter.py* %{python_sitearch}/%{vdsm_name}/tool/configurator.py* -%{_libexecdir}/%{vdsm_name}/libvirt_configure.sh +%{python_sitearch}/%{vdsm_name}/tool/configfile.py* %{python_sitearch}/%{vdsm_name}/tool/passwd.py* %{python_sitearch}/%{vdsm_name}/tool/restore_nets.py* %{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py* @@ -1180,14 +1203,25 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770_nosnap.out %{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_1_4_4.out %{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_2_4_8.out +%{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out %{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out %{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out %{_datadir}/%{vdsm_name}/tests/mem_info.out %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out +%{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_libvirt_logrotate.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_sanlock.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_no_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_ssl.conf %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml @@ -1236,6 +1270,10 @@ exit 0 %doc COPYING %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline +%files hook-ethtool-options +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options + %if 0%{?with_hooks} %files hook-checkimages %defattr(-, root, root, -) @@ -1248,6 +1286,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun +%files hook-fakevmstats +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats + %files hook-fileinject %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject @@ -1276,6 +1318,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan %config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml +%files hook-macbind +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind + %files hook-macspoof %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof @@ -1327,6 +1373,11 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_sriov %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_sriov + +%files hook-spiceoptions +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_spiceoptions + %files hook-vmdisk %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk @@ -1360,23 +1411,22 @@ exit 0 %files xmlrpc %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name} -%{_datadir}/%{vdsm_name}/BindingXMLRPC.py* - -%files api -%doc vdsm_api/vdsm-api.html -%{_datadir}/%{vdsm_name}/vdsmapi-schema.json -%{python_sitelib}/vdsmapi.py* +%{_datadir}/%{vdsm_name}/rpc/BindingXMLRPC.py* %files jsonrpc -%{_datadir}/%{vdsm_name}/BindingJsonRpc.py* -%{_datadir}/%{vdsm_name}/Bridge.py* +%doc %{vdsm_name}/rpc/vdsm-api.html +%{_datadir}/%{vdsm_name}/rpc/__init__.py* +%{_datadir}/%{vdsm_name}/rpc/BindingJsonRpc.py* +%{_datadir}/%{vdsm_name}/rpc/Bridge.py* +%{_datadir}/%{vdsm_name}/rpc/vdsmapi-schema.json +%{python_sitelib}/vdsmapi.py* +%{python_sitelib}/yajsonrpc/__init__.py* %files yajsonrpc %dir %{python_sitelib}/yajsonrpc -%{python_sitelib}/yajsonrpc/__init__.py* -%{python_sitelib}/yajsonrpc/asyncoreReactor.py* -%{python_sitelib}/yajsonrpc/protonReactor.py* -%{python_sitelib}/yajsonrpc/client.py* +%{python_sitelib}/yajsonrpc/betterAsyncore.py* +%{python_sitelib}/yajsonrpc/stomp.py* +%{python_sitelib}/yajsonrpc/stompReactor.py* %files python-zombiereaper %{python_sitelib}/zombiereaper/__init__.py* @@ -1410,7 +1460,6 @@ exit 0 %{_datadir}/%{vdsm_reg}/deployUtil.py* %attr(0755, -, -) %{_datadir}/%{vdsm_reg}/register-to-engine.py* %{_datadir}/%{vdsm_reg}/createDaemon.py* -%{python_sitelib}/ovirt_config_setup/engine.py* %{_datadir}/%{vdsm_reg}/save-config %{_sysconfdir}/ovirt-config-boot.d/vdsm-config %{_sysconfdir}/ovirt-commandline.d/vdsm-reg @@ -1432,12 +1481,16 @@ exit 0 %doc COPYING %{_datadir}/%{vdsm_name}/gluster/api.py* %{_datadir}/%{vdsm_name}/gluster/vdsmapi-gluster-schema.json +%{_datadir}/%{vdsm_name}/gluster/gfapi.py* %{_datadir}/%{vdsm_name}/gluster/hooks.py* %{_datadir}/%{vdsm_name}/gluster/services.py* %{_datadir}/%{vdsm_name}/gluster/tasks.py* %endif %changelog +* Mon Jun 30 2014 Douglas Schilling Landgraf - 4.16.0-6.git5d3ed2d +- vdsm 4.16.0-6.git5d3ed2d + * Sun Jun 08 2014 Fedora Release Engineering - 4.14.8.1-1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From bef30d0676f3b5c988b0a16e3bb9c166c4b7ce5d Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Mon, 28 Jul 2014 15:46:19 +0300 Subject: [PATCH 086/126] Adding ppc arch --- vdsm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index af198e7..ca2aad7 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -176,7 +176,7 @@ Requires: sanlock >= 2.8, sanlock-python %if 0%{?rhel} Requires: python-ethtool >= 0.6-3 %if 0%{?rhel} >= 7 -ExclusiveArch: x86_64 +ExclusiveArch: x86_64 ppc64 Requires: device-mapper-multipath Requires: e2fsprogs Requires: fence-agents-all From 1f7865337c34c695d681afe3d4318b1ef8696b09 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 07:46:06 +0000 Subject: [PATCH 087/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index ca2aad7..bd72132 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -52,7 +52,7 @@ Name: %{vdsm_name} Version: 4.16.0 -Release: 6.git5d3ed2d%{?dist}%{?extra_release} +Release: 7.git5d3ed2d%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1488,6 +1488,9 @@ exit 0 %endif %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 4.16.0-7.git5d3ed2d +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Mon Jun 30 2014 Douglas Schilling Landgraf - 4.16.0-6.git5d3ed2d - vdsm 4.16.0-6.git5d3ed2d From 0df834649ad98f599dfa4a478e00f768cd0134f3 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 10 Sep 2014 16:43:48 -0400 Subject: [PATCH 088/126] vdsm 4.16.4 --- sources | 2 +- vdsm.spec | 83 ++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/sources b/sources index b64362a..f40d509 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8c6163cbfeb369ebfbd6c4f3ba5b814f vdsm-4.16.0.tar.gz +434579d3fc056b5ccb93586c8817c826 vdsm-4.16.4.tar.gz diff --git a/vdsm.spec b/vdsm.spec index bd72132..dd9223b 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -45,14 +45,20 @@ %global with_systemd 1 %endif -%if 0%{?fedora} >= 18 +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %global with_systemd_macros 1 %global with_tmpfiles_macro 1 %endif +%if 0%{?rhel} == 6 +%global _udevrulesdir /lib/udev/rules.d/ +%else +%global _udevrulesdir /usr/lib/udev/rules.d/ +%endif + Name: %{vdsm_name} -Version: 4.16.0 -Release: 7.git5d3ed2d%{?dist}%{?extra_release} +Version: 4.16.4 +Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -69,12 +75,14 @@ Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExclusiveArch: x86_64 ppc64 BuildRequires: gcc BuildRequires: python BuildRequires: python-devel BuildRequires: python-nose BuildRequires: python-netaddr BuildRequires: rpm-build +BuildRequires: cyrus-sasl-lib # BuildRequires needed by the tests during the build BuildRequires: dosfstools @@ -83,7 +91,7 @@ BuildRequires: python-ethtool BuildRequires: python-inotify BuildRequires: python-pthreading BuildRequires: python-cpopen >= 1.3 -BuildRequires: python-ioprocess >= 0.5-1 +BuildRequires: python-ioprocess >= 0.12 BuildRequires: rpm-python BuildRequires: libnl BuildRequires: libselinux-python @@ -91,9 +99,6 @@ BuildRequires: libvirt-python BuildRequires: genisoimage BuildRequires: openssl BuildRequires: m2crypto -%ifarch x86_64 -BuildRequires: python-dmidecode -%endif %if 0%{?rhel} == 6 BuildRequires: python-argparse BuildRequires: python-ordereddict @@ -127,7 +132,8 @@ Requires: python-netaddr Requires: python-inotify Requires: python-argparse Requires: python-cpopen >= 1.3 -Requires: python-ioprocess >= 0.5-1 +Requires: python-ioprocess >= 0.12 +Requires: python-pthreading >= 0.1.3-3 Requires: python-ethtool >= 0.6-3 Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: rpm-python @@ -176,22 +182,20 @@ Requires: sanlock >= 2.8, sanlock-python %if 0%{?rhel} Requires: python-ethtool >= 0.6-3 %if 0%{?rhel} >= 7 -ExclusiveArch: x86_64 ppc64 Requires: device-mapper-multipath Requires: e2fsprogs Requires: fence-agents-all Requires: lvm2 Requires: python Requires: policycoreutils-python -Requires: python-pthreading >= 0.1.2 -Requires: qemu-kvm -Requires: qemu-img +Requires: qemu-kvm-rhev +Requires: qemu-img-rhev Requires: selinux-policy-targeted %else Requires: python -# Update the qemu-kvm requires when block_stream will be included -Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4 -Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4 +# Update the qemu-kvm-rhev requires when block_stream will be included +Requires: qemu-kvm-rhev >= 2:0.12.1.2-2.415.el6_5.3 +Requires: qemu-img-rhev >= 2:0.12.1.2-2.415.el6_5.3 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents @@ -199,13 +203,11 @@ Requires: kernel >= 2.6.32-279.9.1 Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: policycoreutils >= 2.0.83-19.30 Requires: policycoreutils-python >= 2.0.83-19.30 -Requires: python-pthreading Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13 Requires: lvm2 >= 2.02.100-5 Requires: logrotate < 3.8.0 %endif %else -Requires: python-pthreading >= 0.1.2 Requires: fence-agents-all Requires: kernel >= 3.11.3-201 # Subprocess and thread bug was found on python 2.7.2 @@ -341,7 +343,8 @@ Summary: VDSM python libraries Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: python-cpopen >= 1.2.3-5 Requires: m2crypto -Requires: python-ioprocess >= 0.5-1 +Requires: python-ioprocess >= 0.12 +BuildArch: noarch %description python Shared libraries between the various VDSM packages. @@ -648,7 +651,7 @@ make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build install -dDm 0755 %{buildroot}/var/log/vdsm -touch %{buildroot}/var/log/vdsm/{mom.log,supervdsm.log,vdsm.log} +touch %{buildroot}/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} # Install the respawn utility install -Dm 0755 init/sysvinit/respawn \ @@ -656,18 +659,18 @@ install -Dm 0755 init/sysvinit/respawn \ # Install the lvm rules install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ - %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules + %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf %if 0%{?with_systemd} -install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/lib/systemd/systemd-vdsmd +install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/usr/lib/systemd/systemd-vdsmd install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service install -Dm 0755 vdsm_reg/vdsm-reg.init \ - %{buildroot}/lib/systemd/systemd-vdsm-reg + %{buildroot}/usr/lib/systemd/systemd-vdsm-reg install -Dm 0644 vdsm_reg/vdsm-reg.service \ %{buildroot}%{_unitdir}/vdsm-reg.service install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ @@ -720,7 +723,7 @@ export LC_ALL=C /usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} %post -%{_bindir}/vdsm-tool configure --module sanlock --force +%{_bindir}/vdsm-tool configure --module sanlock --force >/dev/null %{_bindir}/vdsm-tool sebool-config || : # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd @@ -728,9 +731,9 @@ export LC_ALL=C # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included -touch /var/log/vdsm/{mom.log,supervdsm.log,vdsm.log} -chmod 0644 /var/log/vdsm/{mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /var/log/vdsm/{mom.log,vdsm.log} +touch /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +chmod 0644 /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /var/log/vdsm/{connectivity.log,mom.log,vdsm.log} chown root:root /var/log/vdsm/supervdsm.log # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. @@ -753,6 +756,14 @@ if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add supervdsmd fi %else +# multipath.conf does not exists after multipath install, causing multipathd to +# exit silently when started as vdsmd required service. This creates default +# configuration blacklisting all devices, simulating the behavior of multipathd +# on EL6 when configuration file is missing. +# See https://bugzilla.redhat.com/1120209 +if [ ! -f "/etc/multipath.conf" ]; then + /usr/sbin/mpathconf --disable +fi /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : @@ -828,7 +839,7 @@ if [ "$1" -ge 1 ]; then # fallback to vdsmd reconfigure api - This change may be removed # when vdsm won't support any downgrade\upgrade to versions that # don't include vdsm-tool configure api (vdsm <= 3.3) - for f in '/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do + for f in '/usr/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do if [ -f "${f}" ]; then "${f}" reconfigure >/dev/null 2>&1 || : fi @@ -900,7 +911,7 @@ exit 0 %defattr(-, root, root, -) %doc COPYING README lib/vdsm/vdsm.conf.sample %if 0%{?with_systemd} -/lib/systemd/systemd-vdsmd +/usr/lib/systemd/systemd-vdsmd %{_unitdir}/vdsmd.service %{_unitdir}/supervdsmd.service %else @@ -909,6 +920,7 @@ exit 0 %endif %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/connectivity.log %ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log %ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log %ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log @@ -961,7 +973,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy -%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf %if 0%{?with_systemd} @@ -1117,7 +1129,7 @@ exit 0 %exclude %{_datadir}/%{vdsm_name}/gluster/* %endif %{python_sitelib}/sos/plugins/vdsm.py* -/lib/udev/rules.d/12-vdsm-lvm.rules +%{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} @@ -1181,7 +1193,11 @@ exit 0 %{python_sitearch}/%{vdsm_name}/tool/dummybr.py* %{python_sitearch}/%{vdsm_name}/tool/nwfilter.py* %{python_sitearch}/%{vdsm_name}/tool/configurator.py* -%{python_sitearch}/%{vdsm_name}/tool/configfile.py* +%{python_sitearch}/%{vdsm_name}/tool/configurators/__init__* +%{python_sitearch}/%{vdsm_name}/tool/configurators/configfile.py* +%{python_sitearch}/%{vdsm_name}/tool/configurators/certificates.py* +%{python_sitearch}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python_sitearch}/%{vdsm_name}/tool/configurators/sanlock.py* %{python_sitearch}/%{vdsm_name}/tool/passwd.py* %{python_sitearch}/%{vdsm_name}/tool/restore_nets.py* %{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py* @@ -1447,7 +1463,7 @@ exit 0 %ghost %dir /data %ghost %dir %attr(0775, root, root) /data/updates %if 0%{?with_systemd} -/lib/systemd/systemd-vdsm-reg +/usr/lib/systemd/systemd-vdsm-reg %{_unitdir}/vdsm-reg.service %else %{_initrddir}/vdsm-reg @@ -1488,6 +1504,9 @@ exit 0 %endif %changelog +* Wed Sep 10 2014 Douglas Schilling Landgraf - 4.16.4-0 +- vdsm tag 4.16.4 + * Mon Aug 18 2014 Fedora Release Engineering - 4.16.0-7.git5d3ed2d - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 194beb78d4c5c2150d64a9dbdbdcba3a0f8d02d9 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Sun, 28 Sep 2014 18:05:10 -0400 Subject: [PATCH 089/126] vdsm tag 4.16.5-5 --- sources | 2 +- vdsm.spec | 71 ++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/sources b/sources index f40d509..5513cee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -434579d3fc056b5ccb93586c8817c826 vdsm-4.16.4.tar.gz +b750b144d7291dde53ccf21d90ba82bf vdsm-4.16.5.tar.gz diff --git a/vdsm.spec b/vdsm.spec index dd9223b..d740f91 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -57,8 +57,8 @@ %endif Name: %{vdsm_name} -Version: 4.16.4 -Release: 0%{?dist}%{?extra_release} +Version: 4.16.5 +Release: 5.gitb16b036%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -75,7 +75,10 @@ Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%if !%{fedora_koji_build} ExclusiveArch: x86_64 ppc64 +%endif + BuildRequires: gcc BuildRequires: python BuildRequires: python-devel @@ -144,7 +147,10 @@ Requires: libnl Requires: %{name}-xmlrpc = %{version}-%{release} Requires: %{name}-jsonrpc = %{version}-%{release} Requires: mom >= 0.4.1 +# Numactl is not available on s390[x] and ARM +%ifnarch s390 s390x %{arm} Requires: numactl +%endif %ifarch x86_64 Requires: python-dmidecode @@ -188,14 +194,9 @@ Requires: fence-agents-all Requires: lvm2 Requires: python Requires: policycoreutils-python -Requires: qemu-kvm-rhev -Requires: qemu-img-rhev Requires: selinux-policy-targeted %else Requires: python -# Update the qemu-kvm-rhev requires when block_stream will be included -Requires: qemu-kvm-rhev >= 2:0.12.1.2-2.415.el6_5.3 -Requires: qemu-img-rhev >= 2:0.12.1.2-2.415.el6_5.3 Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents @@ -212,8 +213,6 @@ Requires: fence-agents-all Requires: kernel >= 3.11.3-201 # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 -Requires: qemu-kvm >= 2:0.15.0-4 -Requires: qemu-img >= 2:0.15.0-4 Requires: python-ethtool >= 0.8-1 Requires: initscripts >= 9.42.2-1 Requires: device-mapper-multipath >= 0.4.9-18 @@ -229,6 +228,23 @@ Requires: policycoreutils >= 2.1.13-55 Requires: systemd >= 197-1.fc18.2 %endif +%if !%{fedora_koji_build} +%global rhev_suffix -rhev +%endif + +%if 0%{?rhel} +%if 0%{?rhel} >= 7 +Requires: qemu-kvm%{?rhev_suffix} +Requires: qemu-img%{?rhev_suffix} +%else +Requires: qemu-kvm%{?rhev_suffix} >= 2:0.12.1.2-2.415.el6_5.3 +Requires: qemu-img%{?rhev_suffix} >= 2:0.12.1.2-2.415.el6_5.3 +%endif +%else +Requires: qemu-kvm >= 2:0.15.0-4 +Requires: qemu-img >= 2:0.15.0-4 +%endif + # GlusterFS client-side RPMs needed for Gluster SD %if 0%{?with_gluster} Requires: glusterfs >= 3.4.2 @@ -290,10 +306,11 @@ ovirt-engine and vdsClient. Summary: VDSM API Server BuildArch: noarch -Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-yajsonrpc = %{version}-%{release} +Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-yajsonrpc = %{version}-%{release} +Obsoletes: vdsm-api < 4.16 %if 0%{?rhel} == 6 -Requires: python-ordereddict +Requires: python-ordereddict %endif %description jsonrpc @@ -703,6 +720,12 @@ install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla %endif +# Install the libvirt hook for cleaning up the XML +%if 0%{?fedora} || 0%{?rhel} >= 7 +install -Dm 0755 vdsm/virt/libvirt-hook.sh \ + %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu +%endif + %check # Disabling the nose tests until they'll all succeed in koji. # make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 @@ -986,6 +1009,9 @@ exit 0 %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/cron.d/vdsm-libvirt-logrotate +%if 0%{?fedora} || 0%{?rhel} >= 7 +%{_sysconfdir}/libvirt/hooks/qemu +%endif %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* %{_libexecdir}/%{vdsm_name}/curl-img-wrap @@ -1264,6 +1290,12 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* +%files hook-macspoof +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof + %if 0%{?with_vhostmd} %files hook-vhostmd %defattr(-, root, root, -) @@ -1338,12 +1370,6 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind -%files hook-macspoof -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof - %files hook-extnet %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet @@ -1437,6 +1463,9 @@ exit 0 %{_datadir}/%{vdsm_name}/rpc/vdsmapi-schema.json %{python_sitelib}/vdsmapi.py* %{python_sitelib}/yajsonrpc/__init__.py* +%if ! 0%{?with_gluster} +%exclude %{_datadir}/%{vdsm_name}/rpc/vdsmapi-gluster-schema.json +%endif %files yajsonrpc %dir %{python_sitelib}/yajsonrpc @@ -1496,7 +1525,8 @@ exit 0 %dir %{_datadir}/%{vdsm_name}/gluster %doc COPYING %{_datadir}/%{vdsm_name}/gluster/api.py* -%{_datadir}/%{vdsm_name}/gluster/vdsmapi-gluster-schema.json +%{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* +%{_datadir}/%{vdsm_name}/rpc/vdsmapi-gluster-schema.json %{_datadir}/%{vdsm_name}/gluster/gfapi.py* %{_datadir}/%{vdsm_name}/gluster/hooks.py* %{_datadir}/%{vdsm_name}/gluster/services.py* @@ -1504,6 +1534,9 @@ exit 0 %endif %changelog +* Sun Sep 28 2014 Douglas Schilling Landgraf - 4.16.5-5 +- vdsm tag 4.16.5-5 + * Wed Sep 10 2014 Douglas Schilling Landgraf - 4.16.4-0 - vdsm tag 4.16.4 From 8da15110f573c77971a258e9ff0d840c14b44518 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 1 Oct 2014 21:21:22 -0400 Subject: [PATCH 090/126] vdsm-4.16.5-20.gita40634a --- sources | 2 +- vdsm.spec | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 5513cee..2af5355 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b750b144d7291dde53ccf21d90ba82bf vdsm-4.16.5.tar.gz +4edc9253ddcb80aa4fbf10969c239417 vdsm-4.16.5.tar.gz diff --git a/vdsm.spec b/vdsm.spec index d740f91..6171168 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -41,6 +41,10 @@ %global with_vhostmd 1 %endif +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 +%global with_chcon_hack 1 +%endif + %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 %global with_systemd 1 %endif @@ -52,13 +56,15 @@ %if 0%{?rhel} == 6 %global _udevrulesdir /lib/udev/rules.d/ +%global _udevexecdir /lib/udev/ %else %global _udevrulesdir /usr/lib/udev/rules.d/ +%global _udevexecdir /usr/lib/udev/ %endif Name: %{vdsm_name} Version: 4.16.5 -Release: 5.gitb16b036%{?dist}%{?extra_release} +Release: 20.gita40634a%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -361,7 +367,6 @@ Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: python-cpopen >= 1.2.3-5 Requires: m2crypto Requires: python-ioprocess >= 0.12 -BuildArch: noarch %description python Shared libraries between the various VDSM packages. @@ -651,7 +656,7 @@ sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %if 0%{?enable_autotools} autoreconf -if %endif -%configure %{?with_hooks:--enable-hooks} +%configure %{?with_hooks:--enable-hooks} %{?with_chcon_hack:--enable-chcon-hack} make # Setting software_version and software_revision in dsaversion.py baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` @@ -678,6 +683,11 @@ install -Dm 0755 init/sysvinit/respawn \ install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules +%if 0%{?with_chcon_hack} +install -Dm 0755 vdsm/storage/vdsm-chcon \ + %{buildroot}%{_udevexecdir}/vdsm-chcon +%endif + install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf @@ -1156,6 +1166,9 @@ exit 0 %endif %{python_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules +%if 0%{?with_chcon_hack} +%{_udevexecdir}/vdsm-chcon +%endif /etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} From dfa6381ab706f918d1dfdfd8176ff595e7744fbd Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Tue, 14 Oct 2014 21:13:36 +0300 Subject: [PATCH 091/126] vdsm 4.16.7 --- sources | 2 +- vdsm.spec | 88 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/sources b/sources index 2af5355..aa9f92c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4edc9253ddcb80aa4fbf10969c239417 vdsm-4.16.5.tar.gz +d2e7b4ad6e78980b8aa3da6afd4ca71a vdsm-4.16.7.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 6171168..fb73578 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -63,8 +63,8 @@ %endif Name: %{vdsm_name} -Version: 4.16.5 -Release: 20.gita40634a%{?dist}%{?extra_release} +Version: 4.16.7 +Release: 1.gitdb83943%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -367,6 +367,7 @@ Requires: %{name}-python-zombiereaper = %{version}-%{release} Requires: python-cpopen >= 1.2.3-5 Requires: m2crypto Requires: python-ioprocess >= 0.12 +BuildArch: noarch %description python Shared libraries between the various VDSM packages. @@ -1204,49 +1205,49 @@ exit 0 %defattr(-, root, root, -) %{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool -%dir %{python_sitearch}/%{vdsm_name} -%dir %{python_sitearch}/%{vdsm_name}/tool -%{python_sitearch}/%{vdsm_name}/__init__.py* -%{python_sitearch}/%{vdsm_name}/compat.py* -%{python_sitearch}/%{vdsm_name}/config.py* -%{python_sitearch}/%{vdsm_name}/constants.py* -%{python_sitearch}/%{vdsm_name}/define.py* -%{python_sitearch}/%{vdsm_name}/exception.py* -%{python_sitearch}/%{vdsm_name}/ipwrapper.py* -%{python_sitearch}/%{vdsm_name}/libvirtconnection.py* -%{python_sitearch}/%{vdsm_name}/netinfo.py* -%{python_sitearch}/%{vdsm_name}/netlink.py* -%{python_sitearch}/%{vdsm_name}/profile.py* -%{python_sitearch}/%{vdsm_name}/qemuimg.py* -%{python_sitearch}/%{vdsm_name}/SecureXMLRPCServer.py* -%{python_sitearch}/%{vdsm_name}/netconfpersistence.py* -%{python_sitearch}/%{vdsm_name}/sslutils.py* -%{python_sitearch}/%{vdsm_name}/utils.py* -%{python_sitearch}/%{vdsm_name}/vdscli.py* -%{python_sitearch}/%{vdsm_name}/tool/__init__.py* +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/tool +%{python_sitelib}/%{vdsm_name}/__init__.py* +%{python_sitelib}/%{vdsm_name}/compat.py* +%{python_sitelib}/%{vdsm_name}/config.py* +%{python_sitelib}/%{vdsm_name}/constants.py* +%{python_sitelib}/%{vdsm_name}/define.py* +%{python_sitelib}/%{vdsm_name}/exception.py* +%{python_sitelib}/%{vdsm_name}/ipwrapper.py* +%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* +%{python_sitelib}/%{vdsm_name}/netinfo.py* +%{python_sitelib}/%{vdsm_name}/netlink.py* +%{python_sitelib}/%{vdsm_name}/profile.py* +%{python_sitelib}/%{vdsm_name}/qemuimg.py* +%{python_sitelib}/%{vdsm_name}/SecureXMLRPCServer.py* +%{python_sitelib}/%{vdsm_name}/netconfpersistence.py* +%{python_sitelib}/%{vdsm_name}/sslutils.py* +%{python_sitelib}/%{vdsm_name}/utils.py* +%{python_sitelib}/%{vdsm_name}/vdscli.py* +%{python_sitelib}/%{vdsm_name}/tool/__init__.py* %if 0%{?with_systemd} -%exclude %{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py* +%exclude %{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* %else -%{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py* +%{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* %endif -%{python_sitearch}/%{vdsm_name}/tool/dummybr.py* -%{python_sitearch}/%{vdsm_name}/tool/nwfilter.py* -%{python_sitearch}/%{vdsm_name}/tool/configurator.py* -%{python_sitearch}/%{vdsm_name}/tool/configurators/__init__* -%{python_sitearch}/%{vdsm_name}/tool/configurators/configfile.py* -%{python_sitearch}/%{vdsm_name}/tool/configurators/certificates.py* -%{python_sitearch}/%{vdsm_name}/tool/configurators/libvirt.py* -%{python_sitearch}/%{vdsm_name}/tool/configurators/sanlock.py* -%{python_sitearch}/%{vdsm_name}/tool/passwd.py* -%{python_sitearch}/%{vdsm_name}/tool/restore_nets.py* -%{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py* -%{python_sitearch}/%{vdsm_name}/tool/service.py* -%{python_sitearch}/%{vdsm_name}/tool/transient.py* -%{python_sitearch}/%{vdsm_name}/tool/unified_persistence.py* -%{python_sitearch}/%{vdsm_name}/tool/upgrade.py* -%{python_sitearch}/%{vdsm_name}/tool/upgrade_300_networks.py* -%{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py* -%{python_sitearch}/%{vdsm_name}/tool/vdsm-id.py* +%{python_sitelib}/%{vdsm_name}/tool/dummybr.py* +%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* +%{python_sitelib}/%{vdsm_name}/tool/configurator.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* +%{python_sitelib}/%{vdsm_name}/tool/configurators/configfile.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* +%{python_sitelib}/%{vdsm_name}/tool/passwd.py* +%{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* +%{python_sitelib}/%{vdsm_name}/tool/seboolsetup.py* +%{python_sitelib}/%{vdsm_name}/tool/service.py* +%{python_sitelib}/%{vdsm_name}/tool/transient.py* +%{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* +%{python_sitelib}/%{vdsm_name}/tool/upgrade.py* +%{python_sitelib}/%{vdsm_name}/tool/upgrade_300_networks.py* +%{python_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* +%{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README @@ -1547,6 +1548,9 @@ exit 0 %endif %changelog +* Wed Oct 8 2014 Yaniv Bronhaim - 4.16.7 +- vdsm tag 4.16.7 + * Sun Sep 28 2014 Douglas Schilling Landgraf - 4.16.5-5 - vdsm tag 4.16.5-5 From 0a198860876e65d2bd9c0b52ae9b5e39ec783da3 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sun, 28 Dec 2014 22:38:48 +0200 Subject: [PATCH 092/126] Vdsm 4.16.10 ovirt 3.5 --- sources | 2 +- vdsm.spec | 87 ++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 58 insertions(+), 31 deletions(-) diff --git a/sources b/sources index aa9f92c..a7bf884 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d2e7b4ad6e78980b8aa3da6afd4ca71a vdsm-4.16.7.tar.gz +179114e8e977a94897e083f8b4a22556 vdsm-4.16.10.tar.gz diff --git a/vdsm.spec b/vdsm.spec index fb73578..b76f5f9 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -21,11 +21,19 @@ %global fedora_koji_build 1 %global with_hooks 1 +# RHEV build - overridable using rpmbuild --define "rhev_build 1" +%{!?rhev_build: %global rhev_build 0} + # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. %{!?enable_autotools:%define enable_autotools 1} +# Skips check since rhel default repos lack pep8 and pyflakes +%if ! 0%{?rhel} +%global with_check 1 +%endif + # Required paths %if 0%{?fedora} >= 18 %global _polkitdir %{_datadir}/polkit-1/rules.d @@ -41,10 +49,6 @@ %global with_vhostmd 1 %endif -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -%global with_chcon_hack 1 -%endif - %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 %global with_systemd 1 %endif @@ -54,6 +58,10 @@ %global with_tmpfiles_macro 1 %endif +%if 0%{?fedora} || 0%{?rhel} >= 7 +%global with_chown_hack 1 +%endif + %if 0%{?rhel} == 6 %global _udevrulesdir /lib/udev/rules.d/ %global _udevexecdir /lib/udev/ @@ -63,8 +71,8 @@ %endif Name: %{vdsm_name} -Version: 4.16.7 -Release: 1.gitdb83943%{?dist}%{?extra_release} +Version: 4.16.10 +Release: 0%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -83,6 +91,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if !%{fedora_koji_build} ExclusiveArch: x86_64 ppc64 +%else +%global with_check 0 %endif BuildRequires: gcc @@ -101,16 +111,19 @@ BuildRequires: python-inotify BuildRequires: python-pthreading BuildRequires: python-cpopen >= 1.3 BuildRequires: python-ioprocess >= 0.12 +BuildRequires: qemu-img BuildRequires: rpm-python BuildRequires: libnl BuildRequires: libselinux-python BuildRequires: libvirt-python BuildRequires: genisoimage BuildRequires: openssl +BuildRequires: policycoreutils-python BuildRequires: m2crypto %if 0%{?rhel} == 6 BuildRequires: python-argparse BuildRequires: python-ordereddict +BuildRequires: python-simplejson >= 2.0.9 %endif # Autotools BuildRequires @@ -121,7 +134,7 @@ BuildRequires: gettext-devel BuildRequires: libtool %endif -%if !0%{?rhel} +%if 0%{?with_check} BuildRequires: pyflakes BuildRequires: python-pep8 %endif @@ -152,7 +165,13 @@ Requires: libguestfs-tools-c Requires: libnl Requires: %{name}-xmlrpc = %{version}-%{release} Requires: %{name}-jsonrpc = %{version}-%{release} -Requires: mom >= 0.4.1 + +%if 0%{?rhev_build} +Requires: mom >= 0.4.1-4 +%else +Requires: mom >= 0.4.3 +%endif + # Numactl is not available on s390[x] and ARM %ifnarch s390 s390x %{arm} Requires: numactl @@ -200,7 +219,7 @@ Requires: fence-agents-all Requires: lvm2 Requires: python Requires: policycoreutils-python -Requires: selinux-policy-targeted +Requires: selinux-policy-targeted >= 3.12.1-153.el7_0.13 %else Requires: python Requires: device-mapper-multipath >= 0.4.9-52 @@ -209,8 +228,8 @@ Requires: fence-agents Requires: kernel >= 2.6.32-279.9.1 Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: policycoreutils >= 2.0.83-19.30 -Requires: policycoreutils-python >= 2.0.83-19.30 -Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13 +Requires: policycoreutils-python >= 2.0.83-19.47.el6_6.1 +Requires: selinux-policy-targeted >= 3.7.19-260.el6_6.1 Requires: lvm2 >= 2.02.100-5 Requires: logrotate < 3.8.0 %endif @@ -317,6 +336,7 @@ Requires: %{name}-yajsonrpc = %{version}-%{release} Obsoletes: vdsm-api < 4.16 %if 0%{?rhel} == 6 Requires: python-ordereddict +Requires: python-simplejson >= 2.0.9 %endif %description jsonrpc @@ -657,7 +677,7 @@ sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %if 0%{?enable_autotools} autoreconf -if %endif -%configure %{?with_hooks:--enable-hooks} %{?with_chcon_hack:--enable-chcon-hack} +%configure %{?with_hooks:--enable-hooks} %{?with_chown_hack:--enable-chown-hack} make # Setting software_version and software_revision in dsaversion.py baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` @@ -684,11 +704,6 @@ install -Dm 0755 init/sysvinit/respawn \ install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules -%if 0%{?with_chcon_hack} -install -Dm 0755 vdsm/storage/vdsm-chcon \ - %{buildroot}%{_udevexecdir}/vdsm-chcon -%endif - install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf @@ -738,10 +753,9 @@ install -Dm 0755 vdsm/virt/libvirt-hook.sh \ %endif %check -# Disabling the nose tests until they'll all succeed in koji. -# make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 -# make check NOSE_EXCLUDE=".*" -#make check +%if 0%{?with_check} +make check +%endif %clean rm -rf %{buildroot} @@ -756,11 +770,19 @@ export LC_ALL=C /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} /usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} +# We keep the previous rpm version number in a file for managing upgrade flow +# in vdsmd_init_script upgraded_version_check task +if [ "$1" -gt 1 ]; then + rpm -q %{vdsm_name} > "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" +fi + %post %{_bindir}/vdsm-tool configure --module sanlock --force >/dev/null -%{_bindir}/vdsm-tool sebool-config || : -# set the vdsm "secret" password for libvirt -%{_bindir}/vdsm-tool set-saslpasswd +# update the vdsm "secret" password for libvirt +if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then + /usr/sbin/saslpasswd2 -p -a libvirt vdsm@ovirt < \ + /etc/pki/vdsm/keys/libvirt_password +fi # After vdsm install we should create the logs files. # In the install session we create it but since we use @@ -823,8 +845,6 @@ then /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf - %{_bindir}/vdsm-tool sebool-unconfig || : - %{_bindir}/vdsm-tool remove-saslpasswd if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then @@ -996,10 +1016,12 @@ exit 0 %{_datadir}/%{vdsm_name}/virt/migration.py* %{_datadir}/%{vdsm_name}/virt/vmchannels.py* %{_datadir}/%{vdsm_name}/virt/vmstatus.py* +%{_datadir}/%{vdsm_name}/virt/vmtune.py* %{_datadir}/%{vdsm_name}/virt/vm.py* %{_datadir}/%{vdsm_name}/virt/vmexitreason.py* %{_datadir}/%{vdsm_name}/virt/vmpowerdown.py* %{_datadir}/%{vdsm_name}/virt/sampling.py* +%{_datadir}/%{vdsm_name}/virt/utils.py* %{_datadir}/%{vdsm_name}/tool %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf @@ -1026,6 +1048,7 @@ exit 0 %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* %{_libexecdir}/%{vdsm_name}/curl-img-wrap +%{_libexecdir}/%{vdsm_name}/fc-scan %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks %{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh @@ -1167,9 +1190,6 @@ exit 0 %endif %{python_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules -%if 0%{?with_chcon_hack} -%{_udevexecdir}/vdsm-chcon -%endif /etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* %if 0%{?rhel} @@ -1190,6 +1210,7 @@ exit 0 %dir %{_sysconfdir}/pki/%{vdsm_name}/certs %dir %{_sysconfdir}/pki/%{vdsm_name}/libvirt-spice %config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password +%{_localstatedir}/lib/%{vdsm_name}/bonding-defaults.json %dir %{_localstatedir}/lib/%{vdsm_name} %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback %dir %{_localstatedir}/lib/%{vdsm_name}/persistence @@ -1231,6 +1252,7 @@ exit 0 %{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* %endif %{python_sitelib}/%{vdsm_name}/tool/dummybr.py* +%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py* %{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* %{python_sitelib}/%{vdsm_name}/tool/configurator.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* @@ -1238,9 +1260,9 @@ exit 0 %{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* %{python_sitelib}/%{vdsm_name}/tool/passwd.py* %{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* -%{python_sitelib}/%{vdsm_name}/tool/seboolsetup.py* %{python_sitelib}/%{vdsm_name}/tool/service.py* %{python_sitelib}/%{vdsm_name}/tool/transient.py* %{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* @@ -1301,6 +1323,8 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* @@ -1548,6 +1572,9 @@ exit 0 %endif %changelog +* Thu Dec 25 2014 Yaniv Bronhaim - 4.16.10 +* vdsm tag 4.16.10 - ovirt 3.5 build + * Wed Oct 8 2014 Yaniv Bronhaim - 4.16.7 - vdsm tag 4.16.7 From 556f2070adb7b5d698ca9068ed8309971abecabb Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Tue, 13 Jan 2015 17:56:11 +0200 Subject: [PATCH 093/126] Latest upstream master vdsm 4.17 --- sources | 2 +- vdsm.spec | 636 +++++++++++++++--------------------------------------- 2 files changed, 179 insertions(+), 459 deletions(-) diff --git a/sources b/sources index a7bf884..7f7072a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -179114e8e977a94897e083f8b4a22556 vdsm-4.16.10.tar.gz +f77cbb5bfdbf0603fc0892ed8e0ae8e9 vdsm-4.17.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec index b76f5f9..c94b866 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -12,52 +12,52 @@ %global snlk_user sanlock %global cdrom_group cdrom -# Upstream git release -# % global vdsm_release gf2f6683 -# % global vdsm_relvtag .git%{vdsm_release} -# % global vdsm_relttag -%{vdsm_release} - -# Fedora official build -%global fedora_koji_build 1 -%global with_hooks 1 +# koji build - overridable using rpmbuild --define "koji_build 1" +%{!?koji_build: %global fedora_koji_build 0} # RHEV build - overridable using rpmbuild --define "rhev_build 1" %{!?rhev_build: %global rhev_build 0} +%if 0%{fedora_koji_build} +%global with_hooks 1 +%endif + +%if %{rhev_build} +%global rhev_build_config_opt --enable-rhev +%endif + # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 1} +%{!?enable_autotools:%define enable_autotools 0} # Skips check since rhel default repos lack pep8 and pyflakes %if ! 0%{?rhel} -%global with_check 1 +%{!?with_check:%global with_check 1} +%else +%{!?with_check:%global with_check 0} %endif # Required paths -%if 0%{?fedora} >= 18 +%if 0%{?fedora} %global _polkitdir %{_datadir}/polkit-1/rules.d %else %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 +# Gluster should not be shipped with RHEV +%if ! 0%{?rhev_build} %global with_gluster 1 %endif -%if ! 0%{?rhel} +%if ! 0%{?rhel} || ! 0%{fedora_koji_build} %global with_vhostmd 1 %endif -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %global with_systemd 1 %endif -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -%global with_systemd_macros 1 -%global with_tmpfiles_macro 1 -%endif - %if 0%{?fedora} || 0%{?rhel} >= 7 %global with_chown_hack 1 %endif @@ -71,59 +71,54 @@ %endif Name: %{vdsm_name} -Version: 4.16.10 -Release: 0%{?dist}%{?extra_release} +Version: 4.17.0 +Release: 267.git8f8b927%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/wiki/Vdsm -# The source for this package was pulled from upstream's vcs. -# Use the following commands to generate the tarball: -# git clone http://gerrit.ovirt.org/p/vdsm -# cd vdsm -# git reset --hard {vdsm_release} -# ./autogen.sh --system -# make VERSION={version}-{vdsm_release} dist -Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz - +Source0: %{vdsm_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if !%{fedora_koji_build} ExclusiveArch: x86_64 ppc64 -%else -%global with_check 0 %endif +%if 0%{?rhel} <= 6 +# qemu-img is x86_64 only on RHEL6 +ExclusiveArch: x86_64 +%endif + +BuildRequires: cyrus-sasl-lib BuildRequires: gcc BuildRequires: python BuildRequires: python-devel -BuildRequires: python-nose BuildRequires: python-netaddr +BuildRequires: python-nose BuildRequires: rpm-build -BuildRequires: cyrus-sasl-lib # BuildRequires needed by the tests during the build BuildRequires: dosfstools -BuildRequires: psmisc -BuildRequires: python-ethtool -BuildRequires: python-inotify -BuildRequires: python-pthreading -BuildRequires: python-cpopen >= 1.3 -BuildRequires: python-ioprocess >= 0.12 -BuildRequires: qemu-img -BuildRequires: rpm-python -BuildRequires: libnl +BuildRequires: genisoimage +BuildRequires: libnl3 BuildRequires: libselinux-python BuildRequires: libvirt-python -BuildRequires: genisoimage +BuildRequires: m2crypto BuildRequires: openssl BuildRequires: policycoreutils-python -BuildRequires: m2crypto +BuildRequires: psmisc +BuildRequires: python-cpopen >= 1.3 +BuildRequires: python-inotify +BuildRequires: python-ioprocess >= 0.14 +BuildRequires: python-pthreading +BuildRequires: qemu-img +BuildRequires: rpm-python %if 0%{?rhel} == 6 +BuildRequires: python-simplejson >= 2.0.9 +BuildRequires: policycoreutils-python > 2.0.83-19.47 BuildRequires: python-argparse BuildRequires: python-ordereddict -BuildRequires: python-simplejson >= 2.0.9 %endif # Autotools BuildRequires @@ -154,15 +149,13 @@ Requires: python-netaddr Requires: python-inotify Requires: python-argparse Requires: python-cpopen >= 1.3 -Requires: python-ioprocess >= 0.12 +Requires: python-ioprocess >= 0.14 Requires: python-pthreading >= 0.1.3-3 -Requires: python-ethtool >= 0.6-3 -Requires: %{name}-python-zombiereaper = %{version}-%{release} +Requires: %{name}-infra = %{version}-%{release} Requires: rpm-python Requires: nfs-utils Requires: m2crypto -Requires: libguestfs-tools-c -Requires: libnl +Requires: libnl3 Requires: %{name}-xmlrpc = %{version}-%{release} Requires: %{name}-jsonrpc = %{version}-%{release} @@ -182,8 +175,14 @@ Requires: python-dmidecode Requires: dmidecode %endif -%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18 -Requires: libvirt-daemon >= 1.0.2-1 +%if 0%{?rhel} +Requires: libguestfs-tools-c >= 1:1.20.11-10 +%else # fedora +Requires: libguestfs-tools-c >= 1:1.26.7-2 +%endif + +%if 0%{?rhel} >= 7 || 0%{?fedora} +Requires: libvirt-daemon >= 1.1.1 Requires: libvirt-daemon-config-nwfilter Requires: libvirt-daemon-driver-network Requires: libvirt-daemon-driver-nwfilter @@ -192,7 +191,7 @@ Requires: libvirt-daemon-driver-qemu %if 0%{?rhel} Requires: libvirt >= 0.10.2-29.el6_5.4 %else -Requires: libvirt >= 1.0.2-1 +Requires: libvirt >= 1.1.1 %endif %endif Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client @@ -211,7 +210,6 @@ Requires: iscsi-initiator-utils >= 6.2.0.873-21 Requires: sanlock >= 2.8, sanlock-python %if 0%{?rhel} -Requires: python-ethtool >= 0.6-3 %if 0%{?rhel} >= 7 Requires: device-mapper-multipath Requires: e2fsprogs @@ -225,7 +223,7 @@ Requires: python Requires: device-mapper-multipath >= 0.4.9-52 Requires: e2fsprogs >= 1.41.12-11 Requires: fence-agents -Requires: kernel >= 2.6.32-279.9.1 +Requires: kernel >= 2.6.32-465 Requires: initscripts >= 9.03.31-2.el6_3.1 Requires: policycoreutils >= 2.0.83-19.30 Requires: policycoreutils-python >= 2.0.83-19.47.el6_6.1 @@ -238,7 +236,6 @@ Requires: fence-agents-all Requires: kernel >= 3.11.3-201 # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 -Requires: python-ethtool >= 0.8-1 Requires: initscripts >= 9.42.2-1 Requires: device-mapper-multipath >= 0.4.9-18 Requires: e2fsprogs >= 1.41.14 @@ -291,14 +288,19 @@ Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 -%if 0%{?fedora} && 0%{?fedora} >= 21 +%if 0%{?fedora} >= 21 Requires(post): hostname %else Requires(post): /bin/hostname %endif -Requires(post): policycoreutils-python -Requires(preun): policycoreutils-python +%if 0%{?rhev_build} +# backward compatible with older bootstrap code +# see bug#870079 +# can be removed when rhevm-3.0 hosts are +# updated with latest vdsm-bootstrap +Requires: %{name}-cli = %{version}-%{release} +%endif %description The VDSM service is required by a Virtualization Manager to manage the @@ -351,18 +353,24 @@ Requires: python >= 2.6 %description yajsonrpc A JSON RPC server and client implementation. -%package python-zombiereaper -Summary: Collects zombie processes automatically +%package infra +Summary: Utilities and libraries for vdsm BuildArch: noarch Requires: python >= 2.6 +Obsoletes: python-zombiereaper -%description python-zombiereaper -Collects zombie processes automatically so you don't have to +%description infra +Utilities and libraries for vdsm. %package bootstrap Summary: VDSM bootstrapping package BuildArch: noarch +%if 0%{?rhel} < 7 +Requires: python-ethtool >= 0.6-3 +%else +Requires: python-ethtool >= 0.8-1 +%endif %description bootstrap VDSM bootstrapping package. Used for delivering the bootstrap code onto the @@ -383,10 +391,10 @@ Manager. %package python Summary: VDSM python libraries -Requires: %{name}-python-zombiereaper = %{version}-%{release} +Requires: %{name}-infra = %{version}-%{release} Requires: python-cpopen >= 1.2.3-5 Requires: m2crypto -Requires: python-ioprocess >= 0.12 +Requires: python-ioprocess >= 0.14 BuildArch: noarch %description python @@ -411,6 +419,14 @@ BuildArch: noarch %description tests A test suite for verifying the functionality of a running vdsm instance +%package hook-allocate_net +Summary: random_network allocation hook for VDSM +BuildArch: noarch +Requires: %{name} + +%description hook-allocate_net +VDSM hook used to allocate networks for vms in a random fashion + %package hook-checkimages Summary: Qcow2 disk image format check hook for VDSM BuildArch: noarch @@ -475,6 +491,14 @@ VDSM hooks which allow to disable mac spoof filtering either on all the of the VM's interfaces or on specific vnics. +%package hook-noipspoof +Summary: Enables strict anti-spoofing filtering +BuildArch: noarch + +%description hook-noipspoof +VDSM hook which allows to enable strict anti-spoofing filtering +on all of the the VM's interfaces. + %package hook-extnet Summary: Force a vNIC to connect to a specific libvirt network BuildArch: noarch @@ -611,7 +635,7 @@ such as: vendor, version, date and release %package hook-sriov Summary: sr-iov support for VDSM -%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18 +%if 0%{?rhel} >= 7 || 0%{?fedora} Requires: libvirt-daemon-driver-nodedev %endif BuildArch: noarch @@ -654,6 +678,15 @@ BuildArch: noarch %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) +%package hook-ipv6 +Summary: Set IPv6 configuration through custom network properties +BuildArch: noarch +Requires: %{name} >= 4.16.7 + +%description hook-ipv6 +VDSM hook used for applying IPv6 configuration through custom network +properties + %if 0%{?with_gluster} %package gluster Summary: Gluster Plugin for VDSM @@ -677,7 +710,19 @@ sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in %if 0%{?enable_autotools} autoreconf -if %endif -%configure %{?with_hooks:--enable-hooks} %{?with_chown_hack:--enable-chown-hack} +%configure %{?with_hooks:--enable-hooks} \ + %{?with_chown_hack:--enable-chown-hack} \ + %{rhev_build_config_opt} \ +%if 0%{?rhev_build} + --with-reg-bridge-name='rhevm' \ + --with-engine-name='RHEV-M' \ + --with-smbios-manufacturer='Red Hat' \ + --with-smbios-osname='RHEV Hypervisor' \ + --with-qemu-kvm='qemu-kvm-rhev' \ + --with-qemu-img='qemu-img-rhev' \ + --with-register-uri='/RHEVManagerWeb/VdsAutoRegistration.aspx' +%endif + make # Setting software_version and software_revision in dsaversion.py baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` @@ -726,7 +771,7 @@ install -Dm 0755 init/sysvinit/supervdsmd.init %{buildroot}%{_initrddir}/supervd install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg %endif -%if 0%{?with_tmpfiles_macro} +%if 0%{?with_systemd} install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf %endif @@ -738,7 +783,7 @@ install -dDm 1777 %{buildroot}%{_localstatedir}/log/core %endif # Install the polkit for libvirt -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules %else @@ -812,14 +857,6 @@ if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add supervdsmd fi %else -# multipath.conf does not exists after multipath install, causing multipathd to -# exit silently when started as vdsmd required service. This creates default -# configuration blacklisting all devices, simulating the behavior of multipathd -# on EL6 when configuration file is missing. -# See https://bugzilla.redhat.com/1120209 -if [ ! -f "/etc/multipath.conf" ]; then - /usr/sbin/mpathconf --disable -fi /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : if [ "$1" -eq 1 ] ; then /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : @@ -856,7 +893,7 @@ then fi fi %else -%if 0%{?with_systemd_macros} +%if 0%{?with_systemd} %systemd_preun vdsmd.service %systemd_preun supervdsmd.service %else @@ -931,7 +968,7 @@ if [ "$1" -eq 1 ] ; then /sbin/chkconfig --add vdsm-reg fi %else -%if 0%{?with_systemd_macros} +%if 0%{?with_systemd} %systemd_post vdsm-reg.service %else if [ "$1" -eq 1 ] ; then @@ -950,7 +987,7 @@ then /sbin/chkconfig --del vdsm-reg fi %else -%if 0%{?with_systemd_macros} +%if 0%{?with_systemd} %systemd_preun vdsm-reg.service %else if [ "$1" -eq 0 ]; then @@ -986,6 +1023,7 @@ exit 0 %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/network %dir %{_datadir}/%{vdsm_name}/network/configurators +%dir %{_datadir}/%{vdsm_name}/network/tc %dir %{_datadir}/%{vdsm_name}/storage %dir %{_datadir}/%{vdsm_name}/storage/imageRepository %dir %{_datadir}/%{vdsm_name}/virt @@ -998,8 +1036,7 @@ exit 0 %{_datadir}/%{vdsm_name}/API.py* %{_datadir}/%{vdsm_name}/hooking.py* %{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/lsblk.py* -%{_datadir}/%{vdsm_name}/md_utils.py* +%{_datadir}/%{vdsm_name}/hostdev.py* %{_datadir}/%{vdsm_name}/mk_sysprep_floppy %{_datadir}/%{vdsm_name}/parted_utils.py* %{_datadir}/%{vdsm_name}/mkimage.py* @@ -1008,20 +1045,28 @@ exit 0 %{_datadir}/%{vdsm_name}/protocoldetector.py* %{_datadir}/%{vdsm_name}/supervdsm.py* %{_datadir}/%{vdsm_name}/supervdsmServer +%{_datadir}/%{vdsm_name}/v2v.py* %{_datadir}/%{vdsm_name}/vdsm %{_datadir}/%{vdsm_name}/vdsm-restore-net-config %{_datadir}/%{vdsm_name}/vdsm-store-net-config %{_datadir}/%{vdsm_name}/virt/__init__.py* +%{_datadir}/%{vdsm_name}/virt/domain_descriptor.py* %{_datadir}/%{vdsm_name}/virt/guestagent.py* %{_datadir}/%{vdsm_name}/virt/migration.py* +%{_datadir}/%{vdsm_name}/virt/sampling.py* %{_datadir}/%{vdsm_name}/virt/vmchannels.py* %{_datadir}/%{vdsm_name}/virt/vmstatus.py* %{_datadir}/%{vdsm_name}/virt/vmtune.py* %{_datadir}/%{vdsm_name}/virt/vm.py* %{_datadir}/%{vdsm_name}/virt/vmexitreason.py* %{_datadir}/%{vdsm_name}/virt/vmpowerdown.py* -%{_datadir}/%{vdsm_name}/virt/sampling.py* +%{_datadir}/%{vdsm_name}/virt/vmxml.py* %{_datadir}/%{vdsm_name}/virt/utils.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/core.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/hwclass.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/network.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/storage.py* %{_datadir}/%{vdsm_name}/tool %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf @@ -1035,7 +1080,7 @@ exit 0 %if 0%{?with_systemd} %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf %endif -%if 0%{?with_tmpfiles_macro} +%if 0%{?with_systemd} %config(noreplace) %{_tmpfilesdir}/%{vdsm_name}.conf %endif %{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh @@ -1060,12 +1105,19 @@ exit 0 %{_datadir}/%{vdsm_name}/network/models.py* %{_datadir}/%{vdsm_name}/network/sourceroute.py* %{_datadir}/%{vdsm_name}/network/sourceroutethread.py* -%{_datadir}/%{vdsm_name}/network/tc.py* %{_datadir}/%{vdsm_name}/network/configurators/__init__.py* %{_datadir}/%{vdsm_name}/network/configurators/dhclient.py* %{_datadir}/%{vdsm_name}/network/configurators/ifcfg.py* %{_datadir}/%{vdsm_name}/network/configurators/libvirt.py* %{_datadir}/%{vdsm_name}/network/configurators/iproute2.py* +%{_datadir}/%{vdsm_name}/network/configurators/pyroute_two.py* +%{_datadir}/%{vdsm_name}/network/configurators/qos.py* +%{_datadir}/%{vdsm_name}/network/tc/__init__.py* +%{_datadir}/%{vdsm_name}/network/tc/_parser.py* +%{_datadir}/%{vdsm_name}/network/tc/_wrapper.py* +%{_datadir}/%{vdsm_name}/network/tc/cls.py* +%{_datadir}/%{vdsm_name}/network/tc/filter.py* +%{_datadir}/%{vdsm_name}/network/tc/qdisc.py* %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* @@ -1175,7 +1227,6 @@ exit 0 %{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/get-conf-item %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* -%{_datadir}/%{vdsm_name}/ksm.py* %{_datadir}/%{vdsm_name}/momIF.py* %{_datadir}/%{vdsm_name}/respawn %{_datadir}/%{vdsm_name}/set-conf-item @@ -1195,7 +1246,7 @@ exit 0 %if 0%{?rhel} %dir %{_localstatedir}/log/core %endif -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %{_polkitdir}/10-vdsm-libvirt-access.rules %else %{_polkitdir}/10-vdsm-libvirt-access.pkla @@ -1227,6 +1278,7 @@ exit 0 %{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool %dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/netlink %dir %{python_sitelib}/%{vdsm_name}/tool %{python_sitelib}/%{vdsm_name}/__init__.py* %{python_sitelib}/%{vdsm_name}/compat.py* @@ -1237,30 +1289,41 @@ exit 0 %{python_sitelib}/%{vdsm_name}/ipwrapper.py* %{python_sitelib}/%{vdsm_name}/libvirtconnection.py* %{python_sitelib}/%{vdsm_name}/netinfo.py* -%{python_sitelib}/%{vdsm_name}/netlink.py* +%{python_sitelib}/%{vdsm_name}/netlink/__init__.py* +%{python_sitelib}/%{vdsm_name}/netlink/addr.py* +%{python_sitelib}/%{vdsm_name}/netlink/link.py* +%{python_sitelib}/%{vdsm_name}/netlink/route.py* %{python_sitelib}/%{vdsm_name}/profile.py* %{python_sitelib}/%{vdsm_name}/qemuimg.py* -%{python_sitelib}/%{vdsm_name}/SecureXMLRPCServer.py* %{python_sitelib}/%{vdsm_name}/netconfpersistence.py* %{python_sitelib}/%{vdsm_name}/sslutils.py* +%{python_sitelib}/%{vdsm_name}/sysctl.py* %{python_sitelib}/%{vdsm_name}/utils.py* %{python_sitelib}/%{vdsm_name}/vdscli.py* +%{python_sitelib}/%{vdsm_name}/virtsparsify.py* +%{python_sitelib}/%{vdsm_name}/xmlrpc.py* %{python_sitelib}/%{vdsm_name}/tool/__init__.py* +%if 0%{?rhev_build} +#compat +%{_datadir}/%{vdsm_name}/config.py* +%{_datadir}/%{vdsm_name}/netinfo.py* +%endif %if 0%{?with_systemd} %exclude %{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* %else %{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* %endif +%{python_sitelib}/%{vdsm_name}/tool/configfile.py* %{python_sitelib}/%{vdsm_name}/tool/dummybr.py* %{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py* %{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* %{python_sitelib}/%{vdsm_name}/tool/configurator.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* -%{python_sitelib}/%{vdsm_name}/tool/configurators/configfile.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* %{python_sitelib}/%{vdsm_name}/tool/passwd.py* %{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* %{python_sitelib}/%{vdsm_name}/tool/service.py* @@ -1287,6 +1350,8 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_2_4_8.out %{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out %{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out +%{_datadir}/%{vdsm_name}/tests/ip_route_show_table_all.out +%{_datadir}/%{vdsm_name}/tests/iscsiadm_-m_iface.out %{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out %{_datadir}/%{vdsm_name}/tests/mem_info.out %{_datadir}/%{vdsm_name}/tests/netmaskconversions @@ -1360,7 +1425,15 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options +%files hook-ipv6 +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ipv6 + %if 0%{?with_hooks} +%files hook-allocate_net +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/10_allocate_net + %files hook-checkimages %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages @@ -1408,6 +1481,11 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind +%files hook-noipspoof +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_noipspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_noipspoof + %files hook-extnet %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet @@ -1511,8 +1589,10 @@ exit 0 %{python_sitelib}/yajsonrpc/stomp.py* %{python_sitelib}/yajsonrpc/stompReactor.py* -%files python-zombiereaper -%{python_sitelib}/zombiereaper/__init__.py* +%files infra +%{python_sitelib}/%{vdsm_name}/infra/filecontrol/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/zombiereaper/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/__init__.py* %files bootstrap %defattr(-, root, root, -) @@ -1572,372 +1652,12 @@ exit 0 %endif %changelog -* Thu Dec 25 2014 Yaniv Bronhaim - 4.16.10 -* vdsm tag 4.16.10 - ovirt 3.5 build +* Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 +- Removing vdsm-python-cpopen from the spec +- Adding dependency on formal cpopen package -* Wed Oct 8 2014 Yaniv Bronhaim - 4.16.7 -- vdsm tag 4.16.7 - -* Sun Sep 28 2014 Douglas Schilling Landgraf - 4.16.5-5 -- vdsm tag 4.16.5-5 - -* Wed Sep 10 2014 Douglas Schilling Landgraf - 4.16.4-0 -- vdsm tag 4.16.4 - -* Mon Aug 18 2014 Fedora Release Engineering - 4.16.0-7.git5d3ed2d -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Mon Jun 30 2014 Douglas Schilling Landgraf - 4.16.0-6.git5d3ed2d -- vdsm 4.16.0-6.git5d3ed2d - -* Sun Jun 08 2014 Fedora Release Engineering - 4.14.8.1-1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed May 07 2014 Douglas Schilling Landgraf - 4.14.8.1-0 -- vdsm tag 4.14.8.1 - -* Thu Apr 24 2014 Douglas Schilling Landgraf - 4.14.7-0 -- vdsm tag 4.14.7-0 - -* Tue Mar 25 2014 Douglas Schilling Landgraf - 4.14.6-0 -- vdsm tag 4.14.6-0 - -* Sun Mar 09 2014 Yaniv Bronhaim - 4.14.5-0 -- Adding patches until 4.14.5 tag -- Urgent fix for 4.14.4 that included http-1.1 support for python 2.6 - -xmlrpc: [Fix] Use correct base class for parsing request - -* Mon Feb 10 2014 Douglas Schilling Landgraf - 4.14.2-0 -- vdsm 4.14.2-0 - -* Thu Feb 06 2014 Yaniv Bronhaim - 4.14.1-3 -- execCmd with sudo=root raise require tty fault when running as root -- sysvinit: Ensure that iscsid is started (BZ#1056948) -- Add missing libnl buildrequires dependency -- vdsm.spec: vdsm-python requires python-cpopen -- netconfig: set ETHTOOL_OPTS when a NIC goes up (BZ#1059680) -- sos: plugin should ignore /var/run/vdsm/storage -- vdsm.spec: vdsm should own vdsm.log (BZ#1055153) -- vdsm.spec: own metadata supervdsm mom logs (BZ#1055153) -- spec: do not remove vdsm logs when pkg removed (BZ#1055153) -- gluster: add host uuid in volume status -- gluster: interpret and use correct xml elements -- gluster: adopt xml changes of rebalance and remove-brick status -- vm: do not pause during refreshVolume (BZ#889097) -- spec: vdsm pkg for EL distro must include pkla (BZ#1060524) - -* Tue Jan 21 2014 Douglas Schilling Landgraf - 4.14.1-2 -- vdsm.spec: Add BuildRequires to python-argparse - -* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-1 -- Rebuild 4.14.1 from ovirt-3.4 - -* Mon Jan 20 2014 Douglas Schilling Landgraf - 4.14.1-0 -- Build 4.14.1-0 - -* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3-1 -- Reverting iscsi changes that caused a regression by importing -zombieReaper package which was not backported - -* Mon Jan 13 2014 Yaniv Bronhaim - 4.13.3 -- spec: bumping iscsi-initiator-utils requirement -- removing redundant check-local from storage makefile -- Adding exception handling in external threads -- fix bridgeless broken network deletion -- gluster api fix -- fix log issues - Changed BrokerLink log level to prevent log flooding -- sampling: make HostStatsThread a daemon thread -- bugfix - BindingXMLRpc - Return lastClientIface for current connection -- vm: Bring back missing before_device_migrate_source hook call -- update NIC: having no custom properies is valid -- prepareVolumePath payload misdetection fix -- fileSD: Fix image deletion on gluster domain -- vm: Update domains list for disks attached to vm after LSM -- prepareVolumePath correct path handling for cdrom - -* Wed Dec 11 2013 Yaniv Bronhaim - 4.13.2-1 -- fix cpopen obsolete loop -- fix threadPool refs -- mom policy fixes -- restorecon hack in spec file -- domainMonitor fixed last check flow - -* Tue Dec 10 2013 Yaniv Bronhaim - 4.13.2-0 -- Bumping minor version due to recent merge of ovirt-3.3 patches - -* Thu Nov 28 2013 Yaniv Bronhaim - 4.13.0-14 -- Adding update patches from branch ovirt-3.3 -- Declaring ovirt-3.3.2 patchsets scope in spec which declares all the merged -new patches - -* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-11 -- update from branch ovirt-3.3 which include: - upgrade-fix-v3ResetMetaVolSize-argument - lvm-Do-not-use-udev-cache-for-obtaining-device-list - Fix-ballooning-rules-for-computing-the-minimum-avail - Avoid-M2Crypto-races - spec-declare-we-provide-an-existing-python-cpopen - configuring-selinux-allowing-qemu-kvm-to-generate-co - -* Tue Nov 12 2013 Douglas Schilling Landgraf - 4.13.0-10 -- Fix requires on post for hostname. - -* Tue Nov 05 2013 Douglas Schilling Landgraf - 4.13.0-9 -- Build 4.13.0-9 from branch ovirt-3.3 - -* Wed Oct 30 2013 Cole Robinson - 4.12.1-5 -- Fix broken hostname dep on rawhide - -* Thu Oct 10 2013 Douglas Schilling Landgraf 4.12.1-4 -- remoteFileHandler: Add create exclusive option for truncateFile (BZ#979193) -- oop: improve safety for truncateFile - -* Tue Oct 08 2013 Douglas Schilling Landgraf 4.12.1-3 -- vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks (BZ#1007980) -- Require libvirt that allows vmUpdateDevice (BZ#1001001) -- imageSharing: return proper size in httpGetSize -- vdsmd.init: Add service-is-managed in shutdown_conflicting_srv (BZ#1006842) - -* Tue Sep 10 2013 Federico Simoncelli 4.12.1-2 -- systemd init: no need to stop conflicting services (BZ#999664) - -* Tue Aug 27 2013 Federico Simoncelli 4.12.1-1 -- update to 4.12.1 - -* Thu Aug 22 2013 Federico Simoncelli 4.12.0-2 -- Fix GlusterFS RPM dep to support GlusterFS SD (BZ#988299) - -* Tue Aug 13 2013 Federico Simoncelli 4.12.0-1 -- update to 4.12.0 final release -- mom: Require latest mom -- Mark ksmtuned as conflicting service in the init file -- spec: vdsm-hook-sriov on el6 should not require -- Crash fix for migrations that involve devices with no aliases (BZ#988065) -- vdsm: Always retrieve alias for Balloon and Console (BZ#988065) -- vdsm: Fix regression introduced by refactoring (BZ#985735) -- VDSM now writes its version number in VDSM-generated -- Bump requires version of selinux-policy-targeted -- vdsm_reg: fix ovirt_node without default bridge (BZ#988990) -- Source Route script now checks that the DHCP response (BZ#994600) -- Management network is now kept in main routing table (BZ#984028) -- Only remove dhcp source routing if the removal reason (BZ#995142) -- image: use successor volume size when merging - -* Sun Aug 04 2013 Fedora Release Engineering - 4.12.0-0.2.rc3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 23 2013 Federico Simoncelli 4.12.0-0.1.rc3 -- update to vdsm-4.12.0-rc3 - -* Wed Jul 10 2013 Douglas Schilling Landgraf 4.10.3-18 -- vdsm.spec: update python-pthreading -- service: make iscsid a systemd dependency - -* Tue Jun 4 2013 Douglas Schilling Landgraf 4.10.3-17 -- Makefile.am: ignore false positive pyflakes lvm.py -- Deactivate libvirtVM.Drives() -- vdsm: fix Vm cleanup routine -- Support teardownVolumePath(None) - -* Tue Apr 23 2013 Federico Simoncelli 4.10.3-16 -- Don't user sudo in fuser -- svdsm: fix fuser import in supervdsmServer -- Removing vdsm configuration when removing vdsm service -- Seperating supervdsm log to supervdsm.log file -- vdsm.spec: Adding with_systemd macro -- spec: use the fedora systemd macros -- spec: enable gluster upstream and on fedora 19 - -* Tue Apr 9 2013 Federico Simoncelli 4.10.3-15 -- fix the patches backported to ovirt-3.2 -- resync the fedora spec file with the upstream one - -* Mon Apr 8 2013 Federico Simoncelli 4.10.3-14 -- fix storage.fuser -- Bump up libvirt version to fix network linking. - -* Wed Apr 3 2013 Douglas Schilling Landgraf 4.10.3-13 -- Temporarily deactivate Gluster sub-package. - -* Tue Mar 26 2013 Douglas Schilling Landgraf 4.10.3-12 -- Applying direct to spec the fence-agents changes and removing the patch. - -* Mon Mar 25 2013 Douglas Schilling Landgraf 4.10.3-11 -- adapt vdsm.spec to new fence-agents package name. - -* Thu Mar 14 2013 Federico Simoncelli 4.10.3-10 -- gluster: Handling Attribute error in Python 2.6 -- bootstrap: remove glusterfs packages -- gluster: set glusterfs dependency version -- Do not delete the template when zeroing a dependant - -* Wed Feb 27 2013 Federico Simoncelli 4.10.3-9 -- packaging: add load_needed_modules.py.in -- tool: _enable_bond_dev: reopen bonding_masters per bond - -* Tue Feb 19 2013 Federico Simoncelli 4.10.3-8 -- configNet: allow delete/update of devices with no ifcfg (#906383) -- Requires policycoreutils-2.1.13-55 to avoid another -- After fail to connect to supervdsm more than 3 time - -* Thu Feb 14 2013 Federico Simoncelli 4.10.3-7 -- Fedora 18: require a newer udev (applied properly to the fedora specfile) - -* Wed Jan 30 2013 Federico Simoncelli 4.10.3-6 -- Explicitly shutdown m2crypto socket -- spec: require policycoreutils and skip sebool errors -- spec: requires selinux-policy to avoid selinux failure -- vdsmd.service: require either ntpd or chronyd -- isRunning didn't check local variable before reading -- udev: Race fix- load and trigger dev rule (#891300) -- Change scsi_id command path to be configured at runtime (#886087) -- upgrade: force upgrade to v2 before upgrading to v3 (#893184) -- misc: rename safelease to clusterlock -- domain: select the cluster lock using makeClusterLock -- clusterlock: add the local locking implementation (#877715) -- upgrade: catch MetaDataKeyNotFoundError when preparing -- vdsm.spec: Require openssl (#905728) -- Fedora 18: require a newer udev -- fix sloppy backport of safelease rename -- removing the use of zombie reaper from supervdsm - -* Fri Jan 18 2013 Douglas Schilling Landgraf 4.10.3-5 -- Searching for both py and pyc file to start super vdsm -- adding getHardwareInfo API to vdsm - -* Tue Jan 15 2013 Douglas Schilling Landgraf 4.10.3-4 -- python-ordereddict only for rhel more then 7 -- dont require python ordereddict on fedora -- BuildRequires python-pthreading - -* Wed Jan 02 2013 Federico Simoncelli 4.10.3-3 -- caps.py: osversion() validate OVIRT -- restarting libvirtd didn't work over allinone setup -- Integrate Smartcard support - -* Thu Dec 27 2012 Federico Simoncelli 4.10.3-2 -- api: Report CPU thread info in getVdsCapabilities -- schema: Missing comment for new VmDeviceType -- schema: Fix schema for VM.updateDevice - -* Wed Dec 12 2012 Federico Simoncelli 4.10.3-1 -- vdsm-4.10.3 - -* Mon Nov 5 2012 Douglas Schilling Landgraf 4.10.1-100.gf2f6683 -- vdsm-4.10.1-100-gf2f6683 - -* Wed Oct 31 2012 Douglas Schilling Landgraf 4.10.1-1 -- vdsm-4.10.1 -- merged vdsm.spec from f17 with last upstream vdsm.spec - -* Wed Oct 24 2012 Federico Simoncelli 4.10.0-12 -- configure selinux for sanlock on nfs - -* Sat Oct 20 2012 Peter Robinson 4.10.0-11 -- Merge F17 changes into F18+ and disable make check due to pep8 issues -- Add pyparted dependency - -* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10 -- BZ#845660 Use buffer size in multiplies of the recommended transfer size - -* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9 -- BZ#845660 Use the recommended alignment instead of using pagesize - -* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8 -- add the autotools support - -* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7 -- enable all the vdsm hooks - -* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6 -- BZ#842948: deployUtil - safely remove bridge - -* Tue Jul 17 2012 Federico Simoncelli 4.10.0-5 -- configNet: atomicBackup: remove new files upon restore -- configNet: clear up atomicBackup arg -- Remove redundant 'explicitBonding' parameter from setupNetworks -- BZ#837054 - Do not detach network from the bond during bond resize -- BZ#836954 - Allow to break bond and create a new network on its interface in single action. -- BZ#837443: remove bridge before add VDSM bridge -- BZ#837443: removeVlan() drop/remove interface -- configNetwork: fix NetInfo call -- BZ#837443: replace the netinfo import -- BZ#837443: removeBridge() drop/remove interface -- ovirt_functions: fix elif statement -- BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option passed -- BZ#832199: move selinux from init to spec -- bump libvirt version to fix readonly lease unsupported issue - -* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4 -- deployUtil: use os.uname instead of /bin/uname -- deployUtil: slightly saner kernel version comparison -- BZ#835784 - Allow to create a network on top of existing bond in additional - to create a new bond and network -- BZ#833119 - Allow to create VLANed network on top of existing bond -- BZ#833803 - Avoid bond breaking after network detach -- Handle bond properly if connectivity check fail. -- BZ#806555 having /etc/ovirt-node-* means it is a node - -* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3 -- BZ#832577: node can't be approved -- BZ#824298 fix typo in keyword argument exc_info - -* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2 -- deployUtil.yumFind: rename and simplify semantics -- drop deployUtil.yumSearch -- deployUtil.yumSearchVersion: compare versions sanely -- Iterates over delete candidates networks only once -- 'options' translation in setupNetworks is not relevant -- Minor optimization for delNetwork -- Don't ignore bridgeless networks in ifaceUsers -- Minor optimization for addNetwork -- Use already known iface in addNetwork -- Use proper MTU on bonding when add network -- Add bridge on top of VLAN if exists -- BZ#830485 - Add netConfigDirty bit to getVdsCaps report -- remove flag skipLibvirt -- BZ#826873 - Allow to change bond without network attached to it -- BZ#830486 - Allow to change network according the diffs from previous state -- BZ#826467 - Allow to remove bond and attach network to NIC -- Related to BZ#826873 - Allow to create bond without network - -* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1 -- vdsm-4.10.0 - -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471 -- BZ#822158 Report version-release in a short format - -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471 -- vdsm-4.9.6-ge952471 - -* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249 -- vdsm-4.9.6-g1b07249 - -* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5 -- vdsm-4.9.4-0.gb3642e5 - -* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0 -- vdsm-4.9.3.2 -- Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." - -* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0 -- vdsm-4.9.3.1 - -* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929 -- vdsm-4.9.2-g1d7b929 - -* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d -- vdsm-4.9.2-g951b41d - -* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e -- add the revision control comments to the specfile - -* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c -- require iscsi-initiator-utils >= 6.2.0.872-14 bz442980 -- fix the rpmlint errors +* Sun Apr 07 2013 Yaniv Bronhaim - 4.9.0-1 +- Adding cpopen package * Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 - Initial upstream release From a8caa5c684bb1c7a678b911f78a1a62d905e57bf Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 21 Mar 2015 14:02:37 +0000 Subject: [PATCH 094/126] Disable check as it's broken --- vdsm.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index c94b866..1d17b46 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -72,7 +72,7 @@ Name: %{vdsm_name} Version: 4.17.0 -Release: 267.git8f8b927%{?dist}%{?extra_release} +Release: 0.1.git8f8b927%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -799,7 +799,7 @@ install -Dm 0755 vdsm/virt/libvirt-hook.sh \ %check %if 0%{?with_check} -make check +#make check %endif %clean @@ -1652,6 +1652,10 @@ exit 0 %endif %changelog +* Sat Mar 21 2015 Peter Robinson 4.17-0.1 +- 4.17 pre release +- Disable check as it's broken + * Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 - Removing vdsm-python-cpopen from the spec - Adding dependency on formal cpopen package From 1022f5904739d386864854a0a922da5d974aca25 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:55:46 +0000 Subject: [PATCH 095/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 1d17b46..29bf863 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -72,7 +72,7 @@ Name: %{vdsm_name} Version: 4.17.0 -Release: 0.1.git8f8b927%{?dist}%{?extra_release} +Release: 0.2.git8f8b927%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1652,6 +1652,9 @@ exit 0 %endif %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 4.17.0-0.2.git8f8b927 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat Mar 21 2015 Peter Robinson 4.17-0.1 - 4.17 pre release - Disable check as it's broken From 026071b741b124bb85f07795e6e0ed090fdcc192 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sun, 18 Oct 2015 16:54:28 +0300 Subject: [PATCH 096/126] Build of vdsm 4.17 for ovirt-3.6 --- sources | 2 +- vdsm.spec | 652 ++++++++++++++++-------------------------------------- 2 files changed, 191 insertions(+), 463 deletions(-) diff --git a/sources b/sources index 7f7072a..3693f7f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f77cbb5bfdbf0603fc0892ed8e0ae8e9 vdsm-4.17.0.tar.gz +730fc4f0387e19e8f0cff66a4d28ddbd vdsm-4.17.9.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 29bf863..617231d 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1,7 +1,5 @@ # Packages names %global vdsm_name vdsm -%global vdsm_bootstrap vdsm-bootstrap -%global vdsm_reg vdsm-reg # Required users and groups %global vdsm_user vdsm @@ -12,8 +10,11 @@ %global snlk_user sanlock %global cdrom_group cdrom -# koji build - overridable using rpmbuild --define "koji_build 1" -%{!?koji_build: %global fedora_koji_build 0} +# Glusterfs package version +%global gluster_version 3.7.1 + +# koji build - overridable using rpmbuild --define "fedora_koji_build 1" +%global fedora_koji_build 1 # RHEV build - overridable using rpmbuild --define "rhev_build 1" %{!?rhev_build: %global rhev_build 0} @@ -22,10 +23,6 @@ %global with_hooks 1 %endif -%if %{rhev_build} -%global rhev_build_config_opt --enable-rhev -%endif - # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. @@ -54,26 +51,14 @@ %global with_vhostmd 1 %endif -%if 0%{?fedora} || 0%{?rhel} >= 7 -%global with_systemd 1 -%endif - -%if 0%{?fedora} || 0%{?rhel} >= 7 -%global with_chown_hack 1 -%endif - -%if 0%{?rhel} == 6 -%global _udevrulesdir /lib/udev/rules.d/ -%global _udevexecdir /lib/udev/ -%else %global _udevrulesdir /usr/lib/udev/rules.d/ %global _udevexecdir /usr/lib/udev/ -%endif Name: %{vdsm_name} -Version: 4.17.0 -Release: 0.2.git8f8b927%{?dist}%{?extra_release} +Version: 4.17.9 +Release: 3.git9c6ec73%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager +BuildArch: noarch Group: Applications/System License: GPLv2+ @@ -81,14 +66,7 @@ Url: http://www.ovirt.org/wiki/Vdsm Source0: %{vdsm_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%if !%{fedora_koji_build} -ExclusiveArch: x86_64 ppc64 -%endif - -%if 0%{?rhel} <= 6 -# qemu-img is x86_64 only on RHEL6 -ExclusiveArch: x86_64 -%endif +%{!?_licensedir:%global license %%doc} BuildRequires: cyrus-sasl-lib BuildRequires: gcc @@ -96,6 +74,7 @@ BuildRequires: python BuildRequires: python-devel BuildRequires: python-netaddr BuildRequires: python-nose +BuildRequires: python-six BuildRequires: rpm-build # BuildRequires needed by the tests during the build @@ -105,6 +84,7 @@ BuildRequires: libnl3 BuildRequires: libselinux-python BuildRequires: libvirt-python BuildRequires: m2crypto +BuildRequires: mom >= 0.4.5 BuildRequires: openssl BuildRequires: policycoreutils-python BuildRequires: psmisc @@ -114,12 +94,7 @@ BuildRequires: python-ioprocess >= 0.14 BuildRequires: python-pthreading BuildRequires: qemu-img BuildRequires: rpm-python -%if 0%{?rhel} == 6 -BuildRequires: python-simplejson >= 2.0.9 -BuildRequires: policycoreutils-python > 2.0.83-19.47 -BuildRequires: python-argparse -BuildRequires: python-ordereddict -%endif +BuildRequires: python-blivet # Autotools BuildRequires %if 0%{?enable_autotools} @@ -134,9 +109,7 @@ BuildRequires: pyflakes BuildRequires: python-pep8 %endif -%if 0%{?with_systemd} BuildRequires: systemd-units -%endif Requires: ethtool Requires: which @@ -144,36 +117,26 @@ Requires: sudo >= 1.7.3 Requires: logrotate Requires: xz Requires: ntp -Requires: iproute +Requires: iproute >= 3.10.0 Requires: python-netaddr Requires: python-inotify Requires: python-argparse Requires: python-cpopen >= 1.3 Requires: python-ioprocess >= 0.14 Requires: python-pthreading >= 0.1.3-3 +Requires: python-six +Requires: python-requests Requires: %{name}-infra = %{version}-%{release} Requires: rpm-python Requires: nfs-utils Requires: m2crypto Requires: libnl3 +Requires: curl Requires: %{name}-xmlrpc = %{version}-%{release} Requires: %{name}-jsonrpc = %{version}-%{release} - -%if 0%{?rhev_build} -Requires: mom >= 0.4.1-4 -%else -Requires: mom >= 0.4.3 -%endif - -# Numactl is not available on s390[x] and ARM -%ifnarch s390 s390x %{arm} -Requires: numactl -%endif - -%ifarch x86_64 -Requires: python-dmidecode -Requires: dmidecode -%endif +Requires: safelease >= 1.0-5 +Requires: mom >= 0.4.5 +Requires: ovirt-vmconsole >= 1.0.0-0 %if 0%{?rhel} Requires: libguestfs-tools-c >= 1:1.20.11-10 @@ -181,28 +144,31 @@ Requires: libguestfs-tools-c >= 1:1.20.11-10 Requires: libguestfs-tools-c >= 1:1.26.7-2 %endif -%if 0%{?rhel} >= 7 || 0%{?fedora} -Requires: libvirt-daemon >= 1.1.1 Requires: libvirt-daemon-config-nwfilter Requires: libvirt-daemon-driver-network Requires: libvirt-daemon-driver-nwfilter Requires: libvirt-daemon-driver-qemu -%else + %if 0%{?rhel} -Requires: libvirt >= 0.10.2-29.el6_5.4 -%else -Requires: libvirt >= 1.1.1 +Requires: libvirt-daemon >= 1.2.8-16.el7_1.4 +Requires: libvirt-python >= 1.2.8-7.el7_1.1 +%endif # rhel + +%if 0%{?fedora} >= 22 +Requires: libvirt-daemon >= 1.2.13 +Requires: libvirt-python >= 1.2.9-2 %endif + +%if 0%{?fedora} +Requires: libvirt-daemon >= 1.2.9.3-1 +Requires: libvirt-python >= 1.2.9-2 %endif -Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client + +Requires: libvirt-lock-sanlock, libvirt-client # iscsi-intiator versions %if 0%{?rhel} -%if 0%{?rhel} >= 7 Requires: iscsi-initiator-utils -%else -Requires: iscsi-initiator-utils >= 6.2.0.872-15 -%endif # rhel 7 %else # fedora Requires: iscsi-initiator-utils >= 6.2.0.873-21 %endif @@ -210,70 +176,45 @@ Requires: iscsi-initiator-utils >= 6.2.0.873-21 Requires: sanlock >= 2.8, sanlock-python %if 0%{?rhel} -%if 0%{?rhel} >= 7 -Requires: device-mapper-multipath +Requires: device-mapper-multipath >= 0.4.9-68 Requires: e2fsprogs Requires: fence-agents-all -Requires: lvm2 -Requires: python +Requires: kernel >= 3.10.0-132.el7 +Requires: lvm2 >= 2.02.107 +Requires: python >= 2.7.5-18.el7_1.1 Requires: policycoreutils-python -Requires: selinux-policy-targeted >= 3.12.1-153.el7_0.13 -%else -Requires: python -Requires: device-mapper-multipath >= 0.4.9-52 -Requires: e2fsprogs >= 1.41.12-11 -Requires: fence-agents -Requires: kernel >= 2.6.32-465 -Requires: initscripts >= 9.03.31-2.el6_3.1 -Requires: policycoreutils >= 2.0.83-19.30 -Requires: policycoreutils-python >= 2.0.83-19.47.el6_6.1 -Requires: selinux-policy-targeted >= 3.7.19-260.el6_6.1 -Requires: lvm2 >= 2.02.100-5 -Requires: logrotate < 3.8.0 -%endif +Requires: selinux-policy-targeted >= 3.13.1-16.el7 %else Requires: fence-agents-all -Requires: kernel >= 3.11.3-201 +Requires: kernel >= 4.1.6 # Subprocess and thread bug was found on python 2.7.2 Requires: python >= 2.7.3 Requires: initscripts >= 9.42.2-1 -Requires: device-mapper-multipath >= 0.4.9-18 +Requires: device-mapper-multipath >= 0.4.9-56 Requires: e2fsprogs >= 1.41.14 Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: ed -Requires: lvm2 >= 2.02.98-15 -Requires: selinux-policy-targeted >= 3.12.1-71 +Requires: lvm2 >= 2.02.107 +Requires: selinux-policy-targeted >= 3.12.1-177 # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is # disabled we now require the version 2.1.13-55 (or newer) of Fedora. Requires: policycoreutils >= 2.1.13-55 Requires: systemd >= 197-1.fc18.2 %endif -%if !%{fedora_koji_build} -%global rhev_suffix -rhev -%endif - %if 0%{?rhel} -%if 0%{?rhel} >= 7 -Requires: qemu-kvm%{?rhev_suffix} -Requires: qemu-img%{?rhev_suffix} +Requires: qemu-kvm-rhev >= 10:2.1.2-23.el7_1.2 +Requires: qemu-img-rhev >= 10:2.1.2-23.el7_1.2 %else -Requires: qemu-kvm%{?rhev_suffix} >= 2:0.12.1.2-2.415.el6_5.3 -Requires: qemu-img%{?rhev_suffix} >= 2:0.12.1.2-2.415.el6_5.3 -%endif -%else -Requires: qemu-kvm >= 2:0.15.0-4 -Requires: qemu-img >= 2:0.15.0-4 -%endif +Requires: qemu-kvm >= 2:2.1.3-11 +Requires: qemu-img >= 2:2.1.3-11 +%endif # rhel # GlusterFS client-side RPMs needed for Gluster SD %if 0%{?with_gluster} -Requires: glusterfs >= 3.4.2 -Requires: glusterfs-cli -Requires: glusterfs-api -Requires: glusterfs-fuse -Requires: glusterfs-rdma +Requires: glusterfs-cli >= %{gluster_version} +Requires: glusterfs-fuse >= %{gluster_version} %endif Requires: psmisc >= 22.6-15 @@ -288,19 +229,13 @@ Requires: pyparted Requires(post): /usr/sbin/saslpasswd2 -%if 0%{?fedora} >= 21 +%if 0%{?fedora} Requires(post): hostname %else Requires(post): /bin/hostname %endif -%if 0%{?rhev_build} -# backward compatible with older bootstrap code -# see bug#870079 -# can be removed when rhevm-3.0 hosts are -# updated with latest vdsm-bootstrap -Requires: %{name}-cli = %{version}-%{release} -%endif +Conflicts: vdsm-hook-sriov %description The VDSM service is required by a Virtualization Manager to manage the @@ -310,8 +245,6 @@ tasks, statistics gathering, and log collection. %package cli Summary: VDSM command line interface -BuildArch: noarch - Requires: %{name}-python = %{version}-%{release} Requires: %{name}-xmlrpc = %{version}-%{release} @@ -320,8 +253,6 @@ Call VDSM commands from the command line. Used for testing and debugging. %package xmlrpc Summary: VDSM xmlrpc API -BuildArch: noarch - Requires: %{name}-python = %{version}-%{release} @@ -331,23 +262,15 @@ ovirt-engine and vdsClient. %package jsonrpc Summary: VDSM API Server -BuildArch: noarch - Requires: %{name}-python = %{version}-%{release} Requires: %{name}-yajsonrpc = %{version}-%{release} Obsoletes: vdsm-api < 4.16 -%if 0%{?rhel} == 6 -Requires: python-ordereddict -Requires: python-simplejson >= 2.0.9 -%endif %description jsonrpc A Json-based RPC interface that serves as the protocol for libvdsm. %package yajsonrpc Summary: JSON RPC server and client implementation -BuildArch: noarch - Requires: python >= 2.6 %description yajsonrpc @@ -355,31 +278,14 @@ A JSON RPC server and client implementation. %package infra Summary: Utilities and libraries for vdsm -BuildArch: noarch - Requires: python >= 2.6 Obsoletes: python-zombiereaper %description infra Utilities and libraries for vdsm. -%package bootstrap -Summary: VDSM bootstrapping package -BuildArch: noarch -%if 0%{?rhel} < 7 -Requires: python-ethtool >= 0.6-3 -%else -Requires: python-ethtool >= 0.8-1 -%endif - -%description bootstrap -VDSM bootstrapping package. Used for delivering the bootstrap code onto the -Virtualization Manager. - %package reg Summary: VDSM registration package -BuildArch: noarch - Requires: %{name} = %{version}-%{release} Requires: m2crypto Requires: openssl @@ -395,7 +301,6 @@ Requires: %{name}-infra = %{version}-%{release} Requires: python-cpopen >= 1.2.3-5 Requires: m2crypto Requires: python-ioprocess >= 0.14 -BuildArch: noarch %description python Shared libraries between the various VDSM packages. @@ -404,7 +309,6 @@ Shared libraries between the various VDSM packages. Summary: VDSM Debug Plugin Requires: %{name} Requires: %{name}-xmlrpc = %{version}-%{release} -BuildArch: noarch %description debug-plugin Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. @@ -414,14 +318,12 @@ Summary: VDSM Test Suite Requires: %{name} = %{version}-%{release} Requires: dracut Requires: python-nose -BuildArch: noarch %description tests A test suite for verifying the functionality of a running vdsm instance %package hook-allocate_net Summary: random_network allocation hook for VDSM -BuildArch: noarch Requires: %{name} %description hook-allocate_net @@ -429,16 +331,22 @@ VDSM hook used to allocate networks for vms in a random fashion %package hook-checkimages Summary: Qcow2 disk image format check hook for VDSM -BuildArch: noarch Requires: %{name} %description hook-checkimages VDSM hook used to perform consistency check on a qcow2 format disk image using the QEMU disk image utility. +%package hook-diskunmap +Summary: Activate UNMAP for disk/lun devices +BuildArch: noarch +Requires: qemu-kvm >= 1.5 + +%description hook-diskunmap +VDSM hooks which allow to activate disk UNMAP. + %package hook-ethtool-options Summary: Allow setting custom ethtool options for vdsm controlled nics -BuildArch: noarch Requires: %{name} = %{version}-%{release} %description hook-ethtool-options @@ -449,7 +357,6 @@ options for vdsm network nics %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd Requires: vhostmd -BuildArch: noarch %description hook-vhostmd VDSM hook to use vhostmd per VM according to Virtualization Manager requests. @@ -457,7 +364,6 @@ VDSM hook to use vhostmd per VM according to Virtualization Manager requests. %package hook-faqemu Summary: Fake qemu process for VDSM quality assurance -BuildArch: noarch Requires: %{name} %description hook-faqemu @@ -468,7 +374,6 @@ To enable this hook on your host, set vars.fake_kvm_support=True in your %package hook-directlun Summary: Direct LUN support for VDSM -BuildArch: noarch %description hook-directlun VDSM hook enable user to add storage LUN for VDSM @@ -476,7 +381,6 @@ without the sharing and storage handling of VDSM. %package hook-macbind Summary: Bind a vNIC to a Bridge -BuildArch: noarch Requires: %{name} >= 4.14 %description hook-macbind @@ -484,7 +388,6 @@ VDSM hooks which allow to bind a vNIC to a Bridge, managed or not by engine. %package hook-macspoof Summary: Disables MAC spoofing filtering -BuildArch: noarch %description hook-macspoof VDSM hooks which allow to disable mac spoof filtering @@ -493,7 +396,6 @@ specific vnics. %package hook-noipspoof Summary: Enables strict anti-spoofing filtering -BuildArch: noarch %description hook-noipspoof VDSM hook which allows to enable strict anti-spoofing filtering @@ -501,7 +403,6 @@ on all of the the VM's interfaces. %package hook-extnet Summary: Force a vNIC to connect to a specific libvirt network -BuildArch: noarch Requires: %{name} = %{version}-%{release} %description hook-extnet @@ -510,15 +411,15 @@ outside of oVirt, such as an openvswitch network. %package hook-fakevmstats Summary: Generate random VM statistics -BuildArch: noarch Requires: %{name} %description hook-fakevmstats Hook intercepts VM's stats and randomizes various fields. +To enable this hook on your host, set vars.fake_vmstats_enable=true in your +/etc/vdsm/vdsm.conf. %package hook-fileinject Summary: Allow uploading file to VMs disk -BuildArch: noarch Requires: python-libguestfs %description hook-fileinject @@ -527,23 +428,32 @@ create that file in target machine. %package hook-floppy Summary: Allow adding floppy to VM -BuildArch: noarch %description hook-floppy Allow adding floppy to VM %package hook-hostusb Summary: Allow attaching USB device from host -BuildArch: noarch Requires: usbutils %description hook-hostusb Hook is getting vendor and product id of USB device disconnect it from host and attach it to VM +%package hook-httpsisoboot +Summary: Allow directly booting from an https available ISO +BuildArch: noarch +%if 0%{?rhel} +Requires: qemu-kvm-rhev >= 10:2.1.2-3 +%endif + +%description hook-httpsisoboot +Let the VM boot from an ISO image made available via an https URL without +the need to import the ISO into an ISO storage domain. +It doesn't support plain http. + %package hook-hugepages Summary: Huge pages enable user to handle VM with 2048KB page files. -BuildArch: noarch %description hook-hugepages Hook is getting number of huge pages reserve them for the VM, @@ -551,7 +461,6 @@ and enable user to handle VM with 2048KB page files. %package hook-isolatedprivatevlan Summary: Isolated network environment for VMs -BuildArch: noarch %description hook-isolatedprivatevlan limit VM traffic to a specific gateway by its mac address, @@ -561,7 +470,6 @@ and by adding custom filter: isolatedprivatevlan-vdsm.xml %package hook-nestedvt Summary: Nested Virtualization support for VDSM -BuildArch: noarch %description hook-nestedvt If the nested virtualization is enabled in your kvm module @@ -569,7 +477,6 @@ this hook will expose it to the guests. %package hook-numa Summary: NUMA support for VDSM -BuildArch: noarch %description hook-numa Hooks is getting number/rage of NUMA nodes and NUMA mode, @@ -577,14 +484,12 @@ and update the VM xml. %package hook-openstacknet Summary: OpenStack Network vNICs support for VDSM -BuildArch: noarch %description hook-openstacknet Hook for OpenStack Network vNICs. %package hook-pincpu Summary: Hook pin VM so specific CPUs -BuildArch: noarch %description hook-pincpu pincpu is hook for VDSM. @@ -592,7 +497,6 @@ pincpu enable to pin virtual machine to a specific CPUs. %package hook-promisc Summary: Network interface promiscuous mode support for VDSM -BuildArch: noarch %description hook-promisc VDSM promiscuous mode let user define a VM interface that will capture @@ -600,7 +504,6 @@ all network traffic. %package hook-qemucmdline Summary: QEMU cmdline hook for VDSM -BuildArch: noarch Requires: %{name} %description hook-qemucmdline @@ -610,14 +513,12 @@ qemu xml namespace. %package hook-qos Summary: QoS network in/out traffic support for VDSM -BuildArch: noarch %description hook-qos Hook adds QoS in/out traffic to VMs interfaces %package hook-scratchpad Summary: One time disk creation for VDSM -BuildArch: noarch %description hook-scratchpad scratchpad hook for VDSM @@ -627,27 +528,13 @@ VM cannot be migrated when using scratchpad hook %package hook-smbios Summary: Adding custom smbios entries to libvirt domain via VDSM -BuildArch: noarch %description hook-smbios Adding custom smbios entries to libvirt domain via VDSM such as: vendor, version, date and release -%package hook-sriov -Summary: sr-iov support for VDSM -%if 0%{?rhel} >= 7 || 0%{?fedora} -Requires: libvirt-daemon-driver-nodedev -%endif -BuildArch: noarch - -%description hook-sriov -sr-iov hook enable to add virtual functions exposed by the device -directly to a virtual machine. - - %package hook-spiceoptions Summary: To configure spice options for vm -BuildArch: noarch %description hook-spiceoptions This vdsm hook can be used to configure some of @@ -655,7 +542,6 @@ the spice optimization attributes and values.. %package hook-vmfex Summary: vmfex support for VDSM -BuildArch: noarch Conflicts: hook-vmfex-dev %description hook-vmfex @@ -663,7 +549,6 @@ Hook for vmfex. %package hook-vmfex-dev Summary: VM-FEX vNIC support for VDSM -BuildArch: noarch Requires: %{name} = %{version}-%{release} Conflicts: hook-vmfex @@ -673,14 +558,12 @@ VM-FEX Virtual Function (SR-IOV with macvtap mode). %package hook-vmdisk Summary: External disk support for VDSM -BuildArch: noarch %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) %package hook-ipv6 Summary: Set IPv6 configuration through custom network properties -BuildArch: noarch Requires: %{name} >= 4.16.7 %description hook-ipv6 @@ -690,11 +573,13 @@ properties %if 0%{?with_gluster} %package gluster Summary: Gluster Plugin for VDSM -BuildArch: noarch - Requires: %{name} = %{version}-%{release} -Requires: glusterfs-server +Requires: glusterfs-server >= %{gluster_version} +Requires: glusterfs-api >= %{gluster_version} +Requires: glusterfs-geo-replication >= %{gluster_version} Requires: python-magic +Requires: python-blivet +Requires: xfsprogs %description gluster Gluster plugin enables VDSM to serve Gluster functionalities. @@ -702,25 +587,18 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q -%if 0%{?rhel} == 6 -sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in -%endif %build %if 0%{?enable_autotools} autoreconf -if %endif %configure %{?with_hooks:--enable-hooks} \ - %{?with_chown_hack:--enable-chown-hack} \ - %{rhev_build_config_opt} \ %if 0%{?rhev_build} - --with-reg-bridge-name='rhevm' \ - --with-engine-name='RHEV-M' \ + --enable-rhev \ --with-smbios-manufacturer='Red Hat' \ --with-smbios-osname='RHEV Hypervisor' \ --with-qemu-kvm='qemu-kvm-rhev' \ --with-qemu-img='qemu-img-rhev' \ - --with-register-uri='/RHEVManagerWeb/VdsAutoRegistration.aspx' %endif make @@ -741,10 +619,6 @@ make DESTDIR=%{buildroot} install install -dDm 0755 %{buildroot}/var/log/vdsm touch %{buildroot}/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -# Install the respawn utility -install -Dm 0755 init/sysvinit/respawn \ - %{buildroot}%{_datadir}/%{vdsm_name}/respawn - # Install the lvm rules install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules @@ -752,29 +626,20 @@ install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf -%if 0%{?with_systemd} install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/usr/lib/systemd/systemd-vdsmd +install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}/usr/lib/systemd/system-preset/85-vdsmd.preset install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +install -Dm 0644 init/systemd/vdsm-network.service %{buildroot}%{_unitdir}/vdsm-network.service install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service -install -Dm 0755 vdsm_reg/vdsm-reg.init \ - %{buildroot}/usr/lib/systemd/systemd-vdsm-reg -install -Dm 0644 vdsm_reg/vdsm-reg.service \ - %{buildroot}%{_unitdir}/vdsm-reg.service +install -Dm 0644 init/systemd/mom-vdsm.service %{buildroot}%{_unitdir}/mom-vdsm.service + install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf -%else -# Install the SysV init scripts -install -Dm 0755 init/sysvinit/vdsmd.init %{buildroot}%{_initrddir}/vdsmd -install -Dm 0755 init/sysvinit/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd - -install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg -%endif - -%if 0%{?with_systemd} install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf -%endif +install -Dm 0644 init/systemd/unlimited-core.conf \ + %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf %if 0%{?rhel} # This is not commonplace, but we want /var/log/core to be a world-writable @@ -783,23 +648,16 @@ install -dDm 1777 %{buildroot}%{_localstatedir}/log/core %endif # Install the polkit for libvirt -%if 0%{?fedora} || 0%{?rhel} >= 7 install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules -%else -install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ - %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla -%endif # Install the libvirt hook for cleaning up the XML -%if 0%{?fedora} || 0%{?rhel} >= 7 install -Dm 0755 vdsm/virt/libvirt-hook.sh \ %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu -%endif %check %if 0%{?with_check} -#make check +make check %endif %clean @@ -822,13 +680,6 @@ if [ "$1" -gt 1 ]; then fi %post -%{_bindir}/vdsm-tool configure --module sanlock --force >/dev/null -# update the vdsm "secret" password for libvirt -if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then - /usr/sbin/saslpasswd2 -p -a libvirt vdsm@ovirt < \ - /etc/pki/vdsm/keys/libvirt_password -fi - # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included @@ -851,61 +702,26 @@ fi /sbin/restorecon -R /var/log/core >/dev/null 2>&1 # hack until we replace core dump with abrt -%if ! 0%{?with_systemd} -if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsmd - /sbin/chkconfig --add supervdsmd -fi -%else +# VDSM installs vdsm-modules-load.d.conf file - the following command will +# refresh vdsm kernel modules requirements to start on boot /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : -if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : - /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || : -fi + +# The following triggers vdsmd.preset file and enables vdsm required services +%systemd_post vdsmd.service + +# VDSM installs unit files - daemon-reload will refresh systemd /bin/systemctl daemon-reload >/dev/null 2>&1 || : exit 0 -%endif %preun if [ "$1" -eq 0 ]; then %{_bindir}/vdsm-tool remove-config fi - -%if ! 0%{?with_systemd} -if [ "$1" -eq 0 ] -then - /sbin/service vdsmd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del vdsmd - /sbin/service supervdsmd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del supervdsmd - - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ - /etc/sysctl.conf - - %{_bindir}/vdsm-tool remove-saslpasswd - - if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then - /sbin/initctl stop libvirtd >/dev/null 2>/dev/null - rm -f /etc/init/libvirtd.conf - - /sbin/chkconfig libvirtd on - /sbin/service libvirtd start >/dev/null - fi -fi -%else -%if 0%{?with_systemd} %systemd_preun vdsmd.service +%systemd_preun vdsm-network.service %systemd_preun supervdsmd.service -%else -if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : - /bin/systemctl --no-reload disable supervdsmd.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : - /bin/systemctl stop supervdsmd.service > /dev/null 2>&1 || : -fi +%systemd_preun mom-vdsm.service exit 0 -%endif -%endif %postun if [ "$1" -ge 1 ]; then @@ -923,19 +739,8 @@ if [ "$1" -ge 1 ]; then supervdsmd_start_required='yes' fi - if ! %{_bindir}/vdsm-tool is-configured --module libvirt >/dev/null 2>&1; - then - if ! %{_bindir}/vdsm-tool configure --module libvirt --force \ - >/dev/null 2>&1; then - # fallback to vdsmd reconfigure api - This change may be removed - # when vdsm won't support any downgrade\upgrade to versions that - # don't include vdsm-tool configure api (vdsm <= 3.3) - for f in '/usr/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do - if [ -f "${f}" ]; then - "${f}" reconfigure >/dev/null 2>&1 || : - fi - done - fi + if ! %{_bindir}/vdsm-tool is-configured >/dev/null 2>&1; then + %{_bindir}/vdsm-tool configure --force >/dev/null 2>&1 fi if [ "${supervdsmd_start_required}" = 'yes' ]; then @@ -947,68 +752,17 @@ if [ "$1" -ge 1 ]; then fi exit 0 -%if 0%{?rhel} == 6 -# In el6, We configure libvirt to use upstart without the libvirt.rpm's -# awareness. Thus, we must stop/restart libvirt ourselves when the -# libvirt.rpm is removed/upgraded. -%triggerun -- libvirt -if [ "$2" -eq "0" ]; then - /sbin/initctl stop libvirtd > /dev/null 2>&1 || : -fi - -%triggerpostun -- libvirt -if [ "$2" -ge "1" ]; then - /sbin/initctl restart libvirtd > /dev/null 2>&1 || : -fi -%endif - -%post reg -%if ! 0%{?with_systemd} -if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsm-reg -fi -%else -%if 0%{?with_systemd} -%systemd_post vdsm-reg.service -%else -if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -exit 0 -%endif -%endif - -%preun reg -%if ! 0%{?with_systemd} -if [ "$1" -eq 0 ] -then - /sbin/service vdsm-reg stop > /dev/null 2>&1 || : - /sbin/chkconfig --del vdsm-reg -fi -%else -%if 0%{?with_systemd} -%systemd_preun vdsm-reg.service -%else -if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsm-reg.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1 || : -fi -exit 0 -%endif -%endif - %files %defattr(-, root, root, -) -%doc COPYING README lib/vdsm/vdsm.conf.sample -%if 0%{?with_systemd} +%doc README lib/vdsm/vdsm.conf.sample +%license COPYING /usr/lib/systemd/systemd-vdsmd +/usr/lib/systemd/system-preset/85-vdsmd.preset %{_unitdir}/vdsmd.service +%{_unitdir}/vdsm-network.service %{_unitdir}/supervdsmd.service -%else -%{_initrddir}/vdsmd -%{_initrddir}/supervdsmd -%endif +%{_unitdir}/mom-vdsm.service +%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center %ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/connectivity.log @@ -1053,8 +807,12 @@ exit 0 %{_datadir}/%{vdsm_name}/virt/domain_descriptor.py* %{_datadir}/%{vdsm_name}/virt/guestagent.py* %{_datadir}/%{vdsm_name}/virt/migration.py* +%{_datadir}/%{vdsm_name}/virt/periodic.py* %{_datadir}/%{vdsm_name}/virt/sampling.py* +%{_datadir}/%{vdsm_name}/virt/secret.py* +%{_datadir}/%{vdsm_name}/virt/virdomain.py* %{_datadir}/%{vdsm_name}/virt/vmchannels.py* +%{_datadir}/%{vdsm_name}/virt/vmstats.py* %{_datadir}/%{vdsm_name}/virt/vmstatus.py* %{_datadir}/%{vdsm_name}/virt/vmtune.py* %{_datadir}/%{vdsm_name}/virt/vm.py* @@ -1064,10 +822,11 @@ exit 0 %{_datadir}/%{vdsm_name}/virt/utils.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/core.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/graphics.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/hostdevice.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/hwclass.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/network.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/storage.py* -%{_datadir}/%{vdsm_name}/tool %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf @@ -1077,19 +836,12 @@ exit 0 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf -%if 0%{?with_systemd} %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf -%endif -%if 0%{?with_systemd} %config(noreplace) %{_tmpfilesdir}/%{vdsm_name}.conf -%endif %{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate -%{_sysconfdir}/cron.d/vdsm-libvirt-logrotate -%if 0%{?fedora} || 0%{?rhel} >= 7 %{_sysconfdir}/libvirt/hooks/qemu -%endif %{_datadir}/%{vdsm_name}/logUtils.py* %{_datadir}/%{vdsm_name}/dsaversion.py* %{_libexecdir}/%{vdsm_name}/curl-img-wrap @@ -1101,30 +853,31 @@ exit 0 %{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh %{_datadir}/%{vdsm_name}/network/__init__.py* %{_datadir}/%{vdsm_name}/network/api.py* +%{_datadir}/%{vdsm_name}/network/configurators/__init__.py* +%{_datadir}/%{vdsm_name}/network/configurators/dhclient.py* +%{_datadir}/%{vdsm_name}/network/configurators/ifcfg.py* +%{_datadir}/%{vdsm_name}/network/configurators/iproute2.py* +%{_datadir}/%{vdsm_name}/network/configurators/libvirt.py* +%{_datadir}/%{vdsm_name}/network/configurators/pyroute_two.py* +%{_datadir}/%{vdsm_name}/network/configurators/qos.py* %{_datadir}/%{vdsm_name}/network/errors.py* %{_datadir}/%{vdsm_name}/network/models.py* %{_datadir}/%{vdsm_name}/network/sourceroute.py* %{_datadir}/%{vdsm_name}/network/sourceroutethread.py* -%{_datadir}/%{vdsm_name}/network/configurators/__init__.py* -%{_datadir}/%{vdsm_name}/network/configurators/dhclient.py* -%{_datadir}/%{vdsm_name}/network/configurators/ifcfg.py* -%{_datadir}/%{vdsm_name}/network/configurators/libvirt.py* -%{_datadir}/%{vdsm_name}/network/configurators/iproute2.py* -%{_datadir}/%{vdsm_name}/network/configurators/pyroute_two.py* -%{_datadir}/%{vdsm_name}/network/configurators/qos.py* %{_datadir}/%{vdsm_name}/network/tc/__init__.py* %{_datadir}/%{vdsm_name}/network/tc/_parser.py* %{_datadir}/%{vdsm_name}/network/tc/_wrapper.py* %{_datadir}/%{vdsm_name}/network/tc/cls.py* %{_datadir}/%{vdsm_name}/network/tc/filter.py* %{_datadir}/%{vdsm_name}/network/tc/qdisc.py* +%{_datadir}/%{vdsm_name}/network/utils.py* %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* %{_datadir}/%{vdsm_name}/storage/curlImgWrap.py* %{_datadir}/%{vdsm_name}/storage/devicemapper.py* %{_datadir}/%{vdsm_name}/storage/dispatcher.py* -%{_datadir}/%{vdsm_name}/storage/domainMonitor.py* +%{_datadir}/%{vdsm_name}/storage/monitor.py* %{_datadir}/%{vdsm_name}/storage/fileSD.py* %{_datadir}/%{vdsm_name}/storage/fileUtils.py* %{_datadir}/%{vdsm_name}/storage/fileVolume.py* @@ -1167,7 +920,6 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/volume.py* %{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py* %{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py* -%{_libexecdir}/%{vdsm_name}/safelease %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh %dir %{_libexecdir}/%{vdsm_name}/hooks @@ -1216,29 +968,29 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup %dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus %dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_memory_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_memory_hotplug %dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_vm_stats %dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_vm_stats %dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_all_vm_stats %dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats %dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_caps %dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps -%{_datadir}/%{vdsm_name}/addNetwork -%{_datadir}/%{vdsm_name}/delNetwork +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_ifcfg_write +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_ifcfg_write + %{_datadir}/%{vdsm_name}/dumpStorageTable.py* %{_datadir}/%{vdsm_name}/get-conf-item %{_datadir}/%{vdsm_name}/kaxmlrpclib.py* %{_datadir}/%{vdsm_name}/momIF.py* -%{_datadir}/%{vdsm_name}/respawn %{_datadir}/%{vdsm_name}/set-conf-item -%if 0%{?with_gluster} %dir %{_datadir}/%{vdsm_name}/gluster %{_datadir}/%{vdsm_name}/gluster/__init__.py* %{_datadir}/%{vdsm_name}/gluster/cli.py* %{_datadir}/%{vdsm_name}/gluster/exception.py* -%{_datadir}/%{vdsm_name}/gluster/hostname.py* -%else -%exclude %{_datadir}/%{vdsm_name}/gluster/* -%endif %{python_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -1246,11 +998,7 @@ exit 0 %if 0%{?rhel} %dir %{_localstatedir}/log/core %endif -%if 0%{?fedora} || 0%{?rhel} >= 7 %{_polkitdir}/10-vdsm-libvirt-access.rules -%else -%{_polkitdir}/10-vdsm-libvirt-access.pkla -%endif %defattr(-, %{vdsm_user}, %{qemu_group}, -) %dir %{_localstatedir}/lib/libvirt/qemu/channels @@ -1270,6 +1018,7 @@ exit 0 %dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes %dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces %ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload +%dir %{_localstatedir}/run/%{vdsm_name}/v2v %dir %{_localstatedir}/log/%{vdsm_name} %dir %{_localstatedir}/log/%{vdsm_name}/backup @@ -1281,38 +1030,43 @@ exit 0 %dir %{python_sitelib}/%{vdsm_name}/netlink %dir %{python_sitelib}/%{vdsm_name}/tool %{python_sitelib}/%{vdsm_name}/__init__.py* +%{python_sitelib}/%{vdsm_name}/cmdutils.py* %{python_sitelib}/%{vdsm_name}/compat.py* +%{python_sitelib}/%{vdsm_name}/concurrent.py* %{python_sitelib}/%{vdsm_name}/config.py* %{python_sitelib}/%{vdsm_name}/constants.py* %{python_sitelib}/%{vdsm_name}/define.py* %{python_sitelib}/%{vdsm_name}/exception.py* +%{python_sitelib}/%{vdsm_name}/executor.py* %{python_sitelib}/%{vdsm_name}/ipwrapper.py* +%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* %{python_sitelib}/%{vdsm_name}/libvirtconnection.py* %{python_sitelib}/%{vdsm_name}/netinfo.py* %{python_sitelib}/%{vdsm_name}/netlink/__init__.py* %{python_sitelib}/%{vdsm_name}/netlink/addr.py* %{python_sitelib}/%{vdsm_name}/netlink/link.py* +%{python_sitelib}/%{vdsm_name}/netlink/monitor.py* %{python_sitelib}/%{vdsm_name}/netlink/route.py* -%{python_sitelib}/%{vdsm_name}/profile.py* +%{python_sitelib}/%{vdsm_name}/password.py* +%{python_sitelib}/%{vdsm_name}/profiling/__init__.py* +%{python_sitelib}/%{vdsm_name}/profiling/cpu.py* +%{python_sitelib}/%{vdsm_name}/profiling/errors.py* +%{python_sitelib}/%{vdsm_name}/profiling/memory.py* +%{python_sitelib}/%{vdsm_name}/profiling/profile.py* +%{python_sitelib}/%{vdsm_name}/pthread.py* %{python_sitelib}/%{vdsm_name}/qemuimg.py* +%{python_sitelib}/%{vdsm_name}/response.py* %{python_sitelib}/%{vdsm_name}/netconfpersistence.py* +%{python_sitelib}/%{vdsm_name}/schedule.py* %{python_sitelib}/%{vdsm_name}/sslutils.py* %{python_sitelib}/%{vdsm_name}/sysctl.py* +%{python_sitelib}/%{vdsm_name}/taskset.py* +%{python_sitelib}/%{vdsm_name}/udevadm.py* %{python_sitelib}/%{vdsm_name}/utils.py* %{python_sitelib}/%{vdsm_name}/vdscli.py* %{python_sitelib}/%{vdsm_name}/virtsparsify.py* %{python_sitelib}/%{vdsm_name}/xmlrpc.py* %{python_sitelib}/%{vdsm_name}/tool/__init__.py* -%if 0%{?rhev_build} -#compat -%{_datadir}/%{vdsm_name}/config.py* -%{_datadir}/%{vdsm_name}/netinfo.py* -%endif -%if 0%{?with_systemd} -%exclude %{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* -%else -%{python_sitelib}/%{vdsm_name}/tool/load_needed_modules.py* -%endif %{python_sitelib}/%{vdsm_name}/tool/configfile.py* %{python_sitelib}/%{vdsm_name}/tool/dummybr.py* %{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py* @@ -1321,16 +1075,17 @@ exit 0 %{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* %{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* %{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* -%{python_sitelib}/%{vdsm_name}/tool/passwd.py* +%{python_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* +%{python_sitelib}/%{vdsm_name}/tool/register.py* %{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* %{python_sitelib}/%{vdsm_name}/tool/service.py* %{python_sitelib}/%{vdsm_name}/tool/transient.py* %{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* %{python_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python_sitelib}/%{vdsm_name}/tool/upgrade_300_networks.py* %{python_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* %{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* @@ -1339,17 +1094,23 @@ exit 0 %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name}/tests %dir %{_datadir}/%{vdsm_name}/tests/functional +%dir %{_datadir}/%{vdsm_name}/tests/devices +%dir %{_datadir}/%{vdsm_name}/tests/integration %{_datadir}/%{vdsm_name}/tests/*.py* %{_datadir}/%{vdsm_name}/tests/cpu_info.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_ibm_S822L.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5606.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770_nosnap.out -%{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_1_4_4.out -%{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_2_4_8.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_multiqemu.out %{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out -%{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out +%{_datadir}/%{vdsm_name}/tests/cpu_map.xml +%{_datadir}/%{vdsm_name}/tests/devices/*.py* +%{_datadir}/%{vdsm_name}/tests/devices/parsing/*.py* +%{_datadir}/%{vdsm_name}/tests/devices/data/*.xml %{_datadir}/%{vdsm_name}/tests/ip_route_show_table_all.out %{_datadir}/%{vdsm_name}/tests/iscsiadm_-m_iface.out %{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out @@ -1359,19 +1120,27 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out %{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf %{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_libvirt_logrotate.conf %{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf %{_datadir}/%{vdsm_name}/tests/toolTests_qemu_sanlock.conf %{_datadir}/%{vdsm_name}/tests/toolTests_qemu_ssl.conf %{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_no_ssl.conf %{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_ssl.conf +%{_datadir}/%{vdsm_name}/tests/glusterGeoRepStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeGeoRepConfigList.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotList.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotListEmpty.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotConfig.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotRestore.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotList.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotListEmpty.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeTasks.xml %{_datadir}/%{vdsm_name}/tests/functional/*.py* %{_datadir}/%{vdsm_name}/tests/functional/*.policy +%{_datadir}/%{vdsm_name}/tests/integration/*.py* %files hook-openstacknet %defattr(-, root, root, -) @@ -1402,7 +1171,7 @@ exit 0 %if 0%{?with_vhostmd} %files hook-vhostmd %defattr(-, root, root, -) -%doc COPYING +%license COPYING %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd @@ -1418,7 +1187,7 @@ exit 0 %files hook-qemucmdline %defattr(-, root, root, -) -%doc COPYING +%license COPYING %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline %files hook-ethtool-options @@ -1429,6 +1198,12 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ipv6 +%files hook-vmfex-dev +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex + %if 0%{?with_hooks} %files hook-allocate_net %defattr(-, root, root, -) @@ -1445,6 +1220,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun +%files hook-diskunmap +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_diskunmap + %files hook-fakevmstats %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats @@ -1465,6 +1244,10 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb +%files hook-httpsisoboot +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_httpsisoboot + %files hook-hugepages %defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages @@ -1524,14 +1307,6 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios -%files hook-sriov -%defattr(-, root, root, -) -%{_sysconfdir}/sudoers.d/50_vdsm_hook_sriov -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_sriov -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_sriov -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_sriov - - %files hook-spiceoptions %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_spiceoptions @@ -1544,12 +1319,6 @@ exit 0 %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex - -%files hook-vmfex-dev -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex %endif %files debug-plugin @@ -1559,7 +1328,7 @@ exit 0 %files cli %defattr(-, root, root, -) -%doc COPYING +%license COPYING %{_bindir}/vdsClient %{_datadir}/%{vdsm_name}/vdsClient.py* %{_datadir}/%{vdsm_name}/vdsClientGluster.py* @@ -1569,12 +1338,12 @@ exit 0 %files xmlrpc %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name} -%{_datadir}/%{vdsm_name}/rpc/BindingXMLRPC.py* +%{_datadir}/%{vdsm_name}/rpc/bindingxmlrpc.py* %files jsonrpc %doc %{vdsm_name}/rpc/vdsm-api.html %{_datadir}/%{vdsm_name}/rpc/__init__.py* -%{_datadir}/%{vdsm_name}/rpc/BindingJsonRpc.py* +%{_datadir}/%{vdsm_name}/rpc/bindingjsonrpc.py* %{_datadir}/%{vdsm_name}/rpc/Bridge.py* %{_datadir}/%{vdsm_name}/rpc/vdsmapi-schema.json %{python_sitelib}/vdsmapi.py* @@ -1587,78 +1356,37 @@ exit 0 %dir %{python_sitelib}/yajsonrpc %{python_sitelib}/yajsonrpc/betterAsyncore.py* %{python_sitelib}/yajsonrpc/stomp.py* -%{python_sitelib}/yajsonrpc/stompReactor.py* +%{python_sitelib}/yajsonrpc/stompreactor.py* %files infra +%{python_sitelib}/%{vdsm_name}/infra/eventfd/__init__.py* %{python_sitelib}/%{vdsm_name}/infra/filecontrol/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/sigutils/__init__.py* %{python_sitelib}/%{vdsm_name}/infra/zombiereaper/__init__.py* %{python_sitelib}/%{vdsm_name}/infra/__init__.py* -%files bootstrap -%defattr(-, root, root, -) -%doc COPYING -%{_datadir}/%{vdsm_bootstrap} - -%files reg -%defattr(-, root, root, -) -%doc COPYING -%dir %{_sysconfdir}/%{vdsm_reg} -%dir %{_datadir}/%{vdsm_reg} -%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm-reg -%config(noreplace) %{_sysconfdir}/%{vdsm_reg}/vdsm-reg.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf -%ghost %dir /data -%ghost %dir %attr(0775, root, root) /data/updates -%if 0%{?with_systemd} -/usr/lib/systemd/systemd-vdsm-reg -%{_unitdir}/vdsm-reg.service -%else -%{_initrddir}/vdsm-reg -%endif -%{_datadir}/%{vdsm_reg}/vdsm-reg-setup -%{_datadir}/%{vdsm_reg}/vdsm-complete -%{_datadir}/%{vdsm_reg}/vdsm-gen-cert -%{_datadir}/%{vdsm_reg}/vdsm-upgrade -%{_datadir}/%{vdsm_reg}/config.py* -%{_datadir}/%{vdsm_reg}/deployUtil.py* -%attr(0755, -, -) %{_datadir}/%{vdsm_reg}/register-to-engine.py* -%{_datadir}/%{vdsm_reg}/createDaemon.py* -%{_datadir}/%{vdsm_reg}/save-config -%{_sysconfdir}/ovirt-config-boot.d/vdsm-config -%{_sysconfdir}/ovirt-commandline.d/vdsm-reg -%{_sysconfdir}/cron.hourly/vdsm-reg-logrotate -%{_mandir}/man8/vdsm-reg.8* - -%defattr(-, %{vdsm_user}, %{vdsm_group},-) -%dir %{_var}/log/%{vdsm_reg} - %files hook-faqemu %defattr(-, root, root, -) -%doc COPYING +%license COPYING %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %if 0%{?with_gluster} %files gluster %defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name}/gluster -%doc COPYING +%license COPYING %{_datadir}/%{vdsm_name}/gluster/api.py* %{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* +%{_datadir}/%{vdsm_name}/gluster/fstab.py* %{_datadir}/%{vdsm_name}/rpc/vdsmapi-gluster-schema.json %{_datadir}/%{vdsm_name}/gluster/gfapi.py* %{_datadir}/%{vdsm_name}/gluster/hooks.py* %{_datadir}/%{vdsm_name}/gluster/services.py* +%{_datadir}/%{vdsm_name}/gluster/storagedev.py* %{_datadir}/%{vdsm_name}/gluster/tasks.py* %endif %changelog -* Fri Jun 19 2015 Fedora Release Engineering - 4.17.0-0.2.git8f8b927 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat Mar 21 2015 Peter Robinson 4.17-0.1 -- 4.17 pre release -- Disable check as it's broken - * Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 - Removing vdsm-python-cpopen from the spec - Adding dependency on formal cpopen package From 9f1690ebc44a41450672a2c7e40ef2a2df88d4d5 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Wed, 21 Oct 2015 11:18:25 +0300 Subject: [PATCH 097/126] Build vdsm 4.17.9 --- sources | 2 +- vdsm.spec | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/sources b/sources index 3693f7f..5f2be82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -730fc4f0387e19e8f0cff66a4d28ddbd vdsm-4.17.9.tar.gz +53bf8a8e728a82a0553fc6533bd18ed4 vdsm-4.17.9.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 617231d..6866992 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -14,7 +14,7 @@ %global gluster_version 3.7.1 # koji build - overridable using rpmbuild --define "fedora_koji_build 1" -%global fedora_koji_build 1 +%{!?fedora_koji_build: %global fedora_koji_build 0} # RHEV build - overridable using rpmbuild --define "rhev_build 1" %{!?rhev_build: %global rhev_build 0} @@ -56,7 +56,7 @@ Name: %{vdsm_name} Version: 4.17.9 -Release: 3.git9c6ec73%{?dist}%{?extra_release} +Release: 16.git1379158%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager BuildArch: noarch @@ -179,7 +179,11 @@ Requires: sanlock >= 2.8, sanlock-python Requires: device-mapper-multipath >= 0.4.9-68 Requires: e2fsprogs Requires: fence-agents-all +%if 0%{?centos} Requires: kernel >= 3.10.0-132.el7 +%else +Requires: kernel >= 3.10.0-229.17.1.el7 +%endif Requires: lvm2 >= 2.02.107 Requires: python >= 2.7.5-18.el7_1.1 Requires: policycoreutils-python @@ -616,8 +620,8 @@ make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build -install -dDm 0755 %{buildroot}/var/log/vdsm -touch %{buildroot}/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +install -dDm 0755 %{buildroot}/usr/local/var/log/vdsm +touch %{buildroot}/usr/local/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} # Install the lvm rules install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ @@ -683,10 +687,10 @@ fi # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included -touch /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -chmod 0644 /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /var/log/vdsm/{connectivity.log,mom.log,vdsm.log} -chown root:root /var/log/vdsm/supervdsm.log +touch /usr/local/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +chmod 0644 /usr/local/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /usr/local/var/log/vdsm/{connectivity.log,mom.log,vdsm.log} +chown root:root /usr/local/var/log/vdsm/supervdsm.log # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. # So Remove them if it is played with /etc/sysctl.conf. @@ -765,10 +769,10 @@ exit 0 %{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/connectivity.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log -%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/connectivity.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/mom.log +%ghost %config %attr(0644, root, root) /usr/local/var/log/vdsm/supervdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/vdsm.log %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} From 8267936503d66e28bf3b6b3b8386b6e86e5c9280 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 02:38:23 +0000 Subject: [PATCH 098/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 6866992..4ad85cf 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -56,7 +56,7 @@ Name: %{vdsm_name} Version: 4.17.9 -Release: 16.git1379158%{?dist}%{?extra_release} +Release: 17.git1379158%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager BuildArch: noarch @@ -1391,6 +1391,9 @@ exit 0 %endif %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 4.17.9-17.git1379158 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 - Removing vdsm-python-cpopen from the spec - Adding dependency on formal cpopen package From 36ee23731c8bac6f426688ecfa57f41b09003383 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 11 Mar 2016 15:18:50 -0600 Subject: [PATCH 099/126] spec cleanups Signed-off-by: Dennis Gilmore --- vdsm.spec | 965 ++++++++++++++++++++++++++---------------------------- 1 file changed, 465 insertions(+), 500 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 4ad85cf..5edd0bd 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1,6 +1,3 @@ -# Packages names -%global vdsm_name vdsm - # Required users and groups %global vdsm_user vdsm %global vdsm_group kvm @@ -26,7 +23,7 @@ # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 0} +%{!?enable_autotools:%global enable_autotools 0} # Skips check since rhel default repos lack pep8 and pyflakes %if ! 0%{?rhel} @@ -54,19 +51,18 @@ %global _udevrulesdir /usr/lib/udev/rules.d/ %global _udevexecdir /usr/lib/udev/ -Name: %{vdsm_name} +Name: vdsm Version: 4.17.9 -Release: 17.git1379158%{?dist}%{?extra_release} +Release: 18.git1379158%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager BuildArch: noarch Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/wiki/Vdsm -Source0: %{vdsm_name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%{!?_licensedir:%global license %%doc} BuildRequires: cyrus-sasl-lib BuildRequires: gcc @@ -311,7 +307,7 @@ Shared libraries between the various VDSM packages. %package debug-plugin Summary: VDSM Debug Plugin -Requires: %{name} +Requires: %{name} = %{version}-%{release} Requires: %{name}-xmlrpc = %{version}-%{release} %description debug-plugin @@ -328,14 +324,14 @@ A test suite for verifying the functionality of a running vdsm instance %package hook-allocate_net Summary: random_network allocation hook for VDSM -Requires: %{name} +Requires: %{name} = %{version}-%{release} %description hook-allocate_net VDSM hook used to allocate networks for vms in a random fashion %package hook-checkimages Summary: Qcow2 disk image format check hook for VDSM -Requires: %{name} +Requires: %{name} = %{version}-%{release} %description hook-checkimages VDSM hook used to perform consistency check on a qcow2 format disk image @@ -343,7 +339,7 @@ using the QEMU disk image utility. %package hook-diskunmap Summary: Activate UNMAP for disk/lun devices -BuildArch: noarch +Requires: %{name} = %{version}-%{release} Requires: qemu-kvm >= 1.5 %description hook-diskunmap @@ -368,7 +364,7 @@ VDSM hook to use vhostmd per VM according to Virtualization Manager requests. %package hook-faqemu Summary: Fake qemu process for VDSM quality assurance -Requires: %{name} +Requires: %{name} = %{version}-%{release} %description hook-faqemu VDSM hook used for testing VDSM with multiple fake virtual machines without @@ -415,7 +411,7 @@ outside of oVirt, such as an openvswitch network. %package hook-fakevmstats Summary: Generate random VM statistics -Requires: %{name} +Requires: %{name} = %{version}-%{release} %description hook-fakevmstats Hook intercepts VM's stats and randomizes various fields. @@ -446,7 +442,6 @@ disconnect it from host and attach it to VM %package hook-httpsisoboot Summary: Allow directly booting from an https available ISO -BuildArch: noarch %if 0%{?rhel} Requires: qemu-kvm-rhev >= 10:2.1.2-3 %endif @@ -508,7 +503,7 @@ all network traffic. %package hook-qemucmdline Summary: QEMU cmdline hook for VDSM -Requires: %{name} +Requires: %{name} = %{version}-%{release} %description hook-qemucmdline Provides support for injecting QEMU cmdline via VDSM hook. @@ -517,12 +512,14 @@ qemu xml namespace. %package hook-qos Summary: QoS network in/out traffic support for VDSM +Requires: %{name} = %{version}-%{release} %description hook-qos Hook adds QoS in/out traffic to VMs interfaces %package hook-scratchpad Summary: One time disk creation for VDSM +Requires: %{name} = %{version}-%{release} %description hook-scratchpad scratchpad hook for VDSM @@ -532,6 +529,7 @@ VM cannot be migrated when using scratchpad hook %package hook-smbios Summary: Adding custom smbios entries to libvirt domain via VDSM +Requires: %{name} = %{version}-%{release} %description hook-smbios Adding custom smbios entries to libvirt domain via VDSM @@ -539,6 +537,7 @@ such as: vendor, version, date and release %package hook-spiceoptions Summary: To configure spice options for vm +Requires: %{name} = %{version}-%{release} %description hook-spiceoptions This vdsm hook can be used to configure some of @@ -546,6 +545,7 @@ the spice optimization attributes and values.. %package hook-vmfex Summary: vmfex support for VDSM +Requires: %{name} = %{version}-%{release} Conflicts: hook-vmfex-dev %description hook-vmfex @@ -562,13 +562,14 @@ VM-FEX Virtual Function (SR-IOV with macvtap mode). %package hook-vmdisk Summary: External disk support for VDSM +Requires: %{name} = %{version}-%{release} %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) %package hook-ipv6 Summary: Set IPv6 configuration through custom network properties -Requires: %{name} >= 4.16.7 +Requires: %{name} = %{version}-%{release} %description hook-ipv6 VDSM hook used for applying IPv6 configuration through custom network @@ -576,7 +577,7 @@ properties %if 0%{?with_gluster} %package gluster -Summary: Gluster Plugin for VDSM +Summary: Gluster Plugin for VDSM Requires: %{name} = %{version}-%{release} Requires: glusterfs-server >= %{gluster_version} Requires: glusterfs-api >= %{gluster_version} @@ -605,7 +606,7 @@ autoreconf -if --with-qemu-img='qemu-img-rhev' \ %endif -make +make %{_smp_mflags} # Setting software_version and software_revision in dsaversion.py baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` @@ -615,7 +616,6 @@ sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py %install -rm -rf %{buildroot} make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild @@ -641,7 +641,7 @@ install -Dm 0644 init/systemd/mom-vdsm.service %{buildroot}%{_unitdir}/mom-vdsm. install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ - %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf + %{buildroot}%{_tmpfilesdir}/%{name}.conf install -Dm 0644 init/systemd/unlimited-core.conf \ %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf @@ -661,7 +661,7 @@ install -Dm 0755 vdsm/virt/libvirt-hook.sh \ %check %if 0%{?with_check} -make check +#make check %endif %clean @@ -680,7 +680,7 @@ export LC_ALL=C # We keep the previous rpm version number in a file for managing upgrade flow # in vdsmd_init_script upgraded_version_check task if [ "$1" -gt 1 ]; then - rpm -q %{vdsm_name} > "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" + rpm -q %{name} > "%{_localstatedir}/lib/%{name}/upgraded_version" fi %post @@ -757,7 +757,7 @@ fi exit 0 %files -%defattr(-, root, root, -) +%{!?_licensedir:%global license %%doc} %doc README lib/vdsm/vdsm.conf.sample %license COPYING /usr/lib/systemd/systemd-vdsmd @@ -775,226 +775,226 @@ exit 0 %ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/vdsm.log %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt -%dir %{_libexecdir}/%{vdsm_name} -%dir %{_sysconfdir}/%{vdsm_name} -%dir %{_sysconfdir}/%{vdsm_name}/mom.d -%dir %{_datadir}/%{vdsm_name} -%dir %{_datadir}/%{vdsm_name}/network -%dir %{_datadir}/%{vdsm_name}/network/configurators -%dir %{_datadir}/%{vdsm_name}/network/tc -%dir %{_datadir}/%{vdsm_name}/storage -%dir %{_datadir}/%{vdsm_name}/storage/imageRepository -%dir %{_datadir}/%{vdsm_name}/virt -%{_datadir}/%{vdsm_name}/alignmentScan.py* -%{_datadir}/%{vdsm_name}/blkid.py* -%{_datadir}/%{vdsm_name}/caps.py* -%{_datadir}/%{vdsm_name}/clientIF.py* -%{_datadir}/%{vdsm_name}/daemonAdapter -%{_datadir}/%{vdsm_name}/dmidecodeUtil.py* -%{_datadir}/%{vdsm_name}/API.py* -%{_datadir}/%{vdsm_name}/hooking.py* -%{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/hostdev.py* -%{_datadir}/%{vdsm_name}/mk_sysprep_floppy -%{_datadir}/%{vdsm_name}/parted_utils.py* -%{_datadir}/%{vdsm_name}/mkimage.py* -%{_datadir}/%{vdsm_name}/numaUtils.py* -%{_datadir}/%{vdsm_name}/ppc64HardwareInfo.py* -%{_datadir}/%{vdsm_name}/protocoldetector.py* -%{_datadir}/%{vdsm_name}/supervdsm.py* -%{_datadir}/%{vdsm_name}/supervdsmServer -%{_datadir}/%{vdsm_name}/v2v.py* -%{_datadir}/%{vdsm_name}/vdsm -%{_datadir}/%{vdsm_name}/vdsm-restore-net-config -%{_datadir}/%{vdsm_name}/vdsm-store-net-config -%{_datadir}/%{vdsm_name}/virt/__init__.py* -%{_datadir}/%{vdsm_name}/virt/domain_descriptor.py* -%{_datadir}/%{vdsm_name}/virt/guestagent.py* -%{_datadir}/%{vdsm_name}/virt/migration.py* -%{_datadir}/%{vdsm_name}/virt/periodic.py* -%{_datadir}/%{vdsm_name}/virt/sampling.py* -%{_datadir}/%{vdsm_name}/virt/secret.py* -%{_datadir}/%{vdsm_name}/virt/virdomain.py* -%{_datadir}/%{vdsm_name}/virt/vmchannels.py* -%{_datadir}/%{vdsm_name}/virt/vmstats.py* -%{_datadir}/%{vdsm_name}/virt/vmstatus.py* -%{_datadir}/%{vdsm_name}/virt/vmtune.py* -%{_datadir}/%{vdsm_name}/virt/vm.py* -%{_datadir}/%{vdsm_name}/virt/vmexitreason.py* -%{_datadir}/%{vdsm_name}/virt/vmpowerdown.py* -%{_datadir}/%{vdsm_name}/virt/vmxml.py* -%{_datadir}/%{vdsm_name}/virt/utils.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/core.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/graphics.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/hostdevice.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/hwclass.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/network.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/storage.py* +%dir %{_libexecdir}/%{name} +%dir %{_sysconfdir}/%{name} +%dir %{_sysconfdir}/%{name}/mom.d +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/network +%dir %{_datadir}/%{name}/network/configurators +%dir %{_datadir}/%{name}/network/tc +%dir %{_datadir}/%{name}/storage +%dir %{_datadir}/%{name}/storage/imageRepository +%dir %{_datadir}/%{name}/virt +%{_datadir}/%{name}/alignmentScan.py* +%{_datadir}/%{name}/blkid.py* +%{_datadir}/%{name}/caps.py* +%{_datadir}/%{name}/clientIF.py* +%{_datadir}/%{name}/daemonAdapter +%{_datadir}/%{name}/dmidecodeUtil.py* +%{_datadir}/%{name}/API.py* +%{_datadir}/%{name}/hooking.py* +%{_datadir}/%{name}/hooks.py* +%{_datadir}/%{name}/hostdev.py* +%{_datadir}/%{name}/mk_sysprep_floppy +%{_datadir}/%{name}/parted_utils.py* +%{_datadir}/%{name}/mkimage.py* +%{_datadir}/%{name}/numaUtils.py* +%{_datadir}/%{name}/ppc64HardwareInfo.py* +%{_datadir}/%{name}/protocoldetector.py* +%{_datadir}/%{name}/supervdsm.py* +%{_datadir}/%{name}/supervdsmServer +%{_datadir}/%{name}/v2v.py* +%{_datadir}/%{name}/vdsm +%{_datadir}/%{name}/vdsm-restore-net-config +%{_datadir}/%{name}/vdsm-store-net-config +%{_datadir}/%{name}/virt/__init__.py* +%{_datadir}/%{name}/virt/domain_descriptor.py* +%{_datadir}/%{name}/virt/guestagent.py* +%{_datadir}/%{name}/virt/migration.py* +%{_datadir}/%{name}/virt/periodic.py* +%{_datadir}/%{name}/virt/sampling.py* +%{_datadir}/%{name}/virt/secret.py* +%{_datadir}/%{name}/virt/virdomain.py* +%{_datadir}/%{name}/virt/vmchannels.py* +%{_datadir}/%{name}/virt/vmstats.py* +%{_datadir}/%{name}/virt/vmstatus.py* +%{_datadir}/%{name}/virt/vmtune.py* +%{_datadir}/%{name}/virt/vm.py* +%{_datadir}/%{name}/virt/vmexitreason.py* +%{_datadir}/%{name}/virt/vmpowerdown.py* +%{_datadir}/%{name}/virt/vmxml.py* +%{_datadir}/%{name}/virt/utils.py* +%{_datadir}/%{name}/virt/vmdevices/__init__.py* +%{_datadir}/%{name}/virt/vmdevices/core.py* +%{_datadir}/%{name}/virt/vmdevices/graphics.py* +%{_datadir}/%{name}/virt/vmdevices/hostdevice.py* +%{_datadir}/%{name}/virt/vmdevices/hwclass.py* +%{_datadir}/%{name}/virt/vmdevices/network.py* +%{_datadir}/%{name}/virt/vmdevices/storage.py* -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm +%config(noreplace) %{_sysconfdir}/%{name}/vdsm.conf +%config(noreplace) %{_sysconfdir}/%{name}/logger.conf +%config(noreplace) %{_sysconfdir}/%{name}/svdsm.logger.conf +%config(noreplace) %{_sysconfdir}/%{name}/mom.conf +%config(noreplace) %{_sysconfdir}/%{name}/mom.d/*.policy +%config(noreplace) %{_sysconfdir}/%{name}/logrotate/vdsm %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf -%config(noreplace) %{_tmpfilesdir}/%{vdsm_name}.conf +%config(noreplace) %{_tmpfilesdir}/%{name}.conf %{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/libvirt/hooks/qemu -%{_datadir}/%{vdsm_name}/logUtils.py* -%{_datadir}/%{vdsm_name}/dsaversion.py* -%{_libexecdir}/%{vdsm_name}/curl-img-wrap -%{_libexecdir}/%{vdsm_name}/fc-scan -%{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks -%{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook -%{_libexecdir}/%{vdsm_name}/ovirt_functions.sh -%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh -%{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh -%{_datadir}/%{vdsm_name}/network/__init__.py* -%{_datadir}/%{vdsm_name}/network/api.py* -%{_datadir}/%{vdsm_name}/network/configurators/__init__.py* -%{_datadir}/%{vdsm_name}/network/configurators/dhclient.py* -%{_datadir}/%{vdsm_name}/network/configurators/ifcfg.py* -%{_datadir}/%{vdsm_name}/network/configurators/iproute2.py* -%{_datadir}/%{vdsm_name}/network/configurators/libvirt.py* -%{_datadir}/%{vdsm_name}/network/configurators/pyroute_two.py* -%{_datadir}/%{vdsm_name}/network/configurators/qos.py* -%{_datadir}/%{vdsm_name}/network/errors.py* -%{_datadir}/%{vdsm_name}/network/models.py* -%{_datadir}/%{vdsm_name}/network/sourceroute.py* -%{_datadir}/%{vdsm_name}/network/sourceroutethread.py* -%{_datadir}/%{vdsm_name}/network/tc/__init__.py* -%{_datadir}/%{vdsm_name}/network/tc/_parser.py* -%{_datadir}/%{vdsm_name}/network/tc/_wrapper.py* -%{_datadir}/%{vdsm_name}/network/tc/cls.py* -%{_datadir}/%{vdsm_name}/network/tc/filter.py* -%{_datadir}/%{vdsm_name}/network/tc/qdisc.py* -%{_datadir}/%{vdsm_name}/network/utils.py* -%{_datadir}/%{vdsm_name}/storage/__init__.py* -%{_datadir}/%{vdsm_name}/storage/blockSD.py* -%{_datadir}/%{vdsm_name}/storage/blockVolume.py* -%{_datadir}/%{vdsm_name}/storage/curlImgWrap.py* -%{_datadir}/%{vdsm_name}/storage/devicemapper.py* -%{_datadir}/%{vdsm_name}/storage/dispatcher.py* -%{_datadir}/%{vdsm_name}/storage/monitor.py* -%{_datadir}/%{vdsm_name}/storage/fileSD.py* -%{_datadir}/%{vdsm_name}/storage/fileUtils.py* -%{_datadir}/%{vdsm_name}/storage/fileVolume.py* -%{_datadir}/%{vdsm_name}/storage/fuser.py* -%{_datadir}/%{vdsm_name}/storage/glusterSD.py* -%{_datadir}/%{vdsm_name}/storage/glusterVolume.py* -%{_datadir}/%{vdsm_name}/storage/hba.py* -%{_datadir}/%{vdsm_name}/storage/hsm.py* -%{_datadir}/%{vdsm_name}/storage/image.py* -%{_datadir}/%{vdsm_name}/storage/imageSharing.py* -%{_datadir}/%{vdsm_name}/storage/iscsiadm.py* -%{_datadir}/%{vdsm_name}/storage/iscsi.py* -%{_datadir}/%{vdsm_name}/storage/localFsSD.py* -%{_datadir}/%{vdsm_name}/storage/lvm.env -%{_datadir}/%{vdsm_name}/storage/lvm.py* -%{_datadir}/%{vdsm_name}/storage/misc.py* -%{_datadir}/%{vdsm_name}/storage/mount.py* -%{_datadir}/%{vdsm_name}/storage/multipath.py* -%{_datadir}/%{vdsm_name}/storage/nfsSD.py* -%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* -%{_datadir}/%{vdsm_name}/storage/persistentDict.py* -%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* -%{_datadir}/%{vdsm_name}/storage/remoteFileHandler.py* -%{_datadir}/%{vdsm_name}/storage/resourceManager.py* -%{_datadir}/%{vdsm_name}/storage/clusterlock.py* -%{_datadir}/%{vdsm_name}/storage/sdc.py* -%{_datadir}/%{vdsm_name}/storage/sd.py* -%{_datadir}/%{vdsm_name}/storage/securable.py* -%{_datadir}/%{vdsm_name}/storage/sp.py* -%{_datadir}/%{vdsm_name}/storage/spbackends.py* -%{_datadir}/%{vdsm_name}/storage/storageConstants.py* -%{_datadir}/%{vdsm_name}/storage/storage_exception.py* -%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* -%{_datadir}/%{vdsm_name}/storage/storageServer.py* -%{_datadir}/%{vdsm_name}/storage/sync.py* -%{_datadir}/%{vdsm_name}/storage/taskManager.py* -%{_datadir}/%{vdsm_name}/storage/task.py* -%{_datadir}/%{vdsm_name}/storage/threadLocal.py* -%{_datadir}/%{vdsm_name}/storage/threadPool.py* -%{_datadir}/%{vdsm_name}/storage/volume.py* -%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py* -%{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py* -%{_libexecdir}/%{vdsm_name}/spmprotect.sh -%{_libexecdir}/%{vdsm_name}/spmstop.sh -%dir %{_libexecdir}/%{vdsm_name}/hooks -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_cont -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_pause -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_pause -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_hibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_hibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_dehibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_update_device -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_memory_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_memory_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_all_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_caps -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_ifcfg_write -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_ifcfg_write +%{_datadir}/%{name}/logUtils.py* +%{_datadir}/%{name}/dsaversion.py* +%{_libexecdir}/%{name}/curl-img-wrap +%{_libexecdir}/%{name}/fc-scan +%{_libexecdir}/%{name}/persist-vdsm-hooks +%{_libexecdir}/%{name}/unpersist-vdsm-hook +%{_libexecdir}/%{name}/ovirt_functions.sh +%{_libexecdir}/%{name}/vdsm-gencerts.sh +%{_libexecdir}/%{name}/vdsmd_init_common.sh +%{_datadir}/%{name}/network/__init__.py* +%{_datadir}/%{name}/network/api.py* +%{_datadir}/%{name}/network/configurators/__init__.py* +%{_datadir}/%{name}/network/configurators/dhclient.py* +%{_datadir}/%{name}/network/configurators/ifcfg.py* +%{_datadir}/%{name}/network/configurators/iproute2.py* +%{_datadir}/%{name}/network/configurators/libvirt.py* +%{_datadir}/%{name}/network/configurators/pyroute_two.py* +%{_datadir}/%{name}/network/configurators/qos.py* +%{_datadir}/%{name}/network/errors.py* +%{_datadir}/%{name}/network/models.py* +%{_datadir}/%{name}/network/sourceroute.py* +%{_datadir}/%{name}/network/sourceroutethread.py* +%{_datadir}/%{name}/network/tc/__init__.py* +%{_datadir}/%{name}/network/tc/_parser.py* +%{_datadir}/%{name}/network/tc/_wrapper.py* +%{_datadir}/%{name}/network/tc/cls.py* +%{_datadir}/%{name}/network/tc/filter.py* +%{_datadir}/%{name}/network/tc/qdisc.py* +%{_datadir}/%{name}/network/utils.py* +%{_datadir}/%{name}/storage/__init__.py* +%{_datadir}/%{name}/storage/blockSD.py* +%{_datadir}/%{name}/storage/blockVolume.py* +%{_datadir}/%{name}/storage/curlImgWrap.py* +%{_datadir}/%{name}/storage/devicemapper.py* +%{_datadir}/%{name}/storage/dispatcher.py* +%{_datadir}/%{name}/storage/monitor.py* +%{_datadir}/%{name}/storage/fileSD.py* +%{_datadir}/%{name}/storage/fileUtils.py* +%{_datadir}/%{name}/storage/fileVolume.py* +%{_datadir}/%{name}/storage/fuser.py* +%{_datadir}/%{name}/storage/glusterSD.py* +%{_datadir}/%{name}/storage/glusterVolume.py* +%{_datadir}/%{name}/storage/hba.py* +%{_datadir}/%{name}/storage/hsm.py* +%{_datadir}/%{name}/storage/image.py* +%{_datadir}/%{name}/storage/imageSharing.py* +%{_datadir}/%{name}/storage/iscsiadm.py* +%{_datadir}/%{name}/storage/iscsi.py* +%{_datadir}/%{name}/storage/localFsSD.py* +%{_datadir}/%{name}/storage/lvm.env +%{_datadir}/%{name}/storage/lvm.py* +%{_datadir}/%{name}/storage/misc.py* +%{_datadir}/%{name}/storage/mount.py* +%{_datadir}/%{name}/storage/multipath.py* +%{_datadir}/%{name}/storage/nfsSD.py* +%{_datadir}/%{name}/storage/outOfProcess.py* +%{_datadir}/%{name}/storage/persistentDict.py* +%{_datadir}/%{name}/storage/resourceFactories.py* +%{_datadir}/%{name}/storage/remoteFileHandler.py* +%{_datadir}/%{name}/storage/resourceManager.py* +%{_datadir}/%{name}/storage/clusterlock.py* +%{_datadir}/%{name}/storage/sdc.py* +%{_datadir}/%{name}/storage/sd.py* +%{_datadir}/%{name}/storage/securable.py* +%{_datadir}/%{name}/storage/sp.py* +%{_datadir}/%{name}/storage/spbackends.py* +%{_datadir}/%{name}/storage/storageConstants.py* +%{_datadir}/%{name}/storage/storage_exception.py* +%{_datadir}/%{name}/storage/storage_mailbox.py* +%{_datadir}/%{name}/storage/storageServer.py* +%{_datadir}/%{name}/storage/sync.py* +%{_datadir}/%{name}/storage/taskManager.py* +%{_datadir}/%{name}/storage/task.py* +%{_datadir}/%{name}/storage/threadLocal.py* +%{_datadir}/%{name}/storage/threadPool.py* +%{_datadir}/%{name}/storage/volume.py* +%{_datadir}/%{name}/storage/imageRepository/__init__.py* +%{_datadir}/%{name}/storage/imageRepository/formatConverter.py* +%{_libexecdir}/%{name}/spmprotect.sh +%{_libexecdir}/%{name}/spmstop.sh +%dir %{_libexecdir}/%{name}/hooks +%dir %{_libexecdir}/%{name}/hooks/before_device_create +%dir %{_libexecdir}/%{name}/hooks/after_device_create +%dir %{_libexecdir}/%{name}/hooks/before_device_destroy +%dir %{_libexecdir}/%{name}/hooks/after_device_destroy +%dir %{_libexecdir}/%{name}/hooks/before_vm_start +%dir %{_libexecdir}/%{name}/hooks/after_vm_start +%dir %{_libexecdir}/%{name}/hooks/before_vm_cont +%dir %{_libexecdir}/%{name}/hooks/after_vm_cont +%dir %{_libexecdir}/%{name}/hooks/before_vm_pause +%dir %{_libexecdir}/%{name}/hooks/after_vm_pause +%dir %{_libexecdir}/%{name}/hooks/before_vm_hibernate +%dir %{_libexecdir}/%{name}/hooks/after_vm_hibernate +%dir %{_libexecdir}/%{name}/hooks/before_vm_dehibernate +%dir %{_libexecdir}/%{name}/hooks/after_vm_dehibernate +%dir %{_libexecdir}/%{name}/hooks/before_device_migrate_source +%dir %{_libexecdir}/%{name}/hooks/after_device_migrate_source +%dir %{_libexecdir}/%{name}/hooks/before_device_migrate_destination +%dir %{_libexecdir}/%{name}/hooks/after_device_migrate_destination +%dir %{_libexecdir}/%{name}/hooks/before_vm_migrate_source +%dir %{_libexecdir}/%{name}/hooks/after_vm_migrate_source +%dir %{_libexecdir}/%{name}/hooks/before_vm_migrate_destination +%dir %{_libexecdir}/%{name}/hooks/after_vm_migrate_destination +%dir %{_libexecdir}/%{name}/hooks/before_vm_destroy +%dir %{_libexecdir}/%{name}/hooks/after_vm_destroy +%dir %{_libexecdir}/%{name}/hooks/before_vm_set_ticket +%dir %{_libexecdir}/%{name}/hooks/after_vm_set_ticket +%dir %{_libexecdir}/%{name}/hooks/before_update_device +%dir %{_libexecdir}/%{name}/hooks/after_update_device +%dir %{_libexecdir}/%{name}/hooks/after_update_device_fail +%dir %{_libexecdir}/%{name}/hooks/before_nic_hotplug +%dir %{_libexecdir}/%{name}/hooks/after_nic_hotplug +%dir %{_libexecdir}/%{name}/hooks/before_nic_hotunplug +%dir %{_libexecdir}/%{name}/hooks/after_nic_hotunplug +%dir %{_libexecdir}/%{name}/hooks/after_nic_hotplug_fail +%dir %{_libexecdir}/%{name}/hooks/after_nic_hotunplug_fail +%dir %{_libexecdir}/%{name}/hooks/before_disk_hotplug +%dir %{_libexecdir}/%{name}/hooks/after_disk_hotplug +%dir %{_libexecdir}/%{name}/hooks/before_disk_hotunplug +%dir %{_libexecdir}/%{name}/hooks/after_disk_hotunplug +%dir %{_libexecdir}/%{name}/hooks/before_vdsm_start +%dir %{_libexecdir}/%{name}/hooks/after_vdsm_stop +%dir %{_libexecdir}/%{name}/hooks/before_network_setup +%dir %{_libexecdir}/%{name}/hooks/after_network_setup +%dir %{_libexecdir}/%{name}/hooks/before_set_num_of_cpus +%dir %{_libexecdir}/%{name}/hooks/after_set_num_of_cpus +%dir %{_libexecdir}/%{name}/hooks/before_memory_hotplug +%dir %{_libexecdir}/%{name}/hooks/after_memory_hotplug +%dir %{_libexecdir}/%{name}/hooks/before_get_vm_stats +%dir %{_libexecdir}/%{name}/hooks/after_get_vm_stats +%dir %{_libexecdir}/%{name}/hooks/before_get_all_vm_stats +%dir %{_libexecdir}/%{name}/hooks/after_get_all_vm_stats +%dir %{_libexecdir}/%{name}/hooks/before_get_caps +%dir %{_libexecdir}/%{name}/hooks/after_get_caps +%dir %{_libexecdir}/%{name}/hooks/before_get_stats +%dir %{_libexecdir}/%{name}/hooks/after_get_stats +%dir %{_libexecdir}/%{name}/hooks/after_hostdev_list_by_caps +%dir %{_libexecdir}/%{name}/hooks/before_ifcfg_write +%dir %{_libexecdir}/%{name}/hooks/after_ifcfg_write -%{_datadir}/%{vdsm_name}/dumpStorageTable.py* -%{_datadir}/%{vdsm_name}/get-conf-item -%{_datadir}/%{vdsm_name}/kaxmlrpclib.py* -%{_datadir}/%{vdsm_name}/momIF.py* -%{_datadir}/%{vdsm_name}/set-conf-item -%dir %{_datadir}/%{vdsm_name}/gluster -%{_datadir}/%{vdsm_name}/gluster/__init__.py* -%{_datadir}/%{vdsm_name}/gluster/cli.py* -%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{_datadir}/%{name}/dumpStorageTable.py* +%{_datadir}/%{name}/get-conf-item +%{_datadir}/%{name}/kaxmlrpclib.py* +%{_datadir}/%{name}/momIF.py* +%{_datadir}/%{name}/set-conf-item +%dir %{_datadir}/%{name}/gluster +%{_datadir}/%{name}/gluster/__init__.py* +%{_datadir}/%{name}/gluster/cli.py* +%{_datadir}/%{name}/gluster/exception.py* %{python_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -1008,352 +1008,316 @@ exit 0 %dir %{_localstatedir}/lib/libvirt/qemu/channels %defattr(-, %{vdsm_user}, %{vdsm_group}, -) -%dir %{_sysconfdir}/pki/%{vdsm_name} -%dir %{_sysconfdir}/pki/%{vdsm_name}/keys -%dir %{_sysconfdir}/pki/%{vdsm_name}/certs -%dir %{_sysconfdir}/pki/%{vdsm_name}/libvirt-spice -%config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password -%{_localstatedir}/lib/%{vdsm_name}/bonding-defaults.json -%dir %{_localstatedir}/lib/%{vdsm_name} -%dir %{_localstatedir}/lib/%{vdsm_name}/netconfback -%dir %{_localstatedir}/lib/%{vdsm_name}/persistence -%dir %{_localstatedir}/lib/%{vdsm_name}/upgrade -%dir %{_localstatedir}/run/%{vdsm_name} -%dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes -%dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces -%ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload -%dir %{_localstatedir}/run/%{vdsm_name}/v2v -%dir %{_localstatedir}/log/%{vdsm_name} -%dir %{_localstatedir}/log/%{vdsm_name}/backup +%dir %{_sysconfdir}/pki/%{name} +%dir %{_sysconfdir}/pki/%{name}/keys +%dir %{_sysconfdir}/pki/%{name}/certs +%dir %{_sysconfdir}/pki/%{name}/libvirt-spice +%config(noreplace) %{_sysconfdir}/pki/%{name}/keys/libvirt_password +%{_localstatedir}/lib/%{name}/bonding-defaults.json +%dir %{_localstatedir}/lib/%{name} +%dir %{_localstatedir}/lib/%{name}/netconfback +%dir %{_localstatedir}/lib/%{name}/persistence +%dir %{_localstatedir}/lib/%{name}/upgrade +%dir %{_localstatedir}/run/%{name} +%dir %{_localstatedir}/run/%{name}/sourceRoutes +%dir %{_localstatedir}/run/%{name}/trackedInterfaces +%ghost %dir %{_localstatedir}/run/%{name}/payload +%dir %{_localstatedir}/run/%{name}/v2v +%dir %{_localstatedir}/log/%{name} +%dir %{_localstatedir}/log/%{name}/backup %files python -%defattr(-, root, root, -) %{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/netlink -%dir %{python_sitelib}/%{vdsm_name}/tool -%{python_sitelib}/%{vdsm_name}/__init__.py* -%{python_sitelib}/%{vdsm_name}/cmdutils.py* -%{python_sitelib}/%{vdsm_name}/compat.py* -%{python_sitelib}/%{vdsm_name}/concurrent.py* -%{python_sitelib}/%{vdsm_name}/config.py* -%{python_sitelib}/%{vdsm_name}/constants.py* -%{python_sitelib}/%{vdsm_name}/define.py* -%{python_sitelib}/%{vdsm_name}/exception.py* -%{python_sitelib}/%{vdsm_name}/executor.py* -%{python_sitelib}/%{vdsm_name}/ipwrapper.py* -%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* -%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* -%{python_sitelib}/%{vdsm_name}/netinfo.py* -%{python_sitelib}/%{vdsm_name}/netlink/__init__.py* -%{python_sitelib}/%{vdsm_name}/netlink/addr.py* -%{python_sitelib}/%{vdsm_name}/netlink/link.py* -%{python_sitelib}/%{vdsm_name}/netlink/monitor.py* -%{python_sitelib}/%{vdsm_name}/netlink/route.py* -%{python_sitelib}/%{vdsm_name}/password.py* -%{python_sitelib}/%{vdsm_name}/profiling/__init__.py* -%{python_sitelib}/%{vdsm_name}/profiling/cpu.py* -%{python_sitelib}/%{vdsm_name}/profiling/errors.py* -%{python_sitelib}/%{vdsm_name}/profiling/memory.py* -%{python_sitelib}/%{vdsm_name}/profiling/profile.py* -%{python_sitelib}/%{vdsm_name}/pthread.py* -%{python_sitelib}/%{vdsm_name}/qemuimg.py* -%{python_sitelib}/%{vdsm_name}/response.py* -%{python_sitelib}/%{vdsm_name}/netconfpersistence.py* -%{python_sitelib}/%{vdsm_name}/schedule.py* -%{python_sitelib}/%{vdsm_name}/sslutils.py* -%{python_sitelib}/%{vdsm_name}/sysctl.py* -%{python_sitelib}/%{vdsm_name}/taskset.py* -%{python_sitelib}/%{vdsm_name}/udevadm.py* -%{python_sitelib}/%{vdsm_name}/utils.py* -%{python_sitelib}/%{vdsm_name}/vdscli.py* -%{python_sitelib}/%{vdsm_name}/virtsparsify.py* -%{python_sitelib}/%{vdsm_name}/xmlrpc.py* -%{python_sitelib}/%{vdsm_name}/tool/__init__.py* -%{python_sitelib}/%{vdsm_name}/tool/configfile.py* -%{python_sitelib}/%{vdsm_name}/tool/dummybr.py* -%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py* -%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* -%{python_sitelib}/%{vdsm_name}/tool/configurator.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* -%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* -%{python_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* -%{python_sitelib}/%{vdsm_name}/tool/register.py* -%{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* -%{python_sitelib}/%{vdsm_name}/tool/service.py* -%{python_sitelib}/%{vdsm_name}/tool/transient.py* -%{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* -%{python_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* -%{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* +%dir %{python_sitelib}/%{name} +%dir %{python_sitelib}/%{name}/netlink +%dir %{python_sitelib}/%{name}/tool +%{python_sitelib}/%{name}/__init__.py* +%{python_sitelib}/%{name}/cmdutils.py* +%{python_sitelib}/%{name}/compat.py* +%{python_sitelib}/%{name}/concurrent.py* +%{python_sitelib}/%{name}/config.py* +%{python_sitelib}/%{name}/constants.py* +%{python_sitelib}/%{name}/define.py* +%{python_sitelib}/%{name}/exception.py* +%{python_sitelib}/%{name}/executor.py* +%{python_sitelib}/%{name}/ipwrapper.py* +%{python_sitelib}/%{name}/jsonrpcvdscli.py* +%{python_sitelib}/%{name}/libvirtconnection.py* +%{python_sitelib}/%{name}/netinfo.py* +%{python_sitelib}/%{name}/netlink/__init__.py* +%{python_sitelib}/%{name}/netlink/addr.py* +%{python_sitelib}/%{name}/netlink/link.py* +%{python_sitelib}/%{name}/netlink/monitor.py* +%{python_sitelib}/%{name}/netlink/route.py* +%{python_sitelib}/%{name}/password.py* +%{python_sitelib}/%{name}/profiling/__init__.py* +%{python_sitelib}/%{name}/profiling/cpu.py* +%{python_sitelib}/%{name}/profiling/errors.py* +%{python_sitelib}/%{name}/profiling/memory.py* +%{python_sitelib}/%{name}/profiling/profile.py* +%{python_sitelib}/%{name}/pthread.py* +%{python_sitelib}/%{name}/qemuimg.py* +%{python_sitelib}/%{name}/response.py* +%{python_sitelib}/%{name}/netconfpersistence.py* +%{python_sitelib}/%{name}/schedule.py* +%{python_sitelib}/%{name}/sslutils.py* +%{python_sitelib}/%{name}/sysctl.py* +%{python_sitelib}/%{name}/taskset.py* +%{python_sitelib}/%{name}/udevadm.py* +%{python_sitelib}/%{name}/utils.py* +%{python_sitelib}/%{name}/vdscli.py* +%{python_sitelib}/%{name}/virtsparsify.py* +%{python_sitelib}/%{name}/xmlrpc.py* +%{python_sitelib}/%{name}/tool/__init__.py* +%{python_sitelib}/%{name}/tool/configfile.py* +%{python_sitelib}/%{name}/tool/dummybr.py* +%{python_sitelib}/%{name}/tool/dump_bonding_defaults.py* +%{python_sitelib}/%{name}/tool/nwfilter.py* +%{python_sitelib}/%{name}/tool/configurator.py* +%{python_sitelib}/%{name}/tool/configurators/__init__* +%{python_sitelib}/%{name}/tool/configurators/certificates.py* +%{python_sitelib}/%{name}/tool/configurators/libvirt.py* +%{python_sitelib}/%{name}/tool/configurators/passwd.py* +%{python_sitelib}/%{name}/tool/configurators/sanlock.py* +%{python_sitelib}/%{name}/tool/configurators/sebool.py* +%{python_sitelib}/%{name}/tool/configurators/multipath.py* +%{python_sitelib}/%{name}/tool/dump_volume_chains.py* +%{python_sitelib}/%{name}/tool/register.py* +%{python_sitelib}/%{name}/tool/restore_nets.py* +%{python_sitelib}/%{name}/tool/service.py* +%{python_sitelib}/%{name}/tool/transient.py* +%{python_sitelib}/%{name}/tool/unified_persistence.py* +%{python_sitelib}/%{name}/tool/upgrade.py* +%{python_sitelib}/%{name}/tool/validate_ovirt_certs.py* +%{python_sitelib}/%{name}/tool/vdsm-id.py* %files tests -%doc %{_datadir}/%{vdsm_name}/tests/README -%defattr(-, root, root, -) -%dir %{_datadir}/%{vdsm_name}/tests -%dir %{_datadir}/%{vdsm_name}/tests/functional -%dir %{_datadir}/%{vdsm_name}/tests/devices -%dir %{_datadir}/%{vdsm_name}/tests/integration -%{_datadir}/%{vdsm_name}/tests/*.py* -%{_datadir}/%{vdsm_name}/tests/cpu_info.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_ibm_S822L.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5606.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770_nosnap.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_multiqemu.out -%{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out -%{_datadir}/%{vdsm_name}/tests/cpu_map.xml -%{_datadir}/%{vdsm_name}/tests/devices/*.py* -%{_datadir}/%{vdsm_name}/tests/devices/parsing/*.py* -%{_datadir}/%{vdsm_name}/tests/devices/data/*.xml -%{_datadir}/%{vdsm_name}/tests/ip_route_show_table_all.out -%{_datadir}/%{vdsm_name}/tests/iscsiadm_-m_iface.out -%{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out -%{_datadir}/%{vdsm_name}/tests/mem_info.out -%{_datadir}/%{vdsm_name}/tests/netmaskconversions -%{_datadir}/%{vdsm_name}/tests/run_tests.sh -%{_datadir}/%{vdsm_name}/tests/tc_filter_show.out -%{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_sanlock.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_no_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_ssl.conf -%{_datadir}/%{vdsm_name}/tests/glusterGeoRepStatus.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeGeoRepConfigList.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotList.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotListEmpty.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotConfig.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotRestore.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotList.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotListEmpty.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeTasks.xml -%{_datadir}/%{vdsm_name}/tests/functional/*.py* -%{_datadir}/%{vdsm_name}/tests/functional/*.policy -%{_datadir}/%{vdsm_name}/tests/integration/*.py* +%doc %{_datadir}/%{name}/tests/README +%dir %{_datadir}/%{name}/tests +%dir %{_datadir}/%{name}/tests/functional +%dir %{_datadir}/%{name}/tests/devices +%dir %{_datadir}/%{name}/tests/integration +%{_datadir}/%{name}/tests/*.py* +%{_datadir}/%{name}/tests/cpu_info.out +%{_datadir}/%{name}/tests/caps_libvirt_intel_E5649.out +%{_datadir}/%{name}/tests/caps_libvirt_amd_6274.out +%{_datadir}/%{name}/tests/caps_libvirt_ibm_S822L.out +%{_datadir}/%{name}/tests/caps_libvirt_intel_E31220.out +%{_datadir}/%{name}/tests/caps_libvirt_intel_E5606.out +%{_datadir}/%{name}/tests/caps_libvirt_intel_i73770.out +%{_datadir}/%{name}/tests/caps_libvirt_intel_i73770_nosnap.out +%{_datadir}/%{name}/tests/caps_libvirt_multiqemu.out +%{_datadir}/%{name}/tests/caps_numactl_4_nodes.out +%{_datadir}/%{name}/tests/cpu_map.xml +%{_datadir}/%{name}/tests/devices/*.py* +%{_datadir}/%{name}/tests/devices/parsing/*.py* +%{_datadir}/%{name}/tests/devices/data/*.xml +%{_datadir}/%{name}/tests/ip_route_show_table_all.out +%{_datadir}/%{name}/tests/iscsiadm_-m_iface.out +%{_datadir}/%{name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out +%{_datadir}/%{name}/tests/mem_info.out +%{_datadir}/%{name}/tests/netmaskconversions +%{_datadir}/%{name}/tests/run_tests.sh +%{_datadir}/%{name}/tests/tc_filter_show.out +%{_datadir}/%{name}/tests/toolTests_empty.conf +%{_datadir}/%{name}/tests/toolTests_lconf_ssl.conf +%{_datadir}/%{name}/tests/toolTests_libvirtd.conf +%{_datadir}/%{name}/tests/toolTests_qemu_sanlock.conf +%{_datadir}/%{name}/tests/toolTests_qemu_ssl.conf +%{_datadir}/%{name}/tests/toolTests_vdsm_no_ssl.conf +%{_datadir}/%{name}/tests/toolTests_vdsm_ssl.conf +%{_datadir}/%{name}/tests/glusterGeoRepStatus.xml +%{_datadir}/%{name}/tests/glusterVolumeGeoRepConfigList.xml +%{_datadir}/%{name}/tests/glusterSnapshotList.xml +%{_datadir}/%{name}/tests/glusterSnapshotListEmpty.xml +%{_datadir}/%{name}/tests/glusterVolumeProfileInfo.xml +%{_datadir}/%{name}/tests/glusterSnapshotConfig.xml +%{_datadir}/%{name}/tests/glusterVolumeProfileInfoNfs.xml +%{_datadir}/%{name}/tests/glusterVolumeRebalanceStatus.xml +%{_datadir}/%{name}/tests/glusterVolumeRemoveBricksStatus.xml +%{_datadir}/%{name}/tests/glusterSnapshotRestore.xml +%{_datadir}/%{name}/tests/glusterVolumeSnapshotList.xml +%{_datadir}/%{name}/tests/glusterVolumeSnapshotListEmpty.xml +%{_datadir}/%{name}/tests/glusterVolumeTasks.xml +%{_datadir}/%{name}/tests/functional/*.py* +%{_datadir}/%{name}/tests/functional/*.policy +%{_datadir}/%{name}/tests/integration/*.py* %files hook-openstacknet -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/after_device_create/50_openstacknet +%{_libexecdir}/%{name}/hooks/after_device_create/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/after_device_destroy/50_openstacknet +%{_libexecdir}/%{name}/hooks/after_device_destroy/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/after_device_migrate_destination/50_openstacknet +%{_libexecdir}/%{name}/hooks/after_device_migrate_destination/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/after_nic_hotplug/50_openstacknet +%{_libexecdir}/%{name}/hooks/after_nic_hotplug/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/after_nic_hotunplug/50_openstacknet +%{_libexecdir}/%{name}/hooks/after_nic_hotunplug/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/before_device_create/50_openstacknet +%{_libexecdir}/%{name}/hooks/before_device_create/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/before_device_migrate_destination/50_openstacknet +%{_libexecdir}/%{name}/hooks/before_device_migrate_destination/openstacknet_utils.py* +%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_openstacknet +%{_libexecdir}/%{name}/hooks/before_nic_hotplug/openstacknet_utils.py* %files hook-macspoof -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof +%{_libexecdir}/%{name}/hooks/before_vm_start/50_macspoof +%{_libexecdir}/%{name}/hooks/before_device_create/50_macspoof +%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_macspoof %if 0%{?with_vhostmd} %files hook-vhostmd -%defattr(-, root, root, -) %license COPYING %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%{_libexecdir}/%{name}/hooks/before_vm_start/50_vhostmd +%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_vhostmd +%{_libexecdir}/%{name}/hooks/before_vm_dehibernate/50_vhostmd +%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_vhostmd %else %exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%exclude %{_libexecdir}/%{name}/hooks/before_vm_start/50_vhostmd +%exclude %{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_vhostmd +%exclude %{_libexecdir}/%{name}/hooks/before_vm_dehibernate/50_vhostmd +%exclude %{_libexecdir}/%{name}/hooks/after_vm_destroy/50_vhostmd %endif %files hook-qemucmdline -%defattr(-, root, root, -) %license COPYING -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline +%{_libexecdir}/%{name}/hooks/before_vm_start/50_qemucmdline %files hook-ethtool-options -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options +%{_libexecdir}/%{name}/hooks/after_network_setup/30_ethtool_options %files hook-ipv6 -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ipv6 +%{_libexecdir}/%{name}/hooks/before_network_setup/50_ipv6 %files hook-vmfex-dev -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex +%{_libexecdir}/%{name}/hooks/before_device_create/50_vmfex +%{_libexecdir}/%{name}/hooks/before_device_migrate_destination/50_vmfex +%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_vmfex %if 0%{?with_hooks} %files hook-allocate_net -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/10_allocate_net +%{_libexecdir}/%{name}/hooks/before_device_create/10_allocate_net %files hook-checkimages -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages +%{_libexecdir}/%{name}/hooks/before_vm_start/60_checkimages %files hook-directlun -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_directlun -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun +%{_libexecdir}/%{name}/hooks/before_vm_start/50_directlun +%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_directlun +%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_directlun %files hook-diskunmap -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_diskunmap +%{_libexecdir}/%{name}/hooks/before_vm_start/50_diskunmap %files hook-fakevmstats -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats +%{_libexecdir}/%{name}/hooks/after_get_all_vm_stats/10_fakevmstats %files hook-fileinject -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject +%{_libexecdir}/%{name}/hooks/before_vm_start/50_fileinject %files hook-floppy -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy +%{_libexecdir}/%{name}/hooks/before_vm_start/50_floppy +%{_libexecdir}/%{name}/hooks/before_vm_migrate_source/50_floppy %files hook-hostusb -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb +%{_libexecdir}/%{name}/hooks/before_vm_start/50_hostusb +%{_libexecdir}/%{name}/hooks/before_vm_migrate_source/50_hostusb +%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_hostusb %files hook-httpsisoboot -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_httpsisoboot +%{_libexecdir}/%{name}/hooks/before_vm_start/50_httpsisoboot %files hook-hugepages -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages +%{_libexecdir}/%{name}/hooks/before_vm_start/50_hugepages +%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_hugepages +%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_hugepages %files hook-isolatedprivatevlan -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan +%{_libexecdir}/%{name}/hooks/before_vm_start/50_isolatedprivatevlan %config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml %files hook-macbind -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind +%{_libexecdir}/%{name}/hooks/before_vm_start/50_macbind %files hook-noipspoof -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_noipspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_noipspoof +%{_libexecdir}/%{name}/hooks/before_device_create/50_noipspoof +%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_noipspoof %files hook-extnet -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet +%{_libexecdir}/%{name}/hooks/before_device_create/50_extnet +%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_extnet %files hook-nestedvt -%defattr(-, root, root, -) %{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_nestedvt +%{_libexecdir}/%{name}/hooks/before_vm_start/50_nestedvt %files hook-numa -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa +%{_libexecdir}/%{name}/hooks/before_vm_start/50_numa %files hook-pincpu -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu +%{_libexecdir}/%{name}/hooks/before_vm_start/50_pincpu %files hook-promisc -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc +%{_libexecdir}/%{name}/hooks/after_vm_start/50_promisc +%{_libexecdir}/%{name}/hooks/before_vm_destroy/50_promisc %files hook-qos -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos +%{_libexecdir}/%{name}/hooks/before_vm_start/50_qos %files hook-scratchpad -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad +%{_libexecdir}/%{name}/hooks/before_vm_start/50_scratchpad +%{_libexecdir}/%{name}/hooks/before_vm_migrate_source/50_scratchpad +%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_scratchpad %files hook-smbios -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios +%{_libexecdir}/%{name}/hooks/before_vm_start/50_smbios %files hook-spiceoptions -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_spiceoptions +%{_libexecdir}/%{name}/hooks/before_vm_start/50_spiceoptions %files hook-vmdisk -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk +%{_libexecdir}/%{name}/hooks/before_vm_start/50_vmdisk %files hook-vmfex -%defattr(-, root, root, -) -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex +%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_vmfex +%{_libexecdir}/%{name}/hooks/before_vm_start/50_vmfex %endif %files debug-plugin -%defattr(-, root, root, -) -%{_datadir}/%{vdsm_name}/vdsmDebugPlugin.py* -%{_datadir}/%{vdsm_name}/debugPluginClient.py* +%{_datadir}/%{name}/vdsmDebugPlugin.py* +%{_datadir}/%{name}/debugPluginClient.py* %files cli -%defattr(-, root, root, -) %license COPYING %{_bindir}/vdsClient -%{_datadir}/%{vdsm_name}/vdsClient.py* -%{_datadir}/%{vdsm_name}/vdsClientGluster.py* +%{_datadir}/%{name}/vdsClient.py* +%{_datadir}/%{name}/vdsClientGluster.py* %{_sysconfdir}/bash_completion.d/vdsClient %{_mandir}/man1/vdsClient.1* %files xmlrpc -%defattr(-, root, root, -) -%dir %{_datadir}/%{vdsm_name} -%{_datadir}/%{vdsm_name}/rpc/bindingxmlrpc.py* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/rpc/bindingxmlrpc.py* %files jsonrpc -%doc %{vdsm_name}/rpc/vdsm-api.html -%{_datadir}/%{vdsm_name}/rpc/__init__.py* -%{_datadir}/%{vdsm_name}/rpc/bindingjsonrpc.py* -%{_datadir}/%{vdsm_name}/rpc/Bridge.py* -%{_datadir}/%{vdsm_name}/rpc/vdsmapi-schema.json +%doc %{name}/rpc/vdsm-api.html +%{_datadir}/%{name}/rpc/__init__.py* +%{_datadir}/%{name}/rpc/bindingjsonrpc.py* +%{_datadir}/%{name}/rpc/Bridge.py* +%{_datadir}/%{name}/rpc/vdsmapi-schema.json %{python_sitelib}/vdsmapi.py* %{python_sitelib}/yajsonrpc/__init__.py* %if ! 0%{?with_gluster} -%exclude %{_datadir}/%{vdsm_name}/rpc/vdsmapi-gluster-schema.json +%exclude %{_datadir}/%{name}/rpc/vdsmapi-gluster-schema.json %endif %files yajsonrpc @@ -1363,34 +1327,35 @@ exit 0 %{python_sitelib}/yajsonrpc/stompreactor.py* %files infra -%{python_sitelib}/%{vdsm_name}/infra/eventfd/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/filecontrol/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/sigutils/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/zombiereaper/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/__init__.py* +%{python_sitelib}/%{name}/infra/eventfd/__init__.py* +%{python_sitelib}/%{name}/infra/filecontrol/__init__.py* +%{python_sitelib}/%{name}/infra/sigutils/__init__.py* +%{python_sitelib}/%{name}/infra/zombiereaper/__init__.py* +%{python_sitelib}/%{name}/infra/__init__.py* %files hook-faqemu -%defattr(-, root, root, -) %license COPYING -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu +%{_libexecdir}/%{name}/hooks/before_vm_start/10_faqemu %if 0%{?with_gluster} %files gluster -%defattr(-, root, root, -) -%dir %{_datadir}/%{vdsm_name}/gluster +%dir %{_datadir}/%{name}/gluster %license COPYING -%{_datadir}/%{vdsm_name}/gluster/api.py* -%{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* -%{_datadir}/%{vdsm_name}/gluster/fstab.py* -%{_datadir}/%{vdsm_name}/rpc/vdsmapi-gluster-schema.json -%{_datadir}/%{vdsm_name}/gluster/gfapi.py* -%{_datadir}/%{vdsm_name}/gluster/hooks.py* -%{_datadir}/%{vdsm_name}/gluster/services.py* -%{_datadir}/%{vdsm_name}/gluster/storagedev.py* -%{_datadir}/%{vdsm_name}/gluster/tasks.py* +%{_datadir}/%{name}/gluster/api.py* +%{_datadir}/%{name}/gluster/apiwrapper.py* +%{_datadir}/%{name}/gluster/fstab.py* +%{_datadir}/%{name}/rpc/vdsmapi-gluster-schema.json +%{_datadir}/%{name}/gluster/gfapi.py* +%{_datadir}/%{name}/gluster/hooks.py* +%{_datadir}/%{name}/gluster/services.py* +%{_datadir}/%{name}/gluster/storagedev.py* +%{_datadir}/%{name}/gluster/tasks.py* %endif %changelog +* Fri Mar 11 2016 Dennis Gilmore 4.17.9-18.git1379158 +- spec cleanups + * Fri Feb 05 2016 Fedora Release Engineering - 4.17.9-17.git1379158 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From eda3f5b415e8e3c03a429d242b5ed9a269d112c1 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Mon, 30 May 2016 17:55:50 +0200 Subject: [PATCH 100/126] 2016-05-30: Retired because of broken deps in preparation of Fedora 24 Reference: https://fedorahosted.org/rel-eng/ticket/ --- .gitignore | 1 - dead.package | 3 + sources | 1 - vdsm.spec | 1373 -------------------------------------------------- 4 files changed, 3 insertions(+), 1375 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 sources delete mode 100644 vdsm.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8219ac9..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/vdsm-*.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..bb86c0f --- /dev/null +++ b/dead.package @@ -0,0 +1,3 @@ +2016-05-30: Retired because of broken deps in preparation of Fedora 24 +Reference: https://fedorahosted.org/rel-eng/ticket/ + diff --git a/sources b/sources deleted file mode 100644 index 5f2be82..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -53bf8a8e728a82a0553fc6533bd18ed4 vdsm-4.17.9.tar.gz diff --git a/vdsm.spec b/vdsm.spec deleted file mode 100644 index 5edd0bd..0000000 --- a/vdsm.spec +++ /dev/null @@ -1,1373 +0,0 @@ -# Required users and groups -%global vdsm_user vdsm -%global vdsm_group kvm -%global qemu_user qemu -%global qemu_group qemu -%global snlk_group sanlock -%global snlk_user sanlock -%global cdrom_group cdrom - -# Glusterfs package version -%global gluster_version 3.7.1 - -# koji build - overridable using rpmbuild --define "fedora_koji_build 1" -%{!?fedora_koji_build: %global fedora_koji_build 0} - -# RHEV build - overridable using rpmbuild --define "rhev_build 1" -%{!?rhev_build: %global rhev_build 0} - -%if 0%{fedora_koji_build} -%global with_hooks 1 -%endif - -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%global enable_autotools 0} - -# Skips check since rhel default repos lack pep8 and pyflakes -%if ! 0%{?rhel} -%{!?with_check:%global with_check 1} -%else -%{!?with_check:%global with_check 0} -%endif - -# Required paths -%if 0%{?fedora} -%global _polkitdir %{_datadir}/polkit-1/rules.d -%else -%global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d -%endif - -# Gluster should not be shipped with RHEV -%if ! 0%{?rhev_build} -%global with_gluster 1 -%endif - -%if ! 0%{?rhel} || ! 0%{fedora_koji_build} -%global with_vhostmd 1 -%endif - -%global _udevrulesdir /usr/lib/udev/rules.d/ -%global _udevexecdir /usr/lib/udev/ - -Name: vdsm -Version: 4.17.9 -Release: 18.git1379158%{?dist}%{?extra_release} -Summary: Virtual Desktop Server Manager -BuildArch: noarch - -Group: Applications/System -License: GPLv2+ -Url: http://www.ovirt.org/wiki/Vdsm -Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - - -BuildRequires: cyrus-sasl-lib -BuildRequires: gcc -BuildRequires: python -BuildRequires: python-devel -BuildRequires: python-netaddr -BuildRequires: python-nose -BuildRequires: python-six -BuildRequires: rpm-build - -# BuildRequires needed by the tests during the build -BuildRequires: dosfstools -BuildRequires: genisoimage -BuildRequires: libnl3 -BuildRequires: libselinux-python -BuildRequires: libvirt-python -BuildRequires: m2crypto -BuildRequires: mom >= 0.4.5 -BuildRequires: openssl -BuildRequires: policycoreutils-python -BuildRequires: psmisc -BuildRequires: python-cpopen >= 1.3 -BuildRequires: python-inotify -BuildRequires: python-ioprocess >= 0.14 -BuildRequires: python-pthreading -BuildRequires: qemu-img -BuildRequires: rpm-python -BuildRequires: python-blivet - -# Autotools BuildRequires -%if 0%{?enable_autotools} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -%endif - -%if 0%{?with_check} -BuildRequires: pyflakes -BuildRequires: python-pep8 -%endif - -BuildRequires: systemd-units - -Requires: ethtool -Requires: which -Requires: sudo >= 1.7.3 -Requires: logrotate -Requires: xz -Requires: ntp -Requires: iproute >= 3.10.0 -Requires: python-netaddr -Requires: python-inotify -Requires: python-argparse -Requires: python-cpopen >= 1.3 -Requires: python-ioprocess >= 0.14 -Requires: python-pthreading >= 0.1.3-3 -Requires: python-six -Requires: python-requests -Requires: %{name}-infra = %{version}-%{release} -Requires: rpm-python -Requires: nfs-utils -Requires: m2crypto -Requires: libnl3 -Requires: curl -Requires: %{name}-xmlrpc = %{version}-%{release} -Requires: %{name}-jsonrpc = %{version}-%{release} -Requires: safelease >= 1.0-5 -Requires: mom >= 0.4.5 -Requires: ovirt-vmconsole >= 1.0.0-0 - -%if 0%{?rhel} -Requires: libguestfs-tools-c >= 1:1.20.11-10 -%else # fedora -Requires: libguestfs-tools-c >= 1:1.26.7-2 -%endif - -Requires: libvirt-daemon-config-nwfilter -Requires: libvirt-daemon-driver-network -Requires: libvirt-daemon-driver-nwfilter -Requires: libvirt-daemon-driver-qemu - -%if 0%{?rhel} -Requires: libvirt-daemon >= 1.2.8-16.el7_1.4 -Requires: libvirt-python >= 1.2.8-7.el7_1.1 -%endif # rhel - -%if 0%{?fedora} >= 22 -Requires: libvirt-daemon >= 1.2.13 -Requires: libvirt-python >= 1.2.9-2 -%endif - -%if 0%{?fedora} -Requires: libvirt-daemon >= 1.2.9.3-1 -Requires: libvirt-python >= 1.2.9-2 -%endif - -Requires: libvirt-lock-sanlock, libvirt-client - -# iscsi-intiator versions -%if 0%{?rhel} -Requires: iscsi-initiator-utils -%else # fedora -Requires: iscsi-initiator-utils >= 6.2.0.873-21 -%endif - -Requires: sanlock >= 2.8, sanlock-python - -%if 0%{?rhel} -Requires: device-mapper-multipath >= 0.4.9-68 -Requires: e2fsprogs -Requires: fence-agents-all -%if 0%{?centos} -Requires: kernel >= 3.10.0-132.el7 -%else -Requires: kernel >= 3.10.0-229.17.1.el7 -%endif -Requires: lvm2 >= 2.02.107 -Requires: python >= 2.7.5-18.el7_1.1 -Requires: policycoreutils-python -Requires: selinux-policy-targeted >= 3.13.1-16.el7 -%else -Requires: fence-agents-all -Requires: kernel >= 4.1.6 -# Subprocess and thread bug was found on python 2.7.2 -Requires: python >= 2.7.3 -Requires: initscripts >= 9.42.2-1 -Requires: device-mapper-multipath >= 0.4.9-56 -Requires: e2fsprogs >= 1.41.14 -Requires: policycoreutils-python -Requires: sed >= 4.2.1-10 -Requires: ed -Requires: lvm2 >= 2.02.107 -Requires: selinux-policy-targeted >= 3.12.1-177 -# In order to avoid a policycoreutils bug (rhbz 889698) when selinux is -# disabled we now require the version 2.1.13-55 (or newer) of Fedora. -Requires: policycoreutils >= 2.1.13-55 -Requires: systemd >= 197-1.fc18.2 -%endif - -%if 0%{?rhel} -Requires: qemu-kvm-rhev >= 10:2.1.2-23.el7_1.2 -Requires: qemu-img-rhev >= 10:2.1.2-23.el7_1.2 -%else -Requires: qemu-kvm >= 2:2.1.3-11 -Requires: qemu-img >= 2:2.1.3-11 -%endif # rhel - -# GlusterFS client-side RPMs needed for Gluster SD -%if 0%{?with_gluster} -Requires: glusterfs-cli >= %{gluster_version} -Requires: glusterfs-fuse >= %{gluster_version} -%endif - -Requires: psmisc >= 22.6-15 -Requires: bridge-utils -Requires: sos -Requires: tree -Requires: dosfstools -Requires: genisoimage -Requires: libselinux-python -Requires: %{name}-python = %{version}-%{release} -Requires: pyparted - -Requires(post): /usr/sbin/saslpasswd2 - -%if 0%{?fedora} -Requires(post): hostname -%else -Requires(post): /bin/hostname -%endif - -Conflicts: vdsm-hook-sriov - -%description -The VDSM service is required by a Virtualization Manager to manage the -Linux hosts. VDSM manages and monitors the host's storage, memory and -networks as well as virtual machine creation, other host administration -tasks, statistics gathering, and log collection. - -%package cli -Summary: VDSM command line interface -Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-xmlrpc = %{version}-%{release} - -%description cli -Call VDSM commands from the command line. Used for testing and debugging. - -%package xmlrpc -Summary: VDSM xmlrpc API -Requires: %{name}-python = %{version}-%{release} - - -%description xmlrpc -An XMLRPC interface for interacting with vdsmd. Primary control interface for -ovirt-engine and vdsClient. - -%package jsonrpc -Summary: VDSM API Server -Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-yajsonrpc = %{version}-%{release} -Obsoletes: vdsm-api < 4.16 - -%description jsonrpc -A Json-based RPC interface that serves as the protocol for libvdsm. - -%package yajsonrpc -Summary: JSON RPC server and client implementation -Requires: python >= 2.6 - -%description yajsonrpc -A JSON RPC server and client implementation. - -%package infra -Summary: Utilities and libraries for vdsm -Requires: python >= 2.6 -Obsoletes: python-zombiereaper - -%description infra -Utilities and libraries for vdsm. - -%package reg -Summary: VDSM registration package -Requires: %{name} = %{version}-%{release} -Requires: m2crypto -Requires: openssl -Conflicts: ovirt-node < 3.0.4 - -%description reg -VDSM registration package. Used to register a Linux host to a Virtualization -Manager. - -%package python -Summary: VDSM python libraries -Requires: %{name}-infra = %{version}-%{release} -Requires: python-cpopen >= 1.2.3-5 -Requires: m2crypto -Requires: python-ioprocess >= 0.14 - -%description python -Shared libraries between the various VDSM packages. - -%package debug-plugin -Summary: VDSM Debug Plugin -Requires: %{name} = %{version}-%{release} -Requires: %{name}-xmlrpc = %{version}-%{release} - -%description debug-plugin -Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. - -%package tests -Summary: VDSM Test Suite -Requires: %{name} = %{version}-%{release} -Requires: dracut -Requires: python-nose - -%description tests -A test suite for verifying the functionality of a running vdsm instance - -%package hook-allocate_net -Summary: random_network allocation hook for VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-allocate_net -VDSM hook used to allocate networks for vms in a random fashion - -%package hook-checkimages -Summary: Qcow2 disk image format check hook for VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-checkimages -VDSM hook used to perform consistency check on a qcow2 format disk image -using the QEMU disk image utility. - -%package hook-diskunmap -Summary: Activate UNMAP for disk/lun devices -Requires: %{name} = %{version}-%{release} -Requires: qemu-kvm >= 1.5 - -%description hook-diskunmap -VDSM hooks which allow to activate disk UNMAP. - -%package hook-ethtool-options -Summary: Allow setting custom ethtool options for vdsm controlled nics -Requires: %{name} = %{version}-%{release} - -%description hook-ethtool-options -VDSM hook used for applying custom network properties that define ethtool -options for vdsm network nics - -%if 0%{?with_vhostmd} -%package hook-vhostmd -Summary: VDSM hook set for interaction with vhostmd -Requires: vhostmd - -%description hook-vhostmd -VDSM hook to use vhostmd per VM according to Virtualization Manager requests. -%endif - -%package hook-faqemu -Summary: Fake qemu process for VDSM quality assurance -Requires: %{name} = %{version}-%{release} - -%description hook-faqemu -VDSM hook used for testing VDSM with multiple fake virtual machines without -running real guests. -To enable this hook on your host, set vars.fake_kvm_support=True in your -/etc/vdsm/vdsm.conf before adding the host to ovirt-Engine. - -%package hook-directlun -Summary: Direct LUN support for VDSM - -%description hook-directlun -VDSM hook enable user to add storage LUN for VDSM -without the sharing and storage handling of VDSM. - -%package hook-macbind -Summary: Bind a vNIC to a Bridge -Requires: %{name} >= 4.14 - -%description hook-macbind -VDSM hooks which allow to bind a vNIC to a Bridge, managed or not by engine. - -%package hook-macspoof -Summary: Disables MAC spoofing filtering - -%description hook-macspoof -VDSM hooks which allow to disable mac spoof filtering -either on all the of the VM's interfaces or on -specific vnics. - -%package hook-noipspoof -Summary: Enables strict anti-spoofing filtering - -%description hook-noipspoof -VDSM hook which allows to enable strict anti-spoofing filtering -on all of the the VM's interfaces. - -%package hook-extnet -Summary: Force a vNIC to connect to a specific libvirt network -Requires: %{name} = %{version}-%{release} - -%description hook-extnet -VDSM hook which allows to connect a vNIC to a libvirt network that is managed -outside of oVirt, such as an openvswitch network. - -%package hook-fakevmstats -Summary: Generate random VM statistics -Requires: %{name} = %{version}-%{release} - -%description hook-fakevmstats -Hook intercepts VM's stats and randomizes various fields. -To enable this hook on your host, set vars.fake_vmstats_enable=true in your -/etc/vdsm/vdsm.conf. - -%package hook-fileinject -Summary: Allow uploading file to VMs disk -Requires: python-libguestfs - -%description hook-fileinject -Hook is getting target file name and its content and -create that file in target machine. - -%package hook-floppy -Summary: Allow adding floppy to VM - -%description hook-floppy -Allow adding floppy to VM - -%package hook-hostusb -Summary: Allow attaching USB device from host -Requires: usbutils - -%description hook-hostusb -Hook is getting vendor and product id of USB device -disconnect it from host and attach it to VM - -%package hook-httpsisoboot -Summary: Allow directly booting from an https available ISO -%if 0%{?rhel} -Requires: qemu-kvm-rhev >= 10:2.1.2-3 -%endif - -%description hook-httpsisoboot -Let the VM boot from an ISO image made available via an https URL without -the need to import the ISO into an ISO storage domain. -It doesn't support plain http. - -%package hook-hugepages -Summary: Huge pages enable user to handle VM with 2048KB page files. - -%description hook-hugepages -Hook is getting number of huge pages reserve them for the VM, -and enable user to handle VM with 2048KB page files. - -%package hook-isolatedprivatevlan -Summary: Isolated network environment for VMs - -%description hook-isolatedprivatevlan -limit VM traffic to a specific gateway by its mac address, -hook prevent VM from spoofing its mac or ip address -by using libvirt filter -and by adding custom filter: isolatedprivatevlan-vdsm.xml - -%package hook-nestedvt -Summary: Nested Virtualization support for VDSM - -%description hook-nestedvt -If the nested virtualization is enabled in your kvm module -this hook will expose it to the guests. - -%package hook-numa -Summary: NUMA support for VDSM - -%description hook-numa -Hooks is getting number/rage of NUMA nodes and NUMA mode, -and update the VM xml. - -%package hook-openstacknet -Summary: OpenStack Network vNICs support for VDSM - -%description hook-openstacknet -Hook for OpenStack Network vNICs. - -%package hook-pincpu -Summary: Hook pin VM so specific CPUs - -%description hook-pincpu -pincpu is hook for VDSM. -pincpu enable to pin virtual machine to a specific CPUs. - -%package hook-promisc -Summary: Network interface promiscuous mode support for VDSM - -%description hook-promisc -VDSM promiscuous mode let user define a VM interface that will capture -all network traffic. - -%package hook-qemucmdline -Summary: QEMU cmdline hook for VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-qemucmdline -Provides support for injecting QEMU cmdline via VDSM hook. -It exploits libvirt's qemu:commandline facility available in the -qemu xml namespace. - -%package hook-qos -Summary: QoS network in/out traffic support for VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-qos -Hook adds QoS in/out traffic to VMs interfaces - -%package hook-scratchpad -Summary: One time disk creation for VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-scratchpad -scratchpad hook for VDSM -Hook creates a disk for a VM onetime usage, -the disk will be erased when the VM destroyed. -VM cannot be migrated when using scratchpad hook - -%package hook-smbios -Summary: Adding custom smbios entries to libvirt domain via VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-smbios -Adding custom smbios entries to libvirt domain via VDSM -such as: vendor, version, date and release - -%package hook-spiceoptions -Summary: To configure spice options for vm -Requires: %{name} = %{version}-%{release} - -%description hook-spiceoptions -This vdsm hook can be used to configure some of -the spice optimization attributes and values.. - -%package hook-vmfex -Summary: vmfex support for VDSM -Requires: %{name} = %{version}-%{release} -Conflicts: hook-vmfex-dev - -%description hook-vmfex -Hook for vmfex. - -%package hook-vmfex-dev -Summary: VM-FEX vNIC support for VDSM -Requires: %{name} = %{version}-%{release} -Conflicts: hook-vmfex - -%description hook-vmfex-dev -Allows to use custom device properties to connect a guest vNIC to a host -VM-FEX Virtual Function (SR-IOV with macvtap mode). - -%package hook-vmdisk -Summary: External disk support for VDSM -Requires: %{name} = %{version}-%{release} - -%description hook-vmdisk -Hook adds additional disk image for a VM (raw or qcow2) - -%package hook-ipv6 -Summary: Set IPv6 configuration through custom network properties -Requires: %{name} = %{version}-%{release} - -%description hook-ipv6 -VDSM hook used for applying IPv6 configuration through custom network -properties - -%if 0%{?with_gluster} -%package gluster -Summary: Gluster Plugin for VDSM -Requires: %{name} = %{version}-%{release} -Requires: glusterfs-server >= %{gluster_version} -Requires: glusterfs-api >= %{gluster_version} -Requires: glusterfs-geo-replication >= %{gluster_version} -Requires: python-magic -Requires: python-blivet -Requires: xfsprogs - -%description gluster -Gluster plugin enables VDSM to serve Gluster functionalities. -%endif - -%prep -%setup -q - -%build -%if 0%{?enable_autotools} -autoreconf -if -%endif -%configure %{?with_hooks:--enable-hooks} \ -%if 0%{?rhev_build} - --enable-rhev \ - --with-smbios-manufacturer='Red Hat' \ - --with-smbios-osname='RHEV Hypervisor' \ - --with-qemu-kvm='qemu-kvm-rhev' \ - --with-qemu-img='qemu-img-rhev' \ -%endif - -make %{_smp_mflags} -# Setting software_version and software_revision in dsaversion.py -baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` -baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` -rawversion=%{version}-%{release} -sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ - -e 's/^raw_version_revision =.*/raw_version_revision = "'"${rawversion}"'"/' \ - -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py - -%install -make DESTDIR=%{buildroot} install - -# Creating VDSM logs in this session to avoid rpmbuild -# complain during the build -install -dDm 0755 %{buildroot}/usr/local/var/log/vdsm -touch %{buildroot}/usr/local/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} - -# Install the lvm rules -install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ - %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules - -install -Dm 0644 vdsm/limits.conf \ - %{buildroot}/etc/security/limits.d/99-vdsm.conf - -install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/usr/lib/systemd/systemd-vdsmd -install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}/usr/lib/systemd/system-preset/85-vdsmd.preset -install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service -install -Dm 0644 init/systemd/vdsm-network.service %{buildroot}%{_unitdir}/vdsm-network.service -install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service - -install -Dm 0644 init/systemd/mom-vdsm.service %{buildroot}%{_unitdir}/mom-vdsm.service - -install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ - %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf -install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ - %{buildroot}%{_tmpfilesdir}/%{name}.conf -install -Dm 0644 init/systemd/unlimited-core.conf \ - %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf - -%if 0%{?rhel} -# This is not commonplace, but we want /var/log/core to be a world-writable -# dropbox for core dumps -install -dDm 1777 %{buildroot}%{_localstatedir}/log/core -%endif - -# Install the polkit for libvirt -install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ - %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules - -# Install the libvirt hook for cleaning up the XML -install -Dm 0755 vdsm/virt/libvirt-hook.sh \ - %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu - -%check -%if 0%{?with_check} -#make check -%endif - -%clean -rm -rf %{buildroot} - -%pre -# Force standard locale behavior (English) -export LC_ALL=C - -/usr/bin/getent passwd %{vdsm_user} >/dev/null || \ - /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ - -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} -/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} -/usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} - -# We keep the previous rpm version number in a file for managing upgrade flow -# in vdsmd_init_script upgraded_version_check task -if [ "$1" -gt 1 ]; then - rpm -q %{name} > "%{_localstatedir}/lib/%{name}/upgraded_version" -fi - -%post -# After vdsm install we should create the logs files. -# In the install session we create it but since we use -# the ghost macro (in files session) the files are not included -touch /usr/local/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -chmod 0644 /usr/local/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /usr/local/var/log/vdsm/{connectivity.log,mom.log,vdsm.log} -chown root:root /usr/local/var/log/vdsm/supervdsm.log - -# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. -# So Remove them if it is played with /etc/sysctl.conf. -if grep -q "# VDSM section begin" /etc/sysctl.conf; then - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ - /etc/sysctl.conf -fi - -# hack until we replace core dump with abrt -if /usr/sbin/selinuxenabled; then - /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' -fi -/sbin/restorecon -R /var/log/core >/dev/null 2>&1 -# hack until we replace core dump with abrt - -# VDSM installs vdsm-modules-load.d.conf file - the following command will -# refresh vdsm kernel modules requirements to start on boot -/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : - -# The following triggers vdsmd.preset file and enables vdsm required services -%systemd_post vdsmd.service - -# VDSM installs unit files - daemon-reload will refresh systemd -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -exit 0 - -%preun -if [ "$1" -eq 0 ]; then - %{_bindir}/vdsm-tool remove-config -fi -%systemd_preun vdsmd.service -%systemd_preun vdsm-network.service -%systemd_preun supervdsmd.service -%systemd_preun mom-vdsm.service -exit 0 - -%postun -if [ "$1" -ge 1 ]; then - supervdsmd_start_required='no' - vdsmd_start_required='no' - - # Both vdsm and supervdsm should be managed here and must be restarted if - # ran before (code might changed) - if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 || : - vdsmd_start_required='yes' - fi - if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 || : - supervdsmd_start_required='yes' - fi - - if ! %{_bindir}/vdsm-tool is-configured >/dev/null 2>&1; then - %{_bindir}/vdsm-tool configure --force >/dev/null 2>&1 - fi - - if [ "${supervdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 || : - fi - if [ "${vdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 || : - fi -fi -exit 0 - -%files -%{!?_licensedir:%global license %%doc} -%doc README lib/vdsm/vdsm.conf.sample -%license COPYING -/usr/lib/systemd/systemd-vdsmd -/usr/lib/systemd/system-preset/85-vdsmd.preset -%{_unitdir}/vdsmd.service -%{_unitdir}/vdsm-network.service -%{_unitdir}/supervdsmd.service -%{_unitdir}/mom-vdsm.service -%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf - -%dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/connectivity.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/mom.log -%ghost %config %attr(0644, root, root) /usr/local/var/log/vdsm/supervdsm.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /usr/local/var/log/vdsm/vdsm.log -%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks -%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt -%dir %{_libexecdir}/%{name} -%dir %{_sysconfdir}/%{name} -%dir %{_sysconfdir}/%{name}/mom.d -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/network -%dir %{_datadir}/%{name}/network/configurators -%dir %{_datadir}/%{name}/network/tc -%dir %{_datadir}/%{name}/storage -%dir %{_datadir}/%{name}/storage/imageRepository -%dir %{_datadir}/%{name}/virt -%{_datadir}/%{name}/alignmentScan.py* -%{_datadir}/%{name}/blkid.py* -%{_datadir}/%{name}/caps.py* -%{_datadir}/%{name}/clientIF.py* -%{_datadir}/%{name}/daemonAdapter -%{_datadir}/%{name}/dmidecodeUtil.py* -%{_datadir}/%{name}/API.py* -%{_datadir}/%{name}/hooking.py* -%{_datadir}/%{name}/hooks.py* -%{_datadir}/%{name}/hostdev.py* -%{_datadir}/%{name}/mk_sysprep_floppy -%{_datadir}/%{name}/parted_utils.py* -%{_datadir}/%{name}/mkimage.py* -%{_datadir}/%{name}/numaUtils.py* -%{_datadir}/%{name}/ppc64HardwareInfo.py* -%{_datadir}/%{name}/protocoldetector.py* -%{_datadir}/%{name}/supervdsm.py* -%{_datadir}/%{name}/supervdsmServer -%{_datadir}/%{name}/v2v.py* -%{_datadir}/%{name}/vdsm -%{_datadir}/%{name}/vdsm-restore-net-config -%{_datadir}/%{name}/vdsm-store-net-config -%{_datadir}/%{name}/virt/__init__.py* -%{_datadir}/%{name}/virt/domain_descriptor.py* -%{_datadir}/%{name}/virt/guestagent.py* -%{_datadir}/%{name}/virt/migration.py* -%{_datadir}/%{name}/virt/periodic.py* -%{_datadir}/%{name}/virt/sampling.py* -%{_datadir}/%{name}/virt/secret.py* -%{_datadir}/%{name}/virt/virdomain.py* -%{_datadir}/%{name}/virt/vmchannels.py* -%{_datadir}/%{name}/virt/vmstats.py* -%{_datadir}/%{name}/virt/vmstatus.py* -%{_datadir}/%{name}/virt/vmtune.py* -%{_datadir}/%{name}/virt/vm.py* -%{_datadir}/%{name}/virt/vmexitreason.py* -%{_datadir}/%{name}/virt/vmpowerdown.py* -%{_datadir}/%{name}/virt/vmxml.py* -%{_datadir}/%{name}/virt/utils.py* -%{_datadir}/%{name}/virt/vmdevices/__init__.py* -%{_datadir}/%{name}/virt/vmdevices/core.py* -%{_datadir}/%{name}/virt/vmdevices/graphics.py* -%{_datadir}/%{name}/virt/vmdevices/hostdevice.py* -%{_datadir}/%{name}/virt/vmdevices/hwclass.py* -%{_datadir}/%{name}/virt/vmdevices/network.py* -%{_datadir}/%{name}/virt/vmdevices/storage.py* - -%config(noreplace) %{_sysconfdir}/%{name}/vdsm.conf -%config(noreplace) %{_sysconfdir}/%{name}/logger.conf -%config(noreplace) %{_sysconfdir}/%{name}/svdsm.logger.conf -%config(noreplace) %{_sysconfdir}/%{name}/mom.conf -%config(noreplace) %{_sysconfdir}/%{name}/mom.d/*.policy -%config(noreplace) %{_sysconfdir}/%{name}/logrotate/vdsm -%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm -%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf -%config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf -%config(noreplace) %{_tmpfilesdir}/%{name}.conf -%{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh -%{_sysconfdir}/sudoers.d/50_vdsm -%{_sysconfdir}/cron.hourly/vdsm-logrotate -%{_sysconfdir}/libvirt/hooks/qemu -%{_datadir}/%{name}/logUtils.py* -%{_datadir}/%{name}/dsaversion.py* -%{_libexecdir}/%{name}/curl-img-wrap -%{_libexecdir}/%{name}/fc-scan -%{_libexecdir}/%{name}/persist-vdsm-hooks -%{_libexecdir}/%{name}/unpersist-vdsm-hook -%{_libexecdir}/%{name}/ovirt_functions.sh -%{_libexecdir}/%{name}/vdsm-gencerts.sh -%{_libexecdir}/%{name}/vdsmd_init_common.sh -%{_datadir}/%{name}/network/__init__.py* -%{_datadir}/%{name}/network/api.py* -%{_datadir}/%{name}/network/configurators/__init__.py* -%{_datadir}/%{name}/network/configurators/dhclient.py* -%{_datadir}/%{name}/network/configurators/ifcfg.py* -%{_datadir}/%{name}/network/configurators/iproute2.py* -%{_datadir}/%{name}/network/configurators/libvirt.py* -%{_datadir}/%{name}/network/configurators/pyroute_two.py* -%{_datadir}/%{name}/network/configurators/qos.py* -%{_datadir}/%{name}/network/errors.py* -%{_datadir}/%{name}/network/models.py* -%{_datadir}/%{name}/network/sourceroute.py* -%{_datadir}/%{name}/network/sourceroutethread.py* -%{_datadir}/%{name}/network/tc/__init__.py* -%{_datadir}/%{name}/network/tc/_parser.py* -%{_datadir}/%{name}/network/tc/_wrapper.py* -%{_datadir}/%{name}/network/tc/cls.py* -%{_datadir}/%{name}/network/tc/filter.py* -%{_datadir}/%{name}/network/tc/qdisc.py* -%{_datadir}/%{name}/network/utils.py* -%{_datadir}/%{name}/storage/__init__.py* -%{_datadir}/%{name}/storage/blockSD.py* -%{_datadir}/%{name}/storage/blockVolume.py* -%{_datadir}/%{name}/storage/curlImgWrap.py* -%{_datadir}/%{name}/storage/devicemapper.py* -%{_datadir}/%{name}/storage/dispatcher.py* -%{_datadir}/%{name}/storage/monitor.py* -%{_datadir}/%{name}/storage/fileSD.py* -%{_datadir}/%{name}/storage/fileUtils.py* -%{_datadir}/%{name}/storage/fileVolume.py* -%{_datadir}/%{name}/storage/fuser.py* -%{_datadir}/%{name}/storage/glusterSD.py* -%{_datadir}/%{name}/storage/glusterVolume.py* -%{_datadir}/%{name}/storage/hba.py* -%{_datadir}/%{name}/storage/hsm.py* -%{_datadir}/%{name}/storage/image.py* -%{_datadir}/%{name}/storage/imageSharing.py* -%{_datadir}/%{name}/storage/iscsiadm.py* -%{_datadir}/%{name}/storage/iscsi.py* -%{_datadir}/%{name}/storage/localFsSD.py* -%{_datadir}/%{name}/storage/lvm.env -%{_datadir}/%{name}/storage/lvm.py* -%{_datadir}/%{name}/storage/misc.py* -%{_datadir}/%{name}/storage/mount.py* -%{_datadir}/%{name}/storage/multipath.py* -%{_datadir}/%{name}/storage/nfsSD.py* -%{_datadir}/%{name}/storage/outOfProcess.py* -%{_datadir}/%{name}/storage/persistentDict.py* -%{_datadir}/%{name}/storage/resourceFactories.py* -%{_datadir}/%{name}/storage/remoteFileHandler.py* -%{_datadir}/%{name}/storage/resourceManager.py* -%{_datadir}/%{name}/storage/clusterlock.py* -%{_datadir}/%{name}/storage/sdc.py* -%{_datadir}/%{name}/storage/sd.py* -%{_datadir}/%{name}/storage/securable.py* -%{_datadir}/%{name}/storage/sp.py* -%{_datadir}/%{name}/storage/spbackends.py* -%{_datadir}/%{name}/storage/storageConstants.py* -%{_datadir}/%{name}/storage/storage_exception.py* -%{_datadir}/%{name}/storage/storage_mailbox.py* -%{_datadir}/%{name}/storage/storageServer.py* -%{_datadir}/%{name}/storage/sync.py* -%{_datadir}/%{name}/storage/taskManager.py* -%{_datadir}/%{name}/storage/task.py* -%{_datadir}/%{name}/storage/threadLocal.py* -%{_datadir}/%{name}/storage/threadPool.py* -%{_datadir}/%{name}/storage/volume.py* -%{_datadir}/%{name}/storage/imageRepository/__init__.py* -%{_datadir}/%{name}/storage/imageRepository/formatConverter.py* -%{_libexecdir}/%{name}/spmprotect.sh -%{_libexecdir}/%{name}/spmstop.sh -%dir %{_libexecdir}/%{name}/hooks -%dir %{_libexecdir}/%{name}/hooks/before_device_create -%dir %{_libexecdir}/%{name}/hooks/after_device_create -%dir %{_libexecdir}/%{name}/hooks/before_device_destroy -%dir %{_libexecdir}/%{name}/hooks/after_device_destroy -%dir %{_libexecdir}/%{name}/hooks/before_vm_start -%dir %{_libexecdir}/%{name}/hooks/after_vm_start -%dir %{_libexecdir}/%{name}/hooks/before_vm_cont -%dir %{_libexecdir}/%{name}/hooks/after_vm_cont -%dir %{_libexecdir}/%{name}/hooks/before_vm_pause -%dir %{_libexecdir}/%{name}/hooks/after_vm_pause -%dir %{_libexecdir}/%{name}/hooks/before_vm_hibernate -%dir %{_libexecdir}/%{name}/hooks/after_vm_hibernate -%dir %{_libexecdir}/%{name}/hooks/before_vm_dehibernate -%dir %{_libexecdir}/%{name}/hooks/after_vm_dehibernate -%dir %{_libexecdir}/%{name}/hooks/before_device_migrate_source -%dir %{_libexecdir}/%{name}/hooks/after_device_migrate_source -%dir %{_libexecdir}/%{name}/hooks/before_device_migrate_destination -%dir %{_libexecdir}/%{name}/hooks/after_device_migrate_destination -%dir %{_libexecdir}/%{name}/hooks/before_vm_migrate_source -%dir %{_libexecdir}/%{name}/hooks/after_vm_migrate_source -%dir %{_libexecdir}/%{name}/hooks/before_vm_migrate_destination -%dir %{_libexecdir}/%{name}/hooks/after_vm_migrate_destination -%dir %{_libexecdir}/%{name}/hooks/before_vm_destroy -%dir %{_libexecdir}/%{name}/hooks/after_vm_destroy -%dir %{_libexecdir}/%{name}/hooks/before_vm_set_ticket -%dir %{_libexecdir}/%{name}/hooks/after_vm_set_ticket -%dir %{_libexecdir}/%{name}/hooks/before_update_device -%dir %{_libexecdir}/%{name}/hooks/after_update_device -%dir %{_libexecdir}/%{name}/hooks/after_update_device_fail -%dir %{_libexecdir}/%{name}/hooks/before_nic_hotplug -%dir %{_libexecdir}/%{name}/hooks/after_nic_hotplug -%dir %{_libexecdir}/%{name}/hooks/before_nic_hotunplug -%dir %{_libexecdir}/%{name}/hooks/after_nic_hotunplug -%dir %{_libexecdir}/%{name}/hooks/after_nic_hotplug_fail -%dir %{_libexecdir}/%{name}/hooks/after_nic_hotunplug_fail -%dir %{_libexecdir}/%{name}/hooks/before_disk_hotplug -%dir %{_libexecdir}/%{name}/hooks/after_disk_hotplug -%dir %{_libexecdir}/%{name}/hooks/before_disk_hotunplug -%dir %{_libexecdir}/%{name}/hooks/after_disk_hotunplug -%dir %{_libexecdir}/%{name}/hooks/before_vdsm_start -%dir %{_libexecdir}/%{name}/hooks/after_vdsm_stop -%dir %{_libexecdir}/%{name}/hooks/before_network_setup -%dir %{_libexecdir}/%{name}/hooks/after_network_setup -%dir %{_libexecdir}/%{name}/hooks/before_set_num_of_cpus -%dir %{_libexecdir}/%{name}/hooks/after_set_num_of_cpus -%dir %{_libexecdir}/%{name}/hooks/before_memory_hotplug -%dir %{_libexecdir}/%{name}/hooks/after_memory_hotplug -%dir %{_libexecdir}/%{name}/hooks/before_get_vm_stats -%dir %{_libexecdir}/%{name}/hooks/after_get_vm_stats -%dir %{_libexecdir}/%{name}/hooks/before_get_all_vm_stats -%dir %{_libexecdir}/%{name}/hooks/after_get_all_vm_stats -%dir %{_libexecdir}/%{name}/hooks/before_get_caps -%dir %{_libexecdir}/%{name}/hooks/after_get_caps -%dir %{_libexecdir}/%{name}/hooks/before_get_stats -%dir %{_libexecdir}/%{name}/hooks/after_get_stats -%dir %{_libexecdir}/%{name}/hooks/after_hostdev_list_by_caps -%dir %{_libexecdir}/%{name}/hooks/before_ifcfg_write -%dir %{_libexecdir}/%{name}/hooks/after_ifcfg_write - -%{_datadir}/%{name}/dumpStorageTable.py* -%{_datadir}/%{name}/get-conf-item -%{_datadir}/%{name}/kaxmlrpclib.py* -%{_datadir}/%{name}/momIF.py* -%{_datadir}/%{name}/set-conf-item -%dir %{_datadir}/%{name}/gluster -%{_datadir}/%{name}/gluster/__init__.py* -%{_datadir}/%{name}/gluster/cli.py* -%{_datadir}/%{name}/gluster/exception.py* -%{python_sitelib}/sos/plugins/vdsm.py* -%{_udevrulesdir}/12-vdsm-lvm.rules -/etc/security/limits.d/99-vdsm.conf -%{_mandir}/man8/vdsmd.8* -%if 0%{?rhel} -%dir %{_localstatedir}/log/core -%endif -%{_polkitdir}/10-vdsm-libvirt-access.rules - -%defattr(-, %{vdsm_user}, %{qemu_group}, -) -%dir %{_localstatedir}/lib/libvirt/qemu/channels - -%defattr(-, %{vdsm_user}, %{vdsm_group}, -) -%dir %{_sysconfdir}/pki/%{name} -%dir %{_sysconfdir}/pki/%{name}/keys -%dir %{_sysconfdir}/pki/%{name}/certs -%dir %{_sysconfdir}/pki/%{name}/libvirt-spice -%config(noreplace) %{_sysconfdir}/pki/%{name}/keys/libvirt_password -%{_localstatedir}/lib/%{name}/bonding-defaults.json -%dir %{_localstatedir}/lib/%{name} -%dir %{_localstatedir}/lib/%{name}/netconfback -%dir %{_localstatedir}/lib/%{name}/persistence -%dir %{_localstatedir}/lib/%{name}/upgrade -%dir %{_localstatedir}/run/%{name} -%dir %{_localstatedir}/run/%{name}/sourceRoutes -%dir %{_localstatedir}/run/%{name}/trackedInterfaces -%ghost %dir %{_localstatedir}/run/%{name}/payload -%dir %{_localstatedir}/run/%{name}/v2v -%dir %{_localstatedir}/log/%{name} -%dir %{_localstatedir}/log/%{name}/backup - -%files python -%{_mandir}/man1/vdsm-tool.1* -%{_bindir}/vdsm-tool -%dir %{python_sitelib}/%{name} -%dir %{python_sitelib}/%{name}/netlink -%dir %{python_sitelib}/%{name}/tool -%{python_sitelib}/%{name}/__init__.py* -%{python_sitelib}/%{name}/cmdutils.py* -%{python_sitelib}/%{name}/compat.py* -%{python_sitelib}/%{name}/concurrent.py* -%{python_sitelib}/%{name}/config.py* -%{python_sitelib}/%{name}/constants.py* -%{python_sitelib}/%{name}/define.py* -%{python_sitelib}/%{name}/exception.py* -%{python_sitelib}/%{name}/executor.py* -%{python_sitelib}/%{name}/ipwrapper.py* -%{python_sitelib}/%{name}/jsonrpcvdscli.py* -%{python_sitelib}/%{name}/libvirtconnection.py* -%{python_sitelib}/%{name}/netinfo.py* -%{python_sitelib}/%{name}/netlink/__init__.py* -%{python_sitelib}/%{name}/netlink/addr.py* -%{python_sitelib}/%{name}/netlink/link.py* -%{python_sitelib}/%{name}/netlink/monitor.py* -%{python_sitelib}/%{name}/netlink/route.py* -%{python_sitelib}/%{name}/password.py* -%{python_sitelib}/%{name}/profiling/__init__.py* -%{python_sitelib}/%{name}/profiling/cpu.py* -%{python_sitelib}/%{name}/profiling/errors.py* -%{python_sitelib}/%{name}/profiling/memory.py* -%{python_sitelib}/%{name}/profiling/profile.py* -%{python_sitelib}/%{name}/pthread.py* -%{python_sitelib}/%{name}/qemuimg.py* -%{python_sitelib}/%{name}/response.py* -%{python_sitelib}/%{name}/netconfpersistence.py* -%{python_sitelib}/%{name}/schedule.py* -%{python_sitelib}/%{name}/sslutils.py* -%{python_sitelib}/%{name}/sysctl.py* -%{python_sitelib}/%{name}/taskset.py* -%{python_sitelib}/%{name}/udevadm.py* -%{python_sitelib}/%{name}/utils.py* -%{python_sitelib}/%{name}/vdscli.py* -%{python_sitelib}/%{name}/virtsparsify.py* -%{python_sitelib}/%{name}/xmlrpc.py* -%{python_sitelib}/%{name}/tool/__init__.py* -%{python_sitelib}/%{name}/tool/configfile.py* -%{python_sitelib}/%{name}/tool/dummybr.py* -%{python_sitelib}/%{name}/tool/dump_bonding_defaults.py* -%{python_sitelib}/%{name}/tool/nwfilter.py* -%{python_sitelib}/%{name}/tool/configurator.py* -%{python_sitelib}/%{name}/tool/configurators/__init__* -%{python_sitelib}/%{name}/tool/configurators/certificates.py* -%{python_sitelib}/%{name}/tool/configurators/libvirt.py* -%{python_sitelib}/%{name}/tool/configurators/passwd.py* -%{python_sitelib}/%{name}/tool/configurators/sanlock.py* -%{python_sitelib}/%{name}/tool/configurators/sebool.py* -%{python_sitelib}/%{name}/tool/configurators/multipath.py* -%{python_sitelib}/%{name}/tool/dump_volume_chains.py* -%{python_sitelib}/%{name}/tool/register.py* -%{python_sitelib}/%{name}/tool/restore_nets.py* -%{python_sitelib}/%{name}/tool/service.py* -%{python_sitelib}/%{name}/tool/transient.py* -%{python_sitelib}/%{name}/tool/unified_persistence.py* -%{python_sitelib}/%{name}/tool/upgrade.py* -%{python_sitelib}/%{name}/tool/validate_ovirt_certs.py* -%{python_sitelib}/%{name}/tool/vdsm-id.py* - -%files tests -%doc %{_datadir}/%{name}/tests/README -%dir %{_datadir}/%{name}/tests -%dir %{_datadir}/%{name}/tests/functional -%dir %{_datadir}/%{name}/tests/devices -%dir %{_datadir}/%{name}/tests/integration -%{_datadir}/%{name}/tests/*.py* -%{_datadir}/%{name}/tests/cpu_info.out -%{_datadir}/%{name}/tests/caps_libvirt_intel_E5649.out -%{_datadir}/%{name}/tests/caps_libvirt_amd_6274.out -%{_datadir}/%{name}/tests/caps_libvirt_ibm_S822L.out -%{_datadir}/%{name}/tests/caps_libvirt_intel_E31220.out -%{_datadir}/%{name}/tests/caps_libvirt_intel_E5606.out -%{_datadir}/%{name}/tests/caps_libvirt_intel_i73770.out -%{_datadir}/%{name}/tests/caps_libvirt_intel_i73770_nosnap.out -%{_datadir}/%{name}/tests/caps_libvirt_multiqemu.out -%{_datadir}/%{name}/tests/caps_numactl_4_nodes.out -%{_datadir}/%{name}/tests/cpu_map.xml -%{_datadir}/%{name}/tests/devices/*.py* -%{_datadir}/%{name}/tests/devices/parsing/*.py* -%{_datadir}/%{name}/tests/devices/data/*.xml -%{_datadir}/%{name}/tests/ip_route_show_table_all.out -%{_datadir}/%{name}/tests/iscsiadm_-m_iface.out -%{_datadir}/%{name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out -%{_datadir}/%{name}/tests/mem_info.out -%{_datadir}/%{name}/tests/netmaskconversions -%{_datadir}/%{name}/tests/run_tests.sh -%{_datadir}/%{name}/tests/tc_filter_show.out -%{_datadir}/%{name}/tests/toolTests_empty.conf -%{_datadir}/%{name}/tests/toolTests_lconf_ssl.conf -%{_datadir}/%{name}/tests/toolTests_libvirtd.conf -%{_datadir}/%{name}/tests/toolTests_qemu_sanlock.conf -%{_datadir}/%{name}/tests/toolTests_qemu_ssl.conf -%{_datadir}/%{name}/tests/toolTests_vdsm_no_ssl.conf -%{_datadir}/%{name}/tests/toolTests_vdsm_ssl.conf -%{_datadir}/%{name}/tests/glusterGeoRepStatus.xml -%{_datadir}/%{name}/tests/glusterVolumeGeoRepConfigList.xml -%{_datadir}/%{name}/tests/glusterSnapshotList.xml -%{_datadir}/%{name}/tests/glusterSnapshotListEmpty.xml -%{_datadir}/%{name}/tests/glusterVolumeProfileInfo.xml -%{_datadir}/%{name}/tests/glusterSnapshotConfig.xml -%{_datadir}/%{name}/tests/glusterVolumeProfileInfoNfs.xml -%{_datadir}/%{name}/tests/glusterVolumeRebalanceStatus.xml -%{_datadir}/%{name}/tests/glusterVolumeRemoveBricksStatus.xml -%{_datadir}/%{name}/tests/glusterSnapshotRestore.xml -%{_datadir}/%{name}/tests/glusterVolumeSnapshotList.xml -%{_datadir}/%{name}/tests/glusterVolumeSnapshotListEmpty.xml -%{_datadir}/%{name}/tests/glusterVolumeTasks.xml -%{_datadir}/%{name}/tests/functional/*.py* -%{_datadir}/%{name}/tests/functional/*.policy -%{_datadir}/%{name}/tests/integration/*.py* - -%files hook-openstacknet -%{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet -%{_libexecdir}/%{name}/hooks/after_device_create/50_openstacknet -%{_libexecdir}/%{name}/hooks/after_device_create/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/after_device_destroy/50_openstacknet -%{_libexecdir}/%{name}/hooks/after_device_destroy/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/after_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{name}/hooks/after_device_migrate_destination/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/after_nic_hotplug/50_openstacknet -%{_libexecdir}/%{name}/hooks/after_nic_hotplug/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/after_nic_hotunplug/50_openstacknet -%{_libexecdir}/%{name}/hooks/after_nic_hotunplug/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/before_device_create/50_openstacknet -%{_libexecdir}/%{name}/hooks/before_device_create/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/before_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{name}/hooks/before_device_migrate_destination/openstacknet_utils.py* -%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_openstacknet -%{_libexecdir}/%{name}/hooks/before_nic_hotplug/openstacknet_utils.py* - -%files hook-macspoof -%{_libexecdir}/%{name}/hooks/before_vm_start/50_macspoof -%{_libexecdir}/%{name}/hooks/before_device_create/50_macspoof -%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_macspoof - -%if 0%{?with_vhostmd} -%files hook-vhostmd -%license COPYING -%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%{_libexecdir}/%{name}/hooks/before_vm_start/50_vhostmd -%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_vhostmd -%{_libexecdir}/%{name}/hooks/before_vm_dehibernate/50_vhostmd -%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_vhostmd -%else -%exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%exclude %{_libexecdir}/%{name}/hooks/before_vm_start/50_vhostmd -%exclude %{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_vhostmd -%exclude %{_libexecdir}/%{name}/hooks/before_vm_dehibernate/50_vhostmd -%exclude %{_libexecdir}/%{name}/hooks/after_vm_destroy/50_vhostmd -%endif - -%files hook-qemucmdline -%license COPYING -%{_libexecdir}/%{name}/hooks/before_vm_start/50_qemucmdline - -%files hook-ethtool-options -%{_libexecdir}/%{name}/hooks/after_network_setup/30_ethtool_options - -%files hook-ipv6 -%{_libexecdir}/%{name}/hooks/before_network_setup/50_ipv6 - -%files hook-vmfex-dev -%{_libexecdir}/%{name}/hooks/before_device_create/50_vmfex -%{_libexecdir}/%{name}/hooks/before_device_migrate_destination/50_vmfex -%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_vmfex - -%if 0%{?with_hooks} -%files hook-allocate_net -%{_libexecdir}/%{name}/hooks/before_device_create/10_allocate_net - -%files hook-checkimages -%{_libexecdir}/%{name}/hooks/before_vm_start/60_checkimages - -%files hook-directlun -%{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun -%{_libexecdir}/%{name}/hooks/before_vm_start/50_directlun -%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_directlun -%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_directlun - -%files hook-diskunmap -%{_libexecdir}/%{name}/hooks/before_vm_start/50_diskunmap - -%files hook-fakevmstats -%{_libexecdir}/%{name}/hooks/after_get_all_vm_stats/10_fakevmstats - -%files hook-fileinject -%{_libexecdir}/%{name}/hooks/before_vm_start/50_fileinject - -%files hook-floppy -%{_libexecdir}/%{name}/hooks/before_vm_start/50_floppy -%{_libexecdir}/%{name}/hooks/before_vm_migrate_source/50_floppy - -%files hook-hostusb -%{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb -%{_libexecdir}/%{name}/hooks/before_vm_start/50_hostusb -%{_libexecdir}/%{name}/hooks/before_vm_migrate_source/50_hostusb -%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_hostusb - -%files hook-httpsisoboot -%{_libexecdir}/%{name}/hooks/before_vm_start/50_httpsisoboot - -%files hook-hugepages -%{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages -%{_libexecdir}/%{name}/hooks/before_vm_start/50_hugepages -%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_hugepages -%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_hugepages - -%files hook-isolatedprivatevlan -%{_libexecdir}/%{name}/hooks/before_vm_start/50_isolatedprivatevlan -%config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml - -%files hook-macbind -%{_libexecdir}/%{name}/hooks/before_vm_start/50_macbind - -%files hook-noipspoof -%{_libexecdir}/%{name}/hooks/before_device_create/50_noipspoof -%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_noipspoof - -%files hook-extnet -%{_libexecdir}/%{name}/hooks/before_device_create/50_extnet -%{_libexecdir}/%{name}/hooks/before_nic_hotplug/50_extnet - -%files hook-nestedvt -%{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf -%{_libexecdir}/%{name}/hooks/before_vm_start/50_nestedvt - -%files hook-numa -%{_libexecdir}/%{name}/hooks/before_vm_start/50_numa - -%files hook-pincpu -%{_libexecdir}/%{name}/hooks/before_vm_start/50_pincpu - -%files hook-promisc -%{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc -%{_libexecdir}/%{name}/hooks/after_vm_start/50_promisc -%{_libexecdir}/%{name}/hooks/before_vm_destroy/50_promisc - -%files hook-qos -%{_libexecdir}/%{name}/hooks/before_vm_start/50_qos - -%files hook-scratchpad -%{_libexecdir}/%{name}/hooks/before_vm_start/50_scratchpad -%{_libexecdir}/%{name}/hooks/before_vm_migrate_source/50_scratchpad -%{_libexecdir}/%{name}/hooks/after_vm_destroy/50_scratchpad - -%files hook-smbios -%{_libexecdir}/%{name}/hooks/before_vm_start/50_smbios - -%files hook-spiceoptions -%{_libexecdir}/%{name}/hooks/before_vm_start/50_spiceoptions - -%files hook-vmdisk -%{_libexecdir}/%{name}/hooks/before_vm_start/50_vmdisk - -%files hook-vmfex -%{_libexecdir}/%{name}/hooks/before_vm_migrate_destination/50_vmfex -%{_libexecdir}/%{name}/hooks/before_vm_start/50_vmfex -%endif - -%files debug-plugin -%{_datadir}/%{name}/vdsmDebugPlugin.py* -%{_datadir}/%{name}/debugPluginClient.py* - -%files cli -%license COPYING -%{_bindir}/vdsClient -%{_datadir}/%{name}/vdsClient.py* -%{_datadir}/%{name}/vdsClientGluster.py* -%{_sysconfdir}/bash_completion.d/vdsClient -%{_mandir}/man1/vdsClient.1* - -%files xmlrpc -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/rpc/bindingxmlrpc.py* - -%files jsonrpc -%doc %{name}/rpc/vdsm-api.html -%{_datadir}/%{name}/rpc/__init__.py* -%{_datadir}/%{name}/rpc/bindingjsonrpc.py* -%{_datadir}/%{name}/rpc/Bridge.py* -%{_datadir}/%{name}/rpc/vdsmapi-schema.json -%{python_sitelib}/vdsmapi.py* -%{python_sitelib}/yajsonrpc/__init__.py* -%if ! 0%{?with_gluster} -%exclude %{_datadir}/%{name}/rpc/vdsmapi-gluster-schema.json -%endif - -%files yajsonrpc -%dir %{python_sitelib}/yajsonrpc -%{python_sitelib}/yajsonrpc/betterAsyncore.py* -%{python_sitelib}/yajsonrpc/stomp.py* -%{python_sitelib}/yajsonrpc/stompreactor.py* - -%files infra -%{python_sitelib}/%{name}/infra/eventfd/__init__.py* -%{python_sitelib}/%{name}/infra/filecontrol/__init__.py* -%{python_sitelib}/%{name}/infra/sigutils/__init__.py* -%{python_sitelib}/%{name}/infra/zombiereaper/__init__.py* -%{python_sitelib}/%{name}/infra/__init__.py* - -%files hook-faqemu -%license COPYING -%{_libexecdir}/%{name}/hooks/before_vm_start/10_faqemu - -%if 0%{?with_gluster} -%files gluster -%dir %{_datadir}/%{name}/gluster -%license COPYING -%{_datadir}/%{name}/gluster/api.py* -%{_datadir}/%{name}/gluster/apiwrapper.py* -%{_datadir}/%{name}/gluster/fstab.py* -%{_datadir}/%{name}/rpc/vdsmapi-gluster-schema.json -%{_datadir}/%{name}/gluster/gfapi.py* -%{_datadir}/%{name}/gluster/hooks.py* -%{_datadir}/%{name}/gluster/services.py* -%{_datadir}/%{name}/gluster/storagedev.py* -%{_datadir}/%{name}/gluster/tasks.py* -%endif - -%changelog -* Fri Mar 11 2016 Dennis Gilmore 4.17.9-18.git1379158 -- spec cleanups - -* Fri Feb 05 2016 Fedora Release Engineering - 4.17.9-17.git1379158 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 -- Removing vdsm-python-cpopen from the spec -- Adding dependency on formal cpopen package - -* Sun Apr 07 2013 Yaniv Bronhaim - 4.9.0-1 -- Adding cpopen package - -* Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 -- Initial upstream release - -* Thu Nov 02 2006 Simon Grinberg - 0.0-1 -- Initial build From 19694170dade024997cba5f47fb4006d85de3c32 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Thu, 28 Jul 2016 20:08:34 +0300 Subject: [PATCH 101/126] Refresh build of vdsm - stable ovirt-4.0 --- .gitignore | 1 + dead.package | 3 - sources | 1 + vdsm.spec | 1709 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1711 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 dead.package create mode 100644 sources create mode 100644 vdsm.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6f8bd5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/vdsm-4.18.9.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index bb86c0f..0000000 --- a/dead.package +++ /dev/null @@ -1,3 +0,0 @@ -2016-05-30: Retired because of broken deps in preparation of Fedora 24 -Reference: https://fedorahosted.org/rel-eng/ticket/ - diff --git a/sources b/sources new file mode 100644 index 0000000..48f1d34 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +a644fe1bd25c70b488bb8d18aba79af0 vdsm-4.18.9.tar.gz diff --git a/vdsm.spec b/vdsm.spec new file mode 100644 index 0000000..fdfe4d4 --- /dev/null +++ b/vdsm.spec @@ -0,0 +1,1709 @@ +# Packages names +%global vdsm_name vdsm + +# Required users and groups +%global vdsm_user vdsm +%global vdsm_group kvm +%global qemu_user qemu +%global qemu_group qemu +%global snlk_group sanlock +%global snlk_user sanlock +%global cdrom_group cdrom +# Not configurable because owned by ovirt-vmconsole package +%global vmcon_user ovirt-vmconsole +%global vmcon_group ovirt-vmconsole + +# Features +%global with_ovirt_imageio 1 +%global with_ovirt_vmconsole 1 +%global with_gluster_mgmt 1 +%global with_hooks 1 +%global with_vhostmd 0 +%global with_python3 0 + +%ifarch ppc64le +%global with_openvswitch 0 +%else +%global with_openvswitch 0 +%endif + +# Glusterfs package version +%global gluster_version 3.7.1 + +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%{!?enable_autotools:%global enable_autotools 0} + +# Required paths +%if 0%{?fedora} +%global _polkitdir %{_datadir}/polkit-1/rules.d +%else +%global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d +%endif + +%global _udevrulesdir /usr/lib/udev/rules.d/ +%global _udevexecdir /usr/lib/udev/ + +# Disable debuginfo package, since vdsm is a meta-package +%global debug_package %{nil} + +Name: %{vdsm_name} +Version: 4.18.9 +Release: 1%{?dist}%{?extra_release} +Summary: Virtual Desktop Server Manager + +Group: Applications/System +License: GPLv2+ +Url: http://www.ovirt.org/wiki/Vdsm +Source0: %{vdsm_name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%{!?_licensedir:%global license %%doc} + +BuildRequires: cyrus-sasl-lib +BuildRequires: python +BuildRequires: python-devel +BuildRequires: python-netaddr +BuildRequires: python-nose +BuildRequires: python-six >= 1.9.0 +BuildRequires: rpm-build + +# BuildRequires needed by the tests during the build +BuildRequires: dosfstools +BuildRequires: genisoimage +BuildRequires: libnl3 +BuildRequires: libselinux-python +BuildRequires: libvirt-python +BuildRequires: m2crypto +BuildRequires: mom >= 0.5.5 +BuildRequires: openssl +BuildRequires: policycoreutils-python +BuildRequires: psmisc +BuildRequires: PyYAML +BuildRequires: python-cpopen >= 1.4 +BuildRequires: python-inotify +BuildRequires: python-ioprocess >= 0.16.1-1 +BuildRequires: python-pthreading +BuildRequires: qemu-img +BuildRequires: rpm-python +BuildRequires: python-blivet + +%if 0%{?with_openvswitch} +BuildRequires: openvswitch >= 2.0.0 +%endif + +%if 0%{?with_python3} +%if 0%{?rhel} +BuildRequires: python34-nose +BuildRequires: python34-six +%else # fedora +BuildRequires: python3-nose +BuildRequires: python3-six +BuildRequires: python3-netaddr +BuildRequires: python3-yaml +BuildRequires: libselinux-python3 +BuildRequires: libvirt-python3 +%endif # rhel +%endif # support python3 + +# Autotools BuildRequires +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif + +BuildRequires: systemd-units + +# Numactl is not available on s390[x] and ARM +%ifnarch s390 s390x %{arm} +Requires: numactl +%endif + +%ifarch x86_64 +Requires: python-dmidecode +Requires: dmidecode +Requires: virt-v2v +%endif + +# Numactl is not available on s390[x] and ARM +%ifnarch s390 s390x %{arm} +Requires: numactl +%endif + +%ifarch x86_64 +Requires: python-dmidecode +Requires: dmidecode +Requires: virt-v2v +%endif + +Requires: ethtool +Requires: which +Requires: sudo >= 1.7.3 +Requires: logrotate +Requires: xz +Requires: ntp +Requires: iproute >= 3.10.0 +Requires: PyYAML +Requires: python-netaddr +Requires: python-inotify +Requires: python-argparse +Requires: python-cpopen >= 1.4 +Requires: python-ioprocess >= 0.16.1-1 +Requires: python-pthreading >= 0.1.3-3 +Requires: python-six >= 1.9.0 +Requires: python-requests +Requires: %{name}-infra = %{version}-%{release} +Requires: rpm-python +Requires: nfs-utils +Requires: m2crypto +Requires: libnl3 +Requires: curl +Requires: %{name}-xmlrpc = %{version}-%{release} +Requires: %{name}-jsonrpc = %{version}-%{release} +Requires: safelease >= 1.0-7 +Requires: mom >= 0.5.3 +Requires(pre): shadow-utils + +%if 0%{?with_openvswitch} +Requires: openvswitch >= 2.0.0 +%endif + +%if 0%{?with_ovirt_imageio} +Requires: ovirt-imageio-common +Requires: ovirt-imageio-daemon +%endif + +%if 0%{?with_ovirt_vmconsole} +Requires: ovirt-vmconsole >= 1.0.0-0 +%endif + +Requires: libvirt-client +Requires: libvirt-daemon-config-nwfilter +Requires: libvirt-lock-sanlock + +%if 0%{?fedora} +# TODO: bump fedora requirements to >= 1.3.5 as soon +# as we can require Fedora >= 24 + virt-preview +Requires: libvirt-python >= 1.2.18-1 +Requires: libvirt-daemon-kvm >= 1.2.18.1-1 +%else # rhel +Requires: libvirt-daemon-kvm >= 1.2.17-13.el7_2.5 +Requires: libvirt-python >= 1.2.17-2 +%endif + +# iscsi-intiator versions +%if 0%{?rhel} +Requires: iscsi-initiator-utils +%else # fedora +Requires: iscsi-initiator-utils >= 6.2.0.873-21 +%endif + +Requires: sanlock >= 2.8-2, sanlock-python + +# device-mapper-multipath + +%if 0%{?rhel} +Requires: device-mapper-multipath >= 0.4.9-84.el7 +%endif #rhel + +%if 0%{?fedora} == 22 +Requires: device-mapper-multipath >= 0.4.9-73.fc22.2 +%endif + +%if 0%{?fedora} >= 23 +Requires: device-mapper-multipath >= 0.4.9-80.fc23 +%endif + +%if 0%{?rhel} +Requires: e2fsprogs +Requires: fence-agents-all +Requires: kernel >= 3.10.0-327.18.1.el7 +Requires: lvm2 >= 7:2.02.130-5.el7_2.5 +Requires: python >= 2.7.5-18.el7_1.1 +Requires: policycoreutils-python +Requires: selinux-policy-targeted >= 3.13.1-16.el7 +Requires: systemd >= 219-11.el7 +%else +Requires: fence-agents-all +Requires: kernel >= 4.1.6 +# Subprocess and thread bug was found on python 2.7.2 +Requires: python >= 2.7.3 +Requires: initscripts >= 9.42.2-1 +Requires: e2fsprogs >= 1.41.14 +%if 0%{?fedora} >= 23 +Requires: policycoreutils-python-utils +%endif # fedora 23 +Requires: policycoreutils-python +Requires: sed >= 4.2.1-10 +Requires: ed +Requires: lvm2 >= 2.02.107 +Requires: selinux-policy-targeted >= 3.12.1-177 +# In order to avoid a policycoreutils bug (rhbz 889698) when selinux is +# disabled we now require the version 2.1.13-55 (or newer) of Fedora. +Requires: policycoreutils >= 2.1.13-55 +Requires: systemd >= 209 +%endif + +%if 0%{?rhel} +Requires: qemu-kvm-rhev >= 10:2.3.0-31.el7_2.16 +Requires: qemu-img-rhev >= 10:2.3.0-31.el7_2.16 +%else +Requires: qemu-kvm >= 2:2.3.1-1 +Requires: qemu-img >= 2:2.3.1-1 +%endif # rhel + +# GlusterFS client-side RPMs needed for Gluster SD +%ifnarch ppc64le +Requires: glusterfs-cli >= %{gluster_version} +Requires: glusterfs-fuse >= %{gluster_version} +%endif + +Requires: psmisc >= 22.6-15 +Requires: bridge-utils +Requires: sos +Requires: tree +Requires: dosfstools +Requires: genisoimage +Requires: libselinux-python +Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-hook-vmfex-dev = %{version}-%{release} +Requires: NetworkManager-config-server + +Requires(post): /usr/sbin/saslpasswd2 + +%if 0%{?fedora} +Requires(post): hostname +%else +Requires(post): /bin/hostname +%endif + +Conflicts: vdsm-hook-sriov + +%description +The VDSM service is required by a Virtualization Manager to manage the +Linux hosts. VDSM manages and monitors the host's storage, memory and +networks as well as virtual machine creation, other host administration +tasks, statistics gathering, and log collection. + +%package cli +Summary: VDSM command line interface +BuildArch: noarch +Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-xmlrpc = %{version}-%{release} + +%description cli +Call VDSM commands from the command line. Used for testing and debugging. + +%package xmlrpc +Summary: VDSM xmlrpc API +BuildArch: noarch +Requires: %{name}-python = %{version}-%{release} + + +%description xmlrpc +An XMLRPC interface for interacting with vdsmd. Primary control interface for +ovirt-engine and vdsClient. + +%package api +Summary: VDSM API +BuildArch: noarch + +%description api +Contains api schema files + +%package jsonrpc +Summary: VDSM API Server +BuildArch: noarch +Requires: %{name}-python = %{version}-%{release} +Requires: %{name}-api = %{version}-%{release} +Requires: %{name}-yajsonrpc = %{version}-%{release} +Obsoletes: %{name}-api < 4.16 + +%description jsonrpc +A Json-based RPC interface that serves as the protocol for libvdsm. + +%package yajsonrpc +Summary: JSON RPC server and client implementation +BuildArch: noarch +Requires: python >= 2.6 + +%description yajsonrpc +A JSON RPC server and client implementation. + +%package infra +Summary: Utilities and libraries for vdsm +BuildArch: noarch +Requires: python >= 2.6 +Obsoletes: %{name}-python-zombiereaper + +%description infra +Utilities and libraries for vdsm. + +%package reg +Summary: VDSM registration package +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Requires: m2crypto +Requires: openssl +Conflicts: ovirt-node < 3.0.4 + +%description reg +VDSM registration package. Used to register a Linux host to a Virtualization +Manager. + +%package python +Summary: VDSM python libraries +Requires: %{name}-api = %{version}-%{release} +BuildArch: noarch +Requires: %{name}-infra = %{version}-%{release} +Requires: python-cpopen >= 1.4 +Requires: m2crypto +Requires: python-ioprocess >= 0.16.1-1 + +%description python +Shared libraries between the various VDSM packages. + +%post python +# REQUIRED_FOR: Upgrade from 4.14 to 4.17 +# HACK: Remove vdsm python lib __init__ file if installed on old location +# https://bugzilla.redhat.com/show_bug.cgi?id=1279167 +if [ "$1" -ge 2 ]; then + if [ -d "%{python2_sitearch}/%{vdsm_name}" ]; then + logger -t '%{vdsm_name}' \ + 'Disabling old vdsm package in %{python2_sitearch}/%{vdsm_name}.' \ + 'Removing %{python2_sitearch}/%{vdsm_name}/init.py*' + rm -f %{python2_sitearch}/%{vdsm_name}/__init__.py* + fi +fi + +%package tests +Summary: VDSM Test Suite +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Requires: dracut +Requires: python-nose + +%description tests +A test suite for verifying the functionality of a running vdsm instance + +%package hook-allocate_net +Summary: random_network allocation hook for VDSM +BuildArch: noarch +Requires: %{name} + +%description hook-allocate_net +VDSM hook used to allocate networks for vms in a random fashion + +%package hook-checkimages +Summary: Qcow2 disk image format check hook for VDSM +BuildArch: noarch +Requires: %{name} + +%description hook-checkimages +VDSM hook used to perform consistency check on a qcow2 format disk image +using the QEMU disk image utility. + +%package hook-checkips +Summary: Check connectivity from the host to designated IPs +Requires: %{name} = %{version}-%{release} + +%description hook-checkips +VDSM hook used to check connectivity from the host network to designated IPs + +%post hook-checkips +%systemd_post vdsm-checkips.service + +%preun hook-checkips +%systemd_preun vdsm-checkips.service + +%package hook-diskunmap +Summary: Activate UNMAP for disk/lun devices +BuildArch: noarch +Requires: qemu-kvm >= 1.5 + +%description hook-diskunmap +VDSM hooks which allow to activate disk UNMAP. + +%package hook-ethtool-options +Summary: Allow setting custom ethtool options for vdsm controlled nics +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description hook-ethtool-options +VDSM hook used for applying custom network properties that define ethtool +options for vdsm network nics + +%package hook-extra-ipv4-addrs +Summary: Set extra ipv4 addresses for vdsm networks. + +%description hook-extra-ipv4-addrs +This hook allows the user to set extra ipv4 +addresses for vdsm networks. + +%if 0%{?with_vhostmd} +%package hook-vhostmd +Summary: VDSM hook set for interaction with vhostmd +BuildArch: noarch +Requires: vhostmd + +%description hook-vhostmd +VDSM hook to use vhostmd per VM according to Virtualization Manager requests. +%endif + +%package hook-faqemu +Summary: Fake qemu process for VDSM quality assurance +BuildArch: noarch +Requires: %{name} + +%description hook-faqemu +VDSM hook used for testing VDSM with multiple fake virtual machines without +running real guests. +To enable this hook on your host, set vars.fake_kvm_support=True in your +/etc/vdsm/vdsm.conf before adding the host to ovirt-Engine. + +%package hook-macbind +Summary: Bind a vNIC to a Bridge +BuildArch: noarch +Requires: %{name} >= 4.14 + +%description hook-macbind +VDSM hooks which allow to bind a vNIC to a Bridge, managed or not by engine. + +%package hook-macspoof +Summary: Disables MAC spoofing filtering +BuildArch: noarch + +%description hook-macspoof +VDSM hooks which allow to disable mac spoof filtering +either on all the of the VM's interfaces or on +specific vnics. + +%package hook-noipspoof +Summary: Enables strict anti-spoofing filtering +BuildArch: noarch + +%description hook-noipspoof +VDSM hook which allows to enable strict anti-spoofing filtering +on all of the the VM's interfaces. + +%package hook-extnet +Summary: Force a vNIC to connect to a specific libvirt network +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description hook-extnet +VDSM hook which allows to connect a vNIC to a libvirt network that is managed +outside of oVirt, such as an openvswitch network. + +%package hook-fakevmstats +Summary: Generate random VM statistics +BuildArch: noarch +Requires: %{name} + +%description hook-fakevmstats +Hook intercepts VM's stats and randomizes various fields. +To enable this hook on your host, set vars.fake_vmstats_enable=true in your +/etc/vdsm/vdsm.conf. + +%package hook-fakesriov +Summary: Generate fake SR-IOV devices +Requires: %{name} + +%description hook-fakesriov +Hook intercepts reported host device by hostdevListByCaps and adds +1 fake sriov devices and 2 fake virtual function devices +To enable this hook on your host, set vars.fake_sriov_enable=true in your +/etc/vdsm/vdsm.conf. + +%package hook-fileinject +Summary: Allow uploading file to VMs disk +BuildArch: noarch +Requires: python-libguestfs + +%description hook-fileinject +Hook is getting target file name and its content and +create that file in target machine. + +%package hook-floppy +Summary: Allow adding floppy to VM +BuildArch: noarch + +%description hook-floppy +Allow adding floppy to VM + +%package hook-hostusb +Summary: Allow attaching USB device from host +BuildArch: noarch +Requires: usbutils + +%description hook-hostusb +Hook is getting vendor and product id of USB device +disconnect it from host and attach it to VM + +%package hook-httpsisoboot +Summary: Allow directly booting from an https available ISO +BuildArch: noarch +%if 0%{?rhel} +Requires: qemu-kvm-rhev >= 10:2.1.2-3 +%endif + +%description hook-httpsisoboot +Let the VM boot from an ISO image made available via an https URL without +the need to import the ISO into an ISO storage domain. +It doesn't support plain http. + +%package hook-hugepages +Summary: Huge pages enable user to handle VM with 2048KB page files. +BuildArch: noarch + +%description hook-hugepages +Hook is getting number of huge pages reserve them for the VM, +and enable user to handle VM with 2048KB page files. + +%package hook-isolatedprivatevlan +Summary: Isolated network environment for VMs +BuildArch: noarch + +%description hook-isolatedprivatevlan +limit VM traffic to a specific gateway by its mac address, +hook prevent VM from spoofing its mac or ip address +by using libvirt filter +and by adding custom filter: isolatedprivatevlan-vdsm.xml + +%package hook-nestedvt +Summary: Nested Virtualization support for VDSM +BuildArch: noarch + +%description hook-nestedvt +If the nested virtualization is enabled in your kvm module +this hook will expose it to the guests. + +%package hook-numa +Summary: NUMA support for VDSM +BuildArch: noarch + +%description hook-numa +Hooks is getting number/rage of NUMA nodes and NUMA mode, +and update the VM xml. + +%package hook-openstacknet +Summary: OpenStack Network vNICs support for VDSM +BuildArch: noarch + +%description hook-openstacknet +Hook for OpenStack Network vNICs. + +%package hook-ovs +Summary: Open vSwitch support for VDSM +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Requires: openvswitch >= 2.0.0 + +%description hook-ovs +Hook for Open vSwitch support. + +%package hook-pincpu +Summary: Hook pin VM so specific CPUs +BuildArch: noarch + +%description hook-pincpu +pincpu is hook for VDSM. +pincpu enable to pin virtual machine to a specific CPUs. + +%package hook-promisc +Summary: Network interface promiscuous mode support for VDSM +BuildArch: noarch + +%description hook-promisc +VDSM promiscuous mode let user define a VM interface that will capture +all network traffic. + +%package hook-qemucmdline +Summary: QEMU cmdline hook for VDSM +BuildArch: noarch +Requires: %{name} + +%description hook-qemucmdline +Provides support for injecting QEMU cmdline via VDSM hook. +It exploits libvirt's qemu:commandline facility available in the +qemu xml namespace. + +%package hook-qos +Summary: QoS network in/out traffic support for VDSM +BuildArch: noarch + +%description hook-qos +Hook adds QoS in/out traffic to VMs interfaces + +%package hook-scratchpad +Summary: One time disk creation for VDSM +BuildArch: noarch + +%description hook-scratchpad +scratchpad hook for VDSM +Hook creates a disk for a VM onetime usage, +the disk will be erased when the VM destroyed. +VM cannot be migrated when using scratchpad hook + +%package hook-smbios +Summary: Adding custom smbios entries to libvirt domain via VDSM +BuildArch: noarch + +%description hook-smbios +Adding custom smbios entries to libvirt domain via VDSM +such as: vendor, version, date and release + +%package hook-spiceoptions +Summary: To configure spice options for vm +BuildArch: noarch + +%description hook-spiceoptions +This vdsm hook can be used to configure some of +the spice optimization attributes and values.. + +%package hook-vmfex +Summary: vmfex support for VDSM +BuildArch: noarch +Conflicts: hook-vmfex-dev + +%description hook-vmfex +Hook for vmfex. + +%package hook-vmfex-dev +Summary: VM-FEX vNIC support for VDSM +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Conflicts: hook-vmfex + +%description hook-vmfex-dev +Allows to use custom device properties to connect a guest vNIC to a host +VM-FEX Virtual Function (SR-IOV with macvtap mode). + +%package hook-vmdisk +Summary: External disk support for VDSM +BuildArch: noarch + +%description hook-vmdisk +Hook adds additional disk image for a VM (raw or qcow2) + +%package hook-ipv6 +Summary: Set IPv6 configuration through custom network properties +BuildArch: noarch +Requires: %{name} >= 4.16.7 + +%description hook-ipv6 +VDSM hook used for applying IPv6 configuration through custom network +properties + +%package hook-fcoe +Summary: Hook to enable FCoE support +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Requires: fcoe-utils + +%description hook-fcoe +VDSM hook used for configure specified NICs as FCoE interface through custom +network properties + +%if 0%{?with_gluster_mgmt} +%package gluster +Summary: Gluster Plugin for VDSM +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +Requires: glusterfs-server >= %{gluster_version} +Requires: glusterfs-api >= %{gluster_version} +Requires: glusterfs-geo-replication >= %{gluster_version} +Requires: python-magic +Requires: python-blivet +Requires: xfsprogs + +%description gluster +Gluster plugin enables VDSM to serve Gluster functionalities. +%endif + +%prep +%setup -q + +%build +%if 0%{?enable_autotools} +autoreconf -if +%endif +%configure \ +%if 0%{?with_hooks} + --enable-hooks \ +%endif +%if ! 0%{?with_gluster_mgmt} + --disable-gluster-mgmt \ +%endif +%if ! 0%{?with_python3} + --disable-python3 \ +%endif + --with-smbios-manufacturer='Red Hat' \ + --with-smbios-osname='RHEV Hypervisor' \ +%if ! 0%{?with_ovirt_imageio} + --disable-ovirt-imageio \ +%endif +%if ! 0%{?with_openvswitch} + --disable-openvswitch \ +%endif +%if 0%{?with_ovirt_vmconsole} + --with-ovirt-vmconsole-user=%{vmcon_user} \ + --with-ovirt-vmconsole-group=%{vmcon_group} \ +%else + --with-ovirt-vmconsole-user='vdsm' \ + --with-ovirt-vmconsole-group='kvm' \ +%endif + --with-qemu-kvm='qemu-kvm-rhev' \ + --with-qemu-img='qemu-img-rhev' + +make +# Setting software_version and software_revision in dsaversion.py +baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` +rawversion=%{version}-%{release} +sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ + -e 's/^raw_version_revision =.*/raw_version_revision = "'"${rawversion}"'"/' \ + -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' lib/vdsm/dsaversion.py + +sed -i -e 's/@SSL_IMPLEMENTATION@/m2c/g' lib/vdsm/config.py + +sed -i -e 's\@VDSMRPCPYLIBDIR@\%{python_sitelib}/%{vdsm_name}/rpc\g' lib/vdsm/constants.py + +%install +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install + +# Creating VDSM logs in this session to avoid rpmbuild +# complain during the build +install -dDm 0755 %{buildroot}/var/log/vdsm +touch %{buildroot}/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} + +# Install the lvm rules +install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ + %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules + +install -Dm 0644 vdsm/limits.conf \ + %{buildroot}/etc/security/limits.d/99-vdsm.conf + +install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/usr/lib/systemd/systemd-vdsmd +install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}/usr/lib/systemd/system-preset/85-vdsmd.preset +install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +install -Dm 0644 init/systemd/vdsm-network.service %{buildroot}%{_unitdir}/vdsm-network.service +install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service + +install -Dm 0644 init/systemd/mom-vdsm.service %{buildroot}%{_unitdir}/mom-vdsm.service + +install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ + %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf +install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ + %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf +install -Dm 0644 init/systemd/unlimited-core.conf \ + %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf + +%if 0%{?rhel} +# This is not commonplace, but we want /var/log/core to be a world-writable +# dropbox for core dumps +install -dDm 1777 %{buildroot}%{_localstatedir}/log/core +%endif + +# Install the polkit for libvirt +install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ + %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules + +# Install the libvirt hook for cleaning up the XML +install -Dm 0755 vdsm/virt/libvirt-hook.sh \ + %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu + +%check +make check + +%clean +rm -rf %{buildroot} + +%pre +# Force standard locale behavior (English) +export LC_ALL=C + +/usr/bin/getent passwd %{vdsm_user} >/dev/null || \ + /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ + -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} +/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} +/usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} + +# We keep the previous rpm version number in a file for managing upgrade flow +# in vdsmd_init_script upgraded_version_check task +if [ "$1" -gt 1 ]; then + rpm -q %{vdsm_name} > "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" +fi + +%post +# After vdsm install we should create the logs files. +# In the install session we create it but since we use +# the ghost macro (in files session) the files are not included +touch /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +chmod 0644 /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm /var/log/vdsm/{connectivity.log,mom.log,vdsm.log} +chown root:root /var/log/vdsm/supervdsm.log + +# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. +# So Remove them if it is played with /etc/sysctl.conf. +if grep -q "# VDSM section begin" /etc/sysctl.conf; then + /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ + /etc/sysctl.conf +fi + +# hack until we replace core dump with abrt +if /usr/sbin/selinuxenabled; then + /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' +fi +/sbin/restorecon -R /var/log/core >/dev/null 2>&1 +# hack until we replace core dump with abrt + +# VDSM installs vdsm-modules-load.d.conf file - the following command will +# refresh vdsm kernel modules requirements to start on boot +/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : + +# The following triggers vdsmd.preset file and enables vdsm required services +%systemd_post vdsmd.service +%systemd_post supervdsmd.service +%systemd_post vdsm-network.service +%systemd_post mom-vdsm.service +%systemd_post ksmtuned.service + +# From VDSM version 4.18 a .conf file is deployed to /etc/NetworkManager/conf.d +/bin/systemctl reload NetworkManager >/dev/null 2>&1 || : + +# VDSM installs unit files - daemon-reload will refresh systemd +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +exit 0 + +%preun +if [ "$1" -eq 0 ]; then + %{_bindir}/vdsm-tool remove-config +fi +%systemd_preun vdsmd.service +%systemd_preun vdsm-network.service +%systemd_preun supervdsmd.service +%systemd_preun mom-vdsm.service +%systemd_preun ksmtuned.service +exit 0 + +%postun +if [ "$1" -ge 1 ]; then + supervdsmd_start_required='no' + vdsmd_start_required='no' + + # Both vdsm and supervdsm should be managed here and must be restarted if + # ran before (code might changed) + if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 || : + vdsmd_start_required='yes' + fi + if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then + %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 || : + supervdsmd_start_required='yes' + fi + + if ! %{_bindir}/vdsm-tool is-configured >/dev/null 2>&1; then + %{_bindir}/vdsm-tool configure --force >/dev/null 2>&1 + fi + + if [ "${supervdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 || : + fi + if [ "${vdsmd_start_required}" = 'yes' ]; then + %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 || : + fi +fi +exit 0 + +%files +%defattr(-, root, root, -) +%doc README lib/vdsm/vdsm.conf.sample +%license COPYING +/usr/lib/systemd/systemd-vdsmd +/usr/lib/systemd/system-preset/85-vdsmd.preset +%{_unitdir}/vdsmd.service +%{_unitdir}/vdsm-network.service +%{_unitdir}/supervdsmd.service +%{_unitdir}/mom-vdsm.service +%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf + +%dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/connectivity.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log +%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks +%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt +%dir %{_libexecdir}/%{vdsm_name} +%dir %{_sysconfdir}/%{vdsm_name}/vdsm.conf.d +%dir %{_sysconfdir}/NetworkManager +%dir %{_sysconfdir}/NetworkManager/conf.d +%dir %{_sysconfdir}/%{vdsm_name} +%dir %{_sysconfdir}/%{vdsm_name}/mom.d +%dir %{_datadir}/%{vdsm_name} +%dir %{_datadir}/%{vdsm_name}/supervdsm_api +%dir %{_datadir}/%{vdsm_name}/storage +%dir %{_datadir}/%{vdsm_name}/storage/imageRepository +%dir %{_datadir}/%{vdsm_name}/virt +%dir %{_datadir}/%{vdsm_name}/virt/vmdevices +%{_datadir}/%{vdsm_name}/alignmentScan.py* +%{_datadir}/%{vdsm_name}/caps.py* +%{_datadir}/%{vdsm_name}/clientIF.py* +%{_datadir}/%{vdsm_name}/daemonAdapter +%{_datadir}/%{vdsm_name}/API.py* +%{_datadir}/%{vdsm_name}/hooking.py* +%{_datadir}/%{vdsm_name}/mk_sysprep_floppy +%{_datadir}/%{vdsm_name}/mkimage.py* +%{_datadir}/%{vdsm_name}/sitecustomize.py* +%{_datadir}/%{vdsm_name}/supervdsmServer +%{_datadir}/%{vdsm_name}/vdsm +%{_datadir}/%{vdsm_name}/vdsm-restore-net-config +%{_datadir}/%{vdsm_name}/vdsm-store-net-config +%{_datadir}/%{vdsm_name}/virt/__init__.py* +%{_datadir}/%{vdsm_name}/virt/domain_descriptor.py* +%{_datadir}/%{vdsm_name}/virt/migration.py* +%{_datadir}/%{vdsm_name}/virt/recovery.py* +%{_datadir}/%{vdsm_name}/virt/vmtune.py* +%{_datadir}/%{vdsm_name}/virt/vm.py* +%{_datadir}/%{vdsm_name}/virt/vmxml.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/common.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/core.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/graphics.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/hostdevice.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/hwclass.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/network.py* +%{_datadir}/%{vdsm_name}/virt/vmdevices/storage.py* + +%config(noreplace) %{_sysconfdir}/NetworkManager/conf.d/90-vdsm-monitor-connection-files.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy +%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm +%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm +%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf +%config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf +%config(noreplace) %{_tmpfilesdir}/%{vdsm_name}.conf +%{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh +%{_sysconfdir}/sudoers.d/50_vdsm +%{_sysconfdir}/cron.hourly/vdsm-logrotate +%{_sysconfdir}/libvirt/hooks/qemu +%{_libexecdir}/%{vdsm_name}/curl-img-wrap +%{_libexecdir}/%{vdsm_name}/fc-scan +%{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks +%{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook +%{_libexecdir}/%{vdsm_name}/ovirt_functions.sh +%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh +%{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh +%{_libexecdir}/%{vdsm_name}/kvm2ovirt +%{_libexecdir}/%{vdsm_name}/wait_for_ipv4s +%{_datadir}/%{vdsm_name}/supervdsm_api/__init__.py* +%{_datadir}/%{vdsm_name}/supervdsm_api/hwinfo.py* +%{_datadir}/%{vdsm_name}/supervdsm_api/mkimage.py* +%{_datadir}/%{vdsm_name}/supervdsm_api/ksm.py* +%{_datadir}/%{vdsm_name}/supervdsm_api/network.py* +%{_datadir}/%{vdsm_name}/supervdsm_api/udev.py* +%{_datadir}/%{vdsm_name}/supervdsm_api/virt.py* +%{_datadir}/%{vdsm_name}/storage/__init__.py* +%{_datadir}/%{vdsm_name}/storage/blockSD.py* +%{_datadir}/%{vdsm_name}/storage/blockVolume.py* +%{_datadir}/%{vdsm_name}/storage/curlImgWrap.py* +%{_datadir}/%{vdsm_name}/storage/devicemapper.py* +%{_datadir}/%{vdsm_name}/storage/dispatcher.py* +%{_datadir}/%{vdsm_name}/storage/monitor.py* +%{_datadir}/%{vdsm_name}/storage/fileSD.py* +%{_datadir}/%{vdsm_name}/storage/fileVolume.py* +%{_datadir}/%{vdsm_name}/storage/imagetickets.py* +%{_datadir}/%{vdsm_name}/storage/glusterSD.py* +%{_datadir}/%{vdsm_name}/storage/glusterVolume.py* +%{_datadir}/%{vdsm_name}/storage/hsm.py* +%{_datadir}/%{vdsm_name}/storage/image.py* +%{_datadir}/%{vdsm_name}/storage/imageSharing.py* +%{_datadir}/%{vdsm_name}/storage/iscsiadm.py* +%{_datadir}/%{vdsm_name}/storage/iscsi.py* +%{_datadir}/%{vdsm_name}/storage/localFsSD.py* +%{_datadir}/%{vdsm_name}/storage/lvm.env +%{_datadir}/%{vdsm_name}/storage/lvm.py* +%{_datadir}/%{vdsm_name}/storage/multipath.py* +%{_datadir}/%{vdsm_name}/storage/nfsSD.py* +%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* +%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* +%{_datadir}/%{vdsm_name}/storage/resourceManager.py* +%{_datadir}/%{vdsm_name}/storage/sdc.py* +%{_datadir}/%{vdsm_name}/storage/sd.py* +%{_datadir}/%{vdsm_name}/storage/sp.py* +%{_datadir}/%{vdsm_name}/storage/spbackends.py* +%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* +%{_datadir}/%{vdsm_name}/storage/storageServer.py* +%{_datadir}/%{vdsm_name}/storage/taskManager.py* +%{_datadir}/%{vdsm_name}/storage/task.py* +%{_datadir}/%{vdsm_name}/storage/threadPool.py* +%{_datadir}/%{vdsm_name}/storage/volume.py* +%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py* +%{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py* +%{_datadir}/%{vdsm_name}/storage/sdm/__init__.py* +%{_datadir}/%{vdsm_name}/storage/sdm/volume_artifacts.py* +%{_datadir}/%{vdsm_name}/storage/sdm/api/__init__.py* +%{_datadir}/%{vdsm_name}/storage/sdm/api/base.py* +%{_datadir}/%{vdsm_name}/storage/sdm/api/create_volume.py* +%{_libexecdir}/%{vdsm_name}/spmprotect.sh +%{_libexecdir}/%{vdsm_name}/spmstop.sh +%dir %{_libexecdir}/%{vdsm_name}/hooks +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_cont +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_pause +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_pause +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_hibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_hibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_dehibernate +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_update_device +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotunplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_memory_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_memory_hotplug +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_all_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_caps +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_ifcfg_write +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_ifcfg_write + +%{_datadir}/%{vdsm_name}/dumpStorageTable.py* +%{_datadir}/%{vdsm_name}/get-conf-item +%{_datadir}/%{vdsm_name}/set-conf-item +%dir %{_datadir}/%{vdsm_name}/gluster +%{_datadir}/%{vdsm_name}/gluster/__init__.py* +%{_datadir}/%{vdsm_name}/gluster/cli.py* +%{_datadir}/%{vdsm_name}/gluster/exception.py* +%{python_sitelib}/sos/plugins/vdsm.py* +%{_udevrulesdir}/12-vdsm-lvm.rules +/etc/security/limits.d/99-vdsm.conf +%{_mandir}/man8/vdsmd.8* +%if 0%{?rhel} +%dir %{_localstatedir}/log/core +%endif +%{_polkitdir}/10-vdsm-libvirt-access.rules + +%defattr(-, %{vdsm_user}, %{qemu_group}, -) +%dir %{_localstatedir}/lib/libvirt/qemu/channels + +%defattr(-, %{vdsm_user}, %{vdsm_group}, -) +%dir %{_sysconfdir}/pki/%{vdsm_name} +%dir %{_sysconfdir}/pki/%{vdsm_name}/keys +%dir %{_sysconfdir}/pki/%{vdsm_name}/certs +%dir %{_sysconfdir}/pki/%{vdsm_name}/libvirt-spice +%config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password +%dir %{_localstatedir}/lib/%{vdsm_name} +%dir %{_localstatedir}/lib/%{vdsm_name}/netconfback +%dir %{_localstatedir}/lib/%{vdsm_name}/persistence +%dir %{_localstatedir}/lib/%{vdsm_name}/upgrade +%dir %{_localstatedir}/run/%{vdsm_name} +%dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes +%dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces +%ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload +%dir %{_localstatedir}/run/%{vdsm_name}/v2v +%dir %{_localstatedir}/log/%{vdsm_name} +%dir %{_localstatedir}/log/%{vdsm_name}/backup +%defattr(644, %{vdsm_user}, %{vdsm_group}, -) +%{_datadir}/%{vdsm_name}/bonding-defaults.json +%{_datadir}/%{vdsm_name}/bonding-name2numeric.json + +%files python +%defattr(-, root, root, -) +%{_mandir}/man1/vdsm-tool.1* +%{_bindir}/vdsm-tool +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/common +%dir %{python_sitelib}/%{vdsm_name}/common/network +%dir %{python_sitelib}/%{vdsm_name}/host +%dir %{python_sitelib}/%{vdsm_name}/network +%dir %{python_sitelib}/%{vdsm_name}/network/configurators +%dir %{python_sitelib}/%{vdsm_name}/network/ip +%dir %{python_sitelib}/%{vdsm_name}/network/netinfo +%dir %{python_sitelib}/%{vdsm_name}/network/netlink +%dir %{python_sitelib}/%{vdsm_name}/network/ovs +%dir %{python_sitelib}/%{vdsm_name}/network/ovs/driver +%dir %{python_sitelib}/%{vdsm_name}/network/tc +%dir %{python_sitelib}/%{vdsm_name}/metrics +%dir %{python_sitelib}/%{vdsm_name}/tool +%dir %{python_sitelib}/%{vdsm_name}/tool/configurators +%dir %{python_sitelib}/%{vdsm_name}/profiling +%dir %{python_sitelib}/%{vdsm_name}/storage +%dir %{python_sitelib}/%{vdsm_name}/virt +%{python_sitelib}/%{vdsm_name}/__init__.py* +%{python_sitelib}/%{vdsm_name}/cmdutils.py* +%{python_sitelib}/%{vdsm_name}/compat.py* +%{python_sitelib}/%{vdsm_name}/commands.py* +%{python_sitelib}/%{vdsm_name}/common/*.py* +%{python_sitelib}/%{vdsm_name}/host/*.py* +%{python_sitelib}/%{vdsm_name}/common/network/*.py* +%{python_sitelib}/%{vdsm_name}/concurrent.py* +%{python_sitelib}/%{vdsm_name}/config.py* +%{python_sitelib}/%{vdsm_name}/constants.py* +%{python_sitelib}/%{vdsm_name}/cpuarch.py* +%{python_sitelib}/%{vdsm_name}/cpuinfo.py* +%{python_sitelib}/%{vdsm_name}/dsaversion.py* +%{python_sitelib}/%{vdsm_name}/define.py* +%{python_sitelib}/%{vdsm_name}/dmidecodeUtil.py* +%{python_sitelib}/%{vdsm_name}/exception.py* +%{python_sitelib}/%{vdsm_name}/executor.py* +%{python_sitelib}/%{vdsm_name}/health.py* +%{python_sitelib}/%{vdsm_name}/hooks.py* +%{python_sitelib}/%{vdsm_name}/hostdev.py* +%{python_sitelib}/%{vdsm_name}/jobs.py* +%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* +%{python_sitelib}/%{vdsm_name}/kaxmlrpclib.py* +%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* +%{python_sitelib}/%{vdsm_name}/logUtils.py* +%{python_sitelib}/%{vdsm_name}/m2cutils.py* +%{python_sitelib}/%{vdsm_name}/machinetype.py* +%{python_sitelib}/%{vdsm_name}/metrics/*.py* +%{python_sitelib}/%{vdsm_name}/moduleloader.py* +%{python_sitelib}/%{vdsm_name}/momIF.py* +%{python_sitelib}/%{vdsm_name}/network/__init__.py* +%{python_sitelib}/%{vdsm_name}/network/api.py* +%{python_sitelib}/%{vdsm_name}/network/configurators/__init__.py* +%{python_sitelib}/%{vdsm_name}/network/configurators/ifcfg.py* +%{python_sitelib}/%{vdsm_name}/network/configurators/iproute2.py* +%{python_sitelib}/%{vdsm_name}/network/configurators/pyroute_two.py* +%{python_sitelib}/%{vdsm_name}/network/configurators/qos.py* +%{python_sitelib}/%{vdsm_name}/network/errors.py* +%{python_sitelib}/%{vdsm_name}/network/canonicalize.py* +%{python_sitelib}/%{vdsm_name}/network/connectivity.py* +%{python_sitelib}/%{vdsm_name}/network/ip/*.py* +%{python_sitelib}/%{vdsm_name}/network/ipwrapper.py* +%{python_sitelib}/%{vdsm_name}/network/kernelconfig.py* +%{python_sitelib}/%{vdsm_name}/network/legacy_switch.py* +%{python_sitelib}/%{vdsm_name}/network/libvirt.py* +%{python_sitelib}/%{vdsm_name}/network/netinfo/*.py* +%{python_sitelib}/%{vdsm_name}/network/netlink/__init__.py* +%{python_sitelib}/%{vdsm_name}/network/netlink/addr.py* +%{python_sitelib}/%{vdsm_name}/network/netlink/link.py* +%{python_sitelib}/%{vdsm_name}/network/netlink/monitor.py* +%{python_sitelib}/%{vdsm_name}/network/netlink/route.py* +%{python_sitelib}/%{vdsm_name}/network/ovs/__init__.py* +%{python_sitelib}/%{vdsm_name}/network/ovs/info.py* +%{python_sitelib}/%{vdsm_name}/network/ovs/switch.py* +%{python_sitelib}/%{vdsm_name}/network/ovs/validator.py* +%{python_sitelib}/%{vdsm_name}/network/ovs/driver/__init__.py* +%{python_sitelib}/%{vdsm_name}/network/ovs/driver/vsctl.py* +%{python_sitelib}/%{vdsm_name}/network/models.py* +%{python_sitelib}/%{vdsm_name}/network/netconfpersistence.py* +%{python_sitelib}/%{vdsm_name}/network/netswitch.py* +%{python_sitelib}/%{vdsm_name}/network/sourceroute.py* +%{python_sitelib}/%{vdsm_name}/network/sourceroutethread.py* +%{python_sitelib}/%{vdsm_name}/network/tc/__init__.py* +%{python_sitelib}/%{vdsm_name}/network/tc/_parser.py* +%{python_sitelib}/%{vdsm_name}/network/tc/_wrapper.py* +%{python_sitelib}/%{vdsm_name}/network/tc/cls.py* +%{python_sitelib}/%{vdsm_name}/network/tc/filter.py* +%{python_sitelib}/%{vdsm_name}/network/tc/qdisc.py* +%{python_sitelib}/%{vdsm_name}/network/utils.py* +%{python_sitelib}/%{vdsm_name}/numa.py* +%{python_sitelib}/%{vdsm_name}/osinfo.py* +%{python_sitelib}/%{vdsm_name}/password.py* +%{python_sitelib}/%{vdsm_name}/panic.py* +%{python_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* +%{python_sitelib}/%{vdsm_name}/profiling/__init__.py* +%{python_sitelib}/%{vdsm_name}/profiling/cpu.py* +%{python_sitelib}/%{vdsm_name}/profiling/errors.py* +%{python_sitelib}/%{vdsm_name}/profiling/memory.py* +%{python_sitelib}/%{vdsm_name}/profiling/profile.py* +%{python_sitelib}/%{vdsm_name}/storage/__init__.py* +%{python_sitelib}/%{vdsm_name}/storage/asyncevent.py* +%{python_sitelib}/%{vdsm_name}/storage/blkdiscard.py* +%{python_sitelib}/%{vdsm_name}/storage/check.py* +%{python_sitelib}/%{vdsm_name}/storage/clusterlock.py* +%{python_sitelib}/%{vdsm_name}/storage/constants.py* +%{python_sitelib}/%{vdsm_name}/storage/exception.py* +%{python_sitelib}/%{vdsm_name}/storage/fileUtils.py* +%{python_sitelib}/%{vdsm_name}/storage/fuser.py* +%{python_sitelib}/%{vdsm_name}/storage/hba.py* +%{python_sitelib}/%{vdsm_name}/storage/misc.py* +%{python_sitelib}/%{vdsm_name}/storage/mount.py* +%{python_sitelib}/%{vdsm_name}/storage/persistent.py* +%{python_sitelib}/%{vdsm_name}/storage/rwlock.py* +%{python_sitelib}/%{vdsm_name}/storage/securable.py* +%{python_sitelib}/%{vdsm_name}/storage/sync.py* +%{python_sitelib}/%{vdsm_name}/storage/threadlocal.py* +%{python_sitelib}/%{vdsm_name}/storage/volumemetadata.py* +%{python_sitelib}/%{vdsm_name}/protocoldetector.py* +%{python_sitelib}/%{vdsm_name}/pthread.py* +%{python_sitelib}/%{vdsm_name}/qemuimg.py* +%{python_sitelib}/%{vdsm_name}/response.py* +%{python_sitelib}/%{vdsm_name}/schedule.py* +%{python_sitelib}/%{vdsm_name}/sslcompat.py* +%{python_sitelib}/%{vdsm_name}/sslutils.py* +%{python_sitelib}/%{vdsm_name}/supervdsm.py* +%{python_sitelib}/%{vdsm_name}/sysctl.py* +%{python_sitelib}/%{vdsm_name}/taskset.py* +%{python_sitelib}/%{vdsm_name}/throttledlog.py* +%{python_sitelib}/%{vdsm_name}/udevadm.py* +%{python_sitelib}/%{vdsm_name}/utils.py* +%{python_sitelib}/%{vdsm_name}/v2v.py* +%{python_sitelib}/%{vdsm_name}/vdscli.py* +%{python_sitelib}/%{vdsm_name}/virtsparsify.py* +%{python_sitelib}/%{vdsm_name}/xmlrpc.py* +%{python_sitelib}/%{vdsm_name}/tool/__init__.py* +%{python_sitelib}/%{vdsm_name}/tool/configfile.py* +%{python_sitelib}/%{vdsm_name}/tool/dummybr.py* +%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_opts.py* +%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* +%{python_sitelib}/%{vdsm_name}/tool/configurator.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* +%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* +%{python_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* +%{python_sitelib}/%{vdsm_name}/tool/register.py* +%{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* +%{python_sitelib}/%{vdsm_name}/tool/service.py* +%{python_sitelib}/%{vdsm_name}/tool/transient.py* +%{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* +%{python_sitelib}/%{vdsm_name}/tool/upgrade.py* +%{python_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* +%{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* +%{python_sitelib}/%{vdsm_name}/virt/__init__.py* +%{python_sitelib}/%{vdsm_name}/virt/api.py* +%{python_sitelib}/%{vdsm_name}/virt/guestagent.py* +%{python_sitelib}/%{vdsm_name}/virt/periodic.py* +%{python_sitelib}/%{vdsm_name}/virt/sampling.py* +%{python_sitelib}/%{vdsm_name}/virt/secret.py* +%{python_sitelib}/%{vdsm_name}/virt/utils.py* +%{python_sitelib}/%{vdsm_name}/virt/virdomain.py* +%{python_sitelib}/%{vdsm_name}/virt/vmchannels.py* +%{python_sitelib}/%{vdsm_name}/virt/vmexitreason.py* +%{python_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* +%{python_sitelib}/%{vdsm_name}/virt/vmstats.py* +%{python_sitelib}/%{vdsm_name}/virt/vmstatus.py* + +%files tests +%doc %{_datadir}/%{vdsm_name}/tests/README +%defattr(-, root, root, -) +%dir %{_datadir}/%{vdsm_name} +%dir %{_datadir}/%{vdsm_name}/tests +%dir %{_datadir}/%{vdsm_name}/tests/common +%dir %{_datadir}/%{vdsm_name}/tests/cpuinfo +%dir %{_datadir}/%{vdsm_name}/tests/functional +%dir %{_datadir}/%{vdsm_name}/tests/devices +%dir %{_datadir}/%{vdsm_name}/tests/devices/data +%dir %{_datadir}/%{vdsm_name}/tests/devices/parsing +%dir %{_datadir}/%{vdsm_name}/tests/integration +%dir %{_datadir}/%{vdsm_name}/tests/network +%{_datadir}/%{vdsm_name}/supervdsm_api/test.py* +%{_datadir}/%{vdsm_name}/tests/*.py* +%{_datadir}/%{vdsm_name}/tests/cpu_info.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_ibm_S822L.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_ibm_S822L_le.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5606.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770_nosnap.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_multiqemu.out +%{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out +%{_datadir}/%{vdsm_name}/tests/common/*.py* +%{_datadir}/%{vdsm_name}/tests/cpuinfo/*.out +%{_datadir}/%{vdsm_name}/tests/fake-ssh-add +%{_datadir}/%{vdsm_name}/tests/fake-ssh-agent +%{_datadir}/%{vdsm_name}/tests/fake-virt-v2v +%{_datadir}/%{vdsm_name}/tests/fake-virt-v2v.out +%{_datadir}/%{vdsm_name}/tests/cpu_map.xml +%{_datadir}/%{vdsm_name}/tests/devices/*.py* +%{_datadir}/%{vdsm_name}/tests/devices/parsing/*.py* +%{_datadir}/%{vdsm_name}/tests/devices/data/*.xml +%{_datadir}/%{vdsm_name}/tests/iscsiadm_-m_iface.out +%{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out +%{_datadir}/%{vdsm_name}/tests/lvs_f9e55e18-67c4-4377-8e39-5833ca422bef.out +%{_datadir}/%{vdsm_name}/tests/mem_info.out +%{_datadir}/%{vdsm_name}/tests/network/*.py* +%{_datadir}/%{vdsm_name}/tests/network/ip_route_show_table_all.out +%{_datadir}/%{vdsm_name}/tests/network/netmaskconversions +%{_datadir}/%{vdsm_name}/tests/network/tc_filter_show.out +%{_datadir}/%{vdsm_name}/tests/run_tests.sh +%{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_sanlock.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_no_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_ssl.conf +%{_datadir}/%{vdsm_name}/tests/glusterGeoRepStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeGeoRepConfigList.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotList.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotListEmpty.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotConfig.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml +%{_datadir}/%{vdsm_name}/tests/glusterSnapshotRestore.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotList.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotListEmpty.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeTasks.xml +%{_datadir}/%{vdsm_name}/tests/glusterVolumeHealInfo.xml +%{_datadir}/%{vdsm_name}/tests/functional/*.py* +%{_datadir}/%{vdsm_name}/tests/functional/*.policy +%{_datadir}/%{vdsm_name}/tests/integration/*.py* + +%files hook-openstacknet +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/openstacknet_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* + +%files hook-ovs +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_ovs +%{_libexecdir}/%{vdsm_name}/ovs_migrate.py* +%{_libexecdir}/%{vdsm_name}/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_ip.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_libvirt.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_mtu.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_ovs.py* +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail/50_ovs +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail/ovs_utils.py* + +%files hook-macspoof +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof + +%if 0%{?with_vhostmd} +%files hook-vhostmd +%defattr(-, root, root, -) +%license COPYING +%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%else +%exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd +%exclude %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd +%endif + +%files hook-qemucmdline +%defattr(-, root, root, -) +%license COPYING +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline + +%files hook-ethtool-options +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options + +%files hook-ipv6 +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ipv6 + +%files hook-vmfex-dev +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex + +%if 0%{?with_hooks} +%files hook-allocate_net +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/10_allocate_net + +%files hook-checkimages +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages + +%files hook-fcoe +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_fcoe + +%files hook-checkips +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/10_checkips +%{_libexecdir}/%{vdsm_name}/hooks/checkipsd +%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/checkips_utils.py* +%{_unitdir}/vdsm-checkips.service + +%files hook-extra-ipv4-addrs +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/40_extra_ipv4_addrs + +%files hook-diskunmap +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_diskunmap + +%files hook-fakevmstats +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats + +%files hook-fakesriov +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps/10_fakesriov +%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/10_fakesriov + +%files hook-fileinject +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject + +%files hook-floppy +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy + +%files hook-hostusb +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb + +%files hook-httpsisoboot +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_httpsisoboot + +%files hook-hugepages +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages + +%files hook-isolatedprivatevlan +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan +%config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml + +%files hook-macbind +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind + +%files hook-noipspoof +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_noipspoof +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_noipspoof + +%files hook-extnet +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet +%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet + +%files hook-nestedvt +%defattr(-, root, root, -) +%{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_nestedvt + +%files hook-numa +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa + +%files hook-pincpu +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu + +%files hook-promisc +%defattr(-, root, root, -) +%{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc + +%files hook-qos +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos + +%files hook-scratchpad +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad +%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad + +%files hook-smbios +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios + +%files hook-spiceoptions +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_spiceoptions + +%files hook-vmdisk +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk + +%files hook-vmfex +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex +%endif + +%files cli +%defattr(-, root, root, -) +%license COPYING +%{_bindir}/vdsClient +%dir %{_datadir}/%{vdsm_name} +%{_datadir}/%{vdsm_name}/vdsClient.py* +%{_datadir}/%{vdsm_name}/vdsClientGluster.py* +%{_sysconfdir}/bash_completion.d/vdsClient +%{_mandir}/man1/vdsClient.1* + +%files xmlrpc +%defattr(-, root, root, -) +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/rpc +%{python_sitelib}/%{vdsm_name}/rpc/bindingxmlrpc.py* + +%files jsonrpc +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/rpc +%{python_sitelib}/%{vdsm_name}/rpc/__init__.py* +%{python_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* +%{python_sitelib}/%{vdsm_name}/rpc/Bridge.py* +%{python_sitelib}/yajsonrpc/__init__.py* + +%files api +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/rpc +%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api.yml +%{python_sitelib}/api/vdsmapi.py* +%{python_sitelib}/api/__init__.py* +%if ! 0%{?with_gluster_mgmt} +%exclude %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml +%endif + +%files yajsonrpc +%dir %{python_sitelib}/yajsonrpc +%{python_sitelib}/yajsonrpc/betterAsyncore.py* +%{python_sitelib}/yajsonrpc/stomp.py* +%{python_sitelib}/yajsonrpc/stompreactor.py* + +%files infra +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/infra +%dir %{python_sitelib}/%{vdsm_name}/infra/eventfd +%dir %{python_sitelib}/%{vdsm_name}/infra/filecontrol +%dir %{python_sitelib}/%{vdsm_name}/infra/sigutils +%dir %{python_sitelib}/%{vdsm_name}/infra/zombiereaper +%{python_sitelib}/%{vdsm_name}/infra/eventfd/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/filecontrol/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/sigutils/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/zombiereaper/__init__.py* +%{python_sitelib}/%{vdsm_name}/infra/__init__.py* + +%files hook-faqemu +%defattr(-, root, root, -) +%license COPYING +%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/10_faqemu +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu + +%if 0%{?with_gluster_mgmt} +%files gluster +%defattr(-, root, root, -) +%dir %{_datadir}/%{vdsm_name} +%dir %{_datadir}/%{vdsm_name}/gluster +%dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/rpc +%license COPYING +%{_datadir}/%{vdsm_name}/gluster/api.py* +%{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* +%{_datadir}/%{vdsm_name}/gluster/fstab.py* +%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml +%{_datadir}/%{vdsm_name}/gluster/gfapi.py* +%{_datadir}/%{vdsm_name}/gluster/hooks.py* +%{_datadir}/%{vdsm_name}/gluster/services.py* +%{_datadir}/%{vdsm_name}/gluster/storagedev.py* +%{_datadir}/%{vdsm_name}/gluster/tasks.py* +%endif + +%changelog +* Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 +- Removing vdsm-python-cpopen from the spec +- Adding dependency on formal cpopen package + +* Sun Apr 07 2013 Yaniv Bronhaim - 4.9.0-1 +- Adding cpopen package + +* Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 +- Initial upstream release + +* Thu Nov 02 2006 Simon Grinberg - 0.0-1 +- Initial build From be412df1ffca4a2501b59b7660184180119f0f19 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Thu, 28 Jul 2016 20:09:24 +0300 Subject: [PATCH 102/126] Remove make check and gluster-mgmt build due to missing arch deps This build is for upstream use in master branch. We will add back those parts after having all requirements. --- vdsm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index fdfe4d4..cf5d1c7 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -16,7 +16,7 @@ # Features %global with_ovirt_imageio 1 %global with_ovirt_vmconsole 1 -%global with_gluster_mgmt 1 +%global with_gluster_mgmt 0 %global with_hooks 1 %global with_vhostmd 0 %global with_python3 0 @@ -818,7 +818,7 @@ install -Dm 0755 vdsm/virt/libvirt-hook.sh \ %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu %check -make check +#make check %clean rm -rf %{buildroot} From 9b6362d5bb1c837bc9441891e0ba806ea44fdff6 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sun, 14 Aug 2016 11:26:38 +0300 Subject: [PATCH 103/126] master 4.18.999 build --- .gitignore | 1 + sources | 2 +- vdsm.spec | 186 +++++++++++++++++++---------------------------------- 3 files changed, 67 insertions(+), 122 deletions(-) diff --git a/.gitignore b/.gitignore index c6f8bd5..05032c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /vdsm-4.18.9.tar.gz +/vdsm-4.18.999.tar.gz diff --git a/sources b/sources index 48f1d34..803ac6f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a644fe1bd25c70b488bb8d18aba79af0 vdsm-4.18.9.tar.gz +86eef41dad36acd6c2524591c2464361 vdsm-4.18.999.tar.gz diff --git a/vdsm.spec b/vdsm.spec index cf5d1c7..72a5253 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -14,17 +14,17 @@ %global vmcon_group ovirt-vmconsole # Features -%global with_ovirt_imageio 1 -%global with_ovirt_vmconsole 1 -%global with_gluster_mgmt 0 +%global with_ovirt_imageio 0 +%global with_ovirt_vmconsole 0 +%global with_gluster_mgmt 1 %global with_hooks 1 -%global with_vhostmd 0 -%global with_python3 0 +%global with_vhostmd 1 +%global with_python3 1 %ifarch ppc64le %global with_openvswitch 0 %else -%global with_openvswitch 0 +%global with_openvswitch 1 %endif # Glusterfs package version @@ -42,20 +42,20 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -%global _udevrulesdir /usr/lib/udev/rules.d/ -%global _udevexecdir /usr/lib/udev/ +%global _udevrulesdir %{_libdir}/udev/rules.d/ +%global _udevexecdir %{_libdir}/udev/ # Disable debuginfo package, since vdsm is a meta-package %global debug_package %{nil} Name: %{vdsm_name} -Version: 4.18.9 -Release: 1%{?dist}%{?extra_release} +Version: 4.18.999 +Release: 396.gitfb69df9%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System License: GPLv2+ -Url: http://www.ovirt.org/wiki/Vdsm +Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -63,7 +63,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cyrus-sasl-lib BuildRequires: python -BuildRequires: python-devel +BuildRequires: python2-devel +BuildRequires: python-mock BuildRequires: python-netaddr BuildRequires: python-nose BuildRequires: python-six >= 1.9.0 @@ -128,17 +129,6 @@ Requires: dmidecode Requires: virt-v2v %endif -# Numactl is not available on s390[x] and ARM -%ifnarch s390 s390x %{arm} -Requires: numactl -%endif - -%ifarch x86_64 -Requires: python-dmidecode -Requires: dmidecode -Requires: virt-v2v -%endif - Requires: ethtool Requires: which Requires: sudo >= 1.7.3 @@ -155,7 +145,6 @@ Requires: python-ioprocess >= 0.16.1-1 Requires: python-pthreading >= 0.1.3-3 Requires: python-six >= 1.9.0 Requires: python-requests -Requires: %{name}-infra = %{version}-%{release} Requires: rpm-python Requires: nfs-utils Requires: m2crypto @@ -167,6 +156,8 @@ Requires: safelease >= 1.0-7 Requires: mom >= 0.5.3 Requires(pre): shadow-utils +Obsoletes: %{name}-infra >= 4.16.0 + %if 0%{?with_openvswitch} Requires: openvswitch >= 2.0.0 %endif @@ -209,12 +200,8 @@ Requires: sanlock >= 2.8-2, sanlock-python Requires: device-mapper-multipath >= 0.4.9-84.el7 %endif #rhel -%if 0%{?fedora} == 22 -Requires: device-mapper-multipath >= 0.4.9-73.fc22.2 -%endif - -%if 0%{?fedora} >= 23 -Requires: device-mapper-multipath >= 0.4.9-80.fc23 +%if 0%{?fedora} +Requires: device-mapper-multipath >= 0.4.9-80 %endif %if 0%{?rhel} @@ -226,6 +213,10 @@ Requires: python >= 2.7.5-18.el7_1.1 Requires: policycoreutils-python Requires: selinux-policy-targeted >= 3.13.1-16.el7 Requires: systemd >= 219-11.el7 +%if ! 0%{?centos} +# TODO drop this if when this initscripts is available on centos +Requires: initscripts >= 9.49.30-1.el7_2.3 +%endif #!centos %else Requires: fence-agents-all Requires: kernel >= 4.1.6 @@ -239,7 +230,7 @@ Requires: policycoreutils-python-utils Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: ed -Requires: lvm2 >= 2.02.107 +Requires: lvm2 >= 2.02.132 Requires: selinux-policy-targeted >= 3.12.1-177 # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is # disabled we now require the version 2.1.13-55 (or newer) of Fedora. @@ -333,15 +324,6 @@ Requires: python >= 2.6 %description yajsonrpc A JSON RPC server and client implementation. -%package infra -Summary: Utilities and libraries for vdsm -BuildArch: noarch -Requires: python >= 2.6 -Obsoletes: %{name}-python-zombiereaper - -%description infra -Utilities and libraries for vdsm. - %package reg Summary: VDSM registration package BuildArch: noarch @@ -358,7 +340,6 @@ Manager. Summary: VDSM python libraries Requires: %{name}-api = %{version}-%{release} BuildArch: noarch -Requires: %{name}-infra = %{version}-%{release} Requires: python-cpopen >= 1.4 Requires: m2crypto Requires: python-ioprocess >= 0.16.1-1 @@ -708,6 +689,10 @@ Requires: fcoe-utils VDSM hook used for configure specified NICs as FCoE interface through custom network properties +%post hook-fcoe +%systemd_post lldpad.service +%systemd_post fcoe.service + %if 0%{?with_gluster_mgmt} %package gluster Summary: Gluster Plugin for VDSM @@ -741,8 +726,8 @@ autoreconf -if %if ! 0%{?with_python3} --disable-python3 \ %endif - --with-smbios-manufacturer='Red Hat' \ - --with-smbios-osname='RHEV Hypervisor' \ + --with-smbios-manufacturer='oVirt' \ + --with-smbios-osname='oVirt Node' \ %if ! 0%{?with_ovirt_imageio} --disable-ovirt-imageio \ %endif @@ -756,8 +741,8 @@ autoreconf -if --with-ovirt-vmconsole-user='vdsm' \ --with-ovirt-vmconsole-group='kvm' \ %endif - --with-qemu-kvm='qemu-kvm-rhev' \ - --with-qemu-img='qemu-img-rhev' + --with-qemu-kvm='qemu-kvm' \ + --with-qemu-img='qemu-img' make # Setting software_version and software_revision in dsaversion.py @@ -773,8 +758,7 @@ sed -i -e 's/@SSL_IMPLEMENTATION@/m2c/g' lib/vdsm/config.py sed -i -e 's\@VDSMRPCPYLIBDIR@\%{python_sitelib}/%{vdsm_name}/rpc\g' lib/vdsm/constants.py %install -rm -rf %{buildroot} -make DESTDIR=%{buildroot} install +make %{?_smp_mflags} DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build @@ -788,8 +772,8 @@ install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ install -Dm 0644 vdsm/limits.conf \ %{buildroot}/etc/security/limits.d/99-vdsm.conf -install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/usr/lib/systemd/systemd-vdsmd -install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}/usr/lib/systemd/system-preset/85-vdsmd.preset +install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}%{_libdir}/systemd/systemd-vdsmd +install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}%{_libdir}/systemd/system-preset/85-vdsmd.preset install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service install -Dm 0644 init/systemd/vdsm-network.service %{buildroot}%{_unitdir}/vdsm-network.service install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service @@ -798,11 +782,17 @@ install -Dm 0644 init/systemd/mom-vdsm.service %{buildroot}%{_unitdir}/mom-vdsm. install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf +install -Dm 0644 vdsm/vdsm-bonding-modprobe.conf \ + %{buildroot}%{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf install -Dm 0644 init/systemd/unlimited-core.conf \ %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf +%if 0%{?with_hooks} +install -Dm 0644 vdsm_hooks/fcoe/85-vdsm-hook-fcoe.preset %{buildroot}%{_libdir}/systemd/system-preset/ +%endif + %if 0%{?rhel} # This is not commonplace, but we want /var/log/core to be a world-writable # dropbox for core dumps @@ -818,10 +808,7 @@ install -Dm 0755 vdsm/virt/libvirt-hook.sh \ %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu %check -#make check - -%clean -rm -rf %{buildroot} +# make tests %pre # Force standard locale behavior (English) @@ -873,9 +860,6 @@ fi %systemd_post mom-vdsm.service %systemd_post ksmtuned.service -# From VDSM version 4.18 a .conf file is deployed to /etc/NetworkManager/conf.d -/bin/systemctl reload NetworkManager >/dev/null 2>&1 || : - # VDSM installs unit files - daemon-reload will refresh systemd /bin/systemctl daemon-reload >/dev/null 2>&1 || : exit 0 @@ -921,11 +905,12 @@ fi exit 0 %files -%defattr(-, root, root, -) -%doc README lib/vdsm/vdsm.conf.sample +%doc README +%doc lib/vdsm/vdsm.conf.sample +%doc README.logging %license COPYING -/usr/lib/systemd/systemd-vdsmd -/usr/lib/systemd/system-preset/85-vdsmd.preset +%{_libdir}/systemd/systemd-vdsmd +%{_libdir}/systemd/system-preset/85-vdsmd.preset %{_unitdir}/vdsmd.service %{_unitdir}/vdsm-network.service %{_unitdir}/supervdsmd.service @@ -941,8 +926,7 @@ exit 0 %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} %dir %{_sysconfdir}/%{vdsm_name}/vdsm.conf.d -%dir %{_sysconfdir}/NetworkManager -%dir %{_sysconfdir}/NetworkManager/conf.d +%dir %{_sysconfdir}/modprobe.d/ %dir %{_sysconfdir}/%{vdsm_name} %dir %{_sysconfdir}/%{vdsm_name}/mom.d %dir %{_datadir}/%{vdsm_name} @@ -980,7 +964,6 @@ exit 0 %{_datadir}/%{vdsm_name}/virt/vmdevices/network.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/storage.py* -%config(noreplace) %{_sysconfdir}/NetworkManager/conf.d/90-vdsm-monitor-connection-files.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf @@ -990,8 +973,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf -%config(noreplace) %{_tmpfilesdir}/%{vdsm_name}.conf +%{_tmpfilesdir}/%{vdsm_name}.conf %{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh +%{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/libvirt/hooks/qemu @@ -1014,8 +998,6 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/__init__.py* %{_datadir}/%{vdsm_name}/storage/blockSD.py* %{_datadir}/%{vdsm_name}/storage/blockVolume.py* -%{_datadir}/%{vdsm_name}/storage/curlImgWrap.py* -%{_datadir}/%{vdsm_name}/storage/devicemapper.py* %{_datadir}/%{vdsm_name}/storage/dispatcher.py* %{_datadir}/%{vdsm_name}/storage/monitor.py* %{_datadir}/%{vdsm_name}/storage/fileSD.py* @@ -1052,6 +1034,7 @@ exit 0 %{_datadir}/%{vdsm_name}/storage/sdm/volume_artifacts.py* %{_datadir}/%{vdsm_name}/storage/sdm/api/__init__.py* %{_datadir}/%{vdsm_name}/storage/sdm/api/base.py* +%{_datadir}/%{vdsm_name}/storage/sdm/api/copy_data.py* %{_datadir}/%{vdsm_name}/storage/sdm/api/create_volume.py* %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh @@ -1122,7 +1105,6 @@ exit 0 %dir %{_datadir}/%{vdsm_name}/gluster %{_datadir}/%{vdsm_name}/gluster/__init__.py* %{_datadir}/%{vdsm_name}/gluster/cli.py* -%{_datadir}/%{vdsm_name}/gluster/exception.py* %{python_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf @@ -1157,12 +1139,12 @@ exit 0 %{_datadir}/%{vdsm_name}/bonding-name2numeric.json %files python -%defattr(-, root, root, -) %{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/common %dir %{python_sitelib}/%{vdsm_name}/common/network +%dir %{python_sitelib}/%{vdsm_name}/gluster %dir %{python_sitelib}/%{vdsm_name}/host %dir %{python_sitelib}/%{vdsm_name}/network %dir %{python_sitelib}/%{vdsm_name}/network/configurators @@ -1195,6 +1177,10 @@ exit 0 %{python_sitelib}/%{vdsm_name}/dmidecodeUtil.py* %{python_sitelib}/%{vdsm_name}/exception.py* %{python_sitelib}/%{vdsm_name}/executor.py* +# gluster.exception is used in many places like Bridge.py. So it is required +# even without vdsm-gluster package +%{python_sitelib}/%{vdsm_name}/gluster/__init__.py* +%{python_sitelib}/%{vdsm_name}/gluster/exception.py* %{python_sitelib}/%{vdsm_name}/health.py* %{python_sitelib}/%{vdsm_name}/hooks.py* %{python_sitelib}/%{vdsm_name}/hostdev.py* @@ -1219,6 +1205,7 @@ exit 0 %{python_sitelib}/%{vdsm_name}/network/canonicalize.py* %{python_sitelib}/%{vdsm_name}/network/connectivity.py* %{python_sitelib}/%{vdsm_name}/network/ip/*.py* +%{python_sitelib}/%{vdsm_name}/network/ifacquire.py* %{python_sitelib}/%{vdsm_name}/network/ipwrapper.py* %{python_sitelib}/%{vdsm_name}/network/kernelconfig.py* %{python_sitelib}/%{vdsm_name}/network/legacy_switch.py* @@ -1263,6 +1250,9 @@ exit 0 %{python_sitelib}/%{vdsm_name}/storage/check.py* %{python_sitelib}/%{vdsm_name}/storage/clusterlock.py* %{python_sitelib}/%{vdsm_name}/storage/constants.py* +%{python_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* +%{python_sitelib}/%{vdsm_name}/storage/devicemapper.py* +%{python_sitelib}/%{vdsm_name}/storage/directio.py* %{python_sitelib}/%{vdsm_name}/storage/exception.py* %{python_sitelib}/%{vdsm_name}/storage/fileUtils.py* %{python_sitelib}/%{vdsm_name}/storage/fuser.py* @@ -1275,6 +1265,7 @@ exit 0 %{python_sitelib}/%{vdsm_name}/storage/sync.py* %{python_sitelib}/%{vdsm_name}/storage/threadlocal.py* %{python_sitelib}/%{vdsm_name}/storage/volumemetadata.py* +%{python_sitelib}/%{vdsm_name}/properties.py* %{python_sitelib}/%{vdsm_name}/protocoldetector.py* %{python_sitelib}/%{vdsm_name}/pthread.py* %{python_sitelib}/%{vdsm_name}/qemuimg.py* @@ -1330,7 +1321,6 @@ exit 0 %files tests %doc %{_datadir}/%{vdsm_name}/tests/README -%defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/tests %dir %{_datadir}/%{vdsm_name}/tests/common @@ -1399,7 +1389,6 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/integration/*.py* %files hook-openstacknet -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py* @@ -1421,7 +1410,6 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* %files hook-ovs -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_ovs %{_libexecdir}/%{vdsm_name}/ovs_migrate.py* %{_libexecdir}/%{vdsm_name}/ovs_utils.py* @@ -1445,14 +1433,12 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail/ovs_utils.py* %files hook-macspoof -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof %if 0%{?with_vhostmd} %files hook-vhostmd -%defattr(-, root, root, -) %license COPYING %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd @@ -1468,156 +1454,125 @@ exit 0 %endif %files hook-qemucmdline -%defattr(-, root, root, -) %license COPYING %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline %files hook-ethtool-options -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options %files hook-ipv6 -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ipv6 %files hook-vmfex-dev -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex %if 0%{?with_hooks} %files hook-allocate_net -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/10_allocate_net %files hook-checkimages -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages %files hook-fcoe -%defattr(-, root, root, -) +%{_libdir}/systemd/system-preset/85-vdsm-hook-fcoe.preset %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_fcoe %files hook-checkips -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/10_checkips %{_libexecdir}/%{vdsm_name}/hooks/checkipsd %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/checkips_utils.py* %{_unitdir}/vdsm-checkips.service %files hook-extra-ipv4-addrs -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/40_extra_ipv4_addrs %files hook-diskunmap -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_diskunmap %files hook-fakevmstats -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats %files hook-fakesriov -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps/10_fakesriov %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/10_fakesriov %files hook-fileinject -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject %files hook-floppy -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy %files hook-hostusb -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb %files hook-httpsisoboot -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_httpsisoboot %files hook-hugepages -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages %files hook-isolatedprivatevlan -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan %config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml %files hook-macbind -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind %files hook-noipspoof -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_noipspoof %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_noipspoof %files hook-extnet -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet %files hook-nestedvt -%defattr(-, root, root, -) %{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_nestedvt %files hook-numa -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa %files hook-pincpu -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu %files hook-promisc -%defattr(-, root, root, -) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc %files hook-qos -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos %files hook-scratchpad -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad %files hook-smbios -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios %files hook-spiceoptions -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_spiceoptions %files hook-vmdisk -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk %files hook-vmfex -%defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex %endif %files cli -%defattr(-, root, root, -) %license COPYING %{_bindir}/vdsClient %dir %{_datadir}/%{vdsm_name} @@ -1627,7 +1582,6 @@ exit 0 %{_mandir}/man1/vdsClient.1* %files xmlrpc -%defattr(-, root, root, -) %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc %{python_sitelib}/%{vdsm_name}/rpc/bindingxmlrpc.py* @@ -1644,6 +1598,7 @@ exit 0 %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api.yml +%{python_sitelib}/%{vdsm_name}/rpc/vdsm-events.yml %{python_sitelib}/api/vdsmapi.py* %{python_sitelib}/api/__init__.py* %if ! 0%{?with_gluster_mgmt} @@ -1656,28 +1611,13 @@ exit 0 %{python_sitelib}/yajsonrpc/stomp.py* %{python_sitelib}/yajsonrpc/stompreactor.py* -%files infra -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/infra -%dir %{python_sitelib}/%{vdsm_name}/infra/eventfd -%dir %{python_sitelib}/%{vdsm_name}/infra/filecontrol -%dir %{python_sitelib}/%{vdsm_name}/infra/sigutils -%dir %{python_sitelib}/%{vdsm_name}/infra/zombiereaper -%{python_sitelib}/%{vdsm_name}/infra/eventfd/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/filecontrol/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/sigutils/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/zombiereaper/__init__.py* -%{python_sitelib}/%{vdsm_name}/infra/__init__.py* - %files hook-faqemu -%defattr(-, root, root, -) %license COPYING %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/10_faqemu %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu %if 0%{?with_gluster_mgmt} %files gluster -%defattr(-, root, root, -) %dir %{_datadir}/%{vdsm_name} %dir %{_datadir}/%{vdsm_name}/gluster %dir %{python_sitelib}/%{vdsm_name} @@ -1686,6 +1626,7 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/api.py* %{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* %{_datadir}/%{vdsm_name}/gluster/fstab.py* +%{python_sitelib}/%{vdsm_name}/gluster/fence.py* %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml %{_datadir}/%{vdsm_name}/gluster/gfapi.py* %{_datadir}/%{vdsm_name}/gluster/hooks.py* @@ -1695,6 +1636,9 @@ exit 0 %endif %changelog +* Wed Aug 03 2016 Yaniv Bronhaim - 4.18.999 +- Re-review of vdsm.spec to return it to fedora Bug #1361659 + * Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 - Removing vdsm-python-cpopen from the spec - Adding dependency on formal cpopen package From bf94dbfa127236e44fee90c4e81a56603a1f9073 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Wed, 17 Aug 2016 02:01:10 +0300 Subject: [PATCH 104/126] vdsm build fedora master branch - 4.18 ovirt4.0 --- sources | 2 +- vdsm.spec | 23 +++++------------------ 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/sources b/sources index 803ac6f..a0cd42c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -86eef41dad36acd6c2524591c2464361 vdsm-4.18.999.tar.gz +ef2b487086bc44605ba6fb1c09e504d7 vdsm-4.18.999.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 72a5253..8ddc392 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -42,7 +42,6 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -%global _udevrulesdir %{_libdir}/udev/rules.d/ %global _udevexecdir %{_libdir}/udev/ # Disable debuginfo package, since vdsm is a meta-package @@ -50,7 +49,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 396.gitfb69df9%{?dist}%{?extra_release} +Release: 417.git896954a%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -89,6 +88,7 @@ BuildRequires: python-pthreading BuildRequires: qemu-img BuildRequires: rpm-python BuildRequires: python-blivet +BuildRequires: sanlock-python %if 0%{?with_openvswitch} BuildRequires: openvswitch >= 2.0.0 @@ -347,19 +347,6 @@ Requires: python-ioprocess >= 0.16.1-1 %description python Shared libraries between the various VDSM packages. -%post python -# REQUIRED_FOR: Upgrade from 4.14 to 4.17 -# HACK: Remove vdsm python lib __init__ file if installed on old location -# https://bugzilla.redhat.com/show_bug.cgi?id=1279167 -if [ "$1" -ge 2 ]; then - if [ -d "%{python2_sitearch}/%{vdsm_name}" ]; then - logger -t '%{vdsm_name}' \ - 'Disabling old vdsm package in %{python2_sitearch}/%{vdsm_name}.' \ - 'Removing %{python2_sitearch}/%{vdsm_name}/init.py*' - rm -f %{python2_sitearch}/%{vdsm_name}/__init__.py* - fi -fi - %package tests Summary: VDSM Test Suite BuildArch: noarch @@ -758,7 +745,7 @@ sed -i -e 's/@SSL_IMPLEMENTATION@/m2c/g' lib/vdsm/config.py sed -i -e 's\@VDSMRPCPYLIBDIR@\%{python_sitelib}/%{vdsm_name}/rpc\g' lib/vdsm/constants.py %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install +make DESTDIR=%{buildroot} install # Creating VDSM logs in this session to avoid rpmbuild # complain during the build @@ -954,6 +941,7 @@ exit 0 %{_datadir}/%{vdsm_name}/virt/recovery.py* %{_datadir}/%{vdsm_name}/virt/vmtune.py* %{_datadir}/%{vdsm_name}/virt/vm.py* +%{_datadir}/%{vdsm_name}/virt/vm_migrate_hook.py* %{_datadir}/%{vdsm_name}/virt/vmxml.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/common.py* @@ -986,6 +974,7 @@ exit 0 %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh %{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh %{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh +%{_libexecdir}/%{vdsm_name}/vm_migrate_hook.py* %{_libexecdir}/%{vdsm_name}/kvm2ovirt %{_libexecdir}/%{vdsm_name}/wait_for_ipv4s %{_datadir}/%{vdsm_name}/supervdsm_api/__init__.py* @@ -1411,8 +1400,6 @@ exit 0 %files hook-ovs %{_sysconfdir}/sudoers.d/50_vdsm_hook_ovs -%{_libexecdir}/%{vdsm_name}/ovs_migrate.py* -%{_libexecdir}/%{vdsm_name}/ovs_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/50_ovs %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/ovs_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/50_ovs From ccb9a73c2bf80f8fa876f6949e3e6539352d3b25 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sat, 20 Aug 2016 16:53:16 +0300 Subject: [PATCH 105/126] Vdsm build after re-review in koji Vdsm 4.18, ovirt 4.0 component that allows to manage and monitor VMs. --- sources | 2 +- vdsm.spec | 32 +++----------------------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/sources b/sources index a0cd42c..ab95b75 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ef2b487086bc44605ba6fb1c09e504d7 vdsm-4.18.999.tar.gz +d2a6bdaf7240e150294ab3d1934897d6 vdsm-4.18.999.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 8ddc392..e68dfbc 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -42,21 +42,20 @@ %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif -%global _udevexecdir %{_libdir}/udev/ - # Disable debuginfo package, since vdsm is a meta-package %global debug_package %{nil} Name: %{vdsm_name} Version: 4.18.999 -Release: 417.git896954a%{?dist}%{?extra_release} +Release: 439.git6ee9d1d%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +ExclusiveArch: x86_64 ppc ppc64 %{!?_licensedir:%global license %%doc} @@ -324,18 +323,6 @@ Requires: python >= 2.6 %description yajsonrpc A JSON RPC server and client implementation. -%package reg -Summary: VDSM registration package -BuildArch: noarch -Requires: %{name} = %{version}-%{release} -Requires: m2crypto -Requires: openssl -Conflicts: ovirt-node < 3.0.4 - -%description reg -VDSM registration package. Used to register a Linux host to a Virtualization -Manager. - %package python Summary: VDSM python libraries Requires: %{name}-api = %{version}-%{release} @@ -668,7 +655,6 @@ properties %package hook-fcoe Summary: Hook to enable FCoE support -BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: fcoe-utils @@ -756,21 +742,9 @@ touch %{buildroot}/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules -install -Dm 0644 vdsm/limits.conf \ - %{buildroot}/etc/security/limits.d/99-vdsm.conf - install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}%{_libdir}/systemd/systemd-vdsmd install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}%{_libdir}/systemd/system-preset/85-vdsmd.preset -install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service -install -Dm 0644 init/systemd/vdsm-network.service %{buildroot}%{_unitdir}/vdsm-network.service -install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service -install -Dm 0644 init/systemd/mom-vdsm.service %{buildroot}%{_unitdir}/mom-vdsm.service - -install -Dm 0644 vdsm/vdsm-modules-load.d.conf \ - %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf -install -Dm 0644 vdsm/vdsm-bonding-modprobe.conf \ - %{buildroot}%{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf install -Dm 0644 init/systemd/unlimited-core.conf \ From 1ca531003e2677d177e411fe7b26ee9be88317f5 Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sat, 20 Aug 2016 17:05:44 +0300 Subject: [PATCH 106/126] Vdsm build after re-review in koji Vdsm 4.18, ovirt 4.0 component that allows to manage and monitor VMs. --- sources | 2 +- vdsm.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources b/sources index ab95b75..5c00d16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d2a6bdaf7240e150294ab3d1934897d6 vdsm-4.18.999.tar.gz +142490a0e63c0d863ee8dfa08cda8e9c vdsm-4.18.999.tar.gz diff --git a/vdsm.spec b/vdsm.spec index e68dfbc..7576e67 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -16,10 +16,10 @@ # Features %global with_ovirt_imageio 0 %global with_ovirt_vmconsole 0 -%global with_gluster_mgmt 1 +%global with_gluster_mgmt 0 %global with_hooks 1 %global with_vhostmd 1 -%global with_python3 1 +%global with_python3 0 %ifarch ppc64le %global with_openvswitch 0 From 454dac7f600ad614f57f1e990a09601f3ae6469e Mon Sep 17 00:00:00 2001 From: Yaniv Bronhaim Date: Sat, 20 Aug 2016 17:10:21 +0300 Subject: [PATCH 107/126] Vdsm build after re-review in koji Vdsm 4.18, ovirt 4.0 component that allows to manage and monitor VMs. --- sources | 2 +- vdsm.spec | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 5c00d16..e3baa78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -142490a0e63c0d863ee8dfa08cda8e9c vdsm-4.18.999.tar.gz +fd3182d7cc167fdace022c830e7d298e vdsm-4.18.999.tar.gz diff --git a/vdsm.spec b/vdsm.spec index 7576e67..346e673 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 439.git6ee9d1d%{?dist}%{?extra_release} +Release: 440.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -86,7 +86,9 @@ BuildRequires: python-ioprocess >= 0.16.1-1 BuildRequires: python-pthreading BuildRequires: qemu-img BuildRequires: rpm-python +%if 0%{?with_gluster_mgmt} BuildRequires: python-blivet +%endif BuildRequires: sanlock-python %if 0%{?with_openvswitch} From 561e4a0e84b86105c84178853bf24aa2733e4e0b Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 31 Aug 2016 15:12:18 +0100 Subject: [PATCH 108/126] Build on aarch64 and ppc64le --- vdsm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 346e673..6913914 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 440.git0bb7717%{?dist}%{?extra_release} +Release: 441.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -55,7 +55,7 @@ License: GPLv2+ Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz -ExclusiveArch: x86_64 ppc ppc64 +ExclusiveArch: x86_64 %{power64} aarch64 %{!?_licensedir:%global license %%doc} @@ -1599,6 +1599,9 @@ exit 0 %endif %changelog +* Wed Aug 31 2016 Peter Robinson 4.18.999-441 +- Build on aarch64 and ppc64le + * Wed Aug 03 2016 Yaniv Bronhaim - 4.18.999 - Re-review of vdsm.spec to return it to fedora Bug #1361659 From 958c723b12efc12d8ce0a0d2c431f00b695d27fe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:01:09 +0000 Subject: [PATCH 109/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 6913914..4a93d80 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 441.git0bb7717%{?dist}%{?extra_release} +Release: 442.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1599,6 +1599,9 @@ exit 0 %endif %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 4.18.999-442.git0bb7717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Aug 31 2016 Peter Robinson 4.18.999-441 - Build on aarch64 and ppc64le From 9810cc76734af251824e218b9d3af53f4012cde0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:15:21 +0000 Subject: [PATCH 110/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 4a93d80..7e2ea88 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 442.git0bb7717%{?dist}%{?extra_release} +Release: 443.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1599,6 +1599,9 @@ exit 0 %endif %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 4.18.999-443.git0bb7717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 4.18.999-442.git0bb7717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 3579ddc42a710163d2b638caa14252d2b9f35e91 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 10:02:11 +0000 Subject: [PATCH 111/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 7e2ea88..eadb1ac 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 443.git0bb7717%{?dist}%{?extra_release} +Release: 444.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1599,6 +1599,9 @@ exit 0 %endif %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 4.18.999-444.git0bb7717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 4.18.999-443.git0bb7717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From f525c36be4d66e68076cc54240c8f9949de65f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 19 Aug 2017 09:44:24 -0400 Subject: [PATCH 112/126] Python 2 binary package renamed to python2-vdsm --- vdsm.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index eadb1ac..e69c85d 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 444.git0bb7717%{?dist}%{?extra_release} +Release: 445.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -325,7 +325,11 @@ Requires: python >= 2.6 %description yajsonrpc A JSON RPC server and client implementation. -%package python +%package -n python2-vdsm +%{?python_provide:%python_provide python2-vdsm} +# Remove before F30 +Provides: %{name}-python%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-python < %{version}-%{release} Summary: VDSM python libraries Requires: %{name}-api = %{version}-%{release} BuildArch: noarch @@ -333,7 +337,7 @@ Requires: python-cpopen >= 1.4 Requires: m2crypto Requires: python-ioprocess >= 0.16.1-1 -%description python +%description -n python2-vdsm Shared libraries between the various VDSM packages. %package tests @@ -1103,7 +1107,7 @@ exit 0 %{_datadir}/%{vdsm_name}/bonding-defaults.json %{_datadir}/%{vdsm_name}/bonding-name2numeric.json -%files python +%files -n python2-vdsm %{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool %dir %{python_sitelib}/%{vdsm_name} @@ -1599,6 +1603,10 @@ exit 0 %endif %changelog +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 4.18.999-445.git0bb7717 +- Python 2 binary package renamed to python2-vdsm + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + * Thu Aug 03 2017 Fedora Release Engineering - 4.18.999-444.git0bb7717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 28a446966d1ec69966c30b95c0caaffc6c23dacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 19 Aug 2017 23:14:59 -0400 Subject: [PATCH 113/126] Fix %_isa and update internal Requires --- vdsm.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index e69c85d..ba1e0b5 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -260,7 +260,7 @@ Requires: tree Requires: dosfstools Requires: genisoimage Requires: libselinux-python -Requires: %{name}-python = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} Requires: %{name}-hook-vmfex-dev = %{version}-%{release} Requires: NetworkManager-config-server @@ -283,7 +283,7 @@ tasks, statistics gathering, and log collection. %package cli Summary: VDSM command line interface BuildArch: noarch -Requires: %{name}-python = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} Requires: %{name}-xmlrpc = %{version}-%{release} %description cli @@ -292,7 +292,7 @@ Call VDSM commands from the command line. Used for testing and debugging. %package xmlrpc Summary: VDSM xmlrpc API BuildArch: noarch -Requires: %{name}-python = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} %description xmlrpc @@ -309,7 +309,7 @@ Contains api schema files %package jsonrpc Summary: VDSM API Server BuildArch: noarch -Requires: %{name}-python = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} Requires: %{name}-api = %{version}-%{release} Requires: %{name}-yajsonrpc = %{version}-%{release} Obsoletes: %{name}-api < 4.16 @@ -328,6 +328,7 @@ A JSON RPC server and client implementation. %package -n python2-vdsm %{?python_provide:%python_provide python2-vdsm} # Remove before F30 +Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: VDSM python libraries From 765ec660ef1ccce95fad2470e96138d0292d4719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 28 Aug 2017 10:38:14 -0400 Subject: [PATCH 114/126] Drop dependency on python-argparse (part of python stdlib) --- vdsm.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index ba1e0b5..ccf7970 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 445.git0bb7717%{?dist}%{?extra_release} +Release: 446.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -140,7 +140,6 @@ Requires: iproute >= 3.10.0 Requires: PyYAML Requires: python-netaddr Requires: python-inotify -Requires: python-argparse Requires: python-cpopen >= 1.4 Requires: python-ioprocess >= 0.16.1-1 Requires: python-pthreading >= 0.1.3-3 @@ -1604,6 +1603,9 @@ exit 0 %endif %changelog +* Mon Aug 28 2017 Zbigniew Jędrzejewski-Szmek - 4.18.999-446.git0bb7717 +- Drop dependency on python-argparse (part of python stdlib) + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 4.18.999-445.git0bb7717 - Python 2 binary package renamed to python2-vdsm See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 From 4ba9d18ab2a162adf616755c8f2bbace716e93ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 28 Aug 2017 11:46:25 -0400 Subject: [PATCH 115/126] Fix order of BuildArch and Provides --- vdsm.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index ccf7970..7ea12a1 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -325,17 +325,17 @@ Requires: python >= 2.6 A JSON RPC server and client implementation. %package -n python2-vdsm -%{?python_provide:%python_provide python2-vdsm} -# Remove before F30 -Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} Summary: VDSM python libraries Requires: %{name}-api = %{version}-%{release} BuildArch: noarch Requires: python-cpopen >= 1.4 Requires: m2crypto Requires: python-ioprocess >= 0.16.1-1 +%{?python_provide:%python_provide python2-vdsm} +# Remove before F30 +Provides: %{name}-python = %{version}-%{release} +Provides: %{name}-python%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-python < %{version}-%{release} %description -n python2-vdsm Shared libraries between the various VDSM packages. From 09d024629f677e426a1be49c9e142f554b802ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 29 Aug 2017 07:50:35 -0400 Subject: [PATCH 116/126] =?UTF-8?q?Drop=20Provides=20with=20%=5Fisa=20?= =?UTF-8?q?=E2=80=94=20the=20package=20is=20noarch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vdsm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 7ea12a1..748a90b 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -334,7 +334,6 @@ Requires: python-ioprocess >= 0.16.1-1 %{?python_provide:%python_provide python2-vdsm} # Remove before F30 Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} %description -n python2-vdsm From 810d65931e93085ba9b9590e0fc05d0d0c79e7a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:25:49 +0000 Subject: [PATCH 117/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 748a90b..02fc44e 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 446.git0bb7717%{?dist}%{?extra_release} +Release: 447.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1602,6 +1602,9 @@ exit 0 %endif %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 4.18.999-447.git0bb7717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Aug 28 2017 Zbigniew Jędrzejewski-Szmek - 4.18.999-446.git0bb7717 - Drop dependency on python-argparse (part of python stdlib) From c29489e7cddca3429435637785fd1123a8042db8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:29:10 +0000 Subject: [PATCH 118/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 02fc44e..5edcfb7 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -47,7 +47,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 447.git0bb7717%{?dist}%{?extra_release} +Release: 448.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1602,6 +1602,9 @@ exit 0 %endif %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 4.18.999-448.git0bb7717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 4.18.999-447.git0bb7717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From be4bcec861a44602603bd463a79c258b21de2823 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 29 Jul 2018 23:11:37 +0200 Subject: [PATCH 119/126] =?UTF-8?q?%{python=5Fsitelib}=20=E2=86=92=20%{pyt?= =?UTF-8?q?hon2=5Fsitelib}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Igor Gnatenko --- vdsm.spec | 342 +++++++++++++++++++++++++++--------------------------- 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 5edcfb7..05e689c 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1073,7 +1073,7 @@ exit 0 %dir %{_datadir}/%{vdsm_name}/gluster %{_datadir}/%{vdsm_name}/gluster/__init__.py* %{_datadir}/%{vdsm_name}/gluster/cli.py* -%{python_sitelib}/sos/plugins/vdsm.py* +%{python2_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* @@ -1128,164 +1128,164 @@ exit 0 %dir %{python_sitelib}/%{vdsm_name}/profiling %dir %{python_sitelib}/%{vdsm_name}/storage %dir %{python_sitelib}/%{vdsm_name}/virt -%{python_sitelib}/%{vdsm_name}/__init__.py* -%{python_sitelib}/%{vdsm_name}/cmdutils.py* -%{python_sitelib}/%{vdsm_name}/compat.py* -%{python_sitelib}/%{vdsm_name}/commands.py* -%{python_sitelib}/%{vdsm_name}/common/*.py* -%{python_sitelib}/%{vdsm_name}/host/*.py* -%{python_sitelib}/%{vdsm_name}/common/network/*.py* -%{python_sitelib}/%{vdsm_name}/concurrent.py* -%{python_sitelib}/%{vdsm_name}/config.py* -%{python_sitelib}/%{vdsm_name}/constants.py* -%{python_sitelib}/%{vdsm_name}/cpuarch.py* -%{python_sitelib}/%{vdsm_name}/cpuinfo.py* -%{python_sitelib}/%{vdsm_name}/dsaversion.py* -%{python_sitelib}/%{vdsm_name}/define.py* -%{python_sitelib}/%{vdsm_name}/dmidecodeUtil.py* -%{python_sitelib}/%{vdsm_name}/exception.py* -%{python_sitelib}/%{vdsm_name}/executor.py* +%{python2_sitelib}/%{vdsm_name}/__init__.py* +%{python2_sitelib}/%{vdsm_name}/cmdutils.py* +%{python2_sitelib}/%{vdsm_name}/compat.py* +%{python2_sitelib}/%{vdsm_name}/commands.py* +%{python2_sitelib}/%{vdsm_name}/common/*.py* +%{python2_sitelib}/%{vdsm_name}/host/*.py* +%{python2_sitelib}/%{vdsm_name}/common/network/*.py* +%{python2_sitelib}/%{vdsm_name}/concurrent.py* +%{python2_sitelib}/%{vdsm_name}/config.py* +%{python2_sitelib}/%{vdsm_name}/constants.py* +%{python2_sitelib}/%{vdsm_name}/cpuarch.py* +%{python2_sitelib}/%{vdsm_name}/cpuinfo.py* +%{python2_sitelib}/%{vdsm_name}/dsaversion.py* +%{python2_sitelib}/%{vdsm_name}/define.py* +%{python2_sitelib}/%{vdsm_name}/dmidecodeUtil.py* +%{python2_sitelib}/%{vdsm_name}/exception.py* +%{python2_sitelib}/%{vdsm_name}/executor.py* # gluster.exception is used in many places like Bridge.py. So it is required # even without vdsm-gluster package -%{python_sitelib}/%{vdsm_name}/gluster/__init__.py* -%{python_sitelib}/%{vdsm_name}/gluster/exception.py* -%{python_sitelib}/%{vdsm_name}/health.py* -%{python_sitelib}/%{vdsm_name}/hooks.py* -%{python_sitelib}/%{vdsm_name}/hostdev.py* -%{python_sitelib}/%{vdsm_name}/jobs.py* -%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* -%{python_sitelib}/%{vdsm_name}/kaxmlrpclib.py* -%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* -%{python_sitelib}/%{vdsm_name}/logUtils.py* -%{python_sitelib}/%{vdsm_name}/m2cutils.py* -%{python_sitelib}/%{vdsm_name}/machinetype.py* -%{python_sitelib}/%{vdsm_name}/metrics/*.py* -%{python_sitelib}/%{vdsm_name}/moduleloader.py* -%{python_sitelib}/%{vdsm_name}/momIF.py* -%{python_sitelib}/%{vdsm_name}/network/__init__.py* -%{python_sitelib}/%{vdsm_name}/network/api.py* -%{python_sitelib}/%{vdsm_name}/network/configurators/__init__.py* -%{python_sitelib}/%{vdsm_name}/network/configurators/ifcfg.py* -%{python_sitelib}/%{vdsm_name}/network/configurators/iproute2.py* -%{python_sitelib}/%{vdsm_name}/network/configurators/pyroute_two.py* -%{python_sitelib}/%{vdsm_name}/network/configurators/qos.py* -%{python_sitelib}/%{vdsm_name}/network/errors.py* -%{python_sitelib}/%{vdsm_name}/network/canonicalize.py* -%{python_sitelib}/%{vdsm_name}/network/connectivity.py* -%{python_sitelib}/%{vdsm_name}/network/ip/*.py* -%{python_sitelib}/%{vdsm_name}/network/ifacquire.py* -%{python_sitelib}/%{vdsm_name}/network/ipwrapper.py* -%{python_sitelib}/%{vdsm_name}/network/kernelconfig.py* -%{python_sitelib}/%{vdsm_name}/network/legacy_switch.py* -%{python_sitelib}/%{vdsm_name}/network/libvirt.py* -%{python_sitelib}/%{vdsm_name}/network/netinfo/*.py* -%{python_sitelib}/%{vdsm_name}/network/netlink/__init__.py* -%{python_sitelib}/%{vdsm_name}/network/netlink/addr.py* -%{python_sitelib}/%{vdsm_name}/network/netlink/link.py* -%{python_sitelib}/%{vdsm_name}/network/netlink/monitor.py* -%{python_sitelib}/%{vdsm_name}/network/netlink/route.py* -%{python_sitelib}/%{vdsm_name}/network/ovs/__init__.py* -%{python_sitelib}/%{vdsm_name}/network/ovs/info.py* -%{python_sitelib}/%{vdsm_name}/network/ovs/switch.py* -%{python_sitelib}/%{vdsm_name}/network/ovs/validator.py* -%{python_sitelib}/%{vdsm_name}/network/ovs/driver/__init__.py* -%{python_sitelib}/%{vdsm_name}/network/ovs/driver/vsctl.py* -%{python_sitelib}/%{vdsm_name}/network/models.py* -%{python_sitelib}/%{vdsm_name}/network/netconfpersistence.py* -%{python_sitelib}/%{vdsm_name}/network/netswitch.py* -%{python_sitelib}/%{vdsm_name}/network/sourceroute.py* -%{python_sitelib}/%{vdsm_name}/network/sourceroutethread.py* -%{python_sitelib}/%{vdsm_name}/network/tc/__init__.py* -%{python_sitelib}/%{vdsm_name}/network/tc/_parser.py* -%{python_sitelib}/%{vdsm_name}/network/tc/_wrapper.py* -%{python_sitelib}/%{vdsm_name}/network/tc/cls.py* -%{python_sitelib}/%{vdsm_name}/network/tc/filter.py* -%{python_sitelib}/%{vdsm_name}/network/tc/qdisc.py* -%{python_sitelib}/%{vdsm_name}/network/utils.py* -%{python_sitelib}/%{vdsm_name}/numa.py* -%{python_sitelib}/%{vdsm_name}/osinfo.py* -%{python_sitelib}/%{vdsm_name}/password.py* -%{python_sitelib}/%{vdsm_name}/panic.py* -%{python_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* -%{python_sitelib}/%{vdsm_name}/profiling/__init__.py* -%{python_sitelib}/%{vdsm_name}/profiling/cpu.py* -%{python_sitelib}/%{vdsm_name}/profiling/errors.py* -%{python_sitelib}/%{vdsm_name}/profiling/memory.py* -%{python_sitelib}/%{vdsm_name}/profiling/profile.py* -%{python_sitelib}/%{vdsm_name}/storage/__init__.py* -%{python_sitelib}/%{vdsm_name}/storage/asyncevent.py* -%{python_sitelib}/%{vdsm_name}/storage/blkdiscard.py* -%{python_sitelib}/%{vdsm_name}/storage/check.py* -%{python_sitelib}/%{vdsm_name}/storage/clusterlock.py* -%{python_sitelib}/%{vdsm_name}/storage/constants.py* -%{python_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* -%{python_sitelib}/%{vdsm_name}/storage/devicemapper.py* -%{python_sitelib}/%{vdsm_name}/storage/directio.py* -%{python_sitelib}/%{vdsm_name}/storage/exception.py* -%{python_sitelib}/%{vdsm_name}/storage/fileUtils.py* -%{python_sitelib}/%{vdsm_name}/storage/fuser.py* -%{python_sitelib}/%{vdsm_name}/storage/hba.py* -%{python_sitelib}/%{vdsm_name}/storage/misc.py* -%{python_sitelib}/%{vdsm_name}/storage/mount.py* -%{python_sitelib}/%{vdsm_name}/storage/persistent.py* -%{python_sitelib}/%{vdsm_name}/storage/rwlock.py* -%{python_sitelib}/%{vdsm_name}/storage/securable.py* -%{python_sitelib}/%{vdsm_name}/storage/sync.py* -%{python_sitelib}/%{vdsm_name}/storage/threadlocal.py* -%{python_sitelib}/%{vdsm_name}/storage/volumemetadata.py* -%{python_sitelib}/%{vdsm_name}/properties.py* -%{python_sitelib}/%{vdsm_name}/protocoldetector.py* -%{python_sitelib}/%{vdsm_name}/pthread.py* -%{python_sitelib}/%{vdsm_name}/qemuimg.py* -%{python_sitelib}/%{vdsm_name}/response.py* -%{python_sitelib}/%{vdsm_name}/schedule.py* -%{python_sitelib}/%{vdsm_name}/sslcompat.py* -%{python_sitelib}/%{vdsm_name}/sslutils.py* -%{python_sitelib}/%{vdsm_name}/supervdsm.py* -%{python_sitelib}/%{vdsm_name}/sysctl.py* -%{python_sitelib}/%{vdsm_name}/taskset.py* -%{python_sitelib}/%{vdsm_name}/throttledlog.py* -%{python_sitelib}/%{vdsm_name}/udevadm.py* -%{python_sitelib}/%{vdsm_name}/utils.py* -%{python_sitelib}/%{vdsm_name}/v2v.py* -%{python_sitelib}/%{vdsm_name}/vdscli.py* -%{python_sitelib}/%{vdsm_name}/virtsparsify.py* -%{python_sitelib}/%{vdsm_name}/xmlrpc.py* -%{python_sitelib}/%{vdsm_name}/tool/__init__.py* -%{python_sitelib}/%{vdsm_name}/tool/configfile.py* -%{python_sitelib}/%{vdsm_name}/tool/dummybr.py* -%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_opts.py* -%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* -%{python_sitelib}/%{vdsm_name}/tool/configurator.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* -%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* -%{python_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* -%{python_sitelib}/%{vdsm_name}/tool/register.py* -%{python_sitelib}/%{vdsm_name}/tool/restore_nets.py* -%{python_sitelib}/%{vdsm_name}/tool/service.py* -%{python_sitelib}/%{vdsm_name}/tool/transient.py* -%{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* -%{python_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* -%{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* -%{python_sitelib}/%{vdsm_name}/virt/__init__.py* -%{python_sitelib}/%{vdsm_name}/virt/api.py* -%{python_sitelib}/%{vdsm_name}/virt/guestagent.py* -%{python_sitelib}/%{vdsm_name}/virt/periodic.py* -%{python_sitelib}/%{vdsm_name}/virt/sampling.py* -%{python_sitelib}/%{vdsm_name}/virt/secret.py* -%{python_sitelib}/%{vdsm_name}/virt/utils.py* -%{python_sitelib}/%{vdsm_name}/virt/virdomain.py* -%{python_sitelib}/%{vdsm_name}/virt/vmchannels.py* -%{python_sitelib}/%{vdsm_name}/virt/vmexitreason.py* -%{python_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* -%{python_sitelib}/%{vdsm_name}/virt/vmstats.py* -%{python_sitelib}/%{vdsm_name}/virt/vmstatus.py* +%{python2_sitelib}/%{vdsm_name}/gluster/__init__.py* +%{python2_sitelib}/%{vdsm_name}/gluster/exception.py* +%{python2_sitelib}/%{vdsm_name}/health.py* +%{python2_sitelib}/%{vdsm_name}/hooks.py* +%{python2_sitelib}/%{vdsm_name}/hostdev.py* +%{python2_sitelib}/%{vdsm_name}/jobs.py* +%{python2_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* +%{python2_sitelib}/%{vdsm_name}/kaxmlrpclib.py* +%{python2_sitelib}/%{vdsm_name}/libvirtconnection.py* +%{python2_sitelib}/%{vdsm_name}/logUtils.py* +%{python2_sitelib}/%{vdsm_name}/m2cutils.py* +%{python2_sitelib}/%{vdsm_name}/machinetype.py* +%{python2_sitelib}/%{vdsm_name}/metrics/*.py* +%{python2_sitelib}/%{vdsm_name}/moduleloader.py* +%{python2_sitelib}/%{vdsm_name}/momIF.py* +%{python2_sitelib}/%{vdsm_name}/network/__init__.py* +%{python2_sitelib}/%{vdsm_name}/network/api.py* +%{python2_sitelib}/%{vdsm_name}/network/configurators/__init__.py* +%{python2_sitelib}/%{vdsm_name}/network/configurators/ifcfg.py* +%{python2_sitelib}/%{vdsm_name}/network/configurators/iproute2.py* +%{python2_sitelib}/%{vdsm_name}/network/configurators/pyroute_two.py* +%{python2_sitelib}/%{vdsm_name}/network/configurators/qos.py* +%{python2_sitelib}/%{vdsm_name}/network/errors.py* +%{python2_sitelib}/%{vdsm_name}/network/canonicalize.py* +%{python2_sitelib}/%{vdsm_name}/network/connectivity.py* +%{python2_sitelib}/%{vdsm_name}/network/ip/*.py* +%{python2_sitelib}/%{vdsm_name}/network/ifacquire.py* +%{python2_sitelib}/%{vdsm_name}/network/ipwrapper.py* +%{python2_sitelib}/%{vdsm_name}/network/kernelconfig.py* +%{python2_sitelib}/%{vdsm_name}/network/legacy_switch.py* +%{python2_sitelib}/%{vdsm_name}/network/libvirt.py* +%{python2_sitelib}/%{vdsm_name}/network/netinfo/*.py* +%{python2_sitelib}/%{vdsm_name}/network/netlink/__init__.py* +%{python2_sitelib}/%{vdsm_name}/network/netlink/addr.py* +%{python2_sitelib}/%{vdsm_name}/network/netlink/link.py* +%{python2_sitelib}/%{vdsm_name}/network/netlink/monitor.py* +%{python2_sitelib}/%{vdsm_name}/network/netlink/route.py* +%{python2_sitelib}/%{vdsm_name}/network/ovs/__init__.py* +%{python2_sitelib}/%{vdsm_name}/network/ovs/info.py* +%{python2_sitelib}/%{vdsm_name}/network/ovs/switch.py* +%{python2_sitelib}/%{vdsm_name}/network/ovs/validator.py* +%{python2_sitelib}/%{vdsm_name}/network/ovs/driver/__init__.py* +%{python2_sitelib}/%{vdsm_name}/network/ovs/driver/vsctl.py* +%{python2_sitelib}/%{vdsm_name}/network/models.py* +%{python2_sitelib}/%{vdsm_name}/network/netconfpersistence.py* +%{python2_sitelib}/%{vdsm_name}/network/netswitch.py* +%{python2_sitelib}/%{vdsm_name}/network/sourceroute.py* +%{python2_sitelib}/%{vdsm_name}/network/sourceroutethread.py* +%{python2_sitelib}/%{vdsm_name}/network/tc/__init__.py* +%{python2_sitelib}/%{vdsm_name}/network/tc/_parser.py* +%{python2_sitelib}/%{vdsm_name}/network/tc/_wrapper.py* +%{python2_sitelib}/%{vdsm_name}/network/tc/cls.py* +%{python2_sitelib}/%{vdsm_name}/network/tc/filter.py* +%{python2_sitelib}/%{vdsm_name}/network/tc/qdisc.py* +%{python2_sitelib}/%{vdsm_name}/network/utils.py* +%{python2_sitelib}/%{vdsm_name}/numa.py* +%{python2_sitelib}/%{vdsm_name}/osinfo.py* +%{python2_sitelib}/%{vdsm_name}/password.py* +%{python2_sitelib}/%{vdsm_name}/panic.py* +%{python2_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* +%{python2_sitelib}/%{vdsm_name}/profiling/__init__.py* +%{python2_sitelib}/%{vdsm_name}/profiling/cpu.py* +%{python2_sitelib}/%{vdsm_name}/profiling/errors.py* +%{python2_sitelib}/%{vdsm_name}/profiling/memory.py* +%{python2_sitelib}/%{vdsm_name}/profiling/profile.py* +%{python2_sitelib}/%{vdsm_name}/storage/__init__.py* +%{python2_sitelib}/%{vdsm_name}/storage/asyncevent.py* +%{python2_sitelib}/%{vdsm_name}/storage/blkdiscard.py* +%{python2_sitelib}/%{vdsm_name}/storage/check.py* +%{python2_sitelib}/%{vdsm_name}/storage/clusterlock.py* +%{python2_sitelib}/%{vdsm_name}/storage/constants.py* +%{python2_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* +%{python2_sitelib}/%{vdsm_name}/storage/devicemapper.py* +%{python2_sitelib}/%{vdsm_name}/storage/directio.py* +%{python2_sitelib}/%{vdsm_name}/storage/exception.py* +%{python2_sitelib}/%{vdsm_name}/storage/fileUtils.py* +%{python2_sitelib}/%{vdsm_name}/storage/fuser.py* +%{python2_sitelib}/%{vdsm_name}/storage/hba.py* +%{python2_sitelib}/%{vdsm_name}/storage/misc.py* +%{python2_sitelib}/%{vdsm_name}/storage/mount.py* +%{python2_sitelib}/%{vdsm_name}/storage/persistent.py* +%{python2_sitelib}/%{vdsm_name}/storage/rwlock.py* +%{python2_sitelib}/%{vdsm_name}/storage/securable.py* +%{python2_sitelib}/%{vdsm_name}/storage/sync.py* +%{python2_sitelib}/%{vdsm_name}/storage/threadlocal.py* +%{python2_sitelib}/%{vdsm_name}/storage/volumemetadata.py* +%{python2_sitelib}/%{vdsm_name}/properties.py* +%{python2_sitelib}/%{vdsm_name}/protocoldetector.py* +%{python2_sitelib}/%{vdsm_name}/pthread.py* +%{python2_sitelib}/%{vdsm_name}/qemuimg.py* +%{python2_sitelib}/%{vdsm_name}/response.py* +%{python2_sitelib}/%{vdsm_name}/schedule.py* +%{python2_sitelib}/%{vdsm_name}/sslcompat.py* +%{python2_sitelib}/%{vdsm_name}/sslutils.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm.py* +%{python2_sitelib}/%{vdsm_name}/sysctl.py* +%{python2_sitelib}/%{vdsm_name}/taskset.py* +%{python2_sitelib}/%{vdsm_name}/throttledlog.py* +%{python2_sitelib}/%{vdsm_name}/udevadm.py* +%{python2_sitelib}/%{vdsm_name}/utils.py* +%{python2_sitelib}/%{vdsm_name}/v2v.py* +%{python2_sitelib}/%{vdsm_name}/vdscli.py* +%{python2_sitelib}/%{vdsm_name}/virtsparsify.py* +%{python2_sitelib}/%{vdsm_name}/xmlrpc.py* +%{python2_sitelib}/%{vdsm_name}/tool/__init__.py* +%{python2_sitelib}/%{vdsm_name}/tool/configfile.py* +%{python2_sitelib}/%{vdsm_name}/tool/dummybr.py* +%{python2_sitelib}/%{vdsm_name}/tool/dump_bonding_opts.py* +%{python2_sitelib}/%{vdsm_name}/tool/nwfilter.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurator.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/__init__* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* +%{python2_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* +%{python2_sitelib}/%{vdsm_name}/tool/register.py* +%{python2_sitelib}/%{vdsm_name}/tool/restore_nets.py* +%{python2_sitelib}/%{vdsm_name}/tool/service.py* +%{python2_sitelib}/%{vdsm_name}/tool/transient.py* +%{python2_sitelib}/%{vdsm_name}/tool/unified_persistence.py* +%{python2_sitelib}/%{vdsm_name}/tool/upgrade.py* +%{python2_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* +%{python2_sitelib}/%{vdsm_name}/tool/vdsm-id.py* +%{python2_sitelib}/%{vdsm_name}/virt/__init__.py* +%{python2_sitelib}/%{vdsm_name}/virt/api.py* +%{python2_sitelib}/%{vdsm_name}/virt/guestagent.py* +%{python2_sitelib}/%{vdsm_name}/virt/periodic.py* +%{python2_sitelib}/%{vdsm_name}/virt/sampling.py* +%{python2_sitelib}/%{vdsm_name}/virt/secret.py* +%{python2_sitelib}/%{vdsm_name}/virt/utils.py* +%{python2_sitelib}/%{vdsm_name}/virt/virdomain.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmchannels.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmexitreason.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmstats.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmstatus.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README @@ -1550,32 +1550,32 @@ exit 0 %files xmlrpc %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc -%{python_sitelib}/%{vdsm_name}/rpc/bindingxmlrpc.py* +%{python2_sitelib}/%{vdsm_name}/rpc/bindingxmlrpc.py* %files jsonrpc %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc -%{python_sitelib}/%{vdsm_name}/rpc/__init__.py* -%{python_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* -%{python_sitelib}/%{vdsm_name}/rpc/Bridge.py* -%{python_sitelib}/yajsonrpc/__init__.py* +%{python2_sitelib}/%{vdsm_name}/rpc/__init__.py* +%{python2_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* +%{python2_sitelib}/%{vdsm_name}/rpc/Bridge.py* +%{python2_sitelib}/yajsonrpc/__init__.py* %files api %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc -%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api.yml -%{python_sitelib}/%{vdsm_name}/rpc/vdsm-events.yml -%{python_sitelib}/api/vdsmapi.py* -%{python_sitelib}/api/__init__.py* +%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api.yml +%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-events.yml +%{python2_sitelib}/api/vdsmapi.py* +%{python2_sitelib}/api/__init__.py* %if ! 0%{?with_gluster_mgmt} %exclude %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml %endif %files yajsonrpc %dir %{python_sitelib}/yajsonrpc -%{python_sitelib}/yajsonrpc/betterAsyncore.py* -%{python_sitelib}/yajsonrpc/stomp.py* -%{python_sitelib}/yajsonrpc/stompreactor.py* +%{python2_sitelib}/yajsonrpc/betterAsyncore.py* +%{python2_sitelib}/yajsonrpc/stomp.py* +%{python2_sitelib}/yajsonrpc/stompreactor.py* %files hook-faqemu %license COPYING @@ -1592,8 +1592,8 @@ exit 0 %{_datadir}/%{vdsm_name}/gluster/api.py* %{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* %{_datadir}/%{vdsm_name}/gluster/fstab.py* -%{python_sitelib}/%{vdsm_name}/gluster/fence.py* -%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml +%{python2_sitelib}/%{vdsm_name}/gluster/fence.py* +%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml %{_datadir}/%{vdsm_name}/gluster/gfapi.py* %{_datadir}/%{vdsm_name}/gluster/hooks.py* %{_datadir}/%{vdsm_name}/gluster/services.py* From b6e78808605d47b77271eab2329bd4c5f030d2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 15 Nov 2018 12:53:57 +0100 Subject: [PATCH 120/126] https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 --- vdsm.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vdsm.spec b/vdsm.spec index 05e689c..e438a69 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1,3 +1,7 @@ +# This package depends on automagic byte compilation +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 +%global _python_bytecompile_extra 1 + # Packages names %global vdsm_name vdsm From fe5e9df1b4c27e6824a065a9d33627294a07b863 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:29 +0100 Subject: [PATCH 121/126] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- vdsm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index e438a69..3d66823 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -54,7 +54,6 @@ Version: 4.18.999 Release: 448.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager -Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz From ccda24edbd2dc72ffb1bf6397084660507affbaa Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:12:02 +0000 Subject: [PATCH 122/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 3d66823..6fa372d 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -51,7 +51,7 @@ Name: %{vdsm_name} Version: 4.18.999 -Release: 448.git0bb7717%{?dist}%{?extra_release} +Release: 449.git0bb7717%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager License: GPLv2+ @@ -1605,6 +1605,9 @@ exit 0 %endif %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 4.18.999-449.git0bb7717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 4.18.999-448.git0bb7717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From c182e9907cf41e553a61d622f362740d9a2c319a Mon Sep 17 00:00:00 2001 From: Marcin Sobczyk Date: Wed, 12 Jun 2019 17:12:28 +0200 Subject: [PATCH 123/126] vdsm-4.30.17 --- .gitignore | 1 + fix-unversioned-python-shebangs.patch | 67 ++ sources | 2 +- vdsm.spec | 1345 ++++++++++++------------- 4 files changed, 738 insertions(+), 677 deletions(-) create mode 100644 fix-unversioned-python-shebangs.patch diff --git a/.gitignore b/.gitignore index 05032c5..94eb06d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vdsm-4.18.9.tar.gz /vdsm-4.18.999.tar.gz +/vdsm-4.30.17.tar.gz diff --git a/fix-unversioned-python-shebangs.patch b/fix-unversioned-python-shebangs.patch new file mode 100644 index 0000000..645c653 --- /dev/null +++ b/fix-unversioned-python-shebangs.patch @@ -0,0 +1,67 @@ +From 7e70f8c91bace85f2b52ec207597414d37073abf Mon Sep 17 00:00:00 2001 +From: Marcin Sobczyk +Date: Wed, 12 Jun 2019 12:42:56 +0200 +Subject: [PATCH] fix unversioned python shebangs + +Change-Id: I52fc2a17a791ac9e60f6d886c6342f3dd5bdea08 +--- + contrib/repostat | 2 +- + tests/profile | 2 +- + tests/profile-analyze | 2 +- + vdsm_hooks/fileinject/before_vm_start.py | 2 +- + vdsm_hooks/macspoof/macspoof_vnic.py | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/contrib/repostat b/contrib/repostat +index 8a859f512..2f433c25d 100755 +--- a/contrib/repostat ++++ b/contrib/repostat +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + # + # Copyright 2015-2018 Red Hat, Inc. + # +diff --git a/tests/profile b/tests/profile +index c50a5395c..f2e556ce1 100755 +--- a/tests/profile ++++ b/tests/profile +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + """ + Log resource usage info. + +diff --git a/tests/profile-analyze b/tests/profile-analyze +index 63370c953..a97815968 100755 +--- a/tests/profile-analyze ++++ b/tests/profile-analyze +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + """ + Analyze commands profiled using profile tool. + """ +diff --git a/vdsm_hooks/fileinject/before_vm_start.py b/vdsm_hooks/fileinject/before_vm_start.py +index 5763b488d..5be2a7cca 100755 +--- a/vdsm_hooks/fileinject/before_vm_start.py ++++ b/vdsm_hooks/fileinject/before_vm_start.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + + import os + import sys +diff --git a/vdsm_hooks/macspoof/macspoof_vnic.py b/vdsm_hooks/macspoof/macspoof_vnic.py +index 484024403..329d772f6 100755 +--- a/vdsm_hooks/macspoof/macspoof_vnic.py ++++ b/vdsm_hooks/macspoof/macspoof_vnic.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + """ + Removes spoofing filtering, applied on a per vnic basis, + it gets triggered and used by two different events: +-- +2.20.1 + diff --git a/sources b/sources index e3baa78..f0fd516 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fd3182d7cc167fdace022c830e7d298e vdsm-4.18.999.tar.gz +SHA512 (vdsm-4.30.17.tar.gz) = 1f06c1b99facc9e0f89b35ad9ffa5eaeee39bed5c445afe544ad9df1403c7a564c2d399f8d9385924e1358da36ea9141f10fbcc352d86004367a0799dc095934 diff --git a/vdsm.spec b/vdsm.spec index 6fa372d..563a8c9 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -1,7 +1,3 @@ -# This package depends on automagic byte compilation -# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 -%global _python_bytecompile_extra 1 - # Packages names %global vdsm_name vdsm @@ -31,8 +27,11 @@ %global with_openvswitch 1 %endif -# Glusterfs package version -%global gluster_version 3.7.1 +%if 0%{?centos} || 0%{?fedora} +%global gluster_version 3.12 +%else #rhel +%global gluster_version 3.8 +%endif # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that @@ -45,72 +44,33 @@ %else %global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d %endif +%global _vdsm_log_dir %{_localstatedir}/log/%{vdsm_name} # Disable debuginfo package, since vdsm is a meta-package %global debug_package %{nil} Name: %{vdsm_name} -Version: 4.18.999 -Release: 449.git0bb7717%{?dist}%{?extra_release} +Version: 4.30.17 +Release: 1.git114b4b7%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager +Group: Applications/System License: GPLv2+ Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz -ExclusiveArch: x86_64 %{power64} aarch64 +Patch0: fix-unversioned-python-shebangs.patch %{!?_licensedir:%global license %%doc} -BuildRequires: cyrus-sasl-lib -BuildRequires: python -BuildRequires: python2-devel -BuildRequires: python-mock -BuildRequires: python-netaddr -BuildRequires: python-nose -BuildRequires: python-six >= 1.9.0 -BuildRequires: rpm-build - -# BuildRequires needed by the tests during the build -BuildRequires: dosfstools -BuildRequires: genisoimage -BuildRequires: libnl3 -BuildRequires: libselinux-python -BuildRequires: libvirt-python -BuildRequires: m2crypto -BuildRequires: mom >= 0.5.5 BuildRequires: openssl -BuildRequires: policycoreutils-python -BuildRequires: psmisc -BuildRequires: PyYAML -BuildRequires: python-cpopen >= 1.4 -BuildRequires: python-inotify -BuildRequires: python-ioprocess >= 0.16.1-1 -BuildRequires: python-pthreading -BuildRequires: qemu-img -BuildRequires: rpm-python -%if 0%{?with_gluster_mgmt} -BuildRequires: python-blivet -%endif -BuildRequires: sanlock-python - -%if 0%{?with_openvswitch} -BuildRequires: openvswitch >= 2.0.0 -%endif - -%if 0%{?with_python3} -%if 0%{?rhel} -BuildRequires: python34-nose -BuildRequires: python34-six -%else # fedora -BuildRequires: python3-nose -BuildRequires: python3-six -BuildRequires: python3-netaddr -BuildRequires: python3-yaml -BuildRequires: libselinux-python3 -BuildRequires: libvirt-python3 -%endif # rhel -%endif # support python3 +BuildRequires: python +BuildRequires: python-six >= 1.9.0 +BuildRequires: python-dateutil +BuildRequires: python-subprocess32 +BuildRequires: python2-devel +BuildRequires: rpm-build +BuildRequires: systemd-units # Autotools BuildRequires %if 0%{?enable_autotools} @@ -118,9 +78,16 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext-devel BuildRequires: libtool +BuildRequires: util-linux %endif -BuildRequires: systemd-units +%if 0%{?rhel} +BuildRequires: python-enum34 +%endif + +%if 0%{?fedora} +BuildRequires: python2-enum34 +%endif # Numactl is not available on s390[x] and ARM %ifnarch s390 s390x %{arm} @@ -133,121 +100,151 @@ Requires: dmidecode Requires: virt-v2v %endif -Requires: ethtool +Requires: chrony Requires: which Requires: sudo >= 1.7.3 Requires: logrotate +Requires: lshw Requires: xz -Requires: ntp -Requires: iproute >= 3.10.0 -Requires: PyYAML Requires: python-netaddr -Requires: python-inotify -Requires: python-cpopen >= 1.4 -Requires: python-ioprocess >= 0.16.1-1 +# Requires lstat() support, see https://bugzilla.redhat.com/1560460 +Requires: python2-ioprocess >= 1.1.1 Requires: python-pthreading >= 0.1.3-3 Requires: python-six >= 1.9.0 Requires: python-requests Requires: rpm-python -Requires: nfs-utils -Requires: m2crypto -Requires: libnl3 +Requires: abrt-cli +Requires: abrt-addon-vmcore +Requires: abrt-addon-ccpp +Requires: abrt-addon-python Requires: curl -Requires: %{name}-xmlrpc = %{version}-%{release} +Requires: %{name}-http = %{version}-%{release} Requires: %{name}-jsonrpc = %{version}-%{release} Requires: safelease >= 1.0-7 -Requires: mom >= 0.5.3 +Requires: mom >= 0.5.12 +Requires: util-linux Requires(pre): shadow-utils -Obsoletes: %{name}-infra >= 4.16.0 +Obsoletes: %{name}-infra < 4.19 -%if 0%{?with_openvswitch} -Requires: openvswitch >= 2.0.0 +%if 0%{?rhel} +# Required for supporting minorversion mount option +# See https://bugzilla.redhat.com/1547681 for details. +Requires: nfs-utils >= 1.3.0-0.48.el7_4.2 +%else # fedora +Requires: nfs-utils %endif %if 0%{?with_ovirt_imageio} Requires: ovirt-imageio-common -Requires: ovirt-imageio-daemon +# For GET /tickets/* +Requires: ovirt-imageio-daemon >= 1.2.0 %endif %if 0%{?with_ovirt_vmconsole} Requires: ovirt-vmconsole >= 1.0.0-0 %endif +# Python +# For https://bugzilla.redhat.com/1518676 +%if 0%{?rhel} +Requires: python >= 2.7.5-65.el7 +%else +Requires: python >= 2.7.14-4 +%endif + Requires: libvirt-client Requires: libvirt-daemon-config-nwfilter Requires: libvirt-lock-sanlock -%if 0%{?fedora} -# TODO: bump fedora requirements to >= 1.3.5 as soon -# as we can require Fedora >= 24 + virt-preview -Requires: libvirt-python >= 1.2.18-1 -Requires: libvirt-daemon-kvm >= 1.2.18.1-1 -%else # rhel -Requires: libvirt-daemon-kvm >= 1.2.17-13.el7_2.5 -Requires: libvirt-python >= 1.2.17-2 +%if 0%{?rhel} +# 7.6 baseline +Requires: libvirt-python >= 4.5.0-1.el7 +# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 +Requires: libvirt-daemon-kvm >= 4.5.0-10.el7_6.9 +%else # fedora +# Required for preventing an HotPlug disk failure due to cgroups. +# See https://bugzilla.redhat.com/1540872 for details. +Requires: libvirt-python >= 3.7.0 +# Required to fix order of VM life cycle events. +# See https://bugzilla.redhat.com/1612943 for details. +%ifnarch s390 s390x +# virt-preview is not available for s390 +Requires: libvirt-daemon-kvm >= 4.9.0-1 +%else +Requires: libvirt-daemon-kvm +%endif %endif # iscsi-intiator versions -%if 0%{?rhel} -Requires: iscsi-initiator-utils -%else # fedora Requires: iscsi-initiator-utils >= 6.2.0.873-21 -%endif -Requires: sanlock >= 2.8-2, sanlock-python +Requires: sanlock >= 3.5.0-1, sanlock-python # device-mapper-multipath %if 0%{?rhel} -Requires: device-mapper-multipath >= 0.4.9-84.el7 +# Required for blacklisting multipath devices by protocol. +# See https://bugzilla.redhat.com/1016535 for more details. +Requires: device-mapper-multipath >= 0.4.9-119.el7_5.1 %endif #rhel %if 0%{?fedora} -Requires: device-mapper-multipath >= 0.4.9-80 +Requires: device-mapper-multipath >= 0.7.4-3 +%endif + +# augeas + +%if 0%{?rhel} +Requires: python-augeas +%endif + +%if 0%{?fedora} +Requires: python2-augeas +%endif + +Requires: policycoreutils-python +Requires: fence-agents-all +Requires: systemd >= 219-11 +Requires: initscripts >= 9.49.31 +Requires: cyrus-sasl-scram +%if 0%{?fedora} +# Required for solving bug 1575762 +Requires: lvm2 >= 2.02.177-5 +%else +Requires: lvm2 >= 2.02.145 %endif %if 0%{?rhel} +# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 +Requires: kernel >= 3.10.0-957.12.2.el7 Requires: e2fsprogs -Requires: fence-agents-all -Requires: kernel >= 3.10.0-327.18.1.el7 -Requires: lvm2 >= 7:2.02.130-5.el7_2.5 -Requires: python >= 2.7.5-18.el7_1.1 -Requires: policycoreutils-python -Requires: selinux-policy-targeted >= 3.13.1-16.el7 -Requires: systemd >= 219-11.el7 -%if ! 0%{?centos} -# TODO drop this if when this initscripts is available on centos -Requires: initscripts >= 9.49.30-1.el7_2.3 -%endif #!centos -%else -Requires: fence-agents-all -Requires: kernel >= 4.1.6 -# Subprocess and thread bug was found on python 2.7.2 -Requires: python >= 2.7.3 -Requires: initscripts >= 9.42.2-1 +Requires: selinux-policy-targeted >= 3.13.1-166.el7_4.3 +%else # fedora +# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 +Requires: kernel >= 5.0.16-100 Requires: e2fsprogs >= 1.41.14 -%if 0%{?fedora} >= 23 Requires: policycoreutils-python-utils -%endif # fedora 23 -Requires: policycoreutils-python Requires: sed >= 4.2.1-10 Requires: ed -Requires: lvm2 >= 2.02.132 -Requires: selinux-policy-targeted >= 3.12.1-177 +Requires: selinux-policy-targeted >= 3.13-1 # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is # disabled we now require the version 2.1.13-55 (or newer) of Fedora. Requires: policycoreutils >= 2.1.13-55 -Requires: systemd >= 209 %endif %if 0%{?rhel} -Requires: qemu-kvm-rhev >= 10:2.3.0-31.el7_2.16 -Requires: qemu-img-rhev >= 10:2.3.0-31.el7_2.16 +# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 +Requires: qemu-kvm-rhev >= 10:2.12.0-18.el7_6.5 +%else # fedora +# qemu-kvm 2.12 is Fedora 28 virt-preview baseline +# but virt-preview is not available on s390 arch +%ifnarch s390 s390x +Requires: qemu-kvm >= 2:2.12 %else -Requires: qemu-kvm >= 2:2.3.1-1 -Requires: qemu-img >= 2:2.3.1-1 -%endif # rhel +Requires: qemu-kvm >= 2:2.11.2 +%endif +%endif # GlusterFS client-side RPMs needed for Gluster SD %ifnarch ppc64le @@ -256,15 +253,14 @@ Requires: glusterfs-fuse >= %{gluster_version} %endif Requires: psmisc >= 22.6-15 -Requires: bridge-utils Requires: sos Requires: tree Requires: dosfstools Requires: genisoimage -Requires: libselinux-python -Requires: python2-%{name} = %{version}-%{release} +Requires: libselinux-python >= 2.5-2 +Requires: %{name}-python = %{version}-%{release} Requires: %{name}-hook-vmfex-dev = %{version}-%{release} -Requires: NetworkManager-config-server +Requires: libguestfs-tools-c Requires(post): /usr/sbin/saslpasswd2 @@ -274,7 +270,21 @@ Requires(post): hostname Requires(post): /bin/hostname %endif +# SecureBoot & q35, supported by x86_64 and aarch64; no ppc64le support at +# the moment. +%ifarch x86_64 %{arm} +%if 0%{?rhel} +Requires: OVMF +%else # fedora +Requires: edk2-ovmf +%endif +%endif + +Requires: python-pyudev + Conflicts: vdsm-hook-sriov +Obsoletes: vdsm-hook-vfio-mdev +Provides: vdsm-hook-vfio-mdev %description The VDSM service is required by a Virtualization Manager to manage the @@ -282,28 +292,34 @@ Linux hosts. VDSM manages and monitors the host's storage, memory and networks as well as virtual machine creation, other host administration tasks, statistics gathering, and log collection. -%package cli -Summary: VDSM command line interface +%package http +Summary: VDSM http API BuildArch: noarch -Requires: python2-%{name} = %{version}-%{release} -Requires: %{name}-xmlrpc = %{version}-%{release} +Provides: %{name}-xmlrpc = %{version}-%{release} +Requires: %{name}-python = %{version}-%{release} +Obsoletes: %{name}-xmlrpc < %{version}-%{release} -%description cli -Call VDSM commands from the command line. Used for testing and debugging. +%description http +A http interface for interacting with vdsmd when using OVF store image +download or upload. -%package xmlrpc -Summary: VDSM xmlrpc API +%package client +Summary: VDSM client BuildArch: noarch -Requires: python2-%{name} = %{version}-%{release} +# A hack for unbreaking external packages that expect vdsm-cli. +Provides: %{name}-cli = %{version}-%{release} +Requires: %{name}-api = %{version}-%{release} +Requires: %{name}-yajsonrpc = %{version}-%{release} +Requires: %{name}-python = %{version}-%{release} +Obsoletes: %{name}-cli < %{version}-%{release} - -%description xmlrpc -An XMLRPC interface for interacting with vdsmd. Primary control interface for -ovirt-engine and vdsClient. +%description client +Access vdsm API from the command line. %package api Summary: VDSM API BuildArch: noarch +BuildRequires: PyYAML %description api Contains api schema files @@ -311,7 +327,7 @@ Contains api schema files %package jsonrpc Summary: VDSM API Server BuildArch: noarch -Requires: python2-%{name} = %{version}-%{release} +Requires: %{name}-python = %{version}-%{release} Requires: %{name}-api = %{version}-%{release} Requires: %{name}-yajsonrpc = %{version}-%{release} Obsoletes: %{name}-api < 4.16 @@ -327,27 +343,88 @@ Requires: python >= 2.6 %description yajsonrpc A JSON RPC server and client implementation. -%package -n python2-vdsm +%package common +Summary: common VDSM python libraries, required by all subsystems +BuildArch: noarch +Requires: systemd +Requires: glibc +Requires: python-dateutil +Requires: python-six >= 1.9.0 +Requires: python-subprocess32 +%if 0%{?rhel} +Requires: python-decorator +Requires: python-enum34 +Requires: libvirt-python >= 3.2.0-3.el7_4.1 +%endif +%if 0%{?fedora} +Requires: python2-decorator +Requires: python2-enum34 +Requires: libvirt-python >= 3.7.0 +%endif + +%description common +VDSM libraries that are imported by all subsystems + +%package network +Summary: VDSM network python libraries +Requires: NetworkManager-config-server +Requires: dbus-python +Requires: dhclient +Requires: ethtool +Requires: initscripts +Requires: iproute +%if 0%{?fedora} >= 25 +Requires: iproute-tc +%endif +Requires: libnl3 +Requires: libselinux-python +Requires: lldpad +%if 0%{?with_openvswitch} +Requires: openvswitch >= 2.7.0 +%endif +Requires: python-inotify +Requires: python-ipaddress +Requires: python-netaddr +Requires: python-six +Requires: systemd +Requires: %{name}-common = %{version}-%{release} + +%description network +VDSM network python libraries + +%package python Summary: VDSM python libraries Requires: %{name}-api = %{version}-%{release} BuildArch: noarch -Requires: python-cpopen >= 1.4 -Requires: m2crypto Requires: python-ioprocess >= 0.16.1-1 -%{?python_provide:%python_provide python2-vdsm} -# Remove before F30 -Provides: %{name}-python = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-network = %{version}-%{release} -%description -n python2-vdsm +%description python Shared libraries between the various VDSM packages. +%post python +# REQUIRED_FOR: Upgrade from 4.14 to 4.17 +# HACK: Remove vdsm python lib __init__ file if installed on old location +# https://bugzilla.redhat.com/show_bug.cgi?id=1279167 +if [ "$1" -ge 2 ]; then + if [ -d "%{python2_sitearch}/%{vdsm_name}" ]; then + logger -t '%{vdsm_name}' \ + 'Disabling old vdsm package in %{python2_sitearch}/%{vdsm_name}.' \ + 'Removing %{python2_sitearch}/%{vdsm_name}/init.py*' + rm -f %{python2_sitearch}/%{vdsm_name}/__init__.py* + fi +fi + %package tests Summary: VDSM Test Suite BuildArch: noarch Requires: %{name} = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-network = %{version}-%{release} Requires: dracut -Requires: python-nose +Requires: python-nose python-ipaddress +Requires: PyYAML %description tests A test suite for verifying the functionality of a running vdsm instance @@ -360,6 +437,14 @@ Requires: %{name} %description hook-allocate_net VDSM hook used to allocate networks for vms in a random fashion +%package hook-boot_hostdev +Summary: allows setting boot order for hostdev +BuildArch: noarch +Requires: %{name} + +%description hook-boot_hostdev +VDSM hook used to boot vms from passthrough devices via custom property + %package hook-checkimages Summary: Qcow2 disk image format check hook for VDSM BuildArch: noarch @@ -427,6 +512,19 @@ running real guests. To enable this hook on your host, set vars.fake_kvm_support=True in your /etc/vdsm/vdsm.conf before adding the host to ovirt-Engine. +%package hook-localdisk +Summary: Use a local image instead of a shared storage image +BuildArch: noarch +Requires: %{name} == %{version} + +%description hook-localdisk +This hook adds the ability to use fast local storage instead of shared +storage, while using shared storage for managing VM templates. +To enable this hook, the VM should have a custom property of 'localdisk=lvm'. +The system administrator will be responsible for creating the host "ovirt-local" +volume group and extending it with new devices if needed. +The VM must be pinned to the host. + %package hook-macbind Summary: Bind a vNIC to a Bridge BuildArch: noarch @@ -444,14 +542,6 @@ VDSM hooks which allow to disable mac spoof filtering either on all the of the VM's interfaces or on specific vnics. -%package hook-noipspoof -Summary: Enables strict anti-spoofing filtering -BuildArch: noarch - -%description hook-noipspoof -VDSM hook which allows to enable strict anti-spoofing filtering -on all of the the VM's interfaces. - %package hook-extnet Summary: Force a vNIC to connect to a specific libvirt network BuildArch: noarch @@ -471,16 +561,6 @@ Hook intercepts VM's stats and randomizes various fields. To enable this hook on your host, set vars.fake_vmstats_enable=true in your /etc/vdsm/vdsm.conf. -%package hook-fakesriov -Summary: Generate fake SR-IOV devices -Requires: %{name} - -%description hook-fakesriov -Hook intercepts reported host device by hostdevListByCaps and adds -1 fake sriov devices and 2 fake virtual function devices -To enable this hook on your host, set vars.fake_sriov_enable=true in your -/etc/vdsm/vdsm.conf. - %package hook-fileinject Summary: Allow uploading file to VMs disk BuildArch: noarch @@ -497,15 +577,6 @@ BuildArch: noarch %description hook-floppy Allow adding floppy to VM -%package hook-hostusb -Summary: Allow attaching USB device from host -BuildArch: noarch -Requires: usbutils - -%description hook-hostusb -Hook is getting vendor and product id of USB device -disconnect it from host and attach it to VM - %package hook-httpsisoboot Summary: Allow directly booting from an https available ISO BuildArch: noarch @@ -518,24 +589,6 @@ Let the VM boot from an ISO image made available via an https URL without the need to import the ISO into an ISO storage domain. It doesn't support plain http. -%package hook-hugepages -Summary: Huge pages enable user to handle VM with 2048KB page files. -BuildArch: noarch - -%description hook-hugepages -Hook is getting number of huge pages reserve them for the VM, -and enable user to handle VM with 2048KB page files. - -%package hook-isolatedprivatevlan -Summary: Isolated network environment for VMs -BuildArch: noarch - -%description hook-isolatedprivatevlan -limit VM traffic to a specific gateway by its mac address, -hook prevent VM from spoofing its mac or ip address -by using libvirt filter -and by adding custom filter: isolatedprivatevlan-vdsm.xml - %package hook-nestedvt Summary: Nested Virtualization support for VDSM BuildArch: noarch @@ -559,15 +612,6 @@ BuildArch: noarch %description hook-openstacknet Hook for OpenStack Network vNICs. -%package hook-ovs -Summary: Open vSwitch support for VDSM -BuildArch: noarch -Requires: %{name} = %{version}-%{release} -Requires: openvswitch >= 2.0.0 - -%description hook-ovs -Hook for Open vSwitch support. - %package hook-pincpu Summary: Hook pin VM so specific CPUs BuildArch: noarch @@ -594,13 +638,6 @@ Provides support for injecting QEMU cmdline via VDSM hook. It exploits libvirt's qemu:commandline facility available in the qemu xml namespace. -%package hook-qos -Summary: QoS network in/out traffic support for VDSM -BuildArch: noarch - -%description hook-qos -Hook adds QoS in/out traffic to VMs interfaces - %package hook-scratchpad Summary: One time disk creation for VDSM BuildArch: noarch @@ -627,14 +664,6 @@ BuildArch: noarch This vdsm hook can be used to configure some of the spice optimization attributes and values.. -%package hook-vmfex -Summary: vmfex support for VDSM -BuildArch: noarch -Conflicts: hook-vmfex-dev - -%description hook-vmfex -Hook for vmfex. - %package hook-vmfex-dev Summary: VM-FEX vNIC support for VDSM BuildArch: noarch @@ -652,17 +681,9 @@ BuildArch: noarch %description hook-vmdisk Hook adds additional disk image for a VM (raw or qcow2) -%package hook-ipv6 -Summary: Set IPv6 configuration through custom network properties -BuildArch: noarch -Requires: %{name} >= 4.16.7 - -%description hook-ipv6 -VDSM hook used for applying IPv6 configuration through custom network -properties - %package hook-fcoe Summary: Hook to enable FCoE support +BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: fcoe-utils @@ -674,17 +695,34 @@ network properties %systemd_post lldpad.service %systemd_post fcoe.service +%package hook-cpuflags +Summary: Hook that modifies guest's CPU flags +BuildArch: noarch + +%description hook-cpuflags +Hook that modifies guest's CPU flags using custom properties. + %if 0%{?with_gluster_mgmt} %package gluster Summary: Gluster Plugin for VDSM -BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: glusterfs-server >= %{gluster_version} Requires: glusterfs-api >= %{gluster_version} Requires: glusterfs-geo-replication >= %{gluster_version} +Requires: glusterfs-events >= %{gluster_version} Requires: python-magic +Requires: PyYAML +%if 0%{?fedora} +Requires: python-blivet1 >= 1.20.4-1 +%else Requires: python-blivet +%endif Requires: xfsprogs +%ifarch x86_64 +Requires: vdo +Requires: kmod-kvdo +%endif + %description gluster Gluster plugin enables VDSM to serve Gluster functionalities. @@ -693,11 +731,15 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q +%patch0 -p1 + %build %if 0%{?enable_autotools} autoreconf -if %endif + %configure \ + --with-data-center=/rhev/data-center \ %if 0%{?with_hooks} --enable-hooks \ %endif @@ -709,6 +751,7 @@ autoreconf -if %endif --with-smbios-manufacturer='oVirt' \ --with-smbios-osname='oVirt Node' \ + --with-polkitdir=/usr/share/polkit-1/rules.d \ %if ! 0%{?with_ovirt_imageio} --disable-ovirt-imageio \ %endif @@ -722,63 +765,12 @@ autoreconf -if --with-ovirt-vmconsole-user='vdsm' \ --with-ovirt-vmconsole-group='kvm' \ %endif - --with-qemu-kvm='qemu-kvm' \ - --with-qemu-img='qemu-img' make -# Setting software_version and software_revision in dsaversion.py -baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` -baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` -rawversion=%{version}-%{release} -sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ - -e 's/^raw_version_revision =.*/raw_version_revision = "'"${rawversion}"'"/' \ - -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' lib/vdsm/dsaversion.py - -sed -i -e 's/@SSL_IMPLEMENTATION@/m2c/g' lib/vdsm/config.py - -sed -i -e 's\@VDSMRPCPYLIBDIR@\%{python_sitelib}/%{vdsm_name}/rpc\g' lib/vdsm/constants.py %install make DESTDIR=%{buildroot} install -# Creating VDSM logs in this session to avoid rpmbuild -# complain during the build -install -dDm 0755 %{buildroot}/var/log/vdsm -touch %{buildroot}/var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} - -# Install the lvm rules -install -Dm 0644 vdsm/storage/vdsm-lvm.rules \ - %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules - -install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}%{_libdir}/systemd/systemd-vdsmd -install -Dm 0644 init/systemd/85-vdsmd.preset %{buildroot}%{_libdir}/systemd/system-preset/85-vdsmd.preset - -install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ - %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf -install -Dm 0644 init/systemd/unlimited-core.conf \ - %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf - -%if 0%{?with_hooks} -install -Dm 0644 vdsm_hooks/fcoe/85-vdsm-hook-fcoe.preset %{buildroot}%{_libdir}/systemd/system-preset/ -%endif - -%if 0%{?rhel} -# This is not commonplace, but we want /var/log/core to be a world-writable -# dropbox for core dumps -install -dDm 1777 %{buildroot}%{_localstatedir}/log/core -%endif - -# Install the polkit for libvirt -install -Dm 0644 vdsm/vdsm-libvirt-access.rules \ - %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules - -# Install the libvirt hook for cleaning up the XML -install -Dm 0755 vdsm/virt/libvirt-hook.sh \ - %{buildroot}%{_sysconfdir}/libvirt/hooks/qemu - -%check -# make tests - %pre # Force standard locale behavior (English) export LC_ALL=C @@ -790,19 +782,29 @@ export LC_ALL=C /usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} # We keep the previous rpm version number in a file for managing upgrade flow -# in vdsmd_init_script upgraded_version_check task if [ "$1" -gt 1 ]; then rpm -q %{vdsm_name} > "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" + # Both vdsm and supervdsm should be managed here and must be restarted if + # ran before the upgrade + if /bin/systemctl status vdsmd >/dev/null 2>&1; then + /usr/bin/touch "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" + fi + if /bin/systemctl status supervdsmd >/dev/null 2>&1; then + /usr/bin/touch "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" + fi + fi %post # After vdsm install we should create the logs files. # In the install session we create it but since we use # the ghost macro (in files session) the files are not included -touch /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -chmod 0644 /var/log/vdsm/{connectivity.log,mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm /var/log/vdsm/{connectivity.log,mom.log,vdsm.log} -chown root:root /var/log/vdsm/supervdsm.log +touch %{_vdsm_log_dir}/{mom.log,supervdsm.log,vdsm.log} +chmod 0644 %{_vdsm_log_dir}/{mom.log,supervdsm.log,vdsm.log} +chown vdsm:kvm %{_vdsm_log_dir}/{mom.log,vdsm.log} +chown root:root %{_vdsm_log_dir}/supervdsm.log + +systemd-tmpfiles --create %{vdsm_name}.conf # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. # So Remove them if it is played with /etc/sysctl.conf. @@ -811,21 +813,16 @@ if grep -q "# VDSM section begin" /etc/sysctl.conf; then /etc/sysctl.conf fi -# hack until we replace core dump with abrt -if /usr/sbin/selinuxenabled; then - /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?' -fi -/sbin/restorecon -R /var/log/core >/dev/null 2>&1 -# hack until we replace core dump with abrt - # VDSM installs vdsm-modules-load.d.conf file - the following command will # refresh vdsm kernel modules requirements to start on boot /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : # The following triggers vdsmd.preset file and enables vdsm required services +%systemd_post dev-hugepages1G.mount %systemd_post vdsmd.service %systemd_post supervdsmd.service %systemd_post vdsm-network.service +%systemd_post vdsm-network-init.service %systemd_post mom-vdsm.service %systemd_post ksmtuned.service @@ -837,27 +834,33 @@ exit 0 if [ "$1" -eq 0 ]; then %{_bindir}/vdsm-tool remove-config fi +%systemd_preun dev-hugepages1G.mount %systemd_preun vdsmd.service %systemd_preun vdsm-network.service +%systemd_preun vdsm-network-init.service %systemd_preun supervdsmd.service %systemd_preun mom-vdsm.service %systemd_preun ksmtuned.service exit 0 -%postun -if [ "$1" -ge 1 ]; then - supervdsmd_start_required='no' - vdsmd_start_required='no' - - # Both vdsm and supervdsm should be managed here and must be restarted if - # ran before (code might changed) - if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 || : +%posttrans +if [ -f "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" ]; then + # removing temporary files at first to avoid leaving upgrade leftovers + /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" + if [ -f "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" ]; then vdsmd_start_required='yes' + /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" + /bin/systemctl stop vdsmd >/dev/null 2>&1 || : fi - if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then - %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 || : + + if [ -f "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" ]; then supervdsmd_start_required='yes' + /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" + /bin/systemctl stop supervdsmd >/dev/null 2>&1 || : + fi + + if /bin/systemctl status vdsm-network >/dev/null 2>&1; then + /bin/systemctl stop vdsm-network >/dev/null 2>&1 || : fi if ! %{_bindir}/vdsm-tool is-configured >/dev/null 2>&1; then @@ -865,74 +868,46 @@ if [ "$1" -ge 1 ]; then fi if [ "${supervdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 || : + /bin/systemctl start supervdsmd >/dev/null 2>&1 || : fi if [ "${vdsmd_start_required}" = 'yes' ]; then - %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 || : + /bin/systemctl start vdsmd >/dev/null 2>&1 || : fi fi exit 0 %files -%doc README +%doc README.md %doc lib/vdsm/vdsm.conf.sample %doc README.logging %license COPYING -%{_libdir}/systemd/systemd-vdsmd -%{_libdir}/systemd/system-preset/85-vdsmd.preset +%{_presetdir}/85-vdsmd.preset +%{_unitdir}/dev-hugepages1G.mount %{_unitdir}/vdsmd.service %{_unitdir}/vdsm-network.service +%{_unitdir}/vdsm-network-init.service %{_unitdir}/supervdsmd.service %{_unitdir}/mom-vdsm.service %{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/connectivity.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log -%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{_vdsm_log_dir}/mom.log +%ghost %config %attr(0644, root, root) %{_vdsm_log_dir}/supervdsm.log +%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{_vdsm_log_dir}/vdsm.log %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt %dir %{_libexecdir}/%{vdsm_name} %dir %{_sysconfdir}/%{vdsm_name}/vdsm.conf.d %dir %{_sysconfdir}/modprobe.d/ +%dir %{_sysconfdir}/NetworkManager +%dir %{_sysconfdir}/NetworkManager/conf.d %dir %{_sysconfdir}/%{vdsm_name} %dir %{_sysconfdir}/%{vdsm_name}/mom.d %dir %{_datadir}/%{vdsm_name} -%dir %{_datadir}/%{vdsm_name}/supervdsm_api -%dir %{_datadir}/%{vdsm_name}/storage -%dir %{_datadir}/%{vdsm_name}/storage/imageRepository -%dir %{_datadir}/%{vdsm_name}/virt -%dir %{_datadir}/%{vdsm_name}/virt/vmdevices -%{_datadir}/%{vdsm_name}/alignmentScan.py* -%{_datadir}/%{vdsm_name}/caps.py* -%{_datadir}/%{vdsm_name}/clientIF.py* %{_datadir}/%{vdsm_name}/daemonAdapter -%{_datadir}/%{vdsm_name}/API.py* -%{_datadir}/%{vdsm_name}/hooking.py* -%{_datadir}/%{vdsm_name}/mk_sysprep_floppy -%{_datadir}/%{vdsm_name}/mkimage.py* %{_datadir}/%{vdsm_name}/sitecustomize.py* -%{_datadir}/%{vdsm_name}/supervdsmServer -%{_datadir}/%{vdsm_name}/vdsm -%{_datadir}/%{vdsm_name}/vdsm-restore-net-config -%{_datadir}/%{vdsm_name}/vdsm-store-net-config -%{_datadir}/%{vdsm_name}/virt/__init__.py* -%{_datadir}/%{vdsm_name}/virt/domain_descriptor.py* -%{_datadir}/%{vdsm_name}/virt/migration.py* -%{_datadir}/%{vdsm_name}/virt/recovery.py* -%{_datadir}/%{vdsm_name}/virt/vmtune.py* -%{_datadir}/%{vdsm_name}/virt/vm.py* -%{_datadir}/%{vdsm_name}/virt/vm_migrate_hook.py* -%{_datadir}/%{vdsm_name}/virt/vmxml.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/common.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/core.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/graphics.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/hostdevice.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/hwclass.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/network.py* -%{_datadir}/%{vdsm_name}/virt/vmdevices/storage.py* +%{_datadir}/%{vdsm_name}/supervdsmd +%{_datadir}/%{vdsm_name}/vdsmd %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf @@ -940,73 +915,24 @@ exit 0 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm -%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm %config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf %config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf %{_tmpfilesdir}/%{vdsm_name}.conf -%{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh +%{_sysconfdir}/dhcp/dhclient.d/dhclientmon.sh %{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf +%{_sysconfdir}/NetworkManager/conf.d/vdsm.conf %{_sysconfdir}/sudoers.d/50_vdsm %{_sysconfdir}/cron.hourly/vdsm-logrotate %{_sysconfdir}/libvirt/hooks/qemu %{_libexecdir}/%{vdsm_name}/curl-img-wrap %{_libexecdir}/%{vdsm_name}/fc-scan -%{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks -%{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook -%{_libexecdir}/%{vdsm_name}/ovirt_functions.sh +%{_libexecdir}/%{vdsm_name}/managedvolume-helper %{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh %{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh -%{_libexecdir}/%{vdsm_name}/vm_migrate_hook.py* +%{_libexecdir}/%{vdsm_name}/vm_libvirt_hook.py* %{_libexecdir}/%{vdsm_name}/kvm2ovirt +%{_libexecdir}/%{vdsm_name}/fallocate %{_libexecdir}/%{vdsm_name}/wait_for_ipv4s -%{_datadir}/%{vdsm_name}/supervdsm_api/__init__.py* -%{_datadir}/%{vdsm_name}/supervdsm_api/hwinfo.py* -%{_datadir}/%{vdsm_name}/supervdsm_api/mkimage.py* -%{_datadir}/%{vdsm_name}/supervdsm_api/ksm.py* -%{_datadir}/%{vdsm_name}/supervdsm_api/network.py* -%{_datadir}/%{vdsm_name}/supervdsm_api/udev.py* -%{_datadir}/%{vdsm_name}/supervdsm_api/virt.py* -%{_datadir}/%{vdsm_name}/storage/__init__.py* -%{_datadir}/%{vdsm_name}/storage/blockSD.py* -%{_datadir}/%{vdsm_name}/storage/blockVolume.py* -%{_datadir}/%{vdsm_name}/storage/dispatcher.py* -%{_datadir}/%{vdsm_name}/storage/monitor.py* -%{_datadir}/%{vdsm_name}/storage/fileSD.py* -%{_datadir}/%{vdsm_name}/storage/fileVolume.py* -%{_datadir}/%{vdsm_name}/storage/imagetickets.py* -%{_datadir}/%{vdsm_name}/storage/glusterSD.py* -%{_datadir}/%{vdsm_name}/storage/glusterVolume.py* -%{_datadir}/%{vdsm_name}/storage/hsm.py* -%{_datadir}/%{vdsm_name}/storage/image.py* -%{_datadir}/%{vdsm_name}/storage/imageSharing.py* -%{_datadir}/%{vdsm_name}/storage/iscsiadm.py* -%{_datadir}/%{vdsm_name}/storage/iscsi.py* -%{_datadir}/%{vdsm_name}/storage/localFsSD.py* -%{_datadir}/%{vdsm_name}/storage/lvm.env -%{_datadir}/%{vdsm_name}/storage/lvm.py* -%{_datadir}/%{vdsm_name}/storage/multipath.py* -%{_datadir}/%{vdsm_name}/storage/nfsSD.py* -%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* -%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* -%{_datadir}/%{vdsm_name}/storage/resourceManager.py* -%{_datadir}/%{vdsm_name}/storage/sdc.py* -%{_datadir}/%{vdsm_name}/storage/sd.py* -%{_datadir}/%{vdsm_name}/storage/sp.py* -%{_datadir}/%{vdsm_name}/storage/spbackends.py* -%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* -%{_datadir}/%{vdsm_name}/storage/storageServer.py* -%{_datadir}/%{vdsm_name}/storage/taskManager.py* -%{_datadir}/%{vdsm_name}/storage/task.py* -%{_datadir}/%{vdsm_name}/storage/threadPool.py* -%{_datadir}/%{vdsm_name}/storage/volume.py* -%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py* -%{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py* -%{_datadir}/%{vdsm_name}/storage/sdm/__init__.py* -%{_datadir}/%{vdsm_name}/storage/sdm/volume_artifacts.py* -%{_datadir}/%{vdsm_name}/storage/sdm/api/__init__.py* -%{_datadir}/%{vdsm_name}/storage/sdm/api/base.py* -%{_datadir}/%{vdsm_name}/storage/sdm/api/copy_data.py* -%{_datadir}/%{vdsm_name}/storage/sdm/api/create_volume.py* %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh %dir %{_libexecdir}/%{vdsm_name}/hooks @@ -1045,6 +971,7 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug_fail %dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug_fail +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_prepare %dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotplug %dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotplug %dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotunplug @@ -1070,19 +997,11 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/before_ifcfg_write %dir %{_libexecdir}/%{vdsm_name}/hooks/after_ifcfg_write -%{_datadir}/%{vdsm_name}/dumpStorageTable.py* -%{_datadir}/%{vdsm_name}/get-conf-item -%{_datadir}/%{vdsm_name}/set-conf-item -%dir %{_datadir}/%{vdsm_name}/gluster -%{_datadir}/%{vdsm_name}/gluster/__init__.py* -%{_datadir}/%{vdsm_name}/gluster/cli.py* -%{python2_sitelib}/sos/plugins/vdsm.py* +%{_libexecdir}/%{vdsm_name}/get-conf-item +%{python_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* -%if 0%{?rhel} -%dir %{_localstatedir}/log/core -%endif %{_polkitdir}/10-vdsm-libvirt-access.rules %defattr(-, %{vdsm_user}, %{qemu_group}, -) @@ -1097,198 +1016,287 @@ exit 0 %dir %{_localstatedir}/lib/%{vdsm_name} %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback %dir %{_localstatedir}/lib/%{vdsm_name}/persistence +%dir %{_localstatedir}/lib/%{vdsm_name}/staging +%dir %{_localstatedir}/lib/%{vdsm_name}/storage %dir %{_localstatedir}/lib/%{vdsm_name}/upgrade -%dir %{_localstatedir}/run/%{vdsm_name} -%dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes -%dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces -%ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload -%dir %{_localstatedir}/run/%{vdsm_name}/v2v %dir %{_localstatedir}/log/%{vdsm_name} %dir %{_localstatedir}/log/%{vdsm_name}/backup +%dir %{_localstatedir}/log/%{vdsm_name}/import %defattr(644, %{vdsm_user}, %{vdsm_group}, -) -%{_datadir}/%{vdsm_name}/bonding-defaults.json -%{_datadir}/%{vdsm_name}/bonding-name2numeric.json +%{_datadir}/%{vdsm_name}/lvmlocal.conf +%{_datadir}/%{vdsm_name}/autounattend/Win7.xml +%{_datadir}/%{vdsm_name}/autounattend/Win8.xml +%{_datadir}/%{vdsm_name}/autounattend/Win8.1.xml +%{_datadir}/%{vdsm_name}/autounattend/Win10.xml +%{_datadir}/%{vdsm_name}/autounattend/Win2008.xml +%{_datadir}/%{vdsm_name}/autounattend/Win2008R2.xml +%{_datadir}/%{vdsm_name}/autounattend/Win2012.xml +%{_datadir}/%{vdsm_name}/autounattend/Win2012R2.xml +%{_datadir}/%{vdsm_name}/autounattend/Win2016.xml -%files -n python2-vdsm -%{_mandir}/man1/vdsm-tool.1* -%{_bindir}/vdsm-tool +%{_sysconfdir}/yum/pluginconf.d/vdsmupgrade.conf +%{_datadir}/yum-plugins/*.py* + +%files common %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/common %dir %{python_sitelib}/%{vdsm_name}/common/network -%dir %{python_sitelib}/%{vdsm_name}/gluster -%dir %{python_sitelib}/%{vdsm_name}/host +%{python_sitelib}/%{vdsm_name}/__init__.py* +%{python_sitelib}/%{vdsm_name}/common/*.py* +%{python_sitelib}/%{vdsm_name}/common/network/*.py* + +%files network %dir %{python_sitelib}/%{vdsm_name}/network %dir %{python_sitelib}/%{vdsm_name}/network/configurators %dir %{python_sitelib}/%{vdsm_name}/network/ip +%dir %{python_sitelib}/%{vdsm_name}/network/ip/address +%dir %{python_sitelib}/%{vdsm_name}/network/ip/route +%dir %{python_sitelib}/%{vdsm_name}/network/ip/rule +%dir %{python_sitelib}/%{vdsm_name}/network/link +%dir %{python_sitelib}/%{vdsm_name}/network/link/bond +%dir %{python_sitelib}/%{vdsm_name}/network/lldp +%dir %{python_sitelib}/%{vdsm_name}/network/lldpad %dir %{python_sitelib}/%{vdsm_name}/network/netinfo %dir %{python_sitelib}/%{vdsm_name}/network/netlink +%dir %{python_sitelib}/%{vdsm_name}/network/netswitch +%dir %{python_sitelib}/%{vdsm_name}/network/nm +%dir %{python_sitelib}/%{vdsm_name}/network/nm/nmdbus %dir %{python_sitelib}/%{vdsm_name}/network/ovs %dir %{python_sitelib}/%{vdsm_name}/network/ovs/driver %dir %{python_sitelib}/%{vdsm_name}/network/tc +%{python_sitelib}/%{vdsm_name}/network/*.py* +%{python_sitelib}/%{vdsm_name}/network/*/*.py* +%{python_sitelib}/%{vdsm_name}/network/*/*/*.py* + +%files python +%{_mandir}/man1/vdsm-tool.1* +%{_bindir}/vdsm-tool +%dir %{python_sitelib}/%{vdsm_name}/gluster +%dir %{python_sitelib}/%{vdsm_name}/host %dir %{python_sitelib}/%{vdsm_name}/metrics %dir %{python_sitelib}/%{vdsm_name}/tool %dir %{python_sitelib}/%{vdsm_name}/tool/configurators %dir %{python_sitelib}/%{vdsm_name}/profiling %dir %{python_sitelib}/%{vdsm_name}/storage +%dir %{python_sitelib}/%{vdsm_name}/supervdsm_api %dir %{python_sitelib}/%{vdsm_name}/virt -%{python2_sitelib}/%{vdsm_name}/__init__.py* -%{python2_sitelib}/%{vdsm_name}/cmdutils.py* -%{python2_sitelib}/%{vdsm_name}/compat.py* -%{python2_sitelib}/%{vdsm_name}/commands.py* -%{python2_sitelib}/%{vdsm_name}/common/*.py* -%{python2_sitelib}/%{vdsm_name}/host/*.py* -%{python2_sitelib}/%{vdsm_name}/common/network/*.py* -%{python2_sitelib}/%{vdsm_name}/concurrent.py* -%{python2_sitelib}/%{vdsm_name}/config.py* -%{python2_sitelib}/%{vdsm_name}/constants.py* -%{python2_sitelib}/%{vdsm_name}/cpuarch.py* -%{python2_sitelib}/%{vdsm_name}/cpuinfo.py* -%{python2_sitelib}/%{vdsm_name}/dsaversion.py* -%{python2_sitelib}/%{vdsm_name}/define.py* -%{python2_sitelib}/%{vdsm_name}/dmidecodeUtil.py* -%{python2_sitelib}/%{vdsm_name}/exception.py* -%{python2_sitelib}/%{vdsm_name}/executor.py* +%dir %{python_sitelib}/%{vdsm_name}/virt/vmdevices +%{python_sitelib}/%{vdsm_name}/alignmentScan.py* +%{python_sitelib}/%{vdsm_name}/API.py* +%{python_sitelib}/%{vdsm_name}/client.py* +%{python_sitelib}/%{vdsm_name}/clientIF.py* +%{python_sitelib}/%{vdsm_name}/hook/*.py* +%{python_sitelib}/%{vdsm_name}/host/*.py* +%{python_sitelib}/%{vdsm_name}/config.py* +%{python_sitelib}/%{vdsm_name}/constants.py* +%{python_sitelib}/%{vdsm_name}/cpuinfo.py* +%{python_sitelib}/%{vdsm_name}/dmidecodeUtil.py* +%{python_sitelib}/%{vdsm_name}/executor.py* # gluster.exception is used in many places like Bridge.py. So it is required # even without vdsm-gluster package -%{python2_sitelib}/%{vdsm_name}/gluster/__init__.py* -%{python2_sitelib}/%{vdsm_name}/gluster/exception.py* -%{python2_sitelib}/%{vdsm_name}/health.py* -%{python2_sitelib}/%{vdsm_name}/hooks.py* -%{python2_sitelib}/%{vdsm_name}/hostdev.py* -%{python2_sitelib}/%{vdsm_name}/jobs.py* -%{python2_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* -%{python2_sitelib}/%{vdsm_name}/kaxmlrpclib.py* -%{python2_sitelib}/%{vdsm_name}/libvirtconnection.py* -%{python2_sitelib}/%{vdsm_name}/logUtils.py* -%{python2_sitelib}/%{vdsm_name}/m2cutils.py* -%{python2_sitelib}/%{vdsm_name}/machinetype.py* -%{python2_sitelib}/%{vdsm_name}/metrics/*.py* -%{python2_sitelib}/%{vdsm_name}/moduleloader.py* -%{python2_sitelib}/%{vdsm_name}/momIF.py* -%{python2_sitelib}/%{vdsm_name}/network/__init__.py* -%{python2_sitelib}/%{vdsm_name}/network/api.py* -%{python2_sitelib}/%{vdsm_name}/network/configurators/__init__.py* -%{python2_sitelib}/%{vdsm_name}/network/configurators/ifcfg.py* -%{python2_sitelib}/%{vdsm_name}/network/configurators/iproute2.py* -%{python2_sitelib}/%{vdsm_name}/network/configurators/pyroute_two.py* -%{python2_sitelib}/%{vdsm_name}/network/configurators/qos.py* -%{python2_sitelib}/%{vdsm_name}/network/errors.py* -%{python2_sitelib}/%{vdsm_name}/network/canonicalize.py* -%{python2_sitelib}/%{vdsm_name}/network/connectivity.py* -%{python2_sitelib}/%{vdsm_name}/network/ip/*.py* -%{python2_sitelib}/%{vdsm_name}/network/ifacquire.py* -%{python2_sitelib}/%{vdsm_name}/network/ipwrapper.py* -%{python2_sitelib}/%{vdsm_name}/network/kernelconfig.py* -%{python2_sitelib}/%{vdsm_name}/network/legacy_switch.py* -%{python2_sitelib}/%{vdsm_name}/network/libvirt.py* -%{python2_sitelib}/%{vdsm_name}/network/netinfo/*.py* -%{python2_sitelib}/%{vdsm_name}/network/netlink/__init__.py* -%{python2_sitelib}/%{vdsm_name}/network/netlink/addr.py* -%{python2_sitelib}/%{vdsm_name}/network/netlink/link.py* -%{python2_sitelib}/%{vdsm_name}/network/netlink/monitor.py* -%{python2_sitelib}/%{vdsm_name}/network/netlink/route.py* -%{python2_sitelib}/%{vdsm_name}/network/ovs/__init__.py* -%{python2_sitelib}/%{vdsm_name}/network/ovs/info.py* -%{python2_sitelib}/%{vdsm_name}/network/ovs/switch.py* -%{python2_sitelib}/%{vdsm_name}/network/ovs/validator.py* -%{python2_sitelib}/%{vdsm_name}/network/ovs/driver/__init__.py* -%{python2_sitelib}/%{vdsm_name}/network/ovs/driver/vsctl.py* -%{python2_sitelib}/%{vdsm_name}/network/models.py* -%{python2_sitelib}/%{vdsm_name}/network/netconfpersistence.py* -%{python2_sitelib}/%{vdsm_name}/network/netswitch.py* -%{python2_sitelib}/%{vdsm_name}/network/sourceroute.py* -%{python2_sitelib}/%{vdsm_name}/network/sourceroutethread.py* -%{python2_sitelib}/%{vdsm_name}/network/tc/__init__.py* -%{python2_sitelib}/%{vdsm_name}/network/tc/_parser.py* -%{python2_sitelib}/%{vdsm_name}/network/tc/_wrapper.py* -%{python2_sitelib}/%{vdsm_name}/network/tc/cls.py* -%{python2_sitelib}/%{vdsm_name}/network/tc/filter.py* -%{python2_sitelib}/%{vdsm_name}/network/tc/qdisc.py* -%{python2_sitelib}/%{vdsm_name}/network/utils.py* -%{python2_sitelib}/%{vdsm_name}/numa.py* -%{python2_sitelib}/%{vdsm_name}/osinfo.py* -%{python2_sitelib}/%{vdsm_name}/password.py* -%{python2_sitelib}/%{vdsm_name}/panic.py* -%{python2_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* -%{python2_sitelib}/%{vdsm_name}/profiling/__init__.py* -%{python2_sitelib}/%{vdsm_name}/profiling/cpu.py* -%{python2_sitelib}/%{vdsm_name}/profiling/errors.py* -%{python2_sitelib}/%{vdsm_name}/profiling/memory.py* -%{python2_sitelib}/%{vdsm_name}/profiling/profile.py* -%{python2_sitelib}/%{vdsm_name}/storage/__init__.py* -%{python2_sitelib}/%{vdsm_name}/storage/asyncevent.py* -%{python2_sitelib}/%{vdsm_name}/storage/blkdiscard.py* -%{python2_sitelib}/%{vdsm_name}/storage/check.py* -%{python2_sitelib}/%{vdsm_name}/storage/clusterlock.py* -%{python2_sitelib}/%{vdsm_name}/storage/constants.py* -%{python2_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* -%{python2_sitelib}/%{vdsm_name}/storage/devicemapper.py* -%{python2_sitelib}/%{vdsm_name}/storage/directio.py* -%{python2_sitelib}/%{vdsm_name}/storage/exception.py* -%{python2_sitelib}/%{vdsm_name}/storage/fileUtils.py* -%{python2_sitelib}/%{vdsm_name}/storage/fuser.py* -%{python2_sitelib}/%{vdsm_name}/storage/hba.py* -%{python2_sitelib}/%{vdsm_name}/storage/misc.py* -%{python2_sitelib}/%{vdsm_name}/storage/mount.py* -%{python2_sitelib}/%{vdsm_name}/storage/persistent.py* -%{python2_sitelib}/%{vdsm_name}/storage/rwlock.py* -%{python2_sitelib}/%{vdsm_name}/storage/securable.py* -%{python2_sitelib}/%{vdsm_name}/storage/sync.py* -%{python2_sitelib}/%{vdsm_name}/storage/threadlocal.py* -%{python2_sitelib}/%{vdsm_name}/storage/volumemetadata.py* -%{python2_sitelib}/%{vdsm_name}/properties.py* -%{python2_sitelib}/%{vdsm_name}/protocoldetector.py* -%{python2_sitelib}/%{vdsm_name}/pthread.py* -%{python2_sitelib}/%{vdsm_name}/qemuimg.py* -%{python2_sitelib}/%{vdsm_name}/response.py* -%{python2_sitelib}/%{vdsm_name}/schedule.py* -%{python2_sitelib}/%{vdsm_name}/sslcompat.py* -%{python2_sitelib}/%{vdsm_name}/sslutils.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm.py* -%{python2_sitelib}/%{vdsm_name}/sysctl.py* -%{python2_sitelib}/%{vdsm_name}/taskset.py* -%{python2_sitelib}/%{vdsm_name}/throttledlog.py* -%{python2_sitelib}/%{vdsm_name}/udevadm.py* -%{python2_sitelib}/%{vdsm_name}/utils.py* -%{python2_sitelib}/%{vdsm_name}/v2v.py* -%{python2_sitelib}/%{vdsm_name}/vdscli.py* -%{python2_sitelib}/%{vdsm_name}/virtsparsify.py* -%{python2_sitelib}/%{vdsm_name}/xmlrpc.py* -%{python2_sitelib}/%{vdsm_name}/tool/__init__.py* -%{python2_sitelib}/%{vdsm_name}/tool/configfile.py* -%{python2_sitelib}/%{vdsm_name}/tool/dummybr.py* -%{python2_sitelib}/%{vdsm_name}/tool/dump_bonding_opts.py* -%{python2_sitelib}/%{vdsm_name}/tool/nwfilter.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurator.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/__init__* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* -%{python2_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* -%{python2_sitelib}/%{vdsm_name}/tool/register.py* -%{python2_sitelib}/%{vdsm_name}/tool/restore_nets.py* -%{python2_sitelib}/%{vdsm_name}/tool/service.py* -%{python2_sitelib}/%{vdsm_name}/tool/transient.py* -%{python2_sitelib}/%{vdsm_name}/tool/unified_persistence.py* -%{python2_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python2_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* -%{python2_sitelib}/%{vdsm_name}/tool/vdsm-id.py* -%{python2_sitelib}/%{vdsm_name}/virt/__init__.py* -%{python2_sitelib}/%{vdsm_name}/virt/api.py* -%{python2_sitelib}/%{vdsm_name}/virt/guestagent.py* -%{python2_sitelib}/%{vdsm_name}/virt/periodic.py* -%{python2_sitelib}/%{vdsm_name}/virt/sampling.py* -%{python2_sitelib}/%{vdsm_name}/virt/secret.py* -%{python2_sitelib}/%{vdsm_name}/virt/utils.py* -%{python2_sitelib}/%{vdsm_name}/virt/virdomain.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmchannels.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmexitreason.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmstats.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmstatus.py* +%{python_sitelib}/%{vdsm_name}/gluster/__init__.py* +%{python_sitelib}/%{vdsm_name}/gluster/cli.py* +%{python_sitelib}/%{vdsm_name}/gluster/exception.py* +%{python_sitelib}/%{vdsm_name}/health.py* +%{python_sitelib}/%{vdsm_name}/hugepages.py* +%{python_sitelib}/%{vdsm_name}/jobs.py* +%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* +%{python_sitelib}/%{vdsm_name}/kvm2ovirt.py* +%{python_sitelib}/%{vdsm_name}/logUtils.py* +%{python_sitelib}/%{vdsm_name}/machinetype.py* +%{python_sitelib}/%{vdsm_name}/metrics/*.py* +%{python_sitelib}/%{vdsm_name}/moduleloader.py* +%{python_sitelib}/%{vdsm_name}/momIF.py* +%{python_sitelib}/%{vdsm_name}/mkimage.py* +%{python_sitelib}/%{vdsm_name}/numa.py* +%{python_sitelib}/%{vdsm_name}/osinfo.py* +%{python_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* +%{python_sitelib}/%{vdsm_name}/profiling/__init__.py* +%{python_sitelib}/%{vdsm_name}/profiling/cpu.py* +%{python_sitelib}/%{vdsm_name}/profiling/errors.py* +%{python_sitelib}/%{vdsm_name}/profiling/memory.py* +%{python_sitelib}/%{vdsm_name}/profiling/profile.py* +%{python_sitelib}/%{vdsm_name}/storage/__init__.py* +%{python_sitelib}/%{vdsm_name}/storage/asyncevent.py* +%{python_sitelib}/%{vdsm_name}/storage/asyncutils.py* +%{python_sitelib}/%{vdsm_name}/storage/blkdiscard.py* +%{python_sitelib}/%{vdsm_name}/storage/blockdev.py* +%{python_sitelib}/%{vdsm_name}/storage/blockSD.py* +%{python_sitelib}/%{vdsm_name}/storage/blockVolume.py* +%{python_sitelib}/%{vdsm_name}/storage/check.py* +%{python_sitelib}/%{vdsm_name}/storage/clusterlock.py* +%{python_sitelib}/%{vdsm_name}/storage/compat.py* +%{python_sitelib}/%{vdsm_name}/storage/constants.py* +%{python_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* +%{python_sitelib}/%{vdsm_name}/storage/devicemapper.py* +%{python_sitelib}/%{vdsm_name}/storage/directio.py* +%{python_sitelib}/%{vdsm_name}/storage/dispatcher.py* +%{python_sitelib}/%{vdsm_name}/storage/exception.py* +%{python_sitelib}/%{vdsm_name}/storage/fallocate.py* +%{python_sitelib}/%{vdsm_name}/storage/fileSD.py* +%{python_sitelib}/%{vdsm_name}/storage/fileUtils.py* +%{python_sitelib}/%{vdsm_name}/storage/fileVolume.py* +%{python_sitelib}/%{vdsm_name}/storage/formatconverter.py* +%{python_sitelib}/%{vdsm_name}/storage/fuser.py* +%{python_sitelib}/%{vdsm_name}/storage/fsutils.py* +%{python_sitelib}/%{vdsm_name}/storage/glusterSD.py* +%{python_sitelib}/%{vdsm_name}/storage/glusterVolume.py* +%{python_sitelib}/%{vdsm_name}/storage/guarded.py* +%{python_sitelib}/%{vdsm_name}/storage/hba.py* +%{python_sitelib}/%{vdsm_name}/storage/hsm.py* +%{python_sitelib}/%{vdsm_name}/storage/image.py* +%{python_sitelib}/%{vdsm_name}/storage/imageSharing.py* +%{python_sitelib}/%{vdsm_name}/storage/imagetickets.py* +%{python_sitelib}/%{vdsm_name}/storage/iscsi.py* +%{python_sitelib}/%{vdsm_name}/storage/iscsiadm.py* +%{python_sitelib}/%{vdsm_name}/storage/localFsSD.py* +%{python_sitelib}/%{vdsm_name}/storage/lvm.env +%{python_sitelib}/%{vdsm_name}/storage/lvm.py* +%{python_sitelib}/%{vdsm_name}/storage/lvmconf.py* +%{python_sitelib}/%{vdsm_name}/storage/lvmfilter.py* +%{python_sitelib}/%{vdsm_name}/storage/mailbox.py* +%{python_sitelib}/%{vdsm_name}/storage/managedvolume.py* +%{python_sitelib}/%{vdsm_name}/storage/managedvolumedb.py* +%{python_sitelib}/%{vdsm_name}/storage/merge.py* +%{python_sitelib}/%{vdsm_name}/storage/misc.py* +%{python_sitelib}/%{vdsm_name}/storage/monitor.py* +%{python_sitelib}/%{vdsm_name}/storage/mount.py* +%{python_sitelib}/%{vdsm_name}/storage/mpathhealth.py* +%{python_sitelib}/%{vdsm_name}/storage/multipath.py* +%{python_sitelib}/%{vdsm_name}/storage/nbd.py* +%{python_sitelib}/%{vdsm_name}/storage/nfsSD.py* +%{python_sitelib}/%{vdsm_name}/storage/nos_brick.py* +%{python_sitelib}/%{vdsm_name}/storage/operation.py* +%{python_sitelib}/%{vdsm_name}/storage/outOfProcess.py* +%{python_sitelib}/%{vdsm_name}/storage/persistent.py* +%{python_sitelib}/%{vdsm_name}/storage/qemuimg.py* +%{python_sitelib}/%{vdsm_name}/storage/resourceFactories.py* +%{python_sitelib}/%{vdsm_name}/storage/resourceManager.py* +%{python_sitelib}/%{vdsm_name}/storage/rwlock.py* +%{python_sitelib}/%{vdsm_name}/storage/sd.py* +%{python_sitelib}/%{vdsm_name}/storage/sdc.py* +%{python_sitelib}/%{vdsm_name}/storage/securable.py* +%{python_sitelib}/%{vdsm_name}/storage/sp.py* +%{python_sitelib}/%{vdsm_name}/storage/spbackends.py* +%{python_sitelib}/%{vdsm_name}/storage/storageServer.py* +%{python_sitelib}/%{vdsm_name}/storage/sysfs.py* +%{python_sitelib}/%{vdsm_name}/storage/task.py* +%{python_sitelib}/%{vdsm_name}/storage/taskManager.py* +%{python_sitelib}/%{vdsm_name}/storage/threadPool.py* +%{python_sitelib}/%{vdsm_name}/storage/types.py* +%{python_sitelib}/%{vdsm_name}/storage/udev.py* +%{python_sitelib}/%{vdsm_name}/storage/volume.py* +%{python_sitelib}/%{vdsm_name}/storage/volumemetadata.py* +%{python_sitelib}/%{vdsm_name}/storage/workarounds.py* +%{python_sitelib}/%{vdsm_name}/storage/xlease.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/__init__.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/volume_info.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/__init__.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/amend_volume.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/base.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/copy_data.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/merge.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/move_device.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/reduce_domain.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/sparsify_volume.py* +%{python_sitelib}/%{vdsm_name}/storage/sdm/api/update_volume.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/__init__.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/managedvolume.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/hwinfo.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/mkimage.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/ksm.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/nbd.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/network.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/saslpasswd2.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/systemctl.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/test.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/udev.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_api/virt.py* +%{python_sitelib}/%{vdsm_name}/protocoldetector.py* +%{python_sitelib}/%{vdsm_name}/schedule.py* +%{python_sitelib}/%{vdsm_name}/sslutils.py* +%{python_sitelib}/%{vdsm_name}/supervdsm_server.py* +%{python_sitelib}/%{vdsm_name}/taskset.py* +%{python_sitelib}/%{vdsm_name}/throttledlog.py* +%{python_sitelib}/%{vdsm_name}/utils.py* +%{python_sitelib}/%{vdsm_name}/v2v.py* +%{python_sitelib}/%{vdsm_name}/vdsmd.py* +%{python_sitelib}/%{vdsm_name}/virtsparsify.py* +%{python_sitelib}/%{vdsm_name}/virtsysprep.py* +%{python_sitelib}/%{vdsm_name}/tool/__init__.py* +%{python_sitelib}/%{vdsm_name}/tool/common.py* +%{python_sitelib}/%{vdsm_name}/tool/check_volume_leases.py* +%{python_sitelib}/%{vdsm_name}/tool/config_lvm_filter.py* +%{python_sitelib}/%{vdsm_name}/tool/configfile.py* +%{python_sitelib}/%{vdsm_name}/tool/confmeta.py* +%{python_sitelib}/%{vdsm_name}/tool/confutils.py* +%{python_sitelib}/%{vdsm_name}/tool/dummybr.py* +%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* +%{python_sitelib}/%{vdsm_name}/tool/configurator.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* +%{python_sitelib}/%{vdsm_name}/tool/configurators/abrt.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/bond_defaults.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/lvm.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/managedvolumedb.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* +%{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* +%{python_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* +%{python_sitelib}/%{vdsm_name}/tool/network.py* +%{python_sitelib}/%{vdsm_name}/tool/register.py* +%{python_sitelib}/%{vdsm_name}/tool/service.py* +%{python_sitelib}/%{vdsm_name}/tool/transient.py* +%{python_sitelib}/%{vdsm_name}/tool/upgrade.py* +%{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* +%{python_sitelib}/%{vdsm_name}/tool/xleases.py* +%{python_sitelib}/%{vdsm_name}/virt/__init__.py* +%{python_sitelib}/%{vdsm_name}/virt/collectd.py* +%{python_sitelib}/%{vdsm_name}/virt/displaynetwork.py* +%{python_sitelib}/%{vdsm_name}/virt/drivemonitor.py* +%{python_sitelib}/%{vdsm_name}/virt/domain_descriptor.py* +%{python_sitelib}/%{vdsm_name}/virt/domxml_preprocess.py* +%{python_sitelib}/%{vdsm_name}/virt/events.py* +%{python_sitelib}/%{vdsm_name}/virt/guestagent.py* +%{python_sitelib}/%{vdsm_name}/virt/guestagenthelpers.py* +%{python_sitelib}/%{vdsm_name}/virt/libvirtnetwork.py* +%{python_sitelib}/%{vdsm_name}/virt/libvirtxml.py* +%{python_sitelib}/%{vdsm_name}/virt/metadata.py* +%{python_sitelib}/%{vdsm_name}/virt/migration.py* +%{python_sitelib}/%{vdsm_name}/virt/periodic.py* +%{python_sitelib}/%{vdsm_name}/virt/qemuguestagent.py* +%{python_sitelib}/%{vdsm_name}/virt/recovery.py* +%{python_sitelib}/%{vdsm_name}/virt/sampling.py* +%{python_sitelib}/%{vdsm_name}/virt/saslpasswd2.py* +%{python_sitelib}/%{vdsm_name}/virt/secret.py* +%{python_sitelib}/%{vdsm_name}/virt/utils.py* +%{python_sitelib}/%{vdsm_name}/virt/virdomain.py* +%{python_sitelib}/%{vdsm_name}/virt/vm.py* +%{python_sitelib}/%{vdsm_name}/virt/jobs/__init__.py* +%{python_sitelib}/%{vdsm_name}/virt/jobs/seal.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/__init__.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/common.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/compat.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/core.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/drivename.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/graphics.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/hostdevice.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/hwclass.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/lease.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/lookup.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/network.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/storage.py* +%{python_sitelib}/%{vdsm_name}/virt/vmdevices/storagexml.py* +%{python_sitelib}/%{vdsm_name}/virt/vmchannels.py* +%{python_sitelib}/%{vdsm_name}/virt/vmexitreason.py* +%{python_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* +%{python_sitelib}/%{vdsm_name}/virt/vmstats.py* +%{python_sitelib}/%{vdsm_name}/virt/vmstatus.py* +%{python_sitelib}/%{vdsm_name}/virt/vmtune.py* +%{python_sitelib}/%{vdsm_name}/virt/vmxml.py* +%{python_sitelib}/%{vdsm_name}/virt/xmlconstants.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README @@ -1302,7 +1310,13 @@ exit 0 %dir %{_datadir}/%{vdsm_name}/tests/devices/parsing %dir %{_datadir}/%{vdsm_name}/tests/integration %dir %{_datadir}/%{vdsm_name}/tests/network -%{_datadir}/%{vdsm_name}/supervdsm_api/test.py* +%dir %{_datadir}/%{vdsm_name}/tests/network/functional +%dir %{_datadir}/%{vdsm_name}/tests/network/integration +%dir %{_datadir}/%{vdsm_name}/tests/network/integration/ovs +%dir %{_datadir}/%{vdsm_name}/tests/network/unit +%dir %{_datadir}/%{vdsm_name}/tests/network/unit/ovs +%dir %{_datadir}/%{vdsm_name}/tests/network/static +%dir %{_datadir}/%{vdsm_name}/tests/storage %{_datadir}/%{vdsm_name}/tests/*.py* %{_datadir}/%{vdsm_name}/tests/cpu_info.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out @@ -1314,33 +1328,54 @@ exit 0 %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770_nosnap.out %{_datadir}/%{vdsm_name}/tests/caps_libvirt_multiqemu.out +%{_datadir}/%{vdsm_name}/tests/caps_libvirt_s390x.out %{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out +%{_datadir}/%{vdsm_name}/tests/domcaps_libvirt_ppc64le.out +%{_datadir}/%{vdsm_name}/tests/domcaps_libvirt_s390x.out +%{_datadir}/%{vdsm_name}/tests/domcaps_libvirt_x86_64.out %{_datadir}/%{vdsm_name}/tests/common/*.py* %{_datadir}/%{vdsm_name}/tests/cpuinfo/*.out +%{_datadir}/%{vdsm_name}/tests/check_distpkg.sh +%{_datadir}/%{vdsm_name}/tests/check_rpms.sh %{_datadir}/%{vdsm_name}/tests/fake-ssh-add %{_datadir}/%{vdsm_name}/tests/fake-ssh-agent +%{_datadir}/%{vdsm_name}/tests/fake-virt-sysprep %{_datadir}/%{vdsm_name}/tests/fake-virt-v2v %{_datadir}/%{vdsm_name}/tests/fake-virt-v2v.out -%{_datadir}/%{vdsm_name}/tests/cpu_map.xml +%{_datadir}/%{vdsm_name}/tests/fake-virt-v2v.err %{_datadir}/%{vdsm_name}/tests/devices/*.py* %{_datadir}/%{vdsm_name}/tests/devices/parsing/*.py* %{_datadir}/%{vdsm_name}/tests/devices/data/*.xml -%{_datadir}/%{vdsm_name}/tests/iscsiadm_-m_iface.out -%{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out -%{_datadir}/%{vdsm_name}/tests/lvs_f9e55e18-67c4-4377-8e39-5833ca422bef.out %{_datadir}/%{vdsm_name}/tests/mem_info.out %{_datadir}/%{vdsm_name}/tests/network/*.py* -%{_datadir}/%{vdsm_name}/tests/network/ip_route_show_table_all.out %{_datadir}/%{vdsm_name}/tests/network/netmaskconversions %{_datadir}/%{vdsm_name}/tests/network/tc_filter_show.out +%{_datadir}/%{vdsm_name}/tests/network/functional/*.py* +%{_datadir}/%{vdsm_name}/tests/network/integration/*.py* +%{_datadir}/%{vdsm_name}/tests/network/integration/ovs/*.py* +%{_datadir}/%{vdsm_name}/tests/network/unit/*.py* +%{_datadir}/%{vdsm_name}/tests/network/unit/ovs/*.py* +%{_datadir}/%{vdsm_name}/tests/network/static/*.json +%{_datadir}/%{vdsm_name}/tests/network/static/ip_route_show_table_all.out +%{_datadir}/%{vdsm_name}/tests/storage/*.py* +%{_datadir}/%{vdsm_name}/tests/storage/*.out +%{_datadir}/%{vdsm_name}/tests/virt/*.py* +%{_datadir}/%{vdsm_name}/tests/virt/data/*.xml %{_datadir}/%{vdsm_name}/tests/run_tests.sh +%{_datadir}/%{vdsm_name}/tests/toolTests_abrt-action-save-package-data.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_CCPP.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_abrt.conf %{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf %{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf %{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_mtab_1g +%{_datadir}/%{vdsm_name}/tests/toolTests_mtab_default +%{_datadir}/%{vdsm_name}/tests/toolTests_mtab_nohugetlbfs %{_datadir}/%{vdsm_name}/tests/toolTests_qemu_sanlock.conf %{_datadir}/%{vdsm_name}/tests/toolTests_qemu_ssl.conf %{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_no_ssl.conf %{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_ssl.conf +%{_datadir}/%{vdsm_name}/tests/toolTests_vmcore.conf %{_datadir}/%{vdsm_name}/tests/glusterGeoRepStatus.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeGeoRepConfigList.xml %{_datadir}/%{vdsm_name}/tests/glusterSnapshotList.xml @@ -1363,43 +1398,18 @@ exit 0 %{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/openstacknet_utils.py* %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* - -%files hook-ovs -%{_sysconfdir}/sudoers.d/50_vdsm_hook_ovs -%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/ovs_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/ovs_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/ovs_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/ovs_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_ip.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_libvirt.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_mtu.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_setup_ovs.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/ovs_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/ovs_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail/50_ovs -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail/ovs_utils.py* +%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/50_openstacknet +%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/openstacknet_utils.py* %files hook-macspoof %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof @@ -1429,25 +1439,35 @@ exit 0 %files hook-ethtool-options %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options -%files hook-ipv6 -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_ipv6 +%files hook-fcoe +%{_presetdir}/85-vdsm-hook-fcoe.preset +%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_fcoe + +%files hook-localdisk +%{_sysconfdir}/sudoers.d/50_vdsm_hook_localdisk +%{_libexecdir}/%{vdsm_name}/hooks/after_disk_prepare/localdisk +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/localdisk +%{_libexecdir}/%{vdsm_name}/localdisk-helper +%{_udevrulesdir}/12-vdsm-localdisk.rules %files hook-vmfex-dev %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex +%files hook-cpuflags +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_cpuflags + %if 0%{?with_hooks} %files hook-allocate_net %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/10_allocate_net +%files hook-boot_hostdev +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_boot_hostdev + %files hook-checkimages %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages -%files hook-fcoe -%{_libdir}/systemd/system-preset/85-vdsm-hook-fcoe.preset -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_fcoe - %files hook-checkips %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/10_checkips %{_libexecdir}/%{vdsm_name}/hooks/checkipsd @@ -1463,10 +1483,6 @@ exit 0 %files hook-fakevmstats %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats -%files hook-fakesriov -%{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps/10_fakesriov -%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/10_fakesriov - %files hook-fileinject %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject @@ -1474,32 +1490,12 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy -%files hook-hostusb -%{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb - %files hook-httpsisoboot %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_httpsisoboot -%files hook-hugepages -%{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages - -%files hook-isolatedprivatevlan -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan -%config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml - %files hook-macbind %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind -%files hook-noipspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_noipspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_noipspoof - %files hook-extnet %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet @@ -1519,9 +1515,6 @@ exit 0 %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc -%files hook-qos -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos - %files hook-scratchpad %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad @@ -1535,50 +1528,49 @@ exit 0 %files hook-vmdisk %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk - -%files hook-vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex %endif -%files cli -%license COPYING -%{_bindir}/vdsClient -%dir %{_datadir}/%{vdsm_name} -%{_datadir}/%{vdsm_name}/vdsClient.py* -%{_datadir}/%{vdsm_name}/vdsClientGluster.py* -%{_sysconfdir}/bash_completion.d/vdsClient -%{_mandir}/man1/vdsClient.1* - -%files xmlrpc +%files http %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc -%{python2_sitelib}/%{vdsm_name}/rpc/bindingxmlrpc.py* +%{python_sitelib}/%{vdsm_name}/rpc/http.py* + +%files client +%{_bindir}/vdsm-client +%dir %{python_sitelib}/vdsmclient +%{python_sitelib}/vdsmclient/__init__.py* +%{python_sitelib}/vdsmclient/client.py* +%{python_sitelib}/yajsonrpc/__init__.py* +%{_mandir}/man1/vdsm-client.1* %files jsonrpc %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc -%{python2_sitelib}/%{vdsm_name}/rpc/__init__.py* -%{python2_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* -%{python2_sitelib}/%{vdsm_name}/rpc/Bridge.py* -%{python2_sitelib}/yajsonrpc/__init__.py* +%{python_sitelib}/%{vdsm_name}/rpc/__init__.py* +%{python_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* +%{python_sitelib}/%{vdsm_name}/rpc/Bridge.py* +%{python_sitelib}/yajsonrpc/__init__.py* +%{python_sitelib}/yajsonrpc/jsonrpcclient.py* %files api +%doc lib/vdsm/api/vdsm-api.html %dir %{python_sitelib}/%{vdsm_name} +%dir %{python_sitelib}/%{vdsm_name}/api %dir %{python_sitelib}/%{vdsm_name}/rpc -%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api.yml -%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-events.yml -%{python2_sitelib}/api/vdsmapi.py* -%{python2_sitelib}/api/__init__.py* +%{python_sitelib}/%{vdsm_name}/api/*.py* +%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api.pickle +%{python_sitelib}/%{vdsm_name}/rpc/vdsm-events.pickle %if ! 0%{?with_gluster_mgmt} -%exclude %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml +%exclude %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle %endif %files yajsonrpc %dir %{python_sitelib}/yajsonrpc -%{python2_sitelib}/yajsonrpc/betterAsyncore.py* -%{python2_sitelib}/yajsonrpc/stomp.py* -%{python2_sitelib}/yajsonrpc/stompreactor.py* +%{python_sitelib}/yajsonrpc/betterAsyncore.py* +%{python_sitelib}/yajsonrpc/exception.py* +%{python_sitelib}/yajsonrpc/stomp.py* +%{python_sitelib}/yajsonrpc/stompclient.py* +%{python_sitelib}/yajsonrpc/stompserver.py* %files hook-faqemu %license COPYING @@ -1587,21 +1579,22 @@ exit 0 %if 0%{?with_gluster_mgmt} %files gluster -%dir %{_datadir}/%{vdsm_name} -%dir %{_datadir}/%{vdsm_name}/gluster +%license COPYING %dir %{python_sitelib}/%{vdsm_name} %dir %{python_sitelib}/%{vdsm_name}/rpc -%license COPYING -%{_datadir}/%{vdsm_name}/gluster/api.py* -%{_datadir}/%{vdsm_name}/gluster/apiwrapper.py* -%{_datadir}/%{vdsm_name}/gluster/fstab.py* -%{python2_sitelib}/%{vdsm_name}/gluster/fence.py* -%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.yml -%{_datadir}/%{vdsm_name}/gluster/gfapi.py* -%{_datadir}/%{vdsm_name}/gluster/hooks.py* -%{_datadir}/%{vdsm_name}/gluster/services.py* -%{_datadir}/%{vdsm_name}/gluster/storagedev.py* -%{_datadir}/%{vdsm_name}/gluster/tasks.py* +%dir %{python_sitelib}/%{vdsm_name}/gluster +%{python_sitelib}/%{vdsm_name}/gluster/api.py* +%{python_sitelib}/%{vdsm_name}/gluster/apiwrapper.py* +%{python_sitelib}/%{vdsm_name}/gluster/events.py* +%{python_sitelib}/%{vdsm_name}/gluster/fstab.py* +%{python_sitelib}/%{vdsm_name}/gluster/fence.py* +%{python_sitelib}/%{vdsm_name}/gluster/gfapi.py* +%{python_sitelib}/%{vdsm_name}/gluster/hooks.py* +%{python_sitelib}/%{vdsm_name}/gluster/services.py* +%{python_sitelib}/%{vdsm_name}/gluster/storagedev.py* +%{python_sitelib}/%{vdsm_name}/gluster/tasks.py* +%{python_sitelib}/%{vdsm_name}/gluster/thinstorage.py* +%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle %endif %changelog From b40ba2c232953733f54a5bc472565c78970fe2c0 Mon Sep 17 00:00:00 2001 From: Marcin Sobczyk Date: Thu, 13 Jun 2019 09:50:26 +0200 Subject: [PATCH 124/126] Restore arch restrictions, use "python2_sitelib" --- vdsm.spec | 589 +++++++++++++++++++++++++++--------------------------- 1 file changed, 295 insertions(+), 294 deletions(-) diff --git a/vdsm.spec b/vdsm.spec index 563a8c9..01a01f2 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -59,6 +59,7 @@ License: GPLv2+ Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz +ExclusiveArch: x86_64 %{power64} aarch64 Patch0: fix-unversioned-python-shebangs.patch %{!?_licensedir:%global license %%doc} @@ -998,7 +999,7 @@ exit 0 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_ifcfg_write %{_libexecdir}/%{vdsm_name}/get-conf-item -%{python_sitelib}/sos/plugins/vdsm.py* +%{python2_sitelib}/sos/plugins/vdsm.py* %{_udevrulesdir}/12-vdsm-lvm.rules /etc/security/limits.d/99-vdsm.conf %{_mandir}/man8/vdsmd.8* @@ -1038,265 +1039,265 @@ exit 0 %{_datadir}/yum-plugins/*.py* %files common -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/common -%dir %{python_sitelib}/%{vdsm_name}/common/network -%{python_sitelib}/%{vdsm_name}/__init__.py* -%{python_sitelib}/%{vdsm_name}/common/*.py* -%{python_sitelib}/%{vdsm_name}/common/network/*.py* +%dir %{python2_sitelib}/%{vdsm_name} +%dir %{python2_sitelib}/%{vdsm_name}/common +%dir %{python2_sitelib}/%{vdsm_name}/common/network +%{python2_sitelib}/%{vdsm_name}/__init__.py* +%{python2_sitelib}/%{vdsm_name}/common/*.py* +%{python2_sitelib}/%{vdsm_name}/common/network/*.py* %files network -%dir %{python_sitelib}/%{vdsm_name}/network -%dir %{python_sitelib}/%{vdsm_name}/network/configurators -%dir %{python_sitelib}/%{vdsm_name}/network/ip -%dir %{python_sitelib}/%{vdsm_name}/network/ip/address -%dir %{python_sitelib}/%{vdsm_name}/network/ip/route -%dir %{python_sitelib}/%{vdsm_name}/network/ip/rule -%dir %{python_sitelib}/%{vdsm_name}/network/link -%dir %{python_sitelib}/%{vdsm_name}/network/link/bond -%dir %{python_sitelib}/%{vdsm_name}/network/lldp -%dir %{python_sitelib}/%{vdsm_name}/network/lldpad -%dir %{python_sitelib}/%{vdsm_name}/network/netinfo -%dir %{python_sitelib}/%{vdsm_name}/network/netlink -%dir %{python_sitelib}/%{vdsm_name}/network/netswitch -%dir %{python_sitelib}/%{vdsm_name}/network/nm -%dir %{python_sitelib}/%{vdsm_name}/network/nm/nmdbus -%dir %{python_sitelib}/%{vdsm_name}/network/ovs -%dir %{python_sitelib}/%{vdsm_name}/network/ovs/driver -%dir %{python_sitelib}/%{vdsm_name}/network/tc -%{python_sitelib}/%{vdsm_name}/network/*.py* -%{python_sitelib}/%{vdsm_name}/network/*/*.py* -%{python_sitelib}/%{vdsm_name}/network/*/*/*.py* +%dir %{python2_sitelib}/%{vdsm_name}/network +%dir %{python2_sitelib}/%{vdsm_name}/network/configurators +%dir %{python2_sitelib}/%{vdsm_name}/network/ip +%dir %{python2_sitelib}/%{vdsm_name}/network/ip/address +%dir %{python2_sitelib}/%{vdsm_name}/network/ip/route +%dir %{python2_sitelib}/%{vdsm_name}/network/ip/rule +%dir %{python2_sitelib}/%{vdsm_name}/network/link +%dir %{python2_sitelib}/%{vdsm_name}/network/link/bond +%dir %{python2_sitelib}/%{vdsm_name}/network/lldp +%dir %{python2_sitelib}/%{vdsm_name}/network/lldpad +%dir %{python2_sitelib}/%{vdsm_name}/network/netinfo +%dir %{python2_sitelib}/%{vdsm_name}/network/netlink +%dir %{python2_sitelib}/%{vdsm_name}/network/netswitch +%dir %{python2_sitelib}/%{vdsm_name}/network/nm +%dir %{python2_sitelib}/%{vdsm_name}/network/nm/nmdbus +%dir %{python2_sitelib}/%{vdsm_name}/network/ovs +%dir %{python2_sitelib}/%{vdsm_name}/network/ovs/driver +%dir %{python2_sitelib}/%{vdsm_name}/network/tc +%{python2_sitelib}/%{vdsm_name}/network/*.py* +%{python2_sitelib}/%{vdsm_name}/network/*/*.py* +%{python2_sitelib}/%{vdsm_name}/network/*/*/*.py* %files python %{_mandir}/man1/vdsm-tool.1* %{_bindir}/vdsm-tool -%dir %{python_sitelib}/%{vdsm_name}/gluster -%dir %{python_sitelib}/%{vdsm_name}/host -%dir %{python_sitelib}/%{vdsm_name}/metrics -%dir %{python_sitelib}/%{vdsm_name}/tool -%dir %{python_sitelib}/%{vdsm_name}/tool/configurators -%dir %{python_sitelib}/%{vdsm_name}/profiling -%dir %{python_sitelib}/%{vdsm_name}/storage -%dir %{python_sitelib}/%{vdsm_name}/supervdsm_api -%dir %{python_sitelib}/%{vdsm_name}/virt -%dir %{python_sitelib}/%{vdsm_name}/virt/vmdevices -%{python_sitelib}/%{vdsm_name}/alignmentScan.py* -%{python_sitelib}/%{vdsm_name}/API.py* -%{python_sitelib}/%{vdsm_name}/client.py* -%{python_sitelib}/%{vdsm_name}/clientIF.py* -%{python_sitelib}/%{vdsm_name}/hook/*.py* -%{python_sitelib}/%{vdsm_name}/host/*.py* -%{python_sitelib}/%{vdsm_name}/config.py* -%{python_sitelib}/%{vdsm_name}/constants.py* -%{python_sitelib}/%{vdsm_name}/cpuinfo.py* -%{python_sitelib}/%{vdsm_name}/dmidecodeUtil.py* -%{python_sitelib}/%{vdsm_name}/executor.py* +%dir %{python2_sitelib}/%{vdsm_name}/gluster +%dir %{python2_sitelib}/%{vdsm_name}/host +%dir %{python2_sitelib}/%{vdsm_name}/metrics +%dir %{python2_sitelib}/%{vdsm_name}/tool +%dir %{python2_sitelib}/%{vdsm_name}/tool/configurators +%dir %{python2_sitelib}/%{vdsm_name}/profiling +%dir %{python2_sitelib}/%{vdsm_name}/storage +%dir %{python2_sitelib}/%{vdsm_name}/supervdsm_api +%dir %{python2_sitelib}/%{vdsm_name}/virt +%dir %{python2_sitelib}/%{vdsm_name}/virt/vmdevices +%{python2_sitelib}/%{vdsm_name}/alignmentScan.py* +%{python2_sitelib}/%{vdsm_name}/API.py* +%{python2_sitelib}/%{vdsm_name}/client.py* +%{python2_sitelib}/%{vdsm_name}/clientIF.py* +%{python2_sitelib}/%{vdsm_name}/hook/*.py* +%{python2_sitelib}/%{vdsm_name}/host/*.py* +%{python2_sitelib}/%{vdsm_name}/config.py* +%{python2_sitelib}/%{vdsm_name}/constants.py* +%{python2_sitelib}/%{vdsm_name}/cpuinfo.py* +%{python2_sitelib}/%{vdsm_name}/dmidecodeUtil.py* +%{python2_sitelib}/%{vdsm_name}/executor.py* # gluster.exception is used in many places like Bridge.py. So it is required # even without vdsm-gluster package -%{python_sitelib}/%{vdsm_name}/gluster/__init__.py* -%{python_sitelib}/%{vdsm_name}/gluster/cli.py* -%{python_sitelib}/%{vdsm_name}/gluster/exception.py* -%{python_sitelib}/%{vdsm_name}/health.py* -%{python_sitelib}/%{vdsm_name}/hugepages.py* -%{python_sitelib}/%{vdsm_name}/jobs.py* -%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* -%{python_sitelib}/%{vdsm_name}/kvm2ovirt.py* -%{python_sitelib}/%{vdsm_name}/logUtils.py* -%{python_sitelib}/%{vdsm_name}/machinetype.py* -%{python_sitelib}/%{vdsm_name}/metrics/*.py* -%{python_sitelib}/%{vdsm_name}/moduleloader.py* -%{python_sitelib}/%{vdsm_name}/momIF.py* -%{python_sitelib}/%{vdsm_name}/mkimage.py* -%{python_sitelib}/%{vdsm_name}/numa.py* -%{python_sitelib}/%{vdsm_name}/osinfo.py* -%{python_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* -%{python_sitelib}/%{vdsm_name}/profiling/__init__.py* -%{python_sitelib}/%{vdsm_name}/profiling/cpu.py* -%{python_sitelib}/%{vdsm_name}/profiling/errors.py* -%{python_sitelib}/%{vdsm_name}/profiling/memory.py* -%{python_sitelib}/%{vdsm_name}/profiling/profile.py* -%{python_sitelib}/%{vdsm_name}/storage/__init__.py* -%{python_sitelib}/%{vdsm_name}/storage/asyncevent.py* -%{python_sitelib}/%{vdsm_name}/storage/asyncutils.py* -%{python_sitelib}/%{vdsm_name}/storage/blkdiscard.py* -%{python_sitelib}/%{vdsm_name}/storage/blockdev.py* -%{python_sitelib}/%{vdsm_name}/storage/blockSD.py* -%{python_sitelib}/%{vdsm_name}/storage/blockVolume.py* -%{python_sitelib}/%{vdsm_name}/storage/check.py* -%{python_sitelib}/%{vdsm_name}/storage/clusterlock.py* -%{python_sitelib}/%{vdsm_name}/storage/compat.py* -%{python_sitelib}/%{vdsm_name}/storage/constants.py* -%{python_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* -%{python_sitelib}/%{vdsm_name}/storage/devicemapper.py* -%{python_sitelib}/%{vdsm_name}/storage/directio.py* -%{python_sitelib}/%{vdsm_name}/storage/dispatcher.py* -%{python_sitelib}/%{vdsm_name}/storage/exception.py* -%{python_sitelib}/%{vdsm_name}/storage/fallocate.py* -%{python_sitelib}/%{vdsm_name}/storage/fileSD.py* -%{python_sitelib}/%{vdsm_name}/storage/fileUtils.py* -%{python_sitelib}/%{vdsm_name}/storage/fileVolume.py* -%{python_sitelib}/%{vdsm_name}/storage/formatconverter.py* -%{python_sitelib}/%{vdsm_name}/storage/fuser.py* -%{python_sitelib}/%{vdsm_name}/storage/fsutils.py* -%{python_sitelib}/%{vdsm_name}/storage/glusterSD.py* -%{python_sitelib}/%{vdsm_name}/storage/glusterVolume.py* -%{python_sitelib}/%{vdsm_name}/storage/guarded.py* -%{python_sitelib}/%{vdsm_name}/storage/hba.py* -%{python_sitelib}/%{vdsm_name}/storage/hsm.py* -%{python_sitelib}/%{vdsm_name}/storage/image.py* -%{python_sitelib}/%{vdsm_name}/storage/imageSharing.py* -%{python_sitelib}/%{vdsm_name}/storage/imagetickets.py* -%{python_sitelib}/%{vdsm_name}/storage/iscsi.py* -%{python_sitelib}/%{vdsm_name}/storage/iscsiadm.py* -%{python_sitelib}/%{vdsm_name}/storage/localFsSD.py* -%{python_sitelib}/%{vdsm_name}/storage/lvm.env -%{python_sitelib}/%{vdsm_name}/storage/lvm.py* -%{python_sitelib}/%{vdsm_name}/storage/lvmconf.py* -%{python_sitelib}/%{vdsm_name}/storage/lvmfilter.py* -%{python_sitelib}/%{vdsm_name}/storage/mailbox.py* -%{python_sitelib}/%{vdsm_name}/storage/managedvolume.py* -%{python_sitelib}/%{vdsm_name}/storage/managedvolumedb.py* -%{python_sitelib}/%{vdsm_name}/storage/merge.py* -%{python_sitelib}/%{vdsm_name}/storage/misc.py* -%{python_sitelib}/%{vdsm_name}/storage/monitor.py* -%{python_sitelib}/%{vdsm_name}/storage/mount.py* -%{python_sitelib}/%{vdsm_name}/storage/mpathhealth.py* -%{python_sitelib}/%{vdsm_name}/storage/multipath.py* -%{python_sitelib}/%{vdsm_name}/storage/nbd.py* -%{python_sitelib}/%{vdsm_name}/storage/nfsSD.py* -%{python_sitelib}/%{vdsm_name}/storage/nos_brick.py* -%{python_sitelib}/%{vdsm_name}/storage/operation.py* -%{python_sitelib}/%{vdsm_name}/storage/outOfProcess.py* -%{python_sitelib}/%{vdsm_name}/storage/persistent.py* -%{python_sitelib}/%{vdsm_name}/storage/qemuimg.py* -%{python_sitelib}/%{vdsm_name}/storage/resourceFactories.py* -%{python_sitelib}/%{vdsm_name}/storage/resourceManager.py* -%{python_sitelib}/%{vdsm_name}/storage/rwlock.py* -%{python_sitelib}/%{vdsm_name}/storage/sd.py* -%{python_sitelib}/%{vdsm_name}/storage/sdc.py* -%{python_sitelib}/%{vdsm_name}/storage/securable.py* -%{python_sitelib}/%{vdsm_name}/storage/sp.py* -%{python_sitelib}/%{vdsm_name}/storage/spbackends.py* -%{python_sitelib}/%{vdsm_name}/storage/storageServer.py* -%{python_sitelib}/%{vdsm_name}/storage/sysfs.py* -%{python_sitelib}/%{vdsm_name}/storage/task.py* -%{python_sitelib}/%{vdsm_name}/storage/taskManager.py* -%{python_sitelib}/%{vdsm_name}/storage/threadPool.py* -%{python_sitelib}/%{vdsm_name}/storage/types.py* -%{python_sitelib}/%{vdsm_name}/storage/udev.py* -%{python_sitelib}/%{vdsm_name}/storage/volume.py* -%{python_sitelib}/%{vdsm_name}/storage/volumemetadata.py* -%{python_sitelib}/%{vdsm_name}/storage/workarounds.py* -%{python_sitelib}/%{vdsm_name}/storage/xlease.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/__init__.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/volume_info.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/__init__.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/amend_volume.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/base.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/copy_data.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/merge.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/move_device.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/reduce_domain.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/sparsify_volume.py* -%{python_sitelib}/%{vdsm_name}/storage/sdm/api/update_volume.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/__init__.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/managedvolume.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/hwinfo.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/mkimage.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/ksm.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/nbd.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/network.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/saslpasswd2.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/systemctl.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/test.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/udev.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_api/virt.py* -%{python_sitelib}/%{vdsm_name}/protocoldetector.py* -%{python_sitelib}/%{vdsm_name}/schedule.py* -%{python_sitelib}/%{vdsm_name}/sslutils.py* -%{python_sitelib}/%{vdsm_name}/supervdsm_server.py* -%{python_sitelib}/%{vdsm_name}/taskset.py* -%{python_sitelib}/%{vdsm_name}/throttledlog.py* -%{python_sitelib}/%{vdsm_name}/utils.py* -%{python_sitelib}/%{vdsm_name}/v2v.py* -%{python_sitelib}/%{vdsm_name}/vdsmd.py* -%{python_sitelib}/%{vdsm_name}/virtsparsify.py* -%{python_sitelib}/%{vdsm_name}/virtsysprep.py* -%{python_sitelib}/%{vdsm_name}/tool/__init__.py* -%{python_sitelib}/%{vdsm_name}/tool/common.py* -%{python_sitelib}/%{vdsm_name}/tool/check_volume_leases.py* -%{python_sitelib}/%{vdsm_name}/tool/config_lvm_filter.py* -%{python_sitelib}/%{vdsm_name}/tool/configfile.py* -%{python_sitelib}/%{vdsm_name}/tool/confmeta.py* -%{python_sitelib}/%{vdsm_name}/tool/confutils.py* -%{python_sitelib}/%{vdsm_name}/tool/dummybr.py* -%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py* -%{python_sitelib}/%{vdsm_name}/tool/configurator.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__* -%{python_sitelib}/%{vdsm_name}/tool/configurators/abrt.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/bond_defaults.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/lvm.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/managedvolumedb.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* -%{python_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* -%{python_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* -%{python_sitelib}/%{vdsm_name}/tool/network.py* -%{python_sitelib}/%{vdsm_name}/tool/register.py* -%{python_sitelib}/%{vdsm_name}/tool/service.py* -%{python_sitelib}/%{vdsm_name}/tool/transient.py* -%{python_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* -%{python_sitelib}/%{vdsm_name}/tool/xleases.py* -%{python_sitelib}/%{vdsm_name}/virt/__init__.py* -%{python_sitelib}/%{vdsm_name}/virt/collectd.py* -%{python_sitelib}/%{vdsm_name}/virt/displaynetwork.py* -%{python_sitelib}/%{vdsm_name}/virt/drivemonitor.py* -%{python_sitelib}/%{vdsm_name}/virt/domain_descriptor.py* -%{python_sitelib}/%{vdsm_name}/virt/domxml_preprocess.py* -%{python_sitelib}/%{vdsm_name}/virt/events.py* -%{python_sitelib}/%{vdsm_name}/virt/guestagent.py* -%{python_sitelib}/%{vdsm_name}/virt/guestagenthelpers.py* -%{python_sitelib}/%{vdsm_name}/virt/libvirtnetwork.py* -%{python_sitelib}/%{vdsm_name}/virt/libvirtxml.py* -%{python_sitelib}/%{vdsm_name}/virt/metadata.py* -%{python_sitelib}/%{vdsm_name}/virt/migration.py* -%{python_sitelib}/%{vdsm_name}/virt/periodic.py* -%{python_sitelib}/%{vdsm_name}/virt/qemuguestagent.py* -%{python_sitelib}/%{vdsm_name}/virt/recovery.py* -%{python_sitelib}/%{vdsm_name}/virt/sampling.py* -%{python_sitelib}/%{vdsm_name}/virt/saslpasswd2.py* -%{python_sitelib}/%{vdsm_name}/virt/secret.py* -%{python_sitelib}/%{vdsm_name}/virt/utils.py* -%{python_sitelib}/%{vdsm_name}/virt/virdomain.py* -%{python_sitelib}/%{vdsm_name}/virt/vm.py* -%{python_sitelib}/%{vdsm_name}/virt/jobs/__init__.py* -%{python_sitelib}/%{vdsm_name}/virt/jobs/seal.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/__init__.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/common.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/compat.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/core.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/drivename.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/graphics.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/hostdevice.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/hwclass.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/lease.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/lookup.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/network.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/storage.py* -%{python_sitelib}/%{vdsm_name}/virt/vmdevices/storagexml.py* -%{python_sitelib}/%{vdsm_name}/virt/vmchannels.py* -%{python_sitelib}/%{vdsm_name}/virt/vmexitreason.py* -%{python_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* -%{python_sitelib}/%{vdsm_name}/virt/vmstats.py* -%{python_sitelib}/%{vdsm_name}/virt/vmstatus.py* -%{python_sitelib}/%{vdsm_name}/virt/vmtune.py* -%{python_sitelib}/%{vdsm_name}/virt/vmxml.py* -%{python_sitelib}/%{vdsm_name}/virt/xmlconstants.py* +%{python2_sitelib}/%{vdsm_name}/gluster/__init__.py* +%{python2_sitelib}/%{vdsm_name}/gluster/cli.py* +%{python2_sitelib}/%{vdsm_name}/gluster/exception.py* +%{python2_sitelib}/%{vdsm_name}/health.py* +%{python2_sitelib}/%{vdsm_name}/hugepages.py* +%{python2_sitelib}/%{vdsm_name}/jobs.py* +%{python2_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* +%{python2_sitelib}/%{vdsm_name}/kvm2ovirt.py* +%{python2_sitelib}/%{vdsm_name}/logUtils.py* +%{python2_sitelib}/%{vdsm_name}/machinetype.py* +%{python2_sitelib}/%{vdsm_name}/metrics/*.py* +%{python2_sitelib}/%{vdsm_name}/moduleloader.py* +%{python2_sitelib}/%{vdsm_name}/momIF.py* +%{python2_sitelib}/%{vdsm_name}/mkimage.py* +%{python2_sitelib}/%{vdsm_name}/numa.py* +%{python2_sitelib}/%{vdsm_name}/osinfo.py* +%{python2_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* +%{python2_sitelib}/%{vdsm_name}/profiling/__init__.py* +%{python2_sitelib}/%{vdsm_name}/profiling/cpu.py* +%{python2_sitelib}/%{vdsm_name}/profiling/errors.py* +%{python2_sitelib}/%{vdsm_name}/profiling/memory.py* +%{python2_sitelib}/%{vdsm_name}/profiling/profile.py* +%{python2_sitelib}/%{vdsm_name}/storage/__init__.py* +%{python2_sitelib}/%{vdsm_name}/storage/asyncevent.py* +%{python2_sitelib}/%{vdsm_name}/storage/asyncutils.py* +%{python2_sitelib}/%{vdsm_name}/storage/blkdiscard.py* +%{python2_sitelib}/%{vdsm_name}/storage/blockdev.py* +%{python2_sitelib}/%{vdsm_name}/storage/blockSD.py* +%{python2_sitelib}/%{vdsm_name}/storage/blockVolume.py* +%{python2_sitelib}/%{vdsm_name}/storage/check.py* +%{python2_sitelib}/%{vdsm_name}/storage/clusterlock.py* +%{python2_sitelib}/%{vdsm_name}/storage/compat.py* +%{python2_sitelib}/%{vdsm_name}/storage/constants.py* +%{python2_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* +%{python2_sitelib}/%{vdsm_name}/storage/devicemapper.py* +%{python2_sitelib}/%{vdsm_name}/storage/directio.py* +%{python2_sitelib}/%{vdsm_name}/storage/dispatcher.py* +%{python2_sitelib}/%{vdsm_name}/storage/exception.py* +%{python2_sitelib}/%{vdsm_name}/storage/fallocate.py* +%{python2_sitelib}/%{vdsm_name}/storage/fileSD.py* +%{python2_sitelib}/%{vdsm_name}/storage/fileUtils.py* +%{python2_sitelib}/%{vdsm_name}/storage/fileVolume.py* +%{python2_sitelib}/%{vdsm_name}/storage/formatconverter.py* +%{python2_sitelib}/%{vdsm_name}/storage/fuser.py* +%{python2_sitelib}/%{vdsm_name}/storage/fsutils.py* +%{python2_sitelib}/%{vdsm_name}/storage/glusterSD.py* +%{python2_sitelib}/%{vdsm_name}/storage/glusterVolume.py* +%{python2_sitelib}/%{vdsm_name}/storage/guarded.py* +%{python2_sitelib}/%{vdsm_name}/storage/hba.py* +%{python2_sitelib}/%{vdsm_name}/storage/hsm.py* +%{python2_sitelib}/%{vdsm_name}/storage/image.py* +%{python2_sitelib}/%{vdsm_name}/storage/imageSharing.py* +%{python2_sitelib}/%{vdsm_name}/storage/imagetickets.py* +%{python2_sitelib}/%{vdsm_name}/storage/iscsi.py* +%{python2_sitelib}/%{vdsm_name}/storage/iscsiadm.py* +%{python2_sitelib}/%{vdsm_name}/storage/localFsSD.py* +%{python2_sitelib}/%{vdsm_name}/storage/lvm.env +%{python2_sitelib}/%{vdsm_name}/storage/lvm.py* +%{python2_sitelib}/%{vdsm_name}/storage/lvmconf.py* +%{python2_sitelib}/%{vdsm_name}/storage/lvmfilter.py* +%{python2_sitelib}/%{vdsm_name}/storage/mailbox.py* +%{python2_sitelib}/%{vdsm_name}/storage/managedvolume.py* +%{python2_sitelib}/%{vdsm_name}/storage/managedvolumedb.py* +%{python2_sitelib}/%{vdsm_name}/storage/merge.py* +%{python2_sitelib}/%{vdsm_name}/storage/misc.py* +%{python2_sitelib}/%{vdsm_name}/storage/monitor.py* +%{python2_sitelib}/%{vdsm_name}/storage/mount.py* +%{python2_sitelib}/%{vdsm_name}/storage/mpathhealth.py* +%{python2_sitelib}/%{vdsm_name}/storage/multipath.py* +%{python2_sitelib}/%{vdsm_name}/storage/nbd.py* +%{python2_sitelib}/%{vdsm_name}/storage/nfsSD.py* +%{python2_sitelib}/%{vdsm_name}/storage/nos_brick.py* +%{python2_sitelib}/%{vdsm_name}/storage/operation.py* +%{python2_sitelib}/%{vdsm_name}/storage/outOfProcess.py* +%{python2_sitelib}/%{vdsm_name}/storage/persistent.py* +%{python2_sitelib}/%{vdsm_name}/storage/qemuimg.py* +%{python2_sitelib}/%{vdsm_name}/storage/resourceFactories.py* +%{python2_sitelib}/%{vdsm_name}/storage/resourceManager.py* +%{python2_sitelib}/%{vdsm_name}/storage/rwlock.py* +%{python2_sitelib}/%{vdsm_name}/storage/sd.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdc.py* +%{python2_sitelib}/%{vdsm_name}/storage/securable.py* +%{python2_sitelib}/%{vdsm_name}/storage/sp.py* +%{python2_sitelib}/%{vdsm_name}/storage/spbackends.py* +%{python2_sitelib}/%{vdsm_name}/storage/storageServer.py* +%{python2_sitelib}/%{vdsm_name}/storage/sysfs.py* +%{python2_sitelib}/%{vdsm_name}/storage/task.py* +%{python2_sitelib}/%{vdsm_name}/storage/taskManager.py* +%{python2_sitelib}/%{vdsm_name}/storage/threadPool.py* +%{python2_sitelib}/%{vdsm_name}/storage/types.py* +%{python2_sitelib}/%{vdsm_name}/storage/udev.py* +%{python2_sitelib}/%{vdsm_name}/storage/volume.py* +%{python2_sitelib}/%{vdsm_name}/storage/volumemetadata.py* +%{python2_sitelib}/%{vdsm_name}/storage/workarounds.py* +%{python2_sitelib}/%{vdsm_name}/storage/xlease.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/__init__.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/volume_info.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/__init__.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/amend_volume.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/base.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/copy_data.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/merge.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/move_device.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/reduce_domain.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/sparsify_volume.py* +%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/update_volume.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/__init__.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/managedvolume.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/hwinfo.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/mkimage.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/ksm.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/nbd.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/network.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/saslpasswd2.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/systemctl.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/test.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/udev.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_api/virt.py* +%{python2_sitelib}/%{vdsm_name}/protocoldetector.py* +%{python2_sitelib}/%{vdsm_name}/schedule.py* +%{python2_sitelib}/%{vdsm_name}/sslutils.py* +%{python2_sitelib}/%{vdsm_name}/supervdsm_server.py* +%{python2_sitelib}/%{vdsm_name}/taskset.py* +%{python2_sitelib}/%{vdsm_name}/throttledlog.py* +%{python2_sitelib}/%{vdsm_name}/utils.py* +%{python2_sitelib}/%{vdsm_name}/v2v.py* +%{python2_sitelib}/%{vdsm_name}/vdsmd.py* +%{python2_sitelib}/%{vdsm_name}/virtsparsify.py* +%{python2_sitelib}/%{vdsm_name}/virtsysprep.py* +%{python2_sitelib}/%{vdsm_name}/tool/__init__.py* +%{python2_sitelib}/%{vdsm_name}/tool/common.py* +%{python2_sitelib}/%{vdsm_name}/tool/check_volume_leases.py* +%{python2_sitelib}/%{vdsm_name}/tool/config_lvm_filter.py* +%{python2_sitelib}/%{vdsm_name}/tool/configfile.py* +%{python2_sitelib}/%{vdsm_name}/tool/confmeta.py* +%{python2_sitelib}/%{vdsm_name}/tool/confutils.py* +%{python2_sitelib}/%{vdsm_name}/tool/dummybr.py* +%{python2_sitelib}/%{vdsm_name}/tool/nwfilter.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurator.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/__init__* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/abrt.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/bond_defaults.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/lvm.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/managedvolumedb.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* +%{python2_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* +%{python2_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* +%{python2_sitelib}/%{vdsm_name}/tool/network.py* +%{python2_sitelib}/%{vdsm_name}/tool/register.py* +%{python2_sitelib}/%{vdsm_name}/tool/service.py* +%{python2_sitelib}/%{vdsm_name}/tool/transient.py* +%{python2_sitelib}/%{vdsm_name}/tool/upgrade.py* +%{python2_sitelib}/%{vdsm_name}/tool/vdsm-id.py* +%{python2_sitelib}/%{vdsm_name}/tool/xleases.py* +%{python2_sitelib}/%{vdsm_name}/virt/__init__.py* +%{python2_sitelib}/%{vdsm_name}/virt/collectd.py* +%{python2_sitelib}/%{vdsm_name}/virt/displaynetwork.py* +%{python2_sitelib}/%{vdsm_name}/virt/drivemonitor.py* +%{python2_sitelib}/%{vdsm_name}/virt/domain_descriptor.py* +%{python2_sitelib}/%{vdsm_name}/virt/domxml_preprocess.py* +%{python2_sitelib}/%{vdsm_name}/virt/events.py* +%{python2_sitelib}/%{vdsm_name}/virt/guestagent.py* +%{python2_sitelib}/%{vdsm_name}/virt/guestagenthelpers.py* +%{python2_sitelib}/%{vdsm_name}/virt/libvirtnetwork.py* +%{python2_sitelib}/%{vdsm_name}/virt/libvirtxml.py* +%{python2_sitelib}/%{vdsm_name}/virt/metadata.py* +%{python2_sitelib}/%{vdsm_name}/virt/migration.py* +%{python2_sitelib}/%{vdsm_name}/virt/periodic.py* +%{python2_sitelib}/%{vdsm_name}/virt/qemuguestagent.py* +%{python2_sitelib}/%{vdsm_name}/virt/recovery.py* +%{python2_sitelib}/%{vdsm_name}/virt/sampling.py* +%{python2_sitelib}/%{vdsm_name}/virt/saslpasswd2.py* +%{python2_sitelib}/%{vdsm_name}/virt/secret.py* +%{python2_sitelib}/%{vdsm_name}/virt/utils.py* +%{python2_sitelib}/%{vdsm_name}/virt/virdomain.py* +%{python2_sitelib}/%{vdsm_name}/virt/vm.py* +%{python2_sitelib}/%{vdsm_name}/virt/jobs/__init__.py* +%{python2_sitelib}/%{vdsm_name}/virt/jobs/seal.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/__init__.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/common.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/compat.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/core.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/drivename.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/graphics.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/hostdevice.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/hwclass.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/lease.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/lookup.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/network.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/storage.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/storagexml.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmchannels.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmexitreason.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmstats.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmstatus.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmtune.py* +%{python2_sitelib}/%{vdsm_name}/virt/vmxml.py* +%{python2_sitelib}/%{vdsm_name}/virt/xmlconstants.py* %files tests %doc %{_datadir}/%{vdsm_name}/tests/README @@ -1531,46 +1532,46 @@ exit 0 %endif %files http -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/rpc -%{python_sitelib}/%{vdsm_name}/rpc/http.py* +%dir %{python2_sitelib}/%{vdsm_name} +%dir %{python2_sitelib}/%{vdsm_name}/rpc +%{python2_sitelib}/%{vdsm_name}/rpc/http.py* %files client %{_bindir}/vdsm-client -%dir %{python_sitelib}/vdsmclient -%{python_sitelib}/vdsmclient/__init__.py* -%{python_sitelib}/vdsmclient/client.py* -%{python_sitelib}/yajsonrpc/__init__.py* +%dir %{python2_sitelib}/vdsmclient +%{python2_sitelib}/vdsmclient/__init__.py* +%{python2_sitelib}/vdsmclient/client.py* +%{python2_sitelib}/yajsonrpc/__init__.py* %{_mandir}/man1/vdsm-client.1* %files jsonrpc -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/rpc -%{python_sitelib}/%{vdsm_name}/rpc/__init__.py* -%{python_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* -%{python_sitelib}/%{vdsm_name}/rpc/Bridge.py* -%{python_sitelib}/yajsonrpc/__init__.py* -%{python_sitelib}/yajsonrpc/jsonrpcclient.py* +%dir %{python2_sitelib}/%{vdsm_name} +%dir %{python2_sitelib}/%{vdsm_name}/rpc +%{python2_sitelib}/%{vdsm_name}/rpc/__init__.py* +%{python2_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* +%{python2_sitelib}/%{vdsm_name}/rpc/Bridge.py* +%{python2_sitelib}/yajsonrpc/__init__.py* +%{python2_sitelib}/yajsonrpc/jsonrpcclient.py* %files api %doc lib/vdsm/api/vdsm-api.html -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/api -%dir %{python_sitelib}/%{vdsm_name}/rpc -%{python_sitelib}/%{vdsm_name}/api/*.py* -%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api.pickle -%{python_sitelib}/%{vdsm_name}/rpc/vdsm-events.pickle +%dir %{python2_sitelib}/%{vdsm_name} +%dir %{python2_sitelib}/%{vdsm_name}/api +%dir %{python2_sitelib}/%{vdsm_name}/rpc +%{python2_sitelib}/%{vdsm_name}/api/*.py* +%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api.pickle +%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-events.pickle %if ! 0%{?with_gluster_mgmt} -%exclude %{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle +%exclude %{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle %endif %files yajsonrpc -%dir %{python_sitelib}/yajsonrpc -%{python_sitelib}/yajsonrpc/betterAsyncore.py* -%{python_sitelib}/yajsonrpc/exception.py* -%{python_sitelib}/yajsonrpc/stomp.py* -%{python_sitelib}/yajsonrpc/stompclient.py* -%{python_sitelib}/yajsonrpc/stompserver.py* +%dir %{python2_sitelib}/yajsonrpc +%{python2_sitelib}/yajsonrpc/betterAsyncore.py* +%{python2_sitelib}/yajsonrpc/exception.py* +%{python2_sitelib}/yajsonrpc/stomp.py* +%{python2_sitelib}/yajsonrpc/stompclient.py* +%{python2_sitelib}/yajsonrpc/stompserver.py* %files hook-faqemu %license COPYING @@ -1580,21 +1581,21 @@ exit 0 %if 0%{?with_gluster_mgmt} %files gluster %license COPYING -%dir %{python_sitelib}/%{vdsm_name} -%dir %{python_sitelib}/%{vdsm_name}/rpc -%dir %{python_sitelib}/%{vdsm_name}/gluster -%{python_sitelib}/%{vdsm_name}/gluster/api.py* -%{python_sitelib}/%{vdsm_name}/gluster/apiwrapper.py* -%{python_sitelib}/%{vdsm_name}/gluster/events.py* -%{python_sitelib}/%{vdsm_name}/gluster/fstab.py* -%{python_sitelib}/%{vdsm_name}/gluster/fence.py* -%{python_sitelib}/%{vdsm_name}/gluster/gfapi.py* -%{python_sitelib}/%{vdsm_name}/gluster/hooks.py* -%{python_sitelib}/%{vdsm_name}/gluster/services.py* -%{python_sitelib}/%{vdsm_name}/gluster/storagedev.py* -%{python_sitelib}/%{vdsm_name}/gluster/tasks.py* -%{python_sitelib}/%{vdsm_name}/gluster/thinstorage.py* -%{python_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle +%dir %{python2_sitelib}/%{vdsm_name} +%dir %{python2_sitelib}/%{vdsm_name}/rpc +%dir %{python2_sitelib}/%{vdsm_name}/gluster +%{python2_sitelib}/%{vdsm_name}/gluster/api.py* +%{python2_sitelib}/%{vdsm_name}/gluster/apiwrapper.py* +%{python2_sitelib}/%{vdsm_name}/gluster/events.py* +%{python2_sitelib}/%{vdsm_name}/gluster/fstab.py* +%{python2_sitelib}/%{vdsm_name}/gluster/fence.py* +%{python2_sitelib}/%{vdsm_name}/gluster/gfapi.py* +%{python2_sitelib}/%{vdsm_name}/gluster/hooks.py* +%{python2_sitelib}/%{vdsm_name}/gluster/services.py* +%{python2_sitelib}/%{vdsm_name}/gluster/storagedev.py* +%{python2_sitelib}/%{vdsm_name}/gluster/tasks.py* +%{python2_sitelib}/%{vdsm_name}/gluster/thinstorage.py* +%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle %endif %changelog From 30079500a20f7dae72c7339b9cbc2298a9874f93 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 02:53:48 +0000 Subject: [PATCH 125/126] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vdsm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdsm.spec b/vdsm.spec index 01a01f2..2f78d5a 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -51,7 +51,7 @@ Name: %{vdsm_name} Version: 4.30.17 -Release: 1.git114b4b7%{?dist}%{?extra_release} +Release: 2.git114b4b7%{?dist}%{?extra_release} Summary: Virtual Desktop Server Manager Group: Applications/System @@ -1599,6 +1599,9 @@ exit 0 %endif %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 4.30.17-2.git114b4b7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 4.18.999-449.git0bb7717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 6f1df621f648aa3b65edfcf3389649a6d13df5d4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Aug 2019 16:48:01 +0000 Subject: [PATCH 126/126] vdsm fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1676186 --- .gitignore | 3 - dead.package | 1 + fix-unversioned-python-shebangs.patch | 67 - sources | 1 - vdsm.spec | 1647 ------------------------- 5 files changed, 1 insertion(+), 1718 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 fix-unversioned-python-shebangs.patch delete mode 100644 sources delete mode 100644 vdsm.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 94eb06d..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/vdsm-4.18.9.tar.gz -/vdsm-4.18.999.tar.gz -/vdsm-4.30.17.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..9273e84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +vdsm fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1676186 diff --git a/fix-unversioned-python-shebangs.patch b/fix-unversioned-python-shebangs.patch deleted file mode 100644 index 645c653..0000000 --- a/fix-unversioned-python-shebangs.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 7e70f8c91bace85f2b52ec207597414d37073abf Mon Sep 17 00:00:00 2001 -From: Marcin Sobczyk -Date: Wed, 12 Jun 2019 12:42:56 +0200 -Subject: [PATCH] fix unversioned python shebangs - -Change-Id: I52fc2a17a791ac9e60f6d886c6342f3dd5bdea08 ---- - contrib/repostat | 2 +- - tests/profile | 2 +- - tests/profile-analyze | 2 +- - vdsm_hooks/fileinject/before_vm_start.py | 2 +- - vdsm_hooks/macspoof/macspoof_vnic.py | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/contrib/repostat b/contrib/repostat -index 8a859f512..2f433c25d 100755 ---- a/contrib/repostat -+++ b/contrib/repostat -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - # - # Copyright 2015-2018 Red Hat, Inc. - # -diff --git a/tests/profile b/tests/profile -index c50a5395c..f2e556ce1 100755 ---- a/tests/profile -+++ b/tests/profile -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - """ - Log resource usage info. - -diff --git a/tests/profile-analyze b/tests/profile-analyze -index 63370c953..a97815968 100755 ---- a/tests/profile-analyze -+++ b/tests/profile-analyze -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - """ - Analyze commands profiled using profile tool. - """ -diff --git a/vdsm_hooks/fileinject/before_vm_start.py b/vdsm_hooks/fileinject/before_vm_start.py -index 5763b488d..5be2a7cca 100755 ---- a/vdsm_hooks/fileinject/before_vm_start.py -+++ b/vdsm_hooks/fileinject/before_vm_start.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - - import os - import sys -diff --git a/vdsm_hooks/macspoof/macspoof_vnic.py b/vdsm_hooks/macspoof/macspoof_vnic.py -index 484024403..329d772f6 100755 ---- a/vdsm_hooks/macspoof/macspoof_vnic.py -+++ b/vdsm_hooks/macspoof/macspoof_vnic.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - """ - Removes spoofing filtering, applied on a per vnic basis, - it gets triggered and used by two different events: --- -2.20.1 - diff --git a/sources b/sources deleted file mode 100644 index f0fd516..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (vdsm-4.30.17.tar.gz) = 1f06c1b99facc9e0f89b35ad9ffa5eaeee39bed5c445afe544ad9df1403c7a564c2d399f8d9385924e1358da36ea9141f10fbcc352d86004367a0799dc095934 diff --git a/vdsm.spec b/vdsm.spec deleted file mode 100644 index 2f78d5a..0000000 --- a/vdsm.spec +++ /dev/null @@ -1,1647 +0,0 @@ -# Packages names -%global vdsm_name vdsm - -# Required users and groups -%global vdsm_user vdsm -%global vdsm_group kvm -%global qemu_user qemu -%global qemu_group qemu -%global snlk_group sanlock -%global snlk_user sanlock -%global cdrom_group cdrom -# Not configurable because owned by ovirt-vmconsole package -%global vmcon_user ovirt-vmconsole -%global vmcon_group ovirt-vmconsole - -# Features -%global with_ovirt_imageio 0 -%global with_ovirt_vmconsole 0 -%global with_gluster_mgmt 0 -%global with_hooks 1 -%global with_vhostmd 1 -%global with_python3 0 - -%ifarch ppc64le -%global with_openvswitch 0 -%else -%global with_openvswitch 1 -%endif - -%if 0%{?centos} || 0%{?fedora} -%global gluster_version 3.12 -%else #rhel -%global gluster_version 3.8 -%endif - -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%global enable_autotools 0} - -# Required paths -%if 0%{?fedora} -%global _polkitdir %{_datadir}/polkit-1/rules.d -%else -%global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d -%endif -%global _vdsm_log_dir %{_localstatedir}/log/%{vdsm_name} - -# Disable debuginfo package, since vdsm is a meta-package -%global debug_package %{nil} - -Name: %{vdsm_name} -Version: 4.30.17 -Release: 2.git114b4b7%{?dist}%{?extra_release} -Summary: Virtual Desktop Server Manager - -Group: Applications/System -License: GPLv2+ -Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ -Source0: %{vdsm_name}-%{version}.tar.gz - -ExclusiveArch: x86_64 %{power64} aarch64 -Patch0: fix-unversioned-python-shebangs.patch - -%{!?_licensedir:%global license %%doc} - -BuildRequires: openssl -BuildRequires: python -BuildRequires: python-six >= 1.9.0 -BuildRequires: python-dateutil -BuildRequires: python-subprocess32 -BuildRequires: python2-devel -BuildRequires: rpm-build -BuildRequires: systemd-units - -# Autotools BuildRequires -%if 0%{?enable_autotools} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -BuildRequires: util-linux -%endif - -%if 0%{?rhel} -BuildRequires: python-enum34 -%endif - -%if 0%{?fedora} -BuildRequires: python2-enum34 -%endif - -# Numactl is not available on s390[x] and ARM -%ifnarch s390 s390x %{arm} -Requires: numactl -%endif - -%ifarch x86_64 -Requires: python-dmidecode -Requires: dmidecode -Requires: virt-v2v -%endif - -Requires: chrony -Requires: which -Requires: sudo >= 1.7.3 -Requires: logrotate -Requires: lshw -Requires: xz -Requires: python-netaddr -# Requires lstat() support, see https://bugzilla.redhat.com/1560460 -Requires: python2-ioprocess >= 1.1.1 -Requires: python-pthreading >= 0.1.3-3 -Requires: python-six >= 1.9.0 -Requires: python-requests -Requires: rpm-python -Requires: abrt-cli -Requires: abrt-addon-vmcore -Requires: abrt-addon-ccpp -Requires: abrt-addon-python -Requires: curl -Requires: %{name}-http = %{version}-%{release} -Requires: %{name}-jsonrpc = %{version}-%{release} -Requires: safelease >= 1.0-7 -Requires: mom >= 0.5.12 -Requires: util-linux -Requires(pre): shadow-utils - -Obsoletes: %{name}-infra < 4.19 - -%if 0%{?rhel} -# Required for supporting minorversion mount option -# See https://bugzilla.redhat.com/1547681 for details. -Requires: nfs-utils >= 1.3.0-0.48.el7_4.2 -%else # fedora -Requires: nfs-utils -%endif - -%if 0%{?with_ovirt_imageio} -Requires: ovirt-imageio-common -# For GET /tickets/* -Requires: ovirt-imageio-daemon >= 1.2.0 -%endif - -%if 0%{?with_ovirt_vmconsole} -Requires: ovirt-vmconsole >= 1.0.0-0 -%endif - -# Python -# For https://bugzilla.redhat.com/1518676 -%if 0%{?rhel} -Requires: python >= 2.7.5-65.el7 -%else -Requires: python >= 2.7.14-4 -%endif - -Requires: libvirt-client -Requires: libvirt-daemon-config-nwfilter -Requires: libvirt-lock-sanlock - -%if 0%{?rhel} -# 7.6 baseline -Requires: libvirt-python >= 4.5.0-1.el7 -# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 -Requires: libvirt-daemon-kvm >= 4.5.0-10.el7_6.9 -%else # fedora -# Required for preventing an HotPlug disk failure due to cgroups. -# See https://bugzilla.redhat.com/1540872 for details. -Requires: libvirt-python >= 3.7.0 -# Required to fix order of VM life cycle events. -# See https://bugzilla.redhat.com/1612943 for details. -%ifnarch s390 s390x -# virt-preview is not available for s390 -Requires: libvirt-daemon-kvm >= 4.9.0-1 -%else -Requires: libvirt-daemon-kvm -%endif -%endif - -# iscsi-intiator versions -Requires: iscsi-initiator-utils >= 6.2.0.873-21 - -Requires: sanlock >= 3.5.0-1, sanlock-python - -# device-mapper-multipath - -%if 0%{?rhel} -# Required for blacklisting multipath devices by protocol. -# See https://bugzilla.redhat.com/1016535 for more details. -Requires: device-mapper-multipath >= 0.4.9-119.el7_5.1 -%endif #rhel - -%if 0%{?fedora} -Requires: device-mapper-multipath >= 0.7.4-3 -%endif - -# augeas - -%if 0%{?rhel} -Requires: python-augeas -%endif - -%if 0%{?fedora} -Requires: python2-augeas -%endif - -Requires: policycoreutils-python -Requires: fence-agents-all -Requires: systemd >= 219-11 -Requires: initscripts >= 9.49.31 -Requires: cyrus-sasl-scram -%if 0%{?fedora} -# Required for solving bug 1575762 -Requires: lvm2 >= 2.02.177-5 -%else -Requires: lvm2 >= 2.02.145 -%endif - -%if 0%{?rhel} -# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 -Requires: kernel >= 3.10.0-957.12.2.el7 -Requires: e2fsprogs -Requires: selinux-policy-targeted >= 3.13.1-166.el7_4.3 -%else # fedora -# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 -Requires: kernel >= 5.0.16-100 -Requires: e2fsprogs >= 1.41.14 -Requires: policycoreutils-python-utils -Requires: sed >= 4.2.1-10 -Requires: ed -Requires: selinux-policy-targeted >= 3.13-1 -# In order to avoid a policycoreutils bug (rhbz 889698) when selinux is -# disabled we now require the version 2.1.13-55 (or newer) of Fedora. -Requires: policycoreutils >= 2.1.13-55 -%endif - -%if 0%{?rhel} -# CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 -Requires: qemu-kvm-rhev >= 10:2.12.0-18.el7_6.5 -%else # fedora -# qemu-kvm 2.12 is Fedora 28 virt-preview baseline -# but virt-preview is not available on s390 arch -%ifnarch s390 s390x -Requires: qemu-kvm >= 2:2.12 -%else -Requires: qemu-kvm >= 2:2.11.2 -%endif -%endif - -# GlusterFS client-side RPMs needed for Gluster SD -%ifnarch ppc64le -Requires: glusterfs-cli >= %{gluster_version} -Requires: glusterfs-fuse >= %{gluster_version} -%endif - -Requires: psmisc >= 22.6-15 -Requires: sos -Requires: tree -Requires: dosfstools -Requires: genisoimage -Requires: libselinux-python >= 2.5-2 -Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-hook-vmfex-dev = %{version}-%{release} -Requires: libguestfs-tools-c - -Requires(post): /usr/sbin/saslpasswd2 - -%if 0%{?fedora} -Requires(post): hostname -%else -Requires(post): /bin/hostname -%endif - -# SecureBoot & q35, supported by x86_64 and aarch64; no ppc64le support at -# the moment. -%ifarch x86_64 %{arm} -%if 0%{?rhel} -Requires: OVMF -%else # fedora -Requires: edk2-ovmf -%endif -%endif - -Requires: python-pyudev - -Conflicts: vdsm-hook-sriov -Obsoletes: vdsm-hook-vfio-mdev -Provides: vdsm-hook-vfio-mdev - -%description -The VDSM service is required by a Virtualization Manager to manage the -Linux hosts. VDSM manages and monitors the host's storage, memory and -networks as well as virtual machine creation, other host administration -tasks, statistics gathering, and log collection. - -%package http -Summary: VDSM http API -BuildArch: noarch -Provides: %{name}-xmlrpc = %{version}-%{release} -Requires: %{name}-python = %{version}-%{release} -Obsoletes: %{name}-xmlrpc < %{version}-%{release} - -%description http -A http interface for interacting with vdsmd when using OVF store image -download or upload. - -%package client -Summary: VDSM client -BuildArch: noarch -# A hack for unbreaking external packages that expect vdsm-cli. -Provides: %{name}-cli = %{version}-%{release} -Requires: %{name}-api = %{version}-%{release} -Requires: %{name}-yajsonrpc = %{version}-%{release} -Requires: %{name}-python = %{version}-%{release} -Obsoletes: %{name}-cli < %{version}-%{release} - -%description client -Access vdsm API from the command line. - -%package api -Summary: VDSM API -BuildArch: noarch -BuildRequires: PyYAML - -%description api -Contains api schema files - -%package jsonrpc -Summary: VDSM API Server -BuildArch: noarch -Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-api = %{version}-%{release} -Requires: %{name}-yajsonrpc = %{version}-%{release} -Obsoletes: %{name}-api < 4.16 - -%description jsonrpc -A Json-based RPC interface that serves as the protocol for libvdsm. - -%package yajsonrpc -Summary: JSON RPC server and client implementation -BuildArch: noarch -Requires: python >= 2.6 - -%description yajsonrpc -A JSON RPC server and client implementation. - -%package common -Summary: common VDSM python libraries, required by all subsystems -BuildArch: noarch -Requires: systemd -Requires: glibc -Requires: python-dateutil -Requires: python-six >= 1.9.0 -Requires: python-subprocess32 -%if 0%{?rhel} -Requires: python-decorator -Requires: python-enum34 -Requires: libvirt-python >= 3.2.0-3.el7_4.1 -%endif -%if 0%{?fedora} -Requires: python2-decorator -Requires: python2-enum34 -Requires: libvirt-python >= 3.7.0 -%endif - -%description common -VDSM libraries that are imported by all subsystems - -%package network -Summary: VDSM network python libraries -Requires: NetworkManager-config-server -Requires: dbus-python -Requires: dhclient -Requires: ethtool -Requires: initscripts -Requires: iproute -%if 0%{?fedora} >= 25 -Requires: iproute-tc -%endif -Requires: libnl3 -Requires: libselinux-python -Requires: lldpad -%if 0%{?with_openvswitch} -Requires: openvswitch >= 2.7.0 -%endif -Requires: python-inotify -Requires: python-ipaddress -Requires: python-netaddr -Requires: python-six -Requires: systemd -Requires: %{name}-common = %{version}-%{release} - -%description network -VDSM network python libraries - -%package python -Summary: VDSM python libraries -Requires: %{name}-api = %{version}-%{release} -BuildArch: noarch -Requires: python-ioprocess >= 0.16.1-1 -Requires: %{name}-common = %{version}-%{release} -Requires: %{name}-network = %{version}-%{release} - -%description python -Shared libraries between the various VDSM packages. - -%post python -# REQUIRED_FOR: Upgrade from 4.14 to 4.17 -# HACK: Remove vdsm python lib __init__ file if installed on old location -# https://bugzilla.redhat.com/show_bug.cgi?id=1279167 -if [ "$1" -ge 2 ]; then - if [ -d "%{python2_sitearch}/%{vdsm_name}" ]; then - logger -t '%{vdsm_name}' \ - 'Disabling old vdsm package in %{python2_sitearch}/%{vdsm_name}.' \ - 'Removing %{python2_sitearch}/%{vdsm_name}/init.py*' - rm -f %{python2_sitearch}/%{vdsm_name}/__init__.py* - fi -fi - -%package tests -Summary: VDSM Test Suite -BuildArch: noarch -Requires: %{name} = %{version}-%{release} -Requires: %{name}-common = %{version}-%{release} -Requires: %{name}-network = %{version}-%{release} -Requires: dracut -Requires: python-nose python-ipaddress -Requires: PyYAML - -%description tests -A test suite for verifying the functionality of a running vdsm instance - -%package hook-allocate_net -Summary: random_network allocation hook for VDSM -BuildArch: noarch -Requires: %{name} - -%description hook-allocate_net -VDSM hook used to allocate networks for vms in a random fashion - -%package hook-boot_hostdev -Summary: allows setting boot order for hostdev -BuildArch: noarch -Requires: %{name} - -%description hook-boot_hostdev -VDSM hook used to boot vms from passthrough devices via custom property - -%package hook-checkimages -Summary: Qcow2 disk image format check hook for VDSM -BuildArch: noarch -Requires: %{name} - -%description hook-checkimages -VDSM hook used to perform consistency check on a qcow2 format disk image -using the QEMU disk image utility. - -%package hook-checkips -Summary: Check connectivity from the host to designated IPs -Requires: %{name} = %{version}-%{release} - -%description hook-checkips -VDSM hook used to check connectivity from the host network to designated IPs - -%post hook-checkips -%systemd_post vdsm-checkips.service - -%preun hook-checkips -%systemd_preun vdsm-checkips.service - -%package hook-diskunmap -Summary: Activate UNMAP for disk/lun devices -BuildArch: noarch -Requires: qemu-kvm >= 1.5 - -%description hook-diskunmap -VDSM hooks which allow to activate disk UNMAP. - -%package hook-ethtool-options -Summary: Allow setting custom ethtool options for vdsm controlled nics -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description hook-ethtool-options -VDSM hook used for applying custom network properties that define ethtool -options for vdsm network nics - -%package hook-extra-ipv4-addrs -Summary: Set extra ipv4 addresses for vdsm networks. - -%description hook-extra-ipv4-addrs -This hook allows the user to set extra ipv4 -addresses for vdsm networks. - -%if 0%{?with_vhostmd} -%package hook-vhostmd -Summary: VDSM hook set for interaction with vhostmd -BuildArch: noarch -Requires: vhostmd - -%description hook-vhostmd -VDSM hook to use vhostmd per VM according to Virtualization Manager requests. -%endif - -%package hook-faqemu -Summary: Fake qemu process for VDSM quality assurance -BuildArch: noarch -Requires: %{name} - -%description hook-faqemu -VDSM hook used for testing VDSM with multiple fake virtual machines without -running real guests. -To enable this hook on your host, set vars.fake_kvm_support=True in your -/etc/vdsm/vdsm.conf before adding the host to ovirt-Engine. - -%package hook-localdisk -Summary: Use a local image instead of a shared storage image -BuildArch: noarch -Requires: %{name} == %{version} - -%description hook-localdisk -This hook adds the ability to use fast local storage instead of shared -storage, while using shared storage for managing VM templates. -To enable this hook, the VM should have a custom property of 'localdisk=lvm'. -The system administrator will be responsible for creating the host "ovirt-local" -volume group and extending it with new devices if needed. -The VM must be pinned to the host. - -%package hook-macbind -Summary: Bind a vNIC to a Bridge -BuildArch: noarch -Requires: %{name} >= 4.14 - -%description hook-macbind -VDSM hooks which allow to bind a vNIC to a Bridge, managed or not by engine. - -%package hook-macspoof -Summary: Disables MAC spoofing filtering -BuildArch: noarch - -%description hook-macspoof -VDSM hooks which allow to disable mac spoof filtering -either on all the of the VM's interfaces or on -specific vnics. - -%package hook-extnet -Summary: Force a vNIC to connect to a specific libvirt network -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description hook-extnet -VDSM hook which allows to connect a vNIC to a libvirt network that is managed -outside of oVirt, such as an openvswitch network. - -%package hook-fakevmstats -Summary: Generate random VM statistics -BuildArch: noarch -Requires: %{name} - -%description hook-fakevmstats -Hook intercepts VM's stats and randomizes various fields. -To enable this hook on your host, set vars.fake_vmstats_enable=true in your -/etc/vdsm/vdsm.conf. - -%package hook-fileinject -Summary: Allow uploading file to VMs disk -BuildArch: noarch -Requires: python-libguestfs - -%description hook-fileinject -Hook is getting target file name and its content and -create that file in target machine. - -%package hook-floppy -Summary: Allow adding floppy to VM -BuildArch: noarch - -%description hook-floppy -Allow adding floppy to VM - -%package hook-httpsisoboot -Summary: Allow directly booting from an https available ISO -BuildArch: noarch -%if 0%{?rhel} -Requires: qemu-kvm-rhev >= 10:2.1.2-3 -%endif - -%description hook-httpsisoboot -Let the VM boot from an ISO image made available via an https URL without -the need to import the ISO into an ISO storage domain. -It doesn't support plain http. - -%package hook-nestedvt -Summary: Nested Virtualization support for VDSM -BuildArch: noarch - -%description hook-nestedvt -If the nested virtualization is enabled in your kvm module -this hook will expose it to the guests. - -%package hook-numa -Summary: NUMA support for VDSM -BuildArch: noarch - -%description hook-numa -Hooks is getting number/rage of NUMA nodes and NUMA mode, -and update the VM xml. - -%package hook-openstacknet -Summary: OpenStack Network vNICs support for VDSM -BuildArch: noarch - -%description hook-openstacknet -Hook for OpenStack Network vNICs. - -%package hook-pincpu -Summary: Hook pin VM so specific CPUs -BuildArch: noarch - -%description hook-pincpu -pincpu is hook for VDSM. -pincpu enable to pin virtual machine to a specific CPUs. - -%package hook-promisc -Summary: Network interface promiscuous mode support for VDSM -BuildArch: noarch - -%description hook-promisc -VDSM promiscuous mode let user define a VM interface that will capture -all network traffic. - -%package hook-qemucmdline -Summary: QEMU cmdline hook for VDSM -BuildArch: noarch -Requires: %{name} - -%description hook-qemucmdline -Provides support for injecting QEMU cmdline via VDSM hook. -It exploits libvirt's qemu:commandline facility available in the -qemu xml namespace. - -%package hook-scratchpad -Summary: One time disk creation for VDSM -BuildArch: noarch - -%description hook-scratchpad -scratchpad hook for VDSM -Hook creates a disk for a VM onetime usage, -the disk will be erased when the VM destroyed. -VM cannot be migrated when using scratchpad hook - -%package hook-smbios -Summary: Adding custom smbios entries to libvirt domain via VDSM -BuildArch: noarch - -%description hook-smbios -Adding custom smbios entries to libvirt domain via VDSM -such as: vendor, version, date and release - -%package hook-spiceoptions -Summary: To configure spice options for vm -BuildArch: noarch - -%description hook-spiceoptions -This vdsm hook can be used to configure some of -the spice optimization attributes and values.. - -%package hook-vmfex-dev -Summary: VM-FEX vNIC support for VDSM -BuildArch: noarch -Requires: %{name} = %{version}-%{release} -Conflicts: hook-vmfex - -%description hook-vmfex-dev -Allows to use custom device properties to connect a guest vNIC to a host -VM-FEX Virtual Function (SR-IOV with macvtap mode). - -%package hook-vmdisk -Summary: External disk support for VDSM -BuildArch: noarch - -%description hook-vmdisk -Hook adds additional disk image for a VM (raw or qcow2) - -%package hook-fcoe -Summary: Hook to enable FCoE support -BuildArch: noarch -Requires: %{name} = %{version}-%{release} -Requires: fcoe-utils - -%description hook-fcoe -VDSM hook used for configure specified NICs as FCoE interface through custom -network properties - -%post hook-fcoe -%systemd_post lldpad.service -%systemd_post fcoe.service - -%package hook-cpuflags -Summary: Hook that modifies guest's CPU flags -BuildArch: noarch - -%description hook-cpuflags -Hook that modifies guest's CPU flags using custom properties. - -%if 0%{?with_gluster_mgmt} -%package gluster -Summary: Gluster Plugin for VDSM -Requires: %{name} = %{version}-%{release} -Requires: glusterfs-server >= %{gluster_version} -Requires: glusterfs-api >= %{gluster_version} -Requires: glusterfs-geo-replication >= %{gluster_version} -Requires: glusterfs-events >= %{gluster_version} -Requires: python-magic -Requires: PyYAML -%if 0%{?fedora} -Requires: python-blivet1 >= 1.20.4-1 -%else -Requires: python-blivet -%endif -Requires: xfsprogs -%ifarch x86_64 -Requires: vdo -Requires: kmod-kvdo -%endif - - -%description gluster -Gluster plugin enables VDSM to serve Gluster functionalities. -%endif - -%prep -%setup -q - -%patch0 -p1 - -%build -%if 0%{?enable_autotools} -autoreconf -if -%endif - -%configure \ - --with-data-center=/rhev/data-center \ -%if 0%{?with_hooks} - --enable-hooks \ -%endif -%if ! 0%{?with_gluster_mgmt} - --disable-gluster-mgmt \ -%endif -%if ! 0%{?with_python3} - --disable-python3 \ -%endif - --with-smbios-manufacturer='oVirt' \ - --with-smbios-osname='oVirt Node' \ - --with-polkitdir=/usr/share/polkit-1/rules.d \ -%if ! 0%{?with_ovirt_imageio} - --disable-ovirt-imageio \ -%endif -%if ! 0%{?with_openvswitch} - --disable-openvswitch \ -%endif -%if 0%{?with_ovirt_vmconsole} - --with-ovirt-vmconsole-user=%{vmcon_user} \ - --with-ovirt-vmconsole-group=%{vmcon_group} \ -%else - --with-ovirt-vmconsole-user='vdsm' \ - --with-ovirt-vmconsole-group='kvm' \ -%endif - -make - -%install -make DESTDIR=%{buildroot} install - -%pre -# Force standard locale behavior (English) -export LC_ALL=C - -/usr/bin/getent passwd %{vdsm_user} >/dev/null || \ - /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \ - -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user} -/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user} -/usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user} - -# We keep the previous rpm version number in a file for managing upgrade flow -if [ "$1" -gt 1 ]; then - rpm -q %{vdsm_name} > "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" - # Both vdsm and supervdsm should be managed here and must be restarted if - # ran before the upgrade - if /bin/systemctl status vdsmd >/dev/null 2>&1; then - /usr/bin/touch "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" - fi - if /bin/systemctl status supervdsmd >/dev/null 2>&1; then - /usr/bin/touch "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" - fi - -fi - -%post -# After vdsm install we should create the logs files. -# In the install session we create it but since we use -# the ghost macro (in files session) the files are not included -touch %{_vdsm_log_dir}/{mom.log,supervdsm.log,vdsm.log} -chmod 0644 %{_vdsm_log_dir}/{mom.log,supervdsm.log,vdsm.log} -chown vdsm:kvm %{_vdsm_log_dir}/{mom.log,vdsm.log} -chown root:root %{_vdsm_log_dir}/supervdsm.log - -systemd-tmpfiles --create %{vdsm_name}.conf - -# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf. -# So Remove them if it is played with /etc/sysctl.conf. -if grep -q "# VDSM section begin" /etc/sysctl.conf; then - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ - /etc/sysctl.conf -fi - -# VDSM installs vdsm-modules-load.d.conf file - the following command will -# refresh vdsm kernel modules requirements to start on boot -/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || : - -# The following triggers vdsmd.preset file and enables vdsm required services -%systemd_post dev-hugepages1G.mount -%systemd_post vdsmd.service -%systemd_post supervdsmd.service -%systemd_post vdsm-network.service -%systemd_post vdsm-network-init.service -%systemd_post mom-vdsm.service -%systemd_post ksmtuned.service - -# VDSM installs unit files - daemon-reload will refresh systemd -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -exit 0 - -%preun -if [ "$1" -eq 0 ]; then - %{_bindir}/vdsm-tool remove-config -fi -%systemd_preun dev-hugepages1G.mount -%systemd_preun vdsmd.service -%systemd_preun vdsm-network.service -%systemd_preun vdsm-network-init.service -%systemd_preun supervdsmd.service -%systemd_preun mom-vdsm.service -%systemd_preun ksmtuned.service -exit 0 - -%posttrans -if [ -f "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" ]; then - # removing temporary files at first to avoid leaving upgrade leftovers - /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" - if [ -f "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" ]; then - vdsmd_start_required='yes' - /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" - /bin/systemctl stop vdsmd >/dev/null 2>&1 || : - fi - - if [ -f "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" ]; then - supervdsmd_start_required='yes' - /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" - /bin/systemctl stop supervdsmd >/dev/null 2>&1 || : - fi - - if /bin/systemctl status vdsm-network >/dev/null 2>&1; then - /bin/systemctl stop vdsm-network >/dev/null 2>&1 || : - fi - - if ! %{_bindir}/vdsm-tool is-configured >/dev/null 2>&1; then - %{_bindir}/vdsm-tool configure --force >/dev/null 2>&1 - fi - - if [ "${supervdsmd_start_required}" = 'yes' ]; then - /bin/systemctl start supervdsmd >/dev/null 2>&1 || : - fi - if [ "${vdsmd_start_required}" = 'yes' ]; then - /bin/systemctl start vdsmd >/dev/null 2>&1 || : - fi -fi -exit 0 - -%files -%doc README.md -%doc lib/vdsm/vdsm.conf.sample -%doc README.logging -%license COPYING -%{_presetdir}/85-vdsmd.preset -%{_unitdir}/dev-hugepages1G.mount -%{_unitdir}/vdsmd.service -%{_unitdir}/vdsm-network.service -%{_unitdir}/vdsm-network-init.service -%{_unitdir}/supervdsmd.service -%{_unitdir}/mom-vdsm.service -%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf - -%dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{_vdsm_log_dir}/mom.log -%ghost %config %attr(0644, root, root) %{_vdsm_log_dir}/supervdsm.log -%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{_vdsm_log_dir}/vdsm.log -%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks -%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt -%dir %{_libexecdir}/%{vdsm_name} -%dir %{_sysconfdir}/%{vdsm_name}/vdsm.conf.d -%dir %{_sysconfdir}/modprobe.d/ -%dir %{_sysconfdir}/NetworkManager -%dir %{_sysconfdir}/NetworkManager/conf.d -%dir %{_sysconfdir}/%{vdsm_name} -%dir %{_sysconfdir}/%{vdsm_name}/mom.d -%dir %{_datadir}/%{vdsm_name} -%{_datadir}/%{vdsm_name}/daemonAdapter -%{_datadir}/%{vdsm_name}/sitecustomize.py* -%{_datadir}/%{vdsm_name}/supervdsmd -%{_datadir}/%{vdsm_name}/vdsmd - -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm -%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf -%config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf -%{_tmpfilesdir}/%{vdsm_name}.conf -%{_sysconfdir}/dhcp/dhclient.d/dhclientmon.sh -%{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf -%{_sysconfdir}/NetworkManager/conf.d/vdsm.conf -%{_sysconfdir}/sudoers.d/50_vdsm -%{_sysconfdir}/cron.hourly/vdsm-logrotate -%{_sysconfdir}/libvirt/hooks/qemu -%{_libexecdir}/%{vdsm_name}/curl-img-wrap -%{_libexecdir}/%{vdsm_name}/fc-scan -%{_libexecdir}/%{vdsm_name}/managedvolume-helper -%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh -%{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh -%{_libexecdir}/%{vdsm_name}/vm_libvirt_hook.py* -%{_libexecdir}/%{vdsm_name}/kvm2ovirt -%{_libexecdir}/%{vdsm_name}/fallocate -%{_libexecdir}/%{vdsm_name}/wait_for_ipv4s -%{_libexecdir}/%{vdsm_name}/spmprotect.sh -%{_libexecdir}/%{vdsm_name}/spmstop.sh -%dir %{_libexecdir}/%{vdsm_name}/hooks -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_cont -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_pause -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_pause -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_hibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_hibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_dehibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_update_device -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_update_device_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_prepare -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_disk_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotunplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup_fail -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_memory_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_memory_hotplug -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_all_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_caps -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_get_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_hostdev_list_by_caps -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_ifcfg_write -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_ifcfg_write - -%{_libexecdir}/%{vdsm_name}/get-conf-item -%{python2_sitelib}/sos/plugins/vdsm.py* -%{_udevrulesdir}/12-vdsm-lvm.rules -/etc/security/limits.d/99-vdsm.conf -%{_mandir}/man8/vdsmd.8* -%{_polkitdir}/10-vdsm-libvirt-access.rules - -%defattr(-, %{vdsm_user}, %{qemu_group}, -) -%dir %{_localstatedir}/lib/libvirt/qemu/channels - -%defattr(-, %{vdsm_user}, %{vdsm_group}, -) -%dir %{_sysconfdir}/pki/%{vdsm_name} -%dir %{_sysconfdir}/pki/%{vdsm_name}/keys -%dir %{_sysconfdir}/pki/%{vdsm_name}/certs -%dir %{_sysconfdir}/pki/%{vdsm_name}/libvirt-spice -%config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password -%dir %{_localstatedir}/lib/%{vdsm_name} -%dir %{_localstatedir}/lib/%{vdsm_name}/netconfback -%dir %{_localstatedir}/lib/%{vdsm_name}/persistence -%dir %{_localstatedir}/lib/%{vdsm_name}/staging -%dir %{_localstatedir}/lib/%{vdsm_name}/storage -%dir %{_localstatedir}/lib/%{vdsm_name}/upgrade -%dir %{_localstatedir}/log/%{vdsm_name} -%dir %{_localstatedir}/log/%{vdsm_name}/backup -%dir %{_localstatedir}/log/%{vdsm_name}/import -%defattr(644, %{vdsm_user}, %{vdsm_group}, -) -%{_datadir}/%{vdsm_name}/lvmlocal.conf -%{_datadir}/%{vdsm_name}/autounattend/Win7.xml -%{_datadir}/%{vdsm_name}/autounattend/Win8.xml -%{_datadir}/%{vdsm_name}/autounattend/Win8.1.xml -%{_datadir}/%{vdsm_name}/autounattend/Win10.xml -%{_datadir}/%{vdsm_name}/autounattend/Win2008.xml -%{_datadir}/%{vdsm_name}/autounattend/Win2008R2.xml -%{_datadir}/%{vdsm_name}/autounattend/Win2012.xml -%{_datadir}/%{vdsm_name}/autounattend/Win2012R2.xml -%{_datadir}/%{vdsm_name}/autounattend/Win2016.xml - -%{_sysconfdir}/yum/pluginconf.d/vdsmupgrade.conf -%{_datadir}/yum-plugins/*.py* - -%files common -%dir %{python2_sitelib}/%{vdsm_name} -%dir %{python2_sitelib}/%{vdsm_name}/common -%dir %{python2_sitelib}/%{vdsm_name}/common/network -%{python2_sitelib}/%{vdsm_name}/__init__.py* -%{python2_sitelib}/%{vdsm_name}/common/*.py* -%{python2_sitelib}/%{vdsm_name}/common/network/*.py* - -%files network -%dir %{python2_sitelib}/%{vdsm_name}/network -%dir %{python2_sitelib}/%{vdsm_name}/network/configurators -%dir %{python2_sitelib}/%{vdsm_name}/network/ip -%dir %{python2_sitelib}/%{vdsm_name}/network/ip/address -%dir %{python2_sitelib}/%{vdsm_name}/network/ip/route -%dir %{python2_sitelib}/%{vdsm_name}/network/ip/rule -%dir %{python2_sitelib}/%{vdsm_name}/network/link -%dir %{python2_sitelib}/%{vdsm_name}/network/link/bond -%dir %{python2_sitelib}/%{vdsm_name}/network/lldp -%dir %{python2_sitelib}/%{vdsm_name}/network/lldpad -%dir %{python2_sitelib}/%{vdsm_name}/network/netinfo -%dir %{python2_sitelib}/%{vdsm_name}/network/netlink -%dir %{python2_sitelib}/%{vdsm_name}/network/netswitch -%dir %{python2_sitelib}/%{vdsm_name}/network/nm -%dir %{python2_sitelib}/%{vdsm_name}/network/nm/nmdbus -%dir %{python2_sitelib}/%{vdsm_name}/network/ovs -%dir %{python2_sitelib}/%{vdsm_name}/network/ovs/driver -%dir %{python2_sitelib}/%{vdsm_name}/network/tc -%{python2_sitelib}/%{vdsm_name}/network/*.py* -%{python2_sitelib}/%{vdsm_name}/network/*/*.py* -%{python2_sitelib}/%{vdsm_name}/network/*/*/*.py* - -%files python -%{_mandir}/man1/vdsm-tool.1* -%{_bindir}/vdsm-tool -%dir %{python2_sitelib}/%{vdsm_name}/gluster -%dir %{python2_sitelib}/%{vdsm_name}/host -%dir %{python2_sitelib}/%{vdsm_name}/metrics -%dir %{python2_sitelib}/%{vdsm_name}/tool -%dir %{python2_sitelib}/%{vdsm_name}/tool/configurators -%dir %{python2_sitelib}/%{vdsm_name}/profiling -%dir %{python2_sitelib}/%{vdsm_name}/storage -%dir %{python2_sitelib}/%{vdsm_name}/supervdsm_api -%dir %{python2_sitelib}/%{vdsm_name}/virt -%dir %{python2_sitelib}/%{vdsm_name}/virt/vmdevices -%{python2_sitelib}/%{vdsm_name}/alignmentScan.py* -%{python2_sitelib}/%{vdsm_name}/API.py* -%{python2_sitelib}/%{vdsm_name}/client.py* -%{python2_sitelib}/%{vdsm_name}/clientIF.py* -%{python2_sitelib}/%{vdsm_name}/hook/*.py* -%{python2_sitelib}/%{vdsm_name}/host/*.py* -%{python2_sitelib}/%{vdsm_name}/config.py* -%{python2_sitelib}/%{vdsm_name}/constants.py* -%{python2_sitelib}/%{vdsm_name}/cpuinfo.py* -%{python2_sitelib}/%{vdsm_name}/dmidecodeUtil.py* -%{python2_sitelib}/%{vdsm_name}/executor.py* -# gluster.exception is used in many places like Bridge.py. So it is required -# even without vdsm-gluster package -%{python2_sitelib}/%{vdsm_name}/gluster/__init__.py* -%{python2_sitelib}/%{vdsm_name}/gluster/cli.py* -%{python2_sitelib}/%{vdsm_name}/gluster/exception.py* -%{python2_sitelib}/%{vdsm_name}/health.py* -%{python2_sitelib}/%{vdsm_name}/hugepages.py* -%{python2_sitelib}/%{vdsm_name}/jobs.py* -%{python2_sitelib}/%{vdsm_name}/jsonrpcvdscli.py* -%{python2_sitelib}/%{vdsm_name}/kvm2ovirt.py* -%{python2_sitelib}/%{vdsm_name}/logUtils.py* -%{python2_sitelib}/%{vdsm_name}/machinetype.py* -%{python2_sitelib}/%{vdsm_name}/metrics/*.py* -%{python2_sitelib}/%{vdsm_name}/moduleloader.py* -%{python2_sitelib}/%{vdsm_name}/momIF.py* -%{python2_sitelib}/%{vdsm_name}/mkimage.py* -%{python2_sitelib}/%{vdsm_name}/numa.py* -%{python2_sitelib}/%{vdsm_name}/osinfo.py* -%{python2_sitelib}/%{vdsm_name}/ppc64HardwareInfo.py* -%{python2_sitelib}/%{vdsm_name}/profiling/__init__.py* -%{python2_sitelib}/%{vdsm_name}/profiling/cpu.py* -%{python2_sitelib}/%{vdsm_name}/profiling/errors.py* -%{python2_sitelib}/%{vdsm_name}/profiling/memory.py* -%{python2_sitelib}/%{vdsm_name}/profiling/profile.py* -%{python2_sitelib}/%{vdsm_name}/storage/__init__.py* -%{python2_sitelib}/%{vdsm_name}/storage/asyncevent.py* -%{python2_sitelib}/%{vdsm_name}/storage/asyncutils.py* -%{python2_sitelib}/%{vdsm_name}/storage/blkdiscard.py* -%{python2_sitelib}/%{vdsm_name}/storage/blockdev.py* -%{python2_sitelib}/%{vdsm_name}/storage/blockSD.py* -%{python2_sitelib}/%{vdsm_name}/storage/blockVolume.py* -%{python2_sitelib}/%{vdsm_name}/storage/check.py* -%{python2_sitelib}/%{vdsm_name}/storage/clusterlock.py* -%{python2_sitelib}/%{vdsm_name}/storage/compat.py* -%{python2_sitelib}/%{vdsm_name}/storage/constants.py* -%{python2_sitelib}/%{vdsm_name}/storage/curlImgWrap.py* -%{python2_sitelib}/%{vdsm_name}/storage/devicemapper.py* -%{python2_sitelib}/%{vdsm_name}/storage/directio.py* -%{python2_sitelib}/%{vdsm_name}/storage/dispatcher.py* -%{python2_sitelib}/%{vdsm_name}/storage/exception.py* -%{python2_sitelib}/%{vdsm_name}/storage/fallocate.py* -%{python2_sitelib}/%{vdsm_name}/storage/fileSD.py* -%{python2_sitelib}/%{vdsm_name}/storage/fileUtils.py* -%{python2_sitelib}/%{vdsm_name}/storage/fileVolume.py* -%{python2_sitelib}/%{vdsm_name}/storage/formatconverter.py* -%{python2_sitelib}/%{vdsm_name}/storage/fuser.py* -%{python2_sitelib}/%{vdsm_name}/storage/fsutils.py* -%{python2_sitelib}/%{vdsm_name}/storage/glusterSD.py* -%{python2_sitelib}/%{vdsm_name}/storage/glusterVolume.py* -%{python2_sitelib}/%{vdsm_name}/storage/guarded.py* -%{python2_sitelib}/%{vdsm_name}/storage/hba.py* -%{python2_sitelib}/%{vdsm_name}/storage/hsm.py* -%{python2_sitelib}/%{vdsm_name}/storage/image.py* -%{python2_sitelib}/%{vdsm_name}/storage/imageSharing.py* -%{python2_sitelib}/%{vdsm_name}/storage/imagetickets.py* -%{python2_sitelib}/%{vdsm_name}/storage/iscsi.py* -%{python2_sitelib}/%{vdsm_name}/storage/iscsiadm.py* -%{python2_sitelib}/%{vdsm_name}/storage/localFsSD.py* -%{python2_sitelib}/%{vdsm_name}/storage/lvm.env -%{python2_sitelib}/%{vdsm_name}/storage/lvm.py* -%{python2_sitelib}/%{vdsm_name}/storage/lvmconf.py* -%{python2_sitelib}/%{vdsm_name}/storage/lvmfilter.py* -%{python2_sitelib}/%{vdsm_name}/storage/mailbox.py* -%{python2_sitelib}/%{vdsm_name}/storage/managedvolume.py* -%{python2_sitelib}/%{vdsm_name}/storage/managedvolumedb.py* -%{python2_sitelib}/%{vdsm_name}/storage/merge.py* -%{python2_sitelib}/%{vdsm_name}/storage/misc.py* -%{python2_sitelib}/%{vdsm_name}/storage/monitor.py* -%{python2_sitelib}/%{vdsm_name}/storage/mount.py* -%{python2_sitelib}/%{vdsm_name}/storage/mpathhealth.py* -%{python2_sitelib}/%{vdsm_name}/storage/multipath.py* -%{python2_sitelib}/%{vdsm_name}/storage/nbd.py* -%{python2_sitelib}/%{vdsm_name}/storage/nfsSD.py* -%{python2_sitelib}/%{vdsm_name}/storage/nos_brick.py* -%{python2_sitelib}/%{vdsm_name}/storage/operation.py* -%{python2_sitelib}/%{vdsm_name}/storage/outOfProcess.py* -%{python2_sitelib}/%{vdsm_name}/storage/persistent.py* -%{python2_sitelib}/%{vdsm_name}/storage/qemuimg.py* -%{python2_sitelib}/%{vdsm_name}/storage/resourceFactories.py* -%{python2_sitelib}/%{vdsm_name}/storage/resourceManager.py* -%{python2_sitelib}/%{vdsm_name}/storage/rwlock.py* -%{python2_sitelib}/%{vdsm_name}/storage/sd.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdc.py* -%{python2_sitelib}/%{vdsm_name}/storage/securable.py* -%{python2_sitelib}/%{vdsm_name}/storage/sp.py* -%{python2_sitelib}/%{vdsm_name}/storage/spbackends.py* -%{python2_sitelib}/%{vdsm_name}/storage/storageServer.py* -%{python2_sitelib}/%{vdsm_name}/storage/sysfs.py* -%{python2_sitelib}/%{vdsm_name}/storage/task.py* -%{python2_sitelib}/%{vdsm_name}/storage/taskManager.py* -%{python2_sitelib}/%{vdsm_name}/storage/threadPool.py* -%{python2_sitelib}/%{vdsm_name}/storage/types.py* -%{python2_sitelib}/%{vdsm_name}/storage/udev.py* -%{python2_sitelib}/%{vdsm_name}/storage/volume.py* -%{python2_sitelib}/%{vdsm_name}/storage/volumemetadata.py* -%{python2_sitelib}/%{vdsm_name}/storage/workarounds.py* -%{python2_sitelib}/%{vdsm_name}/storage/xlease.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/__init__.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/volume_info.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/__init__.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/amend_volume.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/base.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/copy_data.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/merge.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/move_device.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/reduce_domain.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/sparsify_volume.py* -%{python2_sitelib}/%{vdsm_name}/storage/sdm/api/update_volume.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/__init__.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/managedvolume.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/hwinfo.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/mkimage.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/ksm.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/nbd.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/network.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/saslpasswd2.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/systemctl.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/test.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/udev.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_api/virt.py* -%{python2_sitelib}/%{vdsm_name}/protocoldetector.py* -%{python2_sitelib}/%{vdsm_name}/schedule.py* -%{python2_sitelib}/%{vdsm_name}/sslutils.py* -%{python2_sitelib}/%{vdsm_name}/supervdsm_server.py* -%{python2_sitelib}/%{vdsm_name}/taskset.py* -%{python2_sitelib}/%{vdsm_name}/throttledlog.py* -%{python2_sitelib}/%{vdsm_name}/utils.py* -%{python2_sitelib}/%{vdsm_name}/v2v.py* -%{python2_sitelib}/%{vdsm_name}/vdsmd.py* -%{python2_sitelib}/%{vdsm_name}/virtsparsify.py* -%{python2_sitelib}/%{vdsm_name}/virtsysprep.py* -%{python2_sitelib}/%{vdsm_name}/tool/__init__.py* -%{python2_sitelib}/%{vdsm_name}/tool/common.py* -%{python2_sitelib}/%{vdsm_name}/tool/check_volume_leases.py* -%{python2_sitelib}/%{vdsm_name}/tool/config_lvm_filter.py* -%{python2_sitelib}/%{vdsm_name}/tool/configfile.py* -%{python2_sitelib}/%{vdsm_name}/tool/confmeta.py* -%{python2_sitelib}/%{vdsm_name}/tool/confutils.py* -%{python2_sitelib}/%{vdsm_name}/tool/dummybr.py* -%{python2_sitelib}/%{vdsm_name}/tool/nwfilter.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurator.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/__init__* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/abrt.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/bond_defaults.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/certificates.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/lvm.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/managedvolumedb.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/multipath.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/passwd.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/sanlock.py* -%{python2_sitelib}/%{vdsm_name}/tool/configurators/sebool.py* -%{python2_sitelib}/%{vdsm_name}/tool/dump_volume_chains.py* -%{python2_sitelib}/%{vdsm_name}/tool/network.py* -%{python2_sitelib}/%{vdsm_name}/tool/register.py* -%{python2_sitelib}/%{vdsm_name}/tool/service.py* -%{python2_sitelib}/%{vdsm_name}/tool/transient.py* -%{python2_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python2_sitelib}/%{vdsm_name}/tool/vdsm-id.py* -%{python2_sitelib}/%{vdsm_name}/tool/xleases.py* -%{python2_sitelib}/%{vdsm_name}/virt/__init__.py* -%{python2_sitelib}/%{vdsm_name}/virt/collectd.py* -%{python2_sitelib}/%{vdsm_name}/virt/displaynetwork.py* -%{python2_sitelib}/%{vdsm_name}/virt/drivemonitor.py* -%{python2_sitelib}/%{vdsm_name}/virt/domain_descriptor.py* -%{python2_sitelib}/%{vdsm_name}/virt/domxml_preprocess.py* -%{python2_sitelib}/%{vdsm_name}/virt/events.py* -%{python2_sitelib}/%{vdsm_name}/virt/guestagent.py* -%{python2_sitelib}/%{vdsm_name}/virt/guestagenthelpers.py* -%{python2_sitelib}/%{vdsm_name}/virt/libvirtnetwork.py* -%{python2_sitelib}/%{vdsm_name}/virt/libvirtxml.py* -%{python2_sitelib}/%{vdsm_name}/virt/metadata.py* -%{python2_sitelib}/%{vdsm_name}/virt/migration.py* -%{python2_sitelib}/%{vdsm_name}/virt/periodic.py* -%{python2_sitelib}/%{vdsm_name}/virt/qemuguestagent.py* -%{python2_sitelib}/%{vdsm_name}/virt/recovery.py* -%{python2_sitelib}/%{vdsm_name}/virt/sampling.py* -%{python2_sitelib}/%{vdsm_name}/virt/saslpasswd2.py* -%{python2_sitelib}/%{vdsm_name}/virt/secret.py* -%{python2_sitelib}/%{vdsm_name}/virt/utils.py* -%{python2_sitelib}/%{vdsm_name}/virt/virdomain.py* -%{python2_sitelib}/%{vdsm_name}/virt/vm.py* -%{python2_sitelib}/%{vdsm_name}/virt/jobs/__init__.py* -%{python2_sitelib}/%{vdsm_name}/virt/jobs/seal.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/__init__.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/common.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/compat.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/core.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/drivename.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/graphics.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/hostdevice.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/hwclass.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/lease.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/lookup.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/network.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/storage.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmdevices/storagexml.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmchannels.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmexitreason.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmpowerdown.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmstats.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmstatus.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmtune.py* -%{python2_sitelib}/%{vdsm_name}/virt/vmxml.py* -%{python2_sitelib}/%{vdsm_name}/virt/xmlconstants.py* - -%files tests -%doc %{_datadir}/%{vdsm_name}/tests/README -%dir %{_datadir}/%{vdsm_name} -%dir %{_datadir}/%{vdsm_name}/tests -%dir %{_datadir}/%{vdsm_name}/tests/common -%dir %{_datadir}/%{vdsm_name}/tests/cpuinfo -%dir %{_datadir}/%{vdsm_name}/tests/functional -%dir %{_datadir}/%{vdsm_name}/tests/devices -%dir %{_datadir}/%{vdsm_name}/tests/devices/data -%dir %{_datadir}/%{vdsm_name}/tests/devices/parsing -%dir %{_datadir}/%{vdsm_name}/tests/integration -%dir %{_datadir}/%{vdsm_name}/tests/network -%dir %{_datadir}/%{vdsm_name}/tests/network/functional -%dir %{_datadir}/%{vdsm_name}/tests/network/integration -%dir %{_datadir}/%{vdsm_name}/tests/network/integration/ovs -%dir %{_datadir}/%{vdsm_name}/tests/network/unit -%dir %{_datadir}/%{vdsm_name}/tests/network/unit/ovs -%dir %{_datadir}/%{vdsm_name}/tests/network/static -%dir %{_datadir}/%{vdsm_name}/tests/storage -%{_datadir}/%{vdsm_name}/tests/*.py* -%{_datadir}/%{vdsm_name}/tests/cpu_info.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_ibm_S822L.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_ibm_S822L_le.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5606.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_i73770_nosnap.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_multiqemu.out -%{_datadir}/%{vdsm_name}/tests/caps_libvirt_s390x.out -%{_datadir}/%{vdsm_name}/tests/caps_numactl_4_nodes.out -%{_datadir}/%{vdsm_name}/tests/domcaps_libvirt_ppc64le.out -%{_datadir}/%{vdsm_name}/tests/domcaps_libvirt_s390x.out -%{_datadir}/%{vdsm_name}/tests/domcaps_libvirt_x86_64.out -%{_datadir}/%{vdsm_name}/tests/common/*.py* -%{_datadir}/%{vdsm_name}/tests/cpuinfo/*.out -%{_datadir}/%{vdsm_name}/tests/check_distpkg.sh -%{_datadir}/%{vdsm_name}/tests/check_rpms.sh -%{_datadir}/%{vdsm_name}/tests/fake-ssh-add -%{_datadir}/%{vdsm_name}/tests/fake-ssh-agent -%{_datadir}/%{vdsm_name}/tests/fake-virt-sysprep -%{_datadir}/%{vdsm_name}/tests/fake-virt-v2v -%{_datadir}/%{vdsm_name}/tests/fake-virt-v2v.out -%{_datadir}/%{vdsm_name}/tests/fake-virt-v2v.err -%{_datadir}/%{vdsm_name}/tests/devices/*.py* -%{_datadir}/%{vdsm_name}/tests/devices/parsing/*.py* -%{_datadir}/%{vdsm_name}/tests/devices/data/*.xml -%{_datadir}/%{vdsm_name}/tests/mem_info.out -%{_datadir}/%{vdsm_name}/tests/network/*.py* -%{_datadir}/%{vdsm_name}/tests/network/netmaskconversions -%{_datadir}/%{vdsm_name}/tests/network/tc_filter_show.out -%{_datadir}/%{vdsm_name}/tests/network/functional/*.py* -%{_datadir}/%{vdsm_name}/tests/network/integration/*.py* -%{_datadir}/%{vdsm_name}/tests/network/integration/ovs/*.py* -%{_datadir}/%{vdsm_name}/tests/network/unit/*.py* -%{_datadir}/%{vdsm_name}/tests/network/unit/ovs/*.py* -%{_datadir}/%{vdsm_name}/tests/network/static/*.json -%{_datadir}/%{vdsm_name}/tests/network/static/ip_route_show_table_all.out -%{_datadir}/%{vdsm_name}/tests/storage/*.py* -%{_datadir}/%{vdsm_name}/tests/storage/*.out -%{_datadir}/%{vdsm_name}/tests/virt/*.py* -%{_datadir}/%{vdsm_name}/tests/virt/data/*.xml -%{_datadir}/%{vdsm_name}/tests/run_tests.sh -%{_datadir}/%{vdsm_name}/tests/toolTests_abrt-action-save-package-data.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_CCPP.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_abrt.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_mtab_1g -%{_datadir}/%{vdsm_name}/tests/toolTests_mtab_default -%{_datadir}/%{vdsm_name}/tests/toolTests_mtab_nohugetlbfs -%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_sanlock.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_qemu_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_no_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_vdsm_ssl.conf -%{_datadir}/%{vdsm_name}/tests/toolTests_vmcore.conf -%{_datadir}/%{vdsm_name}/tests/glusterGeoRepStatus.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeGeoRepConfigList.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotList.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotListEmpty.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotConfig.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml -%{_datadir}/%{vdsm_name}/tests/glusterSnapshotRestore.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotList.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeSnapshotListEmpty.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeTasks.xml -%{_datadir}/%{vdsm_name}/tests/glusterVolumeHealInfo.xml -%{_datadir}/%{vdsm_name}/tests/functional/*.py* -%{_datadir}/%{vdsm_name}/tests/functional/*.policy -%{_datadir}/%{vdsm_name}/tests/integration/*.py* - -%files hook-openstacknet -%{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py* -%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/50_openstacknet -%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/openstacknet_utils.py* - -%files hook-macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof - -%if 0%{?with_vhostmd} -%files hook-vhostmd -%license COPYING -%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd -%else -%exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd -%exclude %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd -%endif - -%files hook-qemucmdline -%license COPYING -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline - -%files hook-ethtool-options -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options - -%files hook-fcoe -%{_presetdir}/85-vdsm-hook-fcoe.preset -%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_fcoe - -%files hook-localdisk -%{_sysconfdir}/sudoers.d/50_vdsm_hook_localdisk -%{_libexecdir}/%{vdsm_name}/hooks/after_disk_prepare/localdisk -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/localdisk -%{_libexecdir}/%{vdsm_name}/localdisk-helper -%{_udevrulesdir}/12-vdsm-localdisk.rules - -%files hook-vmfex-dev -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex - -%files hook-cpuflags -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_cpuflags - -%if 0%{?with_hooks} -%files hook-allocate_net -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/10_allocate_net - -%files hook-boot_hostdev -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_boot_hostdev - -%files hook-checkimages -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages - -%files hook-checkips -%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/10_checkips -%{_libexecdir}/%{vdsm_name}/hooks/checkipsd -%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/checkips_utils.py* -%{_unitdir}/vdsm-checkips.service - -%files hook-extra-ipv4-addrs -%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/40_extra_ipv4_addrs - -%files hook-diskunmap -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_diskunmap - -%files hook-fakevmstats -%{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats - -%files hook-fileinject -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject - -%files hook-floppy -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy - -%files hook-httpsisoboot -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_httpsisoboot - -%files hook-macbind -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_macbind - -%files hook-extnet -%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet -%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet - -%files hook-nestedvt -%{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_nestedvt - -%files hook-numa -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa - -%files hook-pincpu -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu - -%files hook-promisc -%{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc - -%files hook-scratchpad -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad -%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad - -%files hook-smbios -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios - -%files hook-spiceoptions -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_spiceoptions - -%files hook-vmdisk -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk -%endif - -%files http -%dir %{python2_sitelib}/%{vdsm_name} -%dir %{python2_sitelib}/%{vdsm_name}/rpc -%{python2_sitelib}/%{vdsm_name}/rpc/http.py* - -%files client -%{_bindir}/vdsm-client -%dir %{python2_sitelib}/vdsmclient -%{python2_sitelib}/vdsmclient/__init__.py* -%{python2_sitelib}/vdsmclient/client.py* -%{python2_sitelib}/yajsonrpc/__init__.py* -%{_mandir}/man1/vdsm-client.1* - -%files jsonrpc -%dir %{python2_sitelib}/%{vdsm_name} -%dir %{python2_sitelib}/%{vdsm_name}/rpc -%{python2_sitelib}/%{vdsm_name}/rpc/__init__.py* -%{python2_sitelib}/%{vdsm_name}/rpc/bindingjsonrpc.py* -%{python2_sitelib}/%{vdsm_name}/rpc/Bridge.py* -%{python2_sitelib}/yajsonrpc/__init__.py* -%{python2_sitelib}/yajsonrpc/jsonrpcclient.py* - -%files api -%doc lib/vdsm/api/vdsm-api.html -%dir %{python2_sitelib}/%{vdsm_name} -%dir %{python2_sitelib}/%{vdsm_name}/api -%dir %{python2_sitelib}/%{vdsm_name}/rpc -%{python2_sitelib}/%{vdsm_name}/api/*.py* -%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api.pickle -%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-events.pickle -%if ! 0%{?with_gluster_mgmt} -%exclude %{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle -%endif - -%files yajsonrpc -%dir %{python2_sitelib}/yajsonrpc -%{python2_sitelib}/yajsonrpc/betterAsyncore.py* -%{python2_sitelib}/yajsonrpc/exception.py* -%{python2_sitelib}/yajsonrpc/stomp.py* -%{python2_sitelib}/yajsonrpc/stompclient.py* -%{python2_sitelib}/yajsonrpc/stompserver.py* - -%files hook-faqemu -%license COPYING -%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/10_faqemu -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu - -%if 0%{?with_gluster_mgmt} -%files gluster -%license COPYING -%dir %{python2_sitelib}/%{vdsm_name} -%dir %{python2_sitelib}/%{vdsm_name}/rpc -%dir %{python2_sitelib}/%{vdsm_name}/gluster -%{python2_sitelib}/%{vdsm_name}/gluster/api.py* -%{python2_sitelib}/%{vdsm_name}/gluster/apiwrapper.py* -%{python2_sitelib}/%{vdsm_name}/gluster/events.py* -%{python2_sitelib}/%{vdsm_name}/gluster/fstab.py* -%{python2_sitelib}/%{vdsm_name}/gluster/fence.py* -%{python2_sitelib}/%{vdsm_name}/gluster/gfapi.py* -%{python2_sitelib}/%{vdsm_name}/gluster/hooks.py* -%{python2_sitelib}/%{vdsm_name}/gluster/services.py* -%{python2_sitelib}/%{vdsm_name}/gluster/storagedev.py* -%{python2_sitelib}/%{vdsm_name}/gluster/tasks.py* -%{python2_sitelib}/%{vdsm_name}/gluster/thinstorage.py* -%{python2_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle -%endif - -%changelog -* Sat Jul 27 2019 Fedora Release Engineering - 4.30.17-2.git114b4b7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 4.18.999-449.git0bb7717 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 4.18.999-448.git0bb7717 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Fedora Release Engineering - 4.18.999-447.git0bb7717 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Aug 28 2017 Zbigniew Jędrzejewski-Szmek - 4.18.999-446.git0bb7717 -- Drop dependency on python-argparse (part of python stdlib) - -* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 4.18.999-445.git0bb7717 -- Python 2 binary package renamed to python2-vdsm - See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 - -* Thu Aug 03 2017 Fedora Release Engineering - 4.18.999-444.git0bb7717 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 4.18.999-443.git0bb7717 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 4.18.999-442.git0bb7717 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Aug 31 2016 Peter Robinson 4.18.999-441 -- Build on aarch64 and ppc64le - -* Wed Aug 03 2016 Yaniv Bronhaim - 4.18.999 -- Re-review of vdsm.spec to return it to fedora Bug #1361659 - -* Sun Oct 13 2013 Yaniv Bronhaim - 4.13.0 -- Removing vdsm-python-cpopen from the spec -- Adding dependency on formal cpopen package - -* Sun Apr 07 2013 Yaniv Bronhaim - 4.9.0-1 -- Adding cpopen package - -* Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 -- Initial upstream release - -* Thu Nov 02 2006 Simon Grinberg - 0.0-1 -- Initial build