geerlingguy / packer-boxes

Jeff Geerling's Packer build configurations for Vagrant boxes.

Home Page:https://app.vagrantup.com/geerlingguy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when upgrading packages at startup

davidsalvador opened this issue · comments

During the apt -y update && apt-get -y update on scripts/ansible.sh looks like the package cloud-init requires interaction when upgrading:

openstack: Configuration file '/etc/cloud/cloud.cfg'
openstack: ==> Modified (by you or by a script) since installation.
openstack: ==> Package distributor has shipped an updated version.
openstack: What would you like to do about it ?  Your options are:
openstack: Y or I  : install the package maintainer's version
openstack: N or O  : keep your currently-installed version
openstack: D     : show the differences between the versions
openstack: Z     : start a shell to examine the situation
openstack: The default action is to keep your current version.
openstack: *** cloud.cfg (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package cloud-init (--configure):
openstack: end of file on stdin at conffile prompt
openstack: Errors were encountered while processing:
openstack: cloud-init
openstack: E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there any way to provide the option that is expecting?

@davidsalvador - Interesting... I last built the box last week and didn't run into this, so I wonder if there's some recent change in the repos that caused this to happen?

Also, are you using 16.04.1, or 16.04.0?

@geerlingguy I'm using Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-36-generic x86_64)

I temporarily fixed it by adding the following to scripts/ansible.sh:

echo "Y" > silent-configure
apt-get -y upgrade < silent-configure

However, this might not be the "cleanest" way of fixing it

Closing this as I can't reproduce this issue and haven't seen it happen on any of my builds; if you run into the problem, please use @davidsalvador's workaround above.