Skip to content

Commit

Permalink
Queue EBS storage refresh after cloud inventory is saved
Browse files Browse the repository at this point in the history
While parsing volumes immediately after new AWS manager is created, EBS
manager failed to get proper links to availability zones, because it was
parsing data in parallel to the cloud manager. This patch queues the EBS
storage manager parse in the same way as the network manager, i.e.
immediately after the cloud inventory is saved, EBS refreshes the data
once more.

Signed-off-by: Gregor Berginc <[email protected]>
  • Loading branch information
gberginc committed Jan 26, 2017
1 parent 6358226 commit c6e88e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def parse_targeted_inventory(ems, _target, inventory)
def save_inventory(ems, target, inventory_collections)
EmsRefresh.save_ems_inventory(ems, inventory_collections)
EmsRefresh.queue_refresh(ems.network_manager) if target.kind_of?(ManageIQ::Providers::BaseManager)
EmsRefresh.queue_refresh(ems.ebs_storage_manager) if target.kind_of?(ManageIQ::Providers::BaseManager)
end

def post_process_refresh_classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def expected_table_counts
:floating_ip => 12,
:guest_device => 0,
:hardware => 46,
:miq_queue => 49,
:miq_queue => 50,
:miq_template => 20,
:network => 14,
:network_port => 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def assert_table_counts
expect(SystemService.count).to eq(0)

expect(Relationship.count).to eq(2)
expect(MiqQueue.count).to eq(6)
expect(MiqQueue.count).to eq(7)
end

def assert_ems
Expand Down

0 comments on commit c6e88e5

Please sign in to comment.