Skip to content

Conversation

@ThiloSolbrig
Copy link
Contributor

There were several issues with oracle_asmdg.py that prevented setting of ASM diskgroup attributes correctly:

  1. wanted_attributes, created from a zip() function, is an iterator. Thus it's exhausted on first for loop and comparison to current_properties constantly returns false later on, regardless if diskgroup's attributes match. Apparently this is changed behavior from python2 to python3. wanted_attributes is now casted to list in that case.
  2. current_properties is build from a query against ASM views. wanted_attributes is build from diskgroup attributes taken from inventory. If attributes are in different order in those lists (what's very likely, because there's no order by clause in the query, and shouldn't be btw*) comparing wanted_attributes to current_properties would return false even if the attribute values match. Lists now are sorted for comparison.
  3. If ASM diskgroup definition contains r/o attributes in inventory, they're removed from wanted_attributes but not from current_properties. Comparing wanted_attributes to current_properties would return false even if all attributes match, just because wanted_attributes is a shorter list than current_properties. Read only attributes now are excluded from v$asm_attribute

* It doesn't make sense to generally sort wanted_attributes, apart from the point we compare it to current_properties. Actually it might be neccessary to list ASM attributes in a specific order, e.g. compatible.asm has to be raised before compatible.rdbms can be.

compare sorted current_properties to sorted wanted_attributes
exclude read_only attributes when building current_properties from v$asm_attribute
@ThiloSolbrig ThiloSolbrig deleted the oracle_asmdg-issues branch November 25, 2025 14:29
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

Successfully merging this pull request may close these issues.

1 participant