Move /dev umount to cleanup step
This commit is contained in:
		@@ -691,9 +691,6 @@ GRUB_DISABLE_LINUX_UUID=false
 | 
				
			|||||||
            # Debian cloud images are affected, so who knows.
 | 
					            # Debian cloud images are affected, so who knows.
 | 
				
			||||||
            os.system("systemctl enable cloud-init.target")
 | 
					            os.system("systemctl enable cloud-init.target")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Unmount the bound devfs
 | 
					 | 
				
			||||||
        os.system("umount {}/dev".format(temporary_directory))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def cleanup(self):
 | 
					    def cleanup(self):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        cleanup(): Perform any cleanup required due to prepare()/install()
 | 
					        cleanup(): Perform any cleanup required due to prepare()/install()
 | 
				
			||||||
@@ -715,6 +712,9 @@ GRUB_DISABLE_LINUX_UUID=false
 | 
				
			|||||||
        # Set the tempdir we used in the prepare() and install() steps
 | 
					        # Set the tempdir we used in the prepare() and install() steps
 | 
				
			||||||
        temp_dir = "/tmp/target"
 | 
					        temp_dir = "/tmp/target"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Unmount the bound devfs
 | 
				
			||||||
 | 
					        os.system("umount {}/dev".format(temporary_directory))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Use this construct for reversing the list, as the normal reverse() messes with the list
 | 
					        # Use this construct for reversing the list, as the normal reverse() messes with the list
 | 
				
			||||||
        for volume in list(reversed(self.vm_data["volumes"])):
 | 
					        for volume in list(reversed(self.vm_data["volumes"])):
 | 
				
			||||||
            dst_volume_name = f"{self.vm_name}_{volume['disk_id']}"
 | 
					            dst_volume_name = f"{self.vm_name}_{volume['disk_id']}"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user