Merge lp:~nuclearbob/utah/installclient-improvement into lp:utah
Status: | Merged |
---|---|
Merged at revision: | 667 |
Proposed branch: | lp:~nuclearbob/utah/installclient-improvement |
Merge into: | lp:utah |
Diff against target: |
16 lines (+5/-2) 1 file modified
utah/provisioning/provisioning.py (+5/-2) |
To merge this branch: | bzr merge lp:~nuclearbob/utah/installclient-improvement |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joe Talbott (community) | Approve | ||
Review via email: mp+119017@code.launchpad.net |
Description of the change
Sometimes when I provision a machine and install the client, some other apt or dpkg process is running, and I can't get a lock on the dpkg database. This causes the whole installation to fail.
I've added to the command that installs the client so that it will wait until it can get a lock before trying to install the package. It seemed to work fine on a VMToolsVM. I plan to test it on a CustomVM as well, and a CobblerMachine certainly wouldn't hurt. Since both of those use run from SSHMachine, I think if it works on one it should work on the other.
The problem I'm having with testing right now is that the client install is broken since it PreDepends on python-pip, and that's not getting installed by the preseed yet. I can commit a fix for that, but I think we're redoing that anyway, so I might just wait until that's ready.
Looks okay to me. I think there might be a small race condition between when the while
tests the lock and the dpkg -i runs in which another process could obtain the lock. However
it's such a small window.