{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/chef-client/issues/523","repository_url":"https://api.github.com/repos/chef-cookbooks/chef-client","labels_url":"https://api.github.com/repos/chef-cookbooks/chef-client/issues/523/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/chef-client/issues/523/comments","events_url":"https://api.github.com/repos/chef-cookbooks/chef-client/issues/523/events","html_url":"https://github.com/chef-cookbooks/chef-client/issues/523","id":258627445,"number":523,"title":"Running chef-client cookbook on Windows 10 produces an \"invalid date\" error.","user":{"login":"billmeyer","id":5712808,"avatar_url":"https://avatars0.githubusercontent.com/u/5712808?v=4","gravatar_id":"","url":"https://api.github.com/users/billmeyer","html_url":"https://github.com/billmeyer","followers_url":"https://api.github.com/users/billmeyer/followers","following_url":"https://api.github.com/users/billmeyer/following{/other_user}","gists_url":"https://api.github.com/users/billmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/billmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billmeyer/subscriptions","organizations_url":"https://api.github.com/users/billmeyer/orgs","repos_url":"https://api.github.com/users/billmeyer/repos","events_url":"https://api.github.com/users/billmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/billmeyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-18T21:29:57Z","updated_at":"2017-09-25T21:59:41Z","closed_at":null,"author_association":"NONE","body":"### Cookbook version\r\n8.1.8\r\n\r\n### Chef-client version\r\n13.4.24\r\n\r\n### Platform Details\r\nWindows 10 Pro - Version 1703\r\n\r\n### Scenario:\r\nAdd the chef-client cookbook to the run list for a Windows 10 node.\r\n\r\n### Steps to Reproduce:\r\nGetting an \"invalid date\" error when running chef-client as Administrator on Windows 10 via a PowerShell prompt.\r\n\r\n### Expected Result:\r\nThe chef-client cookbook to complete without issuing an \"invalid date\" error.\r\n\r\n### Actual Result:\r\n\r\n```\r\nPS C:\\WINDOWS\\system32> chef-client\r\nStarting Chef Client, version 13.4.24\r\n[2017-09-18T16:24:21-05:00] INFO: *** Chef 13.4.24 ***\r\n[2017-09-18T16:24:21-05:00] INFO: Platform: x64-mingw32\r\n[2017-09-18T16:24:21-05:00] INFO: Chef-client pid: 11496\r\n[2017-09-18T16:24:21-05:00] INFO: The plugin path C:\\chef\\ohai\\plugins does not exist. Skipping...\r\n[2017-09-18T16:24:24-05:00] INFO: Run List is [role[base_windows10]]\r\n[2017-09-18T16:24:24-05:00] INFO: Run List expands to [chef-client, base_windows10, audit]\r\n[2017-09-18T16:24:24-05:00] INFO: Starting Chef Run for wpc1\r\n[2017-09-18T16:24:24-05:00] INFO: Running start handlers\r\n[2017-09-18T16:24:24-05:00] INFO: Start handlers complete.\r\nresolving cookbooks for run list: [\"chef-client\", \"base_windows10\", \"audit\"]\r\n[2017-09-18T16:24:24-05:00] INFO: Loading cookbooks [chef-client@8.1.8, cron@4.1.1, compat_resource@12.19.0, logrotate@2.1.0, windows@3.1.1, ohai@5.1.0, base_windows10@0.1.2, windows_rdp@0.1.1, audit@5\r\n.0.0]\r\nSynchronizing Cookbooks:\r\n  - chef-client (8.1.8)\r\n  - cron (4.1.1)\r\n  - compat_resource (12.19.0)\r\n  - logrotate (2.1.0)\r\n  - windows (3.1.1)\r\n  - ohai (5.1.0)\r\n  - base_windows10 (0.1.2)\r\n  - windows_rdp (0.1.1)\r\n  - audit (5.0.0)\r\nInstalling Cookbook Gems:\r\nCompiling Cookbooks...\r\n[2017-09-18T16:24:24-05:00] INFO: Found chef-client in C:/opscode/chef/bin/chef-client\r\nRecipe: audit::inspec\r\n  * inspec_gem[inspec] action install[2017-09-18T16:24:25-05:00] INFO: Processing inspec_gem[inspec] action install (audit::inspec line 20)\r\n[2017-09-18T16:24:25-05:00] INFO: Installation of InSpec required: false\r\n[2017-09-18T16:24:25-05:00] INFO: inspec_gem: not installing InSpec. It's already installed or an explicit version was not supplied.\r\n (up to date)\r\n[2017-09-18T16:24:25-05:00] INFO: loading handler from c:/chef/cache/cookbooks/audit/files/default/handler/audit_report\r\n  Converging 4 resources\r\nRecipe: chef-client::task\r\n  * windows_service[chef-client] action configure_startup[2017-09-18T16:24:25-05:00] INFO: Processing windows_service[chef-client] action configure_startup (chef-client::task line 31)\r\n (skipped due to only_if)\r\n  * chef_client_scheduled_task[Chef Client] action add[2017-09-18T16:24:25-05:00] INFO: Processing chef_client_scheduled_task[Chef Client] action add (chef-client::task line 37)\r\n\r\n    * directory[C:/chef/run] action create[2017-09-18T16:24:25-05:00] INFO: Processing directory[C:/chef/run] action create (c:/chef/cache/cookbooks/chef-client/libraries/helpers.rb line 56)\r\n (up to date)\r\n    * directory[C:/chef/cache] action create[2017-09-18T16:24:25-05:00] INFO: Processing directory[C:/chef/cache] action create (c:/chef/cache/cookbooks/chef-client/libraries/helpers.rb line 56)\r\n (up to date)\r\n    * directory[C:/chef/backup] action create[2017-09-18T16:24:25-05:00] INFO: Processing directory[C:/chef/backup] action create (c:/chef/cache/cookbooks/chef-client/libraries/helpers.rb line 56)\r\n (up to date)\r\n    * directory[C:/chef/log] action create[2017-09-18T16:24:25-05:00] INFO: Processing directory[C:/chef/log] action create (c:/chef/cache/cookbooks/chef-client/libraries/helpers.rb line 56)\r\n (up to date)\r\n    * directory[C:/chef] action create[2017-09-18T16:24:25-05:00] INFO: Processing directory[C:/chef] action create (c:/chef/cache/cookbooks/chef-client/libraries/helpers.rb line 56)\r\n (up to date)\r\n    * windows_task[chef-client] action create[2017-09-18T16:24:25-05:00] INFO: Processing windows_task[chef-client] action create (c:/chef/cache/cookbooks/chef-client/resources/scheduled_task.rb line 4\r\n6)\r\n\r\n\r\n      ================================================================================\r\n      Error executing action `create` on resource 'windows_task[chef-client]'\r\n      ================================================================================\r\n\r\n      ArgumentError\r\n      -------------\r\n      invalid date\r\n\r\n      Resource Declaration:\r\n      ---------------------\r\n      # In c:/chef/cache/cookbooks/chef-client/resources/scheduled_task.rb\r\n\r\n       46:   windows_task 'chef-client' do\r\n       47:     run_level :highest\r\n       48:     command \"cmd /c \\\"#{client_cmd}\\\"\"\r\n       49:\r\n       50:     user               new_resource.user\r\n       51:     password           new_resource.password\r\n       52:     frequency          new_resource.frequency.to_sym\r\n       53:     frequency_modifier new_resource.frequency_modifier\r\n       54:     start_time         new_resource.start_time || start_time\r\n       55:   end\r\n       56: end\r\n\r\n      Compiled Resource:\r\n      ------------------\r\n      # Declared in c:/chef/cache/cookbooks/chef-client/resources/scheduled_task.rb:46:in `block in class_from_file'\r\n\r\n      windows_task(\"chef-client\") do\r\n        action :create\r\n        default_guard_interpreter :default\r\n        task_name \"chef-client\"\r\n        declared_type :windows_task\r\n        cookbook_name \"chef-client\"\r\n        run_level :highest\r\n        command \"cmd /c \\\"C:/opscode/chef/bin/chef-client -L C:/chef/log/client.log -c C:/chef/client.rb -s 300\\\"\"\r\n        user \"SYSTEM\"\r\n        password nil\r\n        frequency :minute\r\n        frequency_modifier 30\r\n        start_time \"16:54\"\r\n        execution_time_limit \"PT72H\"\r\n        start_day \"9/18/2017\"\r\n      end\r\n\r\n      System Info:\r\n      ------------\r\n      chef_version=13.4.24\r\n      platform=windows\r\n      platform_version=10.0.15063\r\n      ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]\r\n      program_name=C:/opscode/chef/bin/chef-client\r\n      executable=C:/opscode/chef/bin/chef-client\r\n\r\n[2017-09-18T16:24:25-05:00] INFO: Running queued delayed notifications before re-raising exception\r\n\r\n    ================================================================================\r\n    Error executing action `add` on resource 'chef_client_scheduled_task[Chef Client]'\r\n    ================================================================================\r\n\r\n    ArgumentError\r\n    -------------\r\n    windows_task[chef-client] (c:/chef/cache/cookbooks/chef-client/resources/scheduled_task.rb line 46) had an error: ArgumentError: invalid date\r\n\r\n    Resource Declaration:\r\n    ---------------------\r\n    # In c:/chef/cache/cookbooks/chef-client/recipes/task.rb\r\n\r\n     37: chef_client_scheduled_task 'Chef Client' do\r\n     38:   user node['chef_client']['task']['user']\r\n     39:   password node['chef_client']['task']['password']\r\n     40:   frequency node['chef_client']['task']['frequency']\r\n     41:   frequency_modifier lazy { node['chef_client']['task']['frequency_modifier'] }\r\n     42:   start_time node['chef_client']['task']['start_time']\r\n     43:   splay node['chef_client']['splay']\r\n     44:   config_directory node['chef_client']['conf_dir']\r\n     45:   log_directory node['chef_client']['log_dir']\r\n     46:   chef_binary_path node['chef_client']['bin']\r\n     47:   daemon_options node['chef_client']['daemon_options']\r\n     48: end\r\n\r\n    Compiled Resource:\r\n    ------------------\r\n    # Declared in c:/chef/cache/cookbooks/chef-client/recipes/task.rb:37:in `from_file'\r\n\r\n    chef_client_scheduled_task(\"Chef Client\") do\r\n      action [:add]\r\n      default_guard_interpreter :default\r\n      declared_type :chef_client_scheduled_task\r\n      cookbook_name \"chef-client\"\r\n      recipe_name \"task\"\r\n      user \"SYSTEM\"\r\n      password nil\r\n      frequency \"minute\"\r\n      frequency_modifier 30\r\n      start_time nil\r\n      splay \"300\"\r\n      config_directory \"C:/chef\"\r\n      log_directory \"C:/chef/log\"\r\n      chef_binary_path \"C:/opscode/chef/bin/chef-client\"\r\n      daemon_options []\r\n    end\r\n\r\n    System Info:\r\n    ------------\r\n    chef_version=13.4.24\r\n    platform=windows\r\n    platform_version=10.0.15063\r\n    ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]\r\n    program_name=C:/opscode/chef/bin/chef-client\r\n    executable=C:/opscode/chef/bin/chef-client\r\n\r\n[2017-09-18T16:24:25-05:00] INFO: Running queued delayed notifications before re-raising exception\r\n\r\nRunning handlers:\r\n[2017-09-18T16:24:25-05:00] ERROR: Running exception handlers\r\nRunning handlers complete\r\n[2017-09-18T16:24:25-05:00] ERROR: Exception handlers complete\r\nChef Client failed. 0 resources updated in 04 seconds\r\n[2017-09-18T16:24:25-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out\r\n[2017-09-18T16:24:25-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report\r\n[2017-09-18T16:24:25-05:00] FATAL: ArgumentError: chef_client_scheduled_task[Chef Client] (chef-client::task line 37) had an error: ArgumentError: windows_task[chef-client] (c:/chef/cache/cookbooks/che\r\nf-client/resources/scheduled_task.rb line 46) had an error: ArgumentError: invalid date\r\nPS C:\\WINDOWS\\system32>\r\n```"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/chef-client/issues/comments/332026220","html_url":"https://github.com/chef-cookbooks/chef-client/issues/523#issuecomment-332026220","issue_url":"https://api.github.com/repos/chef-cookbooks/chef-client/issues/523","id":332026220,"user":{"login":"croffe","id":122574,"avatar_url":"https://avatars1.githubusercontent.com/u/122574?v=4","gravatar_id":"","url":"https://api.github.com/users/croffe","html_url":"https://github.com/croffe","followers_url":"https://api.github.com/users/croffe/followers","following_url":"https://api.github.com/users/croffe/following{/other_user}","gists_url":"https://api.github.com/users/croffe/gists{/gist_id}","starred_url":"https://api.github.com/users/croffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croffe/subscriptions","organizations_url":"https://api.github.com/users/croffe/orgs","repos_url":"https://api.github.com/users/croffe/repos","events_url":"https://api.github.com/users/croffe/events{/privacy}","received_events_url":"https://api.github.com/users/croffe/received_events","type":"User","site_admin":false},"created_at":"2017-09-25T21:59:41Z","updated_at":"2017-09-25T21:59:41Z","author_association":"NONE","body":"Bill,\r\n\r\nThis is an issue with the windows_task resource brought into Chef Client 13.4+ which fails when you pass in the start_day with the expected format (MM/DD/YYYY), but it is succeeding with a new format (DD-Mon-YYYY).  I've filed an issue to resolve.\r\n\r\nLink below:\r\nhttps://github.com/chef/chef/issues/6439\r\n"}}
{"actor":{"display_login":"croffe"}}