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

ExtManagementSystem: Multiple columns called "Total Memory" #18130

Closed
himdel opened this issue Oct 25, 2018 · 11 comments · Fixed by #20664
Closed

ExtManagementSystem: Multiple columns called "Total Memory" #18130

himdel opened this issue Oct 25, 2018 · 11 comments · Fixed by #20664
Assignees
Labels

Comments

@himdel
Copy link
Contributor

himdel commented Oct 25, 2018

Base a report on Providers (any kind other than performance), and in Available Fields, there is "Total Memory" twice:

bad

This is because one is total_memory and the other is aggregate_memory (both fields on ext_management_system) table.

> MiqExpression.model_details(ExtManagementSystem).select { |a,b| a =~ /Total Memory/ }
=> [["Provider : Total Memory", "ExtManagementSystem-aggregate_memory"], ["Provider : Total Memory", "ExtManagementSystem-total_memory"], ....]

Looks like this boils down to...

> MiqExpression.value2human('ExtManagementSystem-aggregate_memory')
"ExtManagementSystem-aggregate_memory"
=> "Provider : Total Memory"
> MiqExpression.value2human('ExtManagementSystem-total_memory')
"ExtManagementSystem-total_memory"
=> "Provider : Total Memory"

even

> MiqExpression.value2human('-aggregate_memory')
"-aggregate_memory"
=> " Total Memory"
> MiqExpression.value2human('-total_memory')
"-total_memory"
=> " Total Memory"

And that is ends up calling..

> Dictionary.gettext('total_memory', :type => :column, :notfound => :titleize)
=> "Total Memory"
> Dictionary.gettext('aggregate_memory', :type => :column, :notfound => :titleize)
=> "Total Memory"

Which is because

locale/en.yml
131:      aggregate_memory: Total Memory

(total_memory gets translated by that :notfound => :titleize fallback)


I guess these 2 fields (total_memory and aggregate_memory) should have distinct descriptions, but I don't know enough about the 2 fields to be able to tell the difference.

@djberg96
Copy link
Contributor

djberg96 commented Nov 1, 2018

I'm guessing this is a vmware thing:

https://www.vmware.com/support/developer/converter-sdk/conv51_apireference/memory_counters.html

Memory Total = Aggregate host machine memory - (VMkernel memory + Service Console memory + other service memory)

Then again maybe I'm way off. Can someone confirm?

@miq-bot miq-bot added the stale label May 6, 2019
@miq-bot
Copy link
Member

miq-bot commented May 6, 2019

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

@chessbyte
Copy link
Member

@agrare can you chime in on this?

@agrare
Copy link
Member

agrare commented Oct 21, 2019

Actually I dont' think this is VMware specific, I think it is just duplicated

virtual_aggregate :total_memory, :hosts, :sum, :ram_size from ext_management_system.rb +231

And

def aggregate_memory(targets = nil)
  aggregate_hardware(:hosts, :memory_mb, targets)
end

From mixins/aggregation_mixin/methods.rb +17

So the only difference is one uses hosts.ram_size and one uses hosts.hardware.memory_mb. And ram_size is defined as hardware.memory_mb here. Therefore they are identical Q.E.D. :)

@himdel
Copy link
Contributor Author

himdel commented Oct 21, 2019

Makes sense, thanks :)

Still, having 2 identical entries in the report menu is suboptimal (even if they do the same thing), any chance we could get rid of one of those attributes?

@agrare
Copy link
Member

agrare commented Oct 21, 2019

Yes absolutely, working on that now

@agrare
Copy link
Member

agrare commented Oct 21, 2019

cc @kbrock

@kbrock
Copy link
Member

kbrock commented Oct 21, 2019

dropping the delegate makes the most sense
ASSUMING that we update the reports to act accordingly

@mfeifer mfeifer added bug and removed stale labels Nov 21, 2019
@miq-bot
Copy link
Member

miq-bot commented Jun 11, 2020

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.

@miq-bot miq-bot added the stale label Jun 11, 2020
@gtanzillo gtanzillo removed the stale label Jun 29, 2020
@gtanzillo
Copy link
Member

ping @kbrock

@kbrock
Copy link
Member

kbrock commented Sep 30, 2020

going forward with this:

introducing a hide_attribute that stores attributes in hidden_attributes. will also tie this into deprecate_attributes.

This will be used by MiqExpression.model_details and api: options_serializer.rb
for ideas on other places, grep for "attribute_names"

kbrock added a commit to kbrock/manageiq that referenced this issue Oct 6, 2020
some virtual attributes are not needed in reporting nor the api.
this allows attributes to work for our uses, but not put them into the
public api

this addresses issues like ManageIQ#18130
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 6, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

This allows attributes to still work, but just not be advertised on our public apis (i.e.: report builder and rest api). This allows 

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 6, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

This allows attributes to still work, but just not be advertised on our public apis (i.e.: report builder and rest api). This allows

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 7, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.


This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 7, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 12, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 12, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 12, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 23, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Oct 23, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Nov 2, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Nov 3, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Nov 3, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to start using.

Now, the attributes are still accessible. So nothing will break. But
these attributes are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Nov 12, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised to the customer
     as attributes to use.

After this change, the attributes are still accessible. Just these attributes
are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes.

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Nov 12, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised to the customer
     as attributes to use.

After this change, the attributes are still accessible. Just these attributes
are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes.

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Nov 12, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised to the customer
     as attributes to use.

After this change, the attributes are still accessible. Just these attributes
are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes.

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
kbrock added a commit to kbrock/manageiq that referenced this issue Dec 8, 2020
Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised to the customer
     as attributes to use.

After this change, the attributes are still accessible. Just these attributes
are no longer advertised on the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532

Hide deprecated and duplicate attributes.

Some virtual_attributes are not needed in reporting nor the api.
Some deprecated attributes should not be advertised for customers to use.

After this change, the attributes are still accessible. So nothing will break, but
these attributes are no longer advertised in the public apis (i.e.: report builder and rest api).

This allows us to control which parts of our models are exposed.

This fixes ManageIQ#18130
This enables ManageIQ#20532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants