Exit 100 with apt-get ugrade/dist-upgrade during provisioning of VM
During provisioning of ubuntu 18.04 (local mirror) we are running apt-get autoclean, then update and finally dist-upgrade (also tried upgrade) and during the dist-upgrade (or upgrade) the program generates an exit 100. I've tried various environment settings and command line options but unable to resolve this.
I've not seen anything in the logs that would indicate WHY dist-upgrade is failing, actually not failing, it's running but the program immediately generates a exit 100 when it's running... the end result is follow up processes stall because files are locked by apt. If I run the command manually on the VM it works fine (which leads me to think its an environment issue).
Any thoughts?
Thanks for the tip (redirect/logging). I kept digging for logs and didnt think to just force the output to file... Turned out to be this:
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
I had to disable auto-update configs in the template and after provisioning our puppet configuration enables. I also found that there is a new command to "wait" for the lock to timeout (tho I've not tested) that should also work. Set to -1 it waits forever. This one should wait 120 seconds.
apt-get -o DPkg::Lock::Timeout=120 dist-upgrade