Score:0

Exit 100 with apt-get ugrade/dist-upgrade during provisioning of VM

br flag

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?

waltinator avatar
it flag
The `100` exit code is `apt-get`'s way of telling you "I had previous errors". Look at the earlier errors. Append "`&> /tmp/my.log`" to capture these messages.
waltinator avatar
it flag
Comments are designed for US to ask YOU questions about your Question. You should [Edit] your question to add information. By updating your Question, and using the formatting buttons, you make all the information available to new readers. People shouldn't have to read a long series of comments to get the whole story.
Someone avatar
my flag
Please answer your question instead of editing and adding the solution.
ucemike avatar
br flag
Apologies for the incorrect etiquette, thanks for the notes on how to manage it ;)
Score:1
br flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.