Skip to content

Instantly share code, notes, and snippets.

@charlesjohnson
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save charlesjohnson/a4ee6c73f5424c43ceb5 to your computer and use it in GitHub Desktop.

Select an option

Save charlesjohnson/a4ee6c73f5424c43ceb5 to your computer and use it in GitHub Desktop.

Revisions

  1. Charles Johnson revised this gist Jun 26, 2015. No changes.
  2. Charles Johnson revised this gist Jun 25, 2015. No changes.
  3. Charles Johnson created this gist Jun 25, 2015.
    4 changes: 4 additions & 0 deletions break.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    #temp/break.rb
    directory '/test/foo' do
    action :create
    end
    2 changes: 2 additions & 0 deletions client.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # /etc/chef/client.rb
    log_location '/var/log/opscode/foo.log'
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #/var/log/opscode/foo.log
    # Logfile created on 2015-06-25 23:57:55 +0000 by logger.rb/44203
    [2015-06-25T23:57:55+00:00] WARN: No cookbooks directory found at or above current directory. Assuming /root/temp.
    [2015-06-25T23:57:56+00:00] WARN: Node default-centos-65 has an empty run list.
    [2015-06-25T23:57:56+00:00] ERROR: Running exception handlers
    [2015-06-25T23:57:56+00:00] ERROR: Exception handlers complete
    [2015-06-25T23:57:56+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out
    [2015-06-25T23:57:56+00:00] ERROR: directory[/test/foo] (@recipe_files::/root/temp/break.rb line 1) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /test does not exist, cannot create /test/foo
    [2015-06-25T23:57:57+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
    45 changes: 45 additions & 0 deletions stdout
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    [root@default-centos-65 temp]# chef-client -z break.rb -c /etc/chef/client.rb
    Starting Chef Client, version 12.3.0
    resolving cookbooks for run list: []
    Synchronizing Cookbooks:
    Compiling Cookbooks...
    Converging 1 resources
    Recipe: @recipe_files::/root/temp/break.rb
    * directory[/test/foo] action create
    * Parent directory /test does not exist, cannot create /test/foo
    ================================================================================
    Error executing action `create` on resource 'directory[/test/foo]'
    ================================================================================

    Chef::Exceptions::EnclosingDirectoryDoesNotExist
    ------------------------------------------------
    Parent directory /test does not exist, cannot create /test/foo

    Resource Declaration:
    ---------------------
    # In /root/temp/break.rb

    1: directory '/test/foo' do
    2: action :create
    3: end

    Compiled Resource:
    ------------------
    # Declared in /root/temp/break.rb:1:in `from_file'

    directory("/test/foo") do
    action [:create]
    retries 0
    retry_delay 2
    default_guard_interpreter :default
    path "/test/foo"
    declared_type :directory
    cookbook_name "@recipe_files"
    recipe_name "/root/temp/break.rb"
    end


    Running handlers:
    Running handlers complete
    Chef Client failed. 0 resources updated in 1.208229417 seconds
    [root@default-centos-65 temp]#