commit vm-install for openSUSE:Factory
Hello community, here is the log from the commit of package vm-install for openSUSE:Factory checked in at 2014-07-02 15:05:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vm-install (Old) and /work/SRC/openSUSE:Factory/.vm-install.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "vm-install" Changes: -------- --- /work/SRC/openSUSE:Factory/vm-install/vm-install.changes 2014-06-16 21:37:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.vm-install.new/vm-install.changes 2014-07-02 15:05:34.000000000 +0200 @@ -1,0 +2,28 @@ +Mon Jun 30 10:33:44 MDT 2014 - carnold@suse.com + +- bnc#870174 - vm-install: Exception AttributeError: "'NoneType' + object has no attribute 'virDomainFree'"... +- Version 0.8.26 + +------------------------------------------------------------------- +Fri Jun 27 10:07:25 MDT 2014 - carnold@suse.com + +- Add try/except blocks around xenstore-read to catch failures due + to a corrupt xenstore database +- Updated language files + +------------------------------------------------------------------- +Thu Jun 26 15:22:16 MDT 2014 - carnold@suse.com + +- Fix PV VMs starting correctly with no graphics specified +- Fix rhel7 to install correctly. Default to text mode install + for Xen PV rhel7 because the kernel has no framebuffer driver + +------------------------------------------------------------------- +Mon Jun 23 12:10:34 MDT 2014 - carnold@suse.com + +- bnc#883901 - sles 12 Xen beta 9 vm-install fails to pxe install + guest with error +- KVM: Fix initializing the use_libvirt flag + +------------------------------------------------------------------- Old: ---- vm-install-0.8.24.tar.bz2 New: ---- vm-install-0.8.26.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vm-install.spec ++++++ --- /var/tmp/diff_new_pack.SpWZ4Q/_old 2014-07-02 15:05:35.000000000 +0200 +++ /var/tmp/diff_new_pack.SpWZ4Q/_new 2014-07-02 15:05:35.000000000 +0200 @@ -27,12 +27,12 @@ %endif # For directory ownership: BuildRequires: yast2 -Version: 0.8.24 +Version: 0.8.26 Release: 0 Summary: Tool to Define a Virtual Machine and Install Its Operating System License: GPL-2.0 Group: System/Emulators/PC -Source0: %{name}-0.8.24.tar.bz2 +Source0: %{name}-0.8.26.tar.bz2 Source1: vm-install.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 s390x ppc64le ++++++ vm-install-0.8.24.tar.bz2 -> vm-install-0.8.26.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/Makefile new/vm-install-0.8.26/Makefile --- old/vm-install-0.8.24/Makefile 2014-06-12 05:43:25.000000000 +0200 +++ new/vm-install-0.8.26/Makefile 2014-06-27 01:37:13.000000000 +0200 @@ -1,5 +1,5 @@ PACKAGE = vm-install -VER = 0.8.24 +VER = 0.8.26 default: @echo "Run 'make install DESTDIR=$destdir' to install." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/po/zh_CN.po new/vm-install-0.8.26/po/zh_CN.po --- old/vm-install-0.8.24/po/zh_CN.po 2014-06-12 07:11:46.000000000 +0200 +++ new/vm-install-0.8.26/po/zh_CN.po 2014-06-30 16:21:00.000000000 +0200 @@ -6,7 +6,7 @@ "Project-Id-Version: xen-vm-install\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-05-08 18:43-0600\n" -"PO-Revision-Date: 2014-06-06 13:52\n" +"PO-Revision-Date: 2014-06-26 12:20\n" "Last-Translator: Novell language <language@novell.com>\n" "Language-Team: Novell language <language@novell.com>\n" "Language: \n" @@ -581,7 +581,7 @@ #: src/vminstall/msg.py:198 msgid "Password:" -msgstr "密码:" +msgstr "口令:" #: src/vminstall/msg.py:199 msgid "Description" @@ -755,7 +755,7 @@ #: src/vminstall/msg.py:251 msgid "Create a virtual disk based on a device (CD or other block device), an existing image file (ISO), or a new file. Specify a device by its device node, such as /dev/cdrom, not its mount point." -msgstr "基于设备(CD 或其他块设备)、现有映象文件 (ISO) 或新文件创建虚拟磁盘。 请根据设备节点(比如,/dev/cdrom)而非装入点来指定设备。" +msgstr "基于设备(CD 或其他块设备)、现有映象文件 (ISO) 或新文件创建虚拟磁盘。 请根据设备节点(比如,/dev/cdrom)而非安装点来指定设备。" #: src/vminstall/msg.py:252 msgid "Please specify the settings for the virtual network adapter." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/setup.py new/vm-install-0.8.26/setup.py --- old/vm-install-0.8.24/setup.py 2014-06-12 05:43:40.000000000 +0200 +++ new/vm-install-0.8.26/setup.py 2014-06-27 01:37:09.000000000 +0200 @@ -1,7 +1,7 @@ from distutils.core import setup setup(name='vminstall', - version='0.8.24', + version='0.8.26', description='Define a virtual machine and install its operating system', author='Charles Coffing', author_email='ccoffing@novell.com', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vmdisks/disks.py new/vm-install-0.8.26/src/vmdisks/disks.py --- old/vm-install-0.8.24/src/vmdisks/disks.py 2014-05-29 17:02:43.000000000 +0200 +++ new/vm-install-0.8.26/src/vmdisks/disks.py 2014-06-26 18:20:49.000000000 +0200 @@ -1199,17 +1199,22 @@ return "'%s,%s,%s'" % (self.get_pdev(), vdev, mode) # xl disk config file format: ['target','format','vdev','access','suse-diskcache-disable-flush','backendtype=tap'] proto = self.get_proto() - tap = False - if proto.startswith('tap:'): - proto = proto.split(':')[1] - tap = True + need_backendtype = False if proto == 'file': proto = 'raw' + elif proto.startswith('tap:'): + proto = proto.split(':')[1] + need_backendtype = True + type='tap' + elif proto == 'phy': + proto = 'raw' + need_backendtype = True + type='phy' extra = "" if self._cache_mode == "unsafe": extra = ",suse-diskcache-disable-flush" - if tap: - extra = extra + ",backendtype=tap" + if need_backendtype: + extra = extra + ",backendtype=%s" % type return "'%s,%s,%s,%s%s'" % (self.get_path(), proto, vdev, mode, extra) def __str__(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/ParaVirtGuest.py new/vm-install-0.8.26/src/vminstall/ParaVirtGuest.py --- old/vm-install-0.8.24/src/vminstall/ParaVirtGuest.py 2014-05-12 21:17:49.000000000 +0200 +++ new/vm-install-0.8.26/src/vminstall/ParaVirtGuest.py 2014-06-27 01:42:02.000000000 +0200 @@ -375,7 +375,9 @@ ramdisk = '' if self.runtime['initrd']: ramdisk = ',%s' % self.runtime['initrd'] - if self.options.os_type == "sles12" or self.options.os_type == "sled12": + if self.options.os_type == "sles12" or \ + self.options.os_type == "sled12" or \ + self.options.os_type == "rhel7": return [ "<os type='%s'>" % self.options.os_type, [ '<type>linux</type>', '<kernel>/usr/lib/grub2/x86_64-xen/grub.xen</kernel>', @@ -433,7 +435,10 @@ ramdisk = '' if self.runtime['initrd']: ramdisk = ',%s' % self.runtime['initrd'] - if self.options.use_xl and (self.options.os_type == "sles12" or self.options.os_type == "sled12"): + if self.options.use_xl and \ + (self.options.os_type == "sles12" or \ + self.options.os_type == "sled12" or \ + self.options.os_type == "rhel7"): return """builder="linux" #bootargs="" #extra="%(runtime_args)s %(extra_args)s" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/VMLinux.py new/vm-install-0.8.26/src/vminstall/VMLinux.py --- old/vm-install-0.8.24/src/vminstall/VMLinux.py 2013-11-19 00:33:16.000000000 +0100 +++ new/vm-install-0.8.26/src/vminstall/VMLinux.py 2014-06-27 03:20:50.000000000 +0200 @@ -41,8 +41,8 @@ # Fall back to file-globbing (filename may include a version) for ext in exts: for path in ('/boot/', '/'): - # rhel6 uses the pvops kernel - if os_type == 'rhel6': + # rhel6/7 uses the pvops kernel + if os_type == 'rhel6' or os_type == 'rhel7': kernels = glob.glob('%s%svmlinuz-*' % (root, path)) initrds = glob.glob('%s%sinitramfs-*' % (root, path)) else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/caps.py new/vm-install-0.8.26/src/vminstall/caps.py --- old/vm-install-0.8.24/src/vminstall/caps.py 2014-06-06 01:18:45.000000000 +0200 +++ new/vm-install-0.8.26/src/vminstall/caps.py 2014-06-30 16:20:24.000000000 +0200 @@ -55,7 +55,10 @@ if domid == '0': continue read_path = '/local/domain/%s/memory/target' % domid - memory = util.run(['/usr/bin/xenstore-read', '-s', read_path]) + try: + memory = util.run(['/usr/bin/xenstore-read', '-s', read_path]) + except: + continue memory = int(memory.strip()) domu_memory = domu_memory + memory / int(512) return domu_memory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/console.py new/vm-install-0.8.26/src/vminstall/console.py --- old/vm-install-0.8.24/src/vminstall/console.py 2014-01-24 03:22:57.000000000 +0100 +++ new/vm-install-0.8.26/src/vminstall/console.py 2014-06-26 22:16:15.000000000 +0200 @@ -199,8 +199,10 @@ """ domid = self.get_domid_from_uuid(guest.uuid) tty = self.get_tty_from_domid(domid) - if tty is None or not os.access(tty, os.R_OK | os.W_OK): + if tty is None: raise NotImplementedError + if not os.access(tty, os.R_OK | os.W_OK): + log.debug("%s may not be accessible, attempting to use anyways" % tty) if os.environ.has_key('DISPLAY'): vmdefaults = VMDefaults[guest.options.os_type] cmd = '/usr/bin/xterm' @@ -212,7 +214,7 @@ if util.is_xend_running(): args.extend(['-T', guest.options.name, '-e', 'xm', 'console', guest.uuid]) else: - args.extend(['-T', guest.options.name, '-e', 'xl', 'console', domid]) + args.extend(['-T', guest.options.name, '-e', 'xl', 'console', str(domid)]) log.info("Opened a console in an xterm.") else: if caps.is_kvm() or caps.is_qemu(): @@ -224,7 +226,7 @@ args = ['/usr/sbin/xm', 'console', guest.uuid ] else: cmd = '/usr/sbin/xl' - args = ['/usr/sbin/xl', 'console', domid ] + args = ['/usr/sbin/xl', 'console', str(domid)] log.debug("Running: %s" % str(args)) if not detach: pid = os.fork() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/job.py new/vm-install-0.8.26/src/vminstall/job.py --- old/vm-install-0.8.24/src/vminstall/job.py 2014-05-15 19:08:58.000000000 +0200 +++ new/vm-install-0.8.26/src/vminstall/job.py 2014-06-30 18:33:15.000000000 +0200 @@ -292,6 +292,9 @@ self._state_num = Job.FAILED self._update_job_file() raise + finally: + if hypervisor.connection: + del hypervisor.connection def _handle_cancel_signal(self, signum, frame): log.debug("handle_cancel_signal") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/libvirt_console.py new/vm-install-0.8.26/src/vminstall/libvirt_console.py --- old/vm-install-0.8.24/src/vminstall/libvirt_console.py 2014-05-15 15:26:35.000000000 +0200 +++ new/vm-install-0.8.26/src/vminstall/libvirt_console.py 2014-06-30 16:20:24.000000000 +0200 @@ -17,6 +17,8 @@ from log import log import vminstall import threading +import util +import caps import time import libvirt @@ -70,7 +72,14 @@ def get_tty_from_domid(self, domid): if domid is None: return None - tty = None + if caps.is_xen(): + console_path = '/local/domain/%d/console/tty' % domid + try: + tty = util.run(['/usr/bin/xenstore-read', '-s', console_path]) + except: + return None + log.info('Domain ID %d has tty %s' % (domid, str(tty))) + return tty # We can avoid xenstore entirely virConn = vminstall.hypervisor.connection.getconn() if virConn: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/options.py new/vm-install-0.8.26/src/vminstall/options.py --- old/vm-install-0.8.24/src/vminstall/options.py 2014-04-03 15:35:55.000000000 +0200 +++ new/vm-install-0.8.26/src/vminstall/options.py 2014-06-26 22:03:21.000000000 +0200 @@ -424,6 +424,8 @@ defaults.connect = xen_hypervisor.Xend(None) defaults.use_libvirt = options.use_libvirt = False hypervisor.connection = defaults.connect + elif defaults.use_libvirt is None and not defaults.use_xl: + defaults.use_libvirt = options.use_libvirt = hypervisor.connection.use_libvirt old_os_type = defaults.os_type if options.os_type: @@ -642,7 +644,11 @@ else: defaults.graphics = 'cirrus' else: - defaults.graphics = 'para' + # Rhel7 kernel doesn't have framebuffer device built in kernel + if options.graphics is None and options.os_type == "rhel7": + options.graphics = defaults.graphics = 'none' + else: + defaults.graphics = 'para' if options.screen_resolution: defaults.screen_resolution = options.screen_resolution diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.8.24/src/vminstall/xl_console.py new/vm-install-0.8.26/src/vminstall/xl_console.py --- old/vm-install-0.8.24/src/vminstall/xl_console.py 2014-01-24 03:22:57.000000000 +0100 +++ new/vm-install-0.8.26/src/vminstall/xl_console.py 2014-06-30 16:20:24.000000000 +0200 @@ -52,11 +52,17 @@ if domid == '0': continue read_path = '/local/domain/%s/vm' % domid - path = util.run(['/usr/bin/xenstore-read', '-s', read_path]) + try: + path = util.run(['/usr/bin/xenstore-read', '-s', read_path]) + except: + return None path = path.strip() if path == vm_path: read_path = '/local/domain/%s/domid' % domid - d = util.run(['/usr/bin/xenstore-read', '-s', read_path]) + try: + d = util.run(['/usr/bin/xenstore-read', '-s', read_path]) + except: + continue if d == 'None': continue domid = int(domid) @@ -82,7 +88,10 @@ return None tty = None console_path = '/local/domain/%d/console/tty' % domid - tty = util.run(['/usr/bin/xenstore-read', '-s', console_path]) + try: + tty = util.run(['/usr/bin/xenstore-read', '-s', console_path]) + except: + return None log.info('Domain ID %d has tty %s' % (domid, str(tty))) return tty @@ -112,7 +121,11 @@ log.debug("Watch fired for '%s'" % uuid_path) cv.acquire() #u = xstransact.Read(uuid_path) - u = util.run(['/usr/bin/xenstore-read', '-s', uuid_path]) + try: + u = util.run(['/usr/bin/xenstore-read', '-s', uuid_path]) + except: + cv.release() + return u = u.strip() log.debug("UUID is '%s'", u) if u is None: @@ -153,10 +166,13 @@ console_path = '/local/domain/%d/console/vnc-port' % domid console_path = console_path.strip() for _ in xrange(10): - p = util.run(['/usr/bin/xenstore-read', '-s', console_path]) - p = p.strip() - if p is not None: - return int(p) + try: + p = util.run(['/usr/bin/xenstore-read', '-s', console_path]) + p = p.strip() + if p is not None: + return int(p) + except: + pass time.sleep(1) return None -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de