{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3983","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3983/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3983/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3983/events","html_url":"https://github.com/ManageIQ/manageiq/issues/3983","id":102390283,"number":3983,"title":"Error caught: [NoMethodError]: undefined method `to_i' for [\"59\"]:Array  Method:[rescue in deliver]","user":{"login":"lfu","id":2593270,"avatar_url":"https://avatars.githubusercontent.com/u/2593270?v=3","gravatar_id":"","url":"https://api.github.com/users/lfu","html_url":"https://github.com/lfu","followers_url":"https://api.github.com/users/lfu/followers","following_url":"https://api.github.com/users/lfu/following{/other_user}","gists_url":"https://api.github.com/users/lfu/gists{/gist_id}","starred_url":"https://api.github.com/users/lfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfu/subscriptions","organizations_url":"https://api.github.com/users/lfu/orgs","repos_url":"https://api.github.com/users/lfu/repos","events_url":"https://api.github.com/users/lfu/events{/privacy}","received_events_url":"https://api.github.com/users/lfu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/ui","name":"ui","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-21T14:25:50Z","updated_at":"2015-08-21T15:08:40Z","closed_at":null,"body":"**Steps to reproduce the issue**\r\n1 Select a VM.\r\n2 Select Perform SmartState Analysis from Configuration.\r\n3 Check the log you would see messages like the following:\r\n\r\n```\r\n[----] I, [2015-08-21T10:02:29.385378 #13461:ce7994]  INFO -- : MIQ(MiqQueue.put) Message id: [70335],  id: [], Zone: [default], Role: [], Server: [], Ident: [generic], Target id: [], Instance id: [], Task id: [], Command: [Vm.invoke_tasks], Timeout: [600], Priority: [100], State: [ready], Deliver On: [], Data: [], Args: [{:ids=>[[\"59\"], []], :task=>\"retire_now\", :userid=>\"admin\"}]\r\n\r\n[----] E, [2015-08-21T10:02:32.672965 #13442:de7998] ERROR -- : MIQ(MiqQueue#deliver) Message id: [70335], Error: [undefined method `to_i' for [\"59\"]:Array]\r\n[----] E, [2015-08-21T10:02:32.673216 #13442:de7998] ERROR -- : [NoMethodError]: undefined method `to_i' for [\"59\"]:Array  Method:[rescue in deliver]\r\n[----] E, [2015-08-21T10:02:32.673432 #13442:de7998] ERROR -- : /var/www/miq/vmdb/lib/extensions/ar_region.rb:43:in `id_to_region'\r\n/var/www/miq/vmdb/lib/extensions/ar_region.rb:83:in `id_in_current_region?'\r\n/var/www/miq/vmdb/lib/extensions/ar_region.rb:129:in `block in partition_ids_by_remote_region'\r\n/var/www/miq/vmdb/lib/extensions/ar_region.rb:129:in `each'\r\n/var/www/miq/vmdb/lib/extensions/ar_region.rb:129:in `partition'\r\n/var/www/miq/vmdb/lib/extensions/ar_region.rb:129:in `partition_ids_by_remote_region'\r\n/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:25:in `invoke_tasks'\r\n/var/www/miq/vmdb/app/models/miq_queue.rb:345:in `block in deliver'\r\n\r\n```\r\n\r\n**Error cause** \r\n```\r\nArgs: [{:ids=>[[\"59\"], []], :task=>\"retire_now\", :userid=>\"admin\"}]\r\n```  \r\n  :ids in args should be an array of ids, like [\"59\"]. \r\nBut process_objects in app/controllers/application_controller/ci_processing.rb was changed [here](https://github.com/ManageIQ/manageiq/blame/dac6b4e598289eb1585361176bdd7fcf8887b9f1/app/controllers/application_controller/ci_processing.rb#L1178) to call filter_ids_in_region which returns an array of two array elements, like [[\"59\"], []].\r\n\r\nThe return of filter_ids_in_region should be processed before it is passed into [options](https://github.com/ManageIQ/manageiq/blame/dac6b4e598289eb1585361176bdd7fcf8887b9f1/app/controllers/application_controller/ci_processing.rb#L1184)."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/133457078","html_url":"https://github.com/ManageIQ/manageiq/issues/3983#issuecomment-133457078","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3983","id":133457078,"user":{"login":"lgalis","id":12769982,"avatar_url":"https://avatars.githubusercontent.com/u/12769982?v=3","gravatar_id":"","url":"https://api.github.com/users/lgalis","html_url":"https://github.com/lgalis","followers_url":"https://api.github.com/users/lgalis/followers","following_url":"https://api.github.com/users/lgalis/following{/other_user}","gists_url":"https://api.github.com/users/lgalis/gists{/gist_id}","starred_url":"https://api.github.com/users/lgalis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgalis/subscriptions","organizations_url":"https://api.github.com/users/lgalis/orgs","repos_url":"https://api.github.com/users/lgalis/repos","events_url":"https://api.github.com/users/lgalis/events{/privacy}","received_events_url":"https://api.github.com/users/lgalis/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T15:08:40Z","updated_at":"2015-08-21T15:08:40Z","body":"@miq-bot assign @lgalis"}}