{"action":"opened","issue":{"url":"https://api.github.com/repos/chef-cookbooks/maven/issues/100","repository_url":"https://api.github.com/repos/chef-cookbooks/maven","labels_url":"https://api.github.com/repos/chef-cookbooks/maven/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/maven/issues/100/comments","events_url":"https://api.github.com/repos/chef-cookbooks/maven/issues/100/events","html_url":"https://github.com/chef-cookbooks/maven/issues/100","id":545235795,"node_id":"MDU6SXNzdWU1NDUyMzU3OTU=","number":100,"title":"Idempotent","user":{"login":"jlosito","id":25142529,"node_id":"MDQ6VXNlcjI1MTQyNTI5","avatar_url":"https://avatars3.githubusercontent.com/u/25142529?v=4","gravatar_id":"","url":"https://api.github.com/users/jlosito","html_url":"https://github.com/jlosito","followers_url":"https://api.github.com/users/jlosito/followers","following_url":"https://api.github.com/users/jlosito/following{/other_user}","gists_url":"https://api.github.com/users/jlosito/gists{/gist_id}","starred_url":"https://api.github.com/users/jlosito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlosito/subscriptions","organizations_url":"https://api.github.com/users/jlosito/orgs","repos_url":"https://api.github.com/users/jlosito/repos","events_url":"https://api.github.com/users/jlosito/events{/privacy}","received_events_url":"https://api.github.com/users/jlosito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2020-01-04T03:38:33Z","updated_at":"2020-01-04T03:38:33Z","closed_at":null,"author_association":"NONE","body":"### Cookbook version\r\n3.5.0\r\n\r\n### Chef-client version\r\n14.8.12\r\n\r\n### Platform Details\r\nUbuntu 16.04.6\r\n\r\n### Scenario:\r\nIt appears that the cookbook is not idempotent when during the default recipe. The ruby block which tries to /usr/local/maven-3.5.2/bin' to chef-client ENV['PATH'] possibly due to the ark cookbook.\r\n\r\n### Steps to Reproduce:\r\nI've created a simple wrapper cookbook with `include_recipe 'maven::default'` as the only line. I've also checked for idempotency in the .kitchen.yaml.\r\n```\r\n$ git clone https://github.com/jlosito/maven-test.git\r\n$ cd maven-test\r\n$ kitchen converge\r\n```\r\n\r\n### Expected Result:\r\nThe cookbook to be idempotent.\r\n\r\n### Actual Result:\r\n```\r\n$ kitchen converge\r\n-----> Starting Kitchen (v1.24.0)\r\n-----> Creating <default-ubuntu-1604>...\r\n       Bringing machine 'default' up with 'virtualbox' provider...\r\n       ==> default: Importing base box 'bento/ubuntu-16.04'...\r\n==> default: Matching MAC address for NAT networking...\r\n       ==> default: Checking if box 'bento/ubuntu-16.04' is up to date...\r\n       ==> default: Setting the name of the VM: kitchen-maven-test-default-ubuntu-1604\r\n       ==> default: Clearing any previously set network interfaces...\r\n       ==> default: Preparing network interfaces based on configuration...\r\n           default: Adapter 1: nat\r\n       ==> default: Forwarding ports...\r\n           default: 22 (guest) => 2222 (host) (adapter 1)\r\n       ==> default: Booting VM...\r\n       ==> default: Waiting for machine to boot. This may take a few minutes...\r\n           default: SSH address: 127.0.0.1:2222\r\n           default: SSH username: vagrant\r\n           default: SSH auth method: private key\r\n           default: \r\n           default: Vagrant insecure key detected. Vagrant will automatically replace\r\n           default: this with a newly generated keypair for better security.\r\n           default: \r\n           default: Inserting generated public key within guest...\r\n           default: Removing insecure key from the guest if it's present...\r\n           default: Key inserted! Disconnecting and reconnecting using new SSH key...\r\n       ==> default: Machine booted and ready!\r\n       ==> default: Checking for guest additions in VM...\r\n           default: The guest additions on this VM do not match the installed version of\r\n           default: VirtualBox! In most cases this is fine, but in rare cases it can\r\n           default: prevent things such as shared folders from working properly. If you see\r\n           default: shared folder errors, please make sure the guest additions within the\r\n           default: virtual machine match the version of VirtualBox you have installed on\r\n           default: your host and reload your VM.\r\n           default: \r\n           default: Guest Additions Version: 6.1.0\r\n           default: VirtualBox Version: 5.2\r\n       ==> default: Setting hostname...\r\n       ==> default: Mounting shared folders...\r\n           default: /tmp/omnibus/cache => /home/jlosito/.kitchen/cache\r\n       ==> default: Machine not provisioned because `--no-provision` is specified.\r\n       [SSH] Established\r\n       Vagrant instance <default-ubuntu-1604> created.\r\n       Finished creating <default-ubuntu-1604> (0m38.38s).\r\n-----> Converging <default-ubuntu-1604>...\r\n       Preparing files for transfer\r\n       Preparing dna.json\r\n       Resolving cookbook dependencies with Berkshelf 7.0.7...\r\n       Removing non-cookbook files before transfer\r\n       Preparing validation.pem\r\n       Preparing client.rb\r\n       ubuntu 16.04 x86_64\r\n       Getting information for chef stable 14.8.12 for ubuntu...\r\n       downloading https://omnitruck.chef.io/stable/chef/metadata?v=14.8.12&p=ubuntu&pv=16.04&m=x86_64\r\n         to file /tmp/install.sh.1637/metadata.txt\r\n       trying wget...\r\n       sha1\t27aa243ab6a05b70115357ea1e552a381a65dd85\r\n       sha256\tcb1f032bc9d0031e12464d7b394901fe340d8e8ef6fe4413e125b9e803b3aaf5\r\n       url\thttps://packages.chef.io/files/stable/chef/14.8.12/ubuntu/16.04/chef_14.8.12-1_amd64.deb\r\n       version\t14.8.12\r\n       downloaded metadata file looks valid...\r\n       /tmp/omnibus/cache/chef_14.8.12-1_amd64.deb exists\r\n       Comparing checksum with sha256sum...\r\n       Installing chef 14.8.12\r\n       installing with dpkg...\r\n       Selecting previously unselected package chef.\r\n(Reading database ... 38555 files and directories currently installed.)\r\n       Preparing to unpack .../cache/chef_14.8.12-1_amd64.deb ...\r\n       Unpacking chef (14.8.12-1) ...\r\n       Setting up chef (14.8.12-1) ...\r\n       Thank you for installing Chef!\r\n       Transferring files to <default-ubuntu-1604>\r\n       Starting Chef Client, version 14.8.12\r\n       Creating a new client identity for default-ubuntu-1604 using the validator key.\r\n       resolving cookbooks for run list: [\"maven-test::default\"]\r\n       Synchronizing Cookbooks:\r\n         - maven-test (0.1.0)\r\n         - ark (5.0.0)\r\n         - maven (5.3.0)\r\n         - seven_zip (3.1.2)\r\n         - windows (6.0.1)\r\n       Installing Cookbook Gems:\r\n       Compiling Cookbooks...\r\n       Converging 5 resources\r\n       Recipe: ark::default\r\n         * apt_package[libtool, autoconf, make, unzip, rsync, gcc, autogen, shtool, pkg-config] action install\r\n           - install version 2.4.6-0.1 of package libtool\r\n           - install version 2.69-9 of package autoconf\r\n           - install version 6.0-20ubuntu1 of package unzip\r\n           - install version 1:5.18.7-3 of package autogen\r\n           - install version 2.0.8-8 of package shtool\r\n           - install version 0.29.1-0ubuntu1 of package pkg-config\r\n       Recipe: maven::default\r\n         * group[create the group for Maven] action create (skipped due to not_if)\r\n         * linux_user[create the user for Maven] action create (skipped due to not_if)\r\n         * ark[maven] action install\r\n           * directory[/usr/local/maven-3.5.2] action create\r\n             - create new directory /usr/local/maven-3.5.2\r\n           * remote_file[/tmp/kitchen/cache/maven-3.5.2.tar.gz] action create\r\n             - create new file /tmp/kitchen/cache/maven-3.5.2.tar.gz\r\n             - update content in file /tmp/kitchen/cache/maven-3.5.2.tar.gz from none to 707b1f\r\n             (new content is binary, diff output suppressed)\r\n           * execute[unpack /tmp/kitchen/cache/maven-3.5.2.tar.gz] action nothing (skipped due to action :nothing)\r\n           * execute[set owner on /usr/local/maven-3.5.2] action nothing (skipped due to action :nothing)\r\n           * link[/usr/local/maven] action create\r\n             - create symlink at /usr/local/maven to /usr/local/maven-3.5.2\r\n           * template[/etc/profile.d/maven.sh] action create\r\n             - create new file /etc/profile.d/maven.sh\r\n             - update content in file /etc/profile.d/maven.sh from none to f704c7\r\n             --- /etc/profile.d/maven.sh\t2020-01-04 03:12:47.357657006 +0000\r\n             +++ /etc/profile.d/.chef-maven20200104-1721-116sycf.sh\t2020-01-04 03:12:47.353655006 +0000\r\n             @@ -1 +1,2 @@\r\n             +export PATH=/usr/local/maven-3.5.2/bin:$PATH\r\n             - change mode from '' to '0755'\r\n             - change owner from '' to 'root'\r\n             - change group from '' to 'root'\r\n           * ruby_block[adding '/usr/local/maven-3.5.2/bin' to chef-client ENV['PATH']] action run\r\n             - execute the ruby block adding '/usr/local/maven-3.5.2/bin' to chef-client ENV['PATH']\r\n           * execute[unpack /tmp/kitchen/cache/maven-3.5.2.tar.gz] action run\r\n             - execute /bin/tar xzf /tmp/kitchen/cache/maven-3.5.2.tar.gz --strip-components=1\r\n           * execute[set owner on /usr/local/maven-3.5.2] action run\r\n             - execute chown -R root:root /usr/local/maven-3.5.2\r\n         \r\n         * template[/etc/mavenrc] action create\r\n           - create new file /etc/mavenrc\r\n           - update content in file /etc/mavenrc from none to 4687e1\r\n           --- /etc/mavenrc\t2020-01-04 03:12:47.533744999 +0000\r\n           +++ /etc/.chef-mavenrc20200104-1721-1q0v8bu\t2020-01-04 03:12:47.533744999 +0000\r\n           @@ -1 +1,3 @@\r\n           +export M2_HOME=/usr/local/maven\r\n           +export MAVEN_OPTS=\"-Dmaven.repo.local=$HOME/.m2/repository -Xmx384m\"\r\n           - change mode from '' to '0755'\r\n       \r\n       Running handlers:\r\n       Running handlers complete\r\n       Chef Client finished, 10/14 resources updated in 25 seconds\r\n       Starting Chef Client, version 14.8.12\r\n       resolving cookbooks for run list: [\"maven-test::default\"]\r\n       Synchronizing Cookbooks:\r\n         - maven-test (0.1.0)\r\n         - ark (5.0.0)\r\n         - windows (6.0.1)\r\n         - maven (5.3.0)\r\n         - seven_zip (3.1.2)\r\n       Installing Cookbook Gems:\r\n       Compiling Cookbooks...\r\n       Converging 5 resources\r\n       Recipe: ark::default\r\n         * apt_package[libtool, autoconf, make, unzip, rsync, gcc, autogen, shtool, pkg-config] action install (up to date)\r\n       Recipe: maven::default\r\n         * group[create the group for Maven] action create (skipped due to not_if)\r\n         * linux_user[create the user for Maven] action create (skipped due to not_if)\r\n         * ark[maven] action install\r\n           * directory[/usr/local/maven-3.5.2] action create (up to date)\r\n           * remote_file[/tmp/kitchen/cache/maven-3.5.2.tar.gz] action create (up to date)\r\n           * execute[unpack /tmp/kitchen/cache/maven-3.5.2.tar.gz] action nothing (skipped due to action :nothing)\r\n           * execute[set owner on /usr/local/maven-3.5.2] action nothing (skipped due to action :nothing)\r\n           * link[/usr/local/maven] action create (up to date)\r\n           * template[/etc/profile.d/maven.sh] action create (up to date)\r\n           * ruby_block[adding '/usr/local/maven-3.5.2/bin' to chef-client ENV['PATH']] action run\r\n             - execute the ruby block adding '/usr/local/maven-3.5.2/bin' to chef-client ENV['PATH']\r\n         \r\n         * template[/etc/mavenrc] action create (up to date)\r\n       \r\n       Running handlers:\r\n       First chef run should have reached a converged state.\r\n       Resources updated in a second chef-client run:\r\n       - ark[maven]\r\n       Killed\r\n>>>>>> ------Exception-------\r\n>>>>>> Class: Kitchen::ActionFailed\r\n>>>>>> Message: 1 actions failed.\r\n>>>>>>     Converge failed on instance <default-ubuntu-1604>.  Please see .kitchen/logs/default-ubuntu-1604.log for more details\r\n>>>>>> ----------------------\r\n>>>>>> Please see .kitchen/logs/kitchen.log for more details\r\n>>>>>> Also try running `kitchen diagnose --all` for configuration\r\n```\r\n"}}
{"actor":{"display_login":"jlosito"}}