Git Product home page Git Product logo

Comments (14)

thommay avatar thommay commented on July 17, 2024

Hi,
please can you confirm:
Which distribution and release?
that you're running from a git checkout of the cookbook?
the output of dpkg -l apt*

from apt.

thommay avatar thommay commented on July 17, 2024

and: dpkg -S /etc/apt/apt.conf.d/

from apt.

gdogaru avatar gdogaru commented on July 17, 2024

I am running on ec2, amazon linux Amazon Linux 2014.09
I do not have dpkg installed

this is from chef
Fetching 'apt' from https://github.com/opscode-cookbooks/apt.git (at master)
Using apt (2.6.1) from https://github.com/opscode-cookbooks/apt.git (at master)
Vendoring apt (2.6.1) to /opt/aws/opsworks/current/berkshelf-cookbooks/apt
[2015-03-23T14:42:34+00:00] INFO: Processing file[/var/lib/apt/periodic/update-success-stamp] action nothing (apt::default line 30)
[2015-03-23T14:42:34+00:00] INFO: Processing cookbook_file[/etc/apt/apt.conf.d/15update-stamp] action create (apt::default line 53)

Error executing action create on resource 'cookbook_file[/etc/apt/apt.conf.d/15update-stamp]'

Chef::Exceptions::EnclosingDirectoryDoesNotExist
Parent directory /etc/apt/apt.conf.d does not exist.

Resource Declaration:

In /var/lib/aws/opsworks/cache.stage2/cookbooks/apt/recipes/default.rb

53: cookbook_file '/etc/apt/apt.conf.d/15update-stamp' do
54: source '15update-stamp'
55: end
56:

Compiled Resource:

Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/apt/recipes/default.rb:53:in `from_file'

cookbook_file("/etc/apt/apt.conf.d/15update-stamp") do
provider Chef::Provider::CookbookFile
action "create"
retries 0
retry_delay 2
path "/etc/apt/apt.conf.d/15update-stamp"
backup 5
atomic_update true
source "15update-stamp"
cookbook_name "apt"
recipe_name "default"
end

from apt.

thommay avatar thommay commented on July 17, 2024

OK. Well, the fix is easy. But can I ask what you're using the apt cookbook for on amazon linux?

from apt.

gdogaru avatar gdogaru commented on July 17, 2024

deploying elastic search
The example we started from had apt in the recipes list for setup

from apt.

thommay avatar thommay commented on July 17, 2024

Well, you shouldn't see this error any more. But I can't imagine that including the apt cookbook on amazon linux is doing much besides making your converges more fragile and slower.

from apt.

gdogaru avatar gdogaru commented on July 17, 2024

here is the article, it's on AWS Blog
http://blogs.aws.amazon.com/application-management/post/Tx3MEVKS0A4G7R5/Deploying-Elasticsearch-with-OpsWorks

from apt.

thommay avatar thommay commented on July 17, 2024

Thanks. That blog seems to be a little incorrect, as they're using a cookbook that's not intended for their distribution of linux. If they were using debian or ubuntu, they'd want to have the apt cookbook. But since the blog post is using a red hat derived distribution, like centos or amazon linux, they ought to be using the yum cookbook.
I'd recommend you remove the apt cookbook from your deployment and test it.

from apt.

cvakiitho avatar cvakiitho commented on July 17, 2024

Hi @thommay ,

I'm not sure if it isn't my mistake, but I think there is still some issue when running apt on amazon( I know it doesn`t make any sense to run it, but some cookbook is doing it.

I have APT version 2.7.0 and:

Recipe: apt::default
  * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing)
  * directory[/etc/apt/apt.conf.d] action create (up to date)
  * cookbook_file[/etc/apt/apt.conf.d/15update-stamp] action create

    ================================================================================
    Error executing action `create` on resource 'cookbook_file[/etc/apt/apt.conf.d/15update-stamp]'
    ================================================================================

    RuntimeError
    ------------
    File files/default/15update-stamp does not exist for cookbook apt

    Resource Declaration:
    ---------------------
    # In /home/ec2-user/chef/cookbooks/apt-2.7.0/recipes/default.rb

     57: cookbook_file '/etc/apt/apt.conf.d/15update-stamp' do
     58:   source '15update-stamp'
     59: end
     60:

    Compiled Resource:
    ------------------
    # Declared in /home/ec2-user/chef/cookbooks/apt-2.7.0/recipes/default.rb:57:in `from_file'

from apt.

thommay avatar thommay commented on July 17, 2024

well, I just checked that the file exists in the download from supermarket. If you look in /home/ec2-user/chef/cookbooks/apt-2.7.0/files/default what do you see? (I'd strongly recommend you fix your cookbook though.)

from apt.

cvakiitho avatar cvakiitho commented on July 17, 2024

15update-stamp is there actually, I also tried copiing it into etc/apt/apt.conf.d/ directly, but it didn't help either.
Also it isn't in my cookbook, it is in dropwizard, and mongodb, but yeah I`ll probably remove it from those dependencies.

EDIT: apt-prox~v2.conf is in files/default as well, since you asked.

(Weird is though, I tried my cookbook on centos locally with chef-zero through kitchen. Also I tried it with chef-server and knife bootstrap, and it worked fine. But it does fail with chef-solo on amazon aws.)

from apt.

cvakiitho avatar cvakiitho commented on July 17, 2024

I removed apt dependency, and got same error for dropwizard cookbook, so I guess it's probably a chef-solo, or my setup issue... :/

from apt.

cvakiitho avatar cvakiitho commented on July 17, 2024

Ah, so it was my setup :) , cookbook has to be named "apt" not "apt-2.7.3",
Sorry...

from apt.

Puneeth-n avatar Puneeth-n commented on July 17, 2024

I seem to face this issue with apt version 2.7.0 installed via berkshelf. Ubuntu 12.04LTS. the file 15update-stamp is however present in files/default dir.

Chef Development Kit Version: 0.10.0
chef-client version: 12.5.1
berks version: 4.0.1
kitchen version: 1.4.2
Recipe: apt::default
  * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing)
  * directory[/etc/apt/apt.conf.d] action create (up to date)
  * cookbook_file[/etc/apt/apt.conf.d/15update-stamp] action create

    ================================================================================
    Error executing action `create` on resource 'cookbook_file[/etc/apt/apt.conf.d/15update-stamp]'
    ================================================================================

    RuntimeError
    ------------
    File files/default/15update-stamp does not exist for cookbook apt

    Resource Declaration:
    ---------------------
    # In /opt/tm-infrastructure-chef/cookbooks/apt-2.7.0/recipes/default.rb

     57: cookbook_file '/etc/apt/apt.conf.d/15update-stamp' do
     58:   source '15update-stamp'
     59: end
     60:

    Compiled Resource:
    ------------------
    # Declared in /opt/tm-infrastructure-chef/cookbooks/apt-2.7.0/recipes/default.rb:57:in `from_file'

    cookbook_file("/etc/apt/apt.conf.d/15update-stamp") do
      provider Chef::Provider::CookbookFile
      action [:create]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      path "/etc/apt/apt.conf.d/15update-stamp"
      backup 5
      atomic_update true
      source "15update-stamp"
      declared_type :cookbook_file
      cookbook_name :apt
      recipe_name "default"
    end

from apt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.