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

resource_tag update fails when attempting to use multiple resource_id values #243

Open
eedwardsdisco opened this issue May 30, 2016 · 5 comments

Comments

@eedwardsdisco
Copy link

Cookbook version

3.3.3

Chef-client version

Chef 12.7.2

Platform Details

AWS Ubuntu

Scenario:

use multiple resource_id values with aws_resource_tag

Steps to Reproduce:

  aws_resource_tag 'bunch_of_things_getting_tagged' do
    tags ({'my-tag-name' => 'my-tag-value'})
    resource_id array_of_ebs_volume_ids
    action :update
  end

Expected Result:

All volumes listed in resource_id will have the relevant tag updated

Actual Result:

Error, appears that providers/resource_tag.rb: load_current_resource fails to handle multiple resource_id values

sanitized to remove proprietary information

================================================================================
Error executing action `update` on resource 'aws_resource_tag[bunch_of_things_getting_tagged]'
================================================================================

ArgumentError
-------------
expected params[:filters][0][:values][0] to be a string

Cookbook Trace:
---------------
/var/chef/runs/40d7e64f-be7f-451b-92de-2b08a33c2463/local-mode-cache/cache/cookbooks/aws/providers/resource_tag.rb:90:in `load_current_resource'
/var/chef/runs/40d7e64f-be7f-451b-92de-2b08a33c2463/local-mode-cache/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

Resource Declaration:
---------------------
# In /var/chef/runs/40d7e64f-be7f-451b-92de-2b08a33c2463/local-mode-cache/cache/cookbooks/my-cookbook/recipes/ebs.rb

160:   aws_resource_tag 'bunch_of_things_getting_tagged' do
161:     tags ({'my-tag-name' => 'my-tag-value'})
162:     resource_id array_of_ebs_volume_ids
163:     action :update
164:   end
165: else

Compiled Resource:
------------------
# Declared in /var/chef/runs/40d7e64f-be7f-451b-92de-2b08a33c2463/local-mode-cache/cache/cookbooks/my-cookbook/recipes/ebs.rb:160:in `from_file'

aws_resource_tag("bunch_of_things_getting_tagged") do
action [:update]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :aws_resource_tag
cookbook_name "my-cookbook"
recipe_name "ebs"
tags {"my-tag-name"=>"my-tag-value"}
resource_id ["vol-1234567", "vol-2345678", "vol-3456789"]
end

[2016-05-30T21:04:30+00:00] INFO: Running queued delayed notifications before re-raising exception
[2016-05-30T21:04:30+00:00] ERROR: Running exception handlers
[2016-05-30T21:04:30+00:00] ERROR: Exception handlers complete
[2016-05-30T21:04:30+00:00] FATAL: Stacktrace dumped to /var/chef/runs/40d7e64f-be7f-451b-92de-2b08a33c2463/local-mode-cache/cache/chef-stacktrace.out
[2016-05-30T21:04:30+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-05-30T21:04:30+00:00] ERROR: aws_resource_tag[bunch_of_things_getting_tagged] (my-cookbook::ebs line 160) had an error: ArgumentError: expected params[:filters][0][:values][0] to be a string
[2016-05-30T21:04:30+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@tas50 tas50 added the Type: Bug label Jan 4, 2017
@jas0nfl0yd
Copy link

Would be great to see a fix for this.

@tas50
Copy link
Contributor

tas50 commented Jun 16, 2017

The 7.0 cookbook release refactored this resource a bit and added testing. Can someone take a look and see if this is still an issue

@gopisaba
Copy link
Contributor

I am seeing the same problem in 7.4.0 as well.

@sayshh
Copy link

sayshh commented Nov 22, 2020

This issue is still there in 8.3.0. Not sure what more information is required. A comment about the same would be helpful.

@ashishranacse
Copy link

I am facing this issue with 8.0.4 as well and the issue is in 'Needs Information'. Please confirm what information is required in order to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants