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

ManagedObjectNotFound: The object 'vim.Task:task-256811' has already been deleted or has not been completely created #93

Open
anissmajlovic opened this issue Sep 1, 2022 · 1 comment

Comments

@anissmajlovic
Copy link

anissmajlovic commented Sep 1, 2022

Hi Encore team,

We have been using the patching module for some time, and no issue, and suddenly we got the error below (it is random, from 10 times doing snapshot will come once, it is always same inputs):
{
"msg" : "ManagedObjectNotFound: The object 'vim.Task:task-256811' has already been deleted or has not been completely created",
"kind" : "bolt/plan-failure",
"details" : {
"class" : "Bolt::PAL::PALError"
}
}
I think that message comes from VMware (error in Plan output above) reference: https://kb.vmware.com/s/article/1039326

I wonder if it is possible to take an exception and proceed with the Plan because when this fails Plan is stopped. Since this is a function, can we raise an exception in Ruby code in case of the error above to proceed?

Thanks

@anissmajlovic
Copy link
Author

Can this help me if I raise exception around this code:

  begin
    unless vm.snapshot
      return_value = true
      break
    end
  rescue => err
    raise "Deleting snapshot failed with error: #{err}"
  end

Basically, if something fails to continue with the rest of the Plan, otherwise we receive an error and the Plan is stopped:
{
"msg" : "ManagedObjectNotFound: The object 'vim.Task:task-256811' has already been deleted or has not been completely created",
"kind" : "bolt/plan-failure",
"details" : {
"class" : "Bolt::PAL::PALError"
}
}

The problem is that error above does not tell where in the Ruby file is an error (line)

Thanks

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

1 participant