`packer build` was failed
Closed this issue · 0 comments
hideokamoto commented
I try packer build packer_ec2.json
, but I saw following Chef error.
amazon-ebs:
amazon-ebs: ================================================================================
amazon-ebs: Recipe Compile Error in /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/chef_handler/attributes/default.rb
amazon-ebs: ================================================================================
amazon-ebs:
amazon-ebs: NoMethodError
amazon-ebs: -------------
amazon-ebs: undefined method `platform' for #<Chef::Node::Attribute:0x00000002536310>
amazon-ebs:
amazon-ebs: Cookbook Trace:
amazon-ebs: ---------------
amazon-ebs: /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/chef_handler/attributes/default.rb:23:in `from_file'
amazon-ebs:
amazon-ebs: Relevant File Content:
amazon-ebs: ----------------------
amazon-ebs: /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/chef_handler/attributes/default.rb:
amazon-ebs:
amazon-ebs: 16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
amazon-ebs: 17: # See the License for the specific language governing permissions and
amazon-ebs: 18: # limitations under the License.
amazon-ebs: 19: #
amazon-ebs: 20:
amazon-ebs: 21: default["chef_handler"]["root_user"] = "root"
amazon-ebs: 22:
amazon-ebs: 23>> case platform
amazon-ebs: 24: when "openbsd", "freebsd", "mac_os_x", "mac_os_x_server"
amazon-ebs: 25: default["chef_handler"]["root_group"] = "wheel"
amazon-ebs: 26: else
amazon-ebs: 27: default["chef_handler"]["root_group"] = "root"
amazon-ebs: 28: end
amazon-ebs: 29:
amazon-ebs: 30: default["chef_handler"]["handler_path"] = "#{File.expand_path(File.join(Chef::Config[:file_cache_path], '..'))}/handlers"
amazon-ebs: 31:
amazon-ebs:
amazon-ebs: System Info:
amazon-ebs: ------------
amazon-ebs: chef_version=13.0.118
amazon-ebs: platform=amazon
amazon-ebs: platform_version=2017.03
amazon-ebs: ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
amazon-ebs: program_name=chef-solo worker: ppid=8643;start=15:52:55;
amazon-ebs: executable=/opt/chef/bin/chef-solo
amazon-ebs:
amazon-ebs:
amazon-ebs: Running handlers:
amazon-ebs: [2017-04-23T15:52:57+00:00] ERROR: Running exception handlers
amazon-ebs: [2017-04-23T15:52:57+00:00] ERROR: Running exception handlers
amazon-ebs: Running handlers complete
amazon-ebs: [2017-04-23T15:52:57+00:00] ERROR: Exception handlers complete
amazon-ebs: [2017-04-23T15:52:57+00:00] ERROR: Exception handlers complete
amazon-ebs: Chef Client failed. 0 resources updated in 02 seconds
amazon-ebs: [2017-04-23T15:52:57+00:00] FATAL: Stacktrace dumped to /tmp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
amazon-ebs: [2017-04-23T15:52:57+00:00] FATAL: Stacktrace dumped to /tmp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
amazon-ebs: [2017-04-23T15:52:57+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
amazon-ebs: [2017-04-23T15:52:57+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
amazon-ebs: [2017-04-23T15:52:57+00:00] ERROR: undefined method `platform' for #<Chef::Node::Attribute:0x00000002536310>
amazon-ebs: [2017-04-23T15:52:57+00:00] ERROR: undefined method `platform' for #<Chef::Node::Attribute:0x00000002536310>
amazon-ebs: [2017-04-23T15:52:57+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
amazon-ebs: [2017-04-23T15:52:57+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: No volumes to clean up, skipping
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: Error executing Chef: Non-zero exit status: 1
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error executing Chef: Non-zero exit status: 1
==> Builds finished but no artifacts were created.