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

DynamicEnum values not being cleaned up #546

Open
michaeljs1990 opened this issue May 16, 2017 · 1 comment
Open

DynamicEnum values not being cleaned up #546

michaeljs1990 opened this issue May 16, 2017 · 1 comment
Assignees

Comments

@michaeljs1990
Copy link
Contributor

At some point in time AssetMeta.Enum was deprecated however the new AssetMeta.DynamicEnum which took it's place was never fully implemented (at least in my opinion). Currently when you update an asset all of the LSHW values and LLDP values in AssetMeta.Enum are remove from the asset and repopulated however if you add something to the new AssetMeta.DynamicEnum the value is added to the database however the initial value is not removed causing it to be returned instead. From the GUI this looks like the LSHW parser has a bug and is not populating the asset. It also has the undesired side effect of a ton of extra entries in the asset_meta_value db. When i found this bug on a node I had been playing with I had about 50 entries for GPUs which would be a super sweet machine but it only had 4 :(

I have a fix for this I'll post shortly and hope to get merged in :)

@byxorna @defect @roymarantz

@michaeljs1990
Copy link
Contributor Author

I should update this slightly... While we ran into this as being an issue when adding the GPU feature it is also an issue for

BASE_DESCRIPTION
BASE_PRODUCT
BASE_VENDOR
BASE_SERIAL

Which end up cropping up strangely in the UI with id's next to them. The nice thing about this fix is the first time a node is inducted again all previous values are cleared and only the new one will remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants