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

Creating snapshot via API fails #83

Open
wiad opened this issue Feb 21, 2023 · 2 comments
Open

Creating snapshot via API fails #83

wiad opened this issue Feb 21, 2023 · 2 comments

Comments

@wiad
Copy link

wiad commented Feb 21, 2023

Creating a snapshot via api fails with

{
  "error": {
    "message": "missing required parameter memory"
  }
}

Creating snapshot via GUI works as expected.

Backtrace from Foreman production.log:

2023-02-21T12:02:51 [W|app|cd0cd43f] Action failed
2023-02-21T12:02:51 [I|app|cd0cd43f] Backtrace for 'Action failed' error (RuntimeError): missing required parameter memory
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/connection.rb:51:in `block (2 levels) in emit_request'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/connection.rb:44:in `each'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/connection.rb:44:in `block in emit_request'
 cd0cd43f | /usr/share/gems/gems/builder-3.2.4/lib/builder/xmlbase.rb:176:in `_nested_structures'
 cd0cd43f | /usr/share/gems/gems/builder-3.2.4/lib/builder/xmlbase.rb:69:in `tag!'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/connection.rb:42:in `emit_request'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/connection.rb:85:in `block in call'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/trivial_soap.rb:74:in `block (2 levels) in soap_envelope'
 cd0cd43f | /usr/share/gems/gems/builder-3.2.4/lib/builder/xmlbase.rb:176:in `_nested_structures'
 cd0cd43f | /usr/share/gems/gems/builder-3.2.4/lib/builder/xmlbase.rb:69:in `tag!'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/trivial_soap.rb:73:in `block in soap_envelope'
 cd0cd43f | /usr/share/gems/gems/builder-3.2.4/lib/builder/xmlbase.rb:176:in `_nested_structures'
 cd0cd43f | /usr/share/gems/gems/builder-3.2.4/lib/builder/xmlbase.rb:69:in `tag!'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/trivial_soap.rb:65:in `soap_envelope'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/connection.rb:84:in `call'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/basic_types.rb:213:in `_call'
 cd0cd43f | /usr/share/gems/gems/rbvmomi-2.4.1/lib/rbvmomi/basic_types.rb:76:in `block (2 levels) in init'
 cd0cd43f | /usr/share/gems/gems/fog-vsphere-3.5.2/lib/fog/vsphere/requests/compute/vm_take_snapshot.rb:18:in `vm_take_snapshot'
 cd0cd43f | /usr/share/gems/gems/foreman_snapshot_management-2.0.1/app/models/foreman_snapshot_management/vmware_extensions.rb:14:in `create_snapshot'
...

This is on RHEL8 with
rubygem-foreman_snapshot_management-2.0.1-1.fm2_6.el8.noarch

@m-bucher
Copy link
Member

Have you tried specifying the include_ram-parameter?

@wiad
Copy link
Author

wiad commented Feb 23, 2023

Thank you, with the include_ram parameter added it works again. It doesnt matter if I set it to true or false, but without it I get the error message. Looking at the code there is a default value but this does not seem to work then?

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

2 participants