Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows_task: :day option not accepting integer value #8431

Open
vsingh-msys opened this issue Apr 30, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@vsingh-msys
Copy link
Contributor

commented Apr 30, 2019

Chef Version

14.10.9, 15.0.242

Platform Version

Windows 10

Replication Case

  • Run recipe with frequency :montly and day with any integer value.
windows_task 'chef-client' do
  command 'chef-client'
  run_level :highest
  frequency :monthly
  day 1
end

Reference docs: https://docs.chef.io/resource_windows_task.html

Client Output

>>>> Caused by NoMethodError: undefined method `split' for 1:Integer
C:/chef/lib/chef/provider/windows_task.rb:449:in `days_of_month'
C:/chef/lib/chef/provider/windows_task.rb:421:in `type'
C:/chef/lib/chef/provider/windows_task.rb:274:in `trigger'
C:/chef/lib/chef/provider/windows_task.rb:341:in `task_needs_update?'
C:/chef/lib/chef/provider/windows_task.rb:123:in `action_create'
C:/chef/lib/chef/provider.rb:190:in `run_action'
C:/chef/lib/chef/resource.rb:584:in `run_action'
C:/chef/lib/chef/runner.rb:70:in `run_action'
C:/chef/lib/chef/runner.rb:99:in `block (2 levels) in converge'
C:/chef/lib/chef/runner.rb:99:in `each'
C:/chef/lib/chef/runner.rb:99:in `block in converge'
C:/chef/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource'
C:/chef/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
C:/chef/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
C:/chef/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
C:/chef/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
C:/chef/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'
C:/chef/lib/chef/runner.rb:97:in `converge'
C:/chef/lib/chef/client.rb:667:in `block in converge'
C:/chef/lib/chef/client.rb:662:in `catch'
C:/chef/lib/chef/client.rb:662:in `converge'
C:/chef/lib/chef/client.rb:686:in `converge_and_save'
C:/chef/lib/chef/client.rb:278:in `run'
C:/chef/lib/chef/application.rb:303:in `run_with_graceful_exit_option'
C:/chef/lib/chef/application.rb:279:in `block in run_chef_client'
C:/chef/lib/chef/local_mode.rb:41:in `with_server_connectivity'
C:/chef/lib/chef/application.rb:262:in `run_chef_client'
C:/chef/lib/chef/application/client.rb:429:in `run_application'
C:/chef/lib/chef/application.rb:67:in `run'
C:/chef/chef-bin/bin/chef-client:25:in `<top (required)>'
C:/Users/test/AppData/Local/chefdk/gem/ruby/2.5.0/bin/chef-client:23:in `load'
C:/Users/test/AppData/Local/chefdk/gem/ruby/2.5.0/bin/chef-client:23:in `<main>'
[2019-04-28T11:42:32-07:00] FATAL: NoMethodError: windows_task[chef-client] (@recipe_files::C:/chef/task.rb line 1) had an error: NoMethodError: undefined method `split' for 1:Integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.