ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.34k stars 897 forks source link

Button configured with 'Submit All' only executing automation request for one VM object #22619

Open hkhatri2 opened 1 year ago

hkhatri2 commented 1 year ago

When selecting an automation request for multiple VMs using a button configured with 'Submit All', only the first VM has the request carried out (e.g. only the first target_object_id in the array is delivered from evm to the automate domain).

The others VMs remain unchanged. It is worth noting that we recently upgraded our MIQ release to Najdorf.

In these logs, we submit automation requests on 3 VMs simultaneously using the configured 'Submit All' button. (88181, 88182, and 88346). The automation request only occurs on the first VM (88181).

Evm Delivery Log:

INFO -- evm: MIQ(MiqAeEngine.deliver) Delivering
{"request"=>"request_retire_extend", :target_object_type=>"VmOrTemplate",
"Array::target_object_ids"=>"Integer::88181,Integer::88182,Integer::88346", "result_format"=>"ignore"}
 for object [.] with state [] to Automate

Automation Log:

INFO -- automation: <automation_request> noguid: #011 Attribute: target_object_ids = [88181]
Fryguy commented 1 year ago

I'm surprised the Array::target_object_ids has Integer:: in it...I would have expected "88181,88182,88346". How is this array being constructed?

Also what version is this?

hkhatri2 commented 1 year ago

Hi, we're not changing anything in the application code, so it should just be constructed by first selecting multiple VMs, and then using a 'Submit All' button on those VMs.

This is occurring from an MiqAeEngine.deliver to the MiqQueue, so we believe that the array is being constructed in the resource_action_spec.rb method, and not the automate_queue_hash() function in resource_action.rb, which also uses target_object_ids in a similar way (though there is a possibility of that too).

    context 'with targets' do
      let(:zone_name) { nil }
      it "validates queue entry" do
        targets = [FactoryBot.create(:vm_vmware), FactoryBot.create(:vm_vmware)]
        ae_attributes[:target_object_type] = targets.first.class.base_class.name
        klass = targets.first.id.class
        ae_attributes['Array::target_object_ids'] = targets.collect { |t| "#{klass}::#{t.id}" }.join(",")
        expect(MiqQueue).to receive(:put).with(q_options).once
        ra.deliver_queue({}, targets, user)
      end
    end

Our best guess is that the deliver is triggered here, where the Array has been set to have Integer::id elements instead of just id elements.

We are using najdorf-1.3.

miq-bot commented 10 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot commented 6 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 3 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 2 weeks ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 2 weeks ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.