chiark / gitweb /
makebuildserver: make config['domain'] local var where its needed
authorHans-Christoph Steiner <hans@eds.org>
Tue, 23 May 2017 09:59:53 +0000 (11:59 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 23 May 2017 18:08:29 +0000 (20:08 +0200)
makebuildserver

index 0b3763346f6c5cbc0f427f25c45759b90d73829e..48e12f9ffaadc16f08466f111ec549ad8f8a135c 100755 (executable)
@@ -80,7 +80,6 @@ if os.path.isfile('/usr/bin/systemd-detect-virt'):
     if virt == 'qemu' or virt == 'kvm' or virt == 'bochs':
         logger.info('Running in a VM guest, defaulting to QEMU/KVM via libvirt')
         config['vm_provider'] = 'libvirt'
-        config['domain'] = 'buildserver_default'
     elif virt != 'none':
         logger.info('Running in an unsupported VM guest (%s)!', virt)
     logger.debug('detected virt: %s', virt)
@@ -402,8 +401,9 @@ def debug_log_vagrant_vm(vm_dir, config):
         if config['vm_provider'] == 'libvirt':
             logger.debug('> virsh -c qmeu:///system list --all')
             subprocess.call(['virsh', '-c', 'qemu:///system', 'list', '--all'])
-            logger.debug('> virsh -c qemu:///system snapshot-list %s', config['domain'])
-            subprocess.call(['virsh', '-c', 'qemu:///system', 'snapshot-list', config['domain']])
+            domain = 'buildserver_default'
+            logger.debug('> virsh -c qemu:///system snapshot-list %s', domain)
+            subprocess.call(['virsh', '-c', 'qemu:///system', 'snapshot-list', domain])
 
 
 def main():