VirtualBox

Changeset 92330 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Nov 10, 2021 4:10:45 PM (3 years ago)
Author:
vboxsync
Message:

ValKit/vboxinstaller.py: Retry 'hdituil detach' for 6 time with a 5 seconds delay between each to try fix the occational 'hdiutil: couldn't unmount disk2 - Resource busy' problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py

    r87468 r92330  
    599599        fRc = self._executeSync(['hdiutil', 'detach', sMountPath ]);
    600600        if not fRc and not fIgnoreError:
    601             reporter.error('Failed to unmount DMG at %s' % sMountPath);
     601            # In case it's busy for some reason or another, just retry after a little delay.
     602            for iTry in range(6):
     603                time.sleep(5);
     604                reporter.error('Retry #%s unmount DMT at %s' % (iTry + 1, sMountPath,));
     605                fRc = self._executeSync(['hdiutil', 'detach', sMountPath ]);
     606                if fRc:
     607                    break;
     608            if not fRc:
     609                reporter.error('Failed to unmount DMG at %s' % (sMountPath,));
    602610
    603611        # Remove dir.
     
    606614        except:
    607615            if not fIgnoreError:
    608                 reporter.errorXcpt('Failed to remove directory %s' % sMountPath);
     616                reporter.errorXcpt('Failed to remove directory %s' % (sMountPath,));
    609617        return fRc;
    610618
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette