[go: up one dir, main page]

Skip to content

Geo - The "Storage config" in the "Other section" is broken in the Geo nodes admin page

The GeoNodeStatus#update_cache! method uses the ActiveRecord::AttributeMethods#attributes method to get the hash of all the attributes of the current node with their names as keys and the values of the attributes as values to store into the Rails cache. The problem is that ActiveRecord::AttributeMethods#attributes method does not return virtual attributes like GeoNodeStatus#storage_shards.

This attribute is required to check if the node matches the primary storage configuration and to expose the storage_shards, and storage_shards_match? attributes in the GeoNodeStatus entity. Without these attributes the "Storage config" in the "Other section" always shows "Unknown".

The "Storage config" is also useless when viewing the Geo nodes page in a secondary node, because we only expose the storage_shards_match? attribute on the primary node.

  • Current:

Screenshot_2018-07-10_16.48.57

  • Expected:

Screenshot_2018-07-10_16.48.27

/cc @stanhu @vsizov