-
Notifications
You must be signed in to change notification settings - Fork 987
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
Fixes #22798 Include the vmFolder in the list_vms filter spec #5297
Fixes #22798 Include the vmFolder in the list_vms filter spec #5297
Conversation
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
2 similar comments
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Issues: #22798 |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
c17a53d
to
ef566db
Compare
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
ef566db
to
082766d
Compare
@agrare welcome! |
@agrare in your screenshots, I can see that folder has no value? I assume it should be |
If a VM is in the root of the datacenter its parent is the vmFolder. This folder was being skipped by the PropertyFilterSpec causing an undefined method error '[]' for nil:NilClass when accessing the vm['parent'] key.
082766d
to
f9b93c6
Compare
Before this change VMs in the root of the datacenter would have a blank folder property. It looks like e7e9821 also broke the MiniServer initializer by passing |
[ok to test] |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take my last comment back, works very well. Thanks @agrare. Will merge pending Jenkins.
Thanks for the review @timogoebel ! |
[test foreman] |
thanks @agrare! |
If a VM is in the root of the datacenter its parent is the vmFolder.
This folder was being skipped by the PropertyFilterSpec causing an
undefined method error '[]' for nil:NilClass when accessing the
vm['parent'] key.
git bisect points to e7e9821 as introducing this issue.
Backtrace:
Which is failing on this line
attrs['path'] = folder_inventory[vm['parent']._ref][:path]
[ref] becausefolder_inventory
doesn't include thedatacenter.vmFolder
.Before fix:
![screenshot from 2018-03-06 11-32-32](https://user-images.githubusercontent.com/12851112/37044696-25336f82-2132-11e8-8eaf-ab92395a2487.png)
After fix:
![screenshot from 2018-03-06 11-55-55](https://user-images.githubusercontent.com/12851112/37046075-6fa39738-2135-11e8-9fb4-ddc2f38aab40.png)
Fixes #22798 - VMware: Exception listing VMs in the root of the datacenter