chef / omnitruck

Web service to automate the release of Omnibus artifacts
Apache License 2.0
25 stars 34 forks source link

Ubuntu Unattended upgrades package interferring #196

Closed doertedev closed 6 years ago

doertedev commented 8 years ago

Hi. Not even sure this is the right place to ask this but...

On a packer AMI for a KitchenCI image of both trusty + xenial I am testing a cookbook for, I forgot to turn off periodic upgrades (unattended-updates package).

Outcome: Kitchen boots the instance, connects, wgets Chef and fails.

Question: Wouldn't it make sense to let the user know that, if this package is installed, and dpkg fails to pull a lock, that this might be the cause for the issue? I mean neither does it have to be the issue, nor do I want to propose anything more than a helpful message.

Logs:

 bundle exec kitchen converge ubuntu-1604 
-----> Starting Kitchen (v1.10.2)
-----> Converging <instana-backend-ubuntu-1604>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 4.3.5...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
       sudo: unable to resolve host ip-10-255-211-7
-----> Installing Chef Omnibus (12.13.37)
       Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
       Trying wget...
       Download complete.
       sudo: unable to resolve host ip-10-255-211-7
       ubuntu 16.04 x86_64
       Getting information for chef stable 12.13.37 for ubuntu...
       downloading https://omnitruck.chef.io/stable/chef/metadata?v=12.13.37&p=ubuntu&pv=16.04&m=x86_64
         to file /tmp/install.sh.1948/metadata.txt
       trying wget...
       sha1 72a0a10ba5684d1e51590c1bc022bcb2e99348c6
       sha256   973c2bc9a84822158ba7c0c360d0a25c97420f293ccbe5d8019615a411460785
       url  https://packages.chef.io/stable/ubuntu/14.04/chef_12.13.37-1_amd64.deb
       version  12.13.37
       downloaded metadata file looks valid...
       downloading https://packages.chef.io/stable/ubuntu/14.04/chef_12.13.37-1_amd64.deb
         to file /tmp/install.sh.1948/chef_12.13.37-1_amd64.deb
       trying wget...
       Comparing checksum with sha256sum...
       Installing chef 12.13.37
       installing with dpkg...
       dpkg: error: dpkg status database is locked by another process
       Installation failed
       Version: 12.13.37

       Please file a Bug Report at https://github.com/chef/omnitruck/issues/new
       Alternatively, feel free to open a Support Ticket at https://www.chef.io/support/tickets
       More Chef support resources can be found at https://www.chef.io/support

       Please include as many details about the problem as possible i.e., how to reproduce
       the problem (if possible), type of the Operating System and its version, etc.,
       and any other relevant details that might help us with troubleshooting.

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <instana-backend-ubuntu-1604>.  Please see .kitchen/logs/ubuntu-1604.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
rake aborted!
Command failed with status (20): [ bundle exec kitchen converge...]
`pwd`/tests/Rakefile:36:in `block in <top (required)>'
Tasks: TOP => single_converge
(See full trace by running task with --trace)

Ideas?

Thanks in advance.

jtimberman commented 6 years ago

Hello!

I'm sorry that we never followed up on this issue. I'm not aware of the presence of this problem on any current releases of the Kitchen images we provide. As such, and given the age of this, I'm going to close this issue. If it is still a problem, please reopen and follow up in the Chef Community Slack #test-kitchen channel.

Thank you, Joshua