Skip to content

Commit

Permalink
B #6319: Skip if elastic
Browse files Browse the repository at this point in the history
Do not execute the elastic drivers post operation on snapshot-revert,
these operations are related to the hypervisor and not the VM.

(cherry picked from commit 60f00b49a356c603437ac09817c09bdb06bbcd5a)
  • Loading branch information
rsmontero committed Sep 26, 2023
1 parent 1d4f0b4 commit d458064
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/vmm_mad/exec/one_vmm_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ def snapshot_revert(id, drv_message)
{
:driver => :vnm,
:action => :post,
:skip => ['elastic'],
:parameters => [:deploy_id, :host]
}
]
Expand Down
5 changes: 4 additions & 1 deletion src/vnm_mad/one_vnm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def initialize(vnm_drivers, options = {})
def do_action(id, aname, ops = {})
options={
:stdin => nil,
:parameters => nil
:parameters => nil,
:skip => nil
}.merge(ops)

cmd_params = ''
Expand All @@ -59,6 +60,8 @@ def do_action(id, aname, ops = {})
infos = ''

@vnm_drivers.each do |subdirectory|
next if options[:skip] && options[:skip].include?(subdirectory)

cmd = action_command_line(aname, cmd_params, nil, subdirectory)

if action_is_local?(aname, subdirectory)
Expand Down

0 comments on commit d458064

Please sign in to comment.