Project

General

Profile

Bug #12572

Custom node properties from inventory are not found in group search

Added by Félix DALLIDET 7 months ago. Updated 6 months ago.

Status:
Released
Priority:
N/A
Category:
Web - UI & UX
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
75

Description

In a node web-page, in the properties tab, or in the group creation page, queries can be done on node properties.
When the properties source is the inventory, they are loaded on the interface but do not appear in the query answer.
Query are functional after entering manually a "classic" node property (key/value from the same web page).

no_query_output.png (78.8 KB) no_query_output.png Félix DALLIDET, 2018-05-02 14:00
1357

Related issues

Related to Rudder - User story #4670: Allows inventories to be augmented by the user with custom propertiesReleased
Related to Rudder - Bug #9299: Extend groups search capabilities for complex JSON Properties / JsonPathPending release

Associated revisions

Revision 0fe6ce6f (diff)
Added by François ARMAND 6 months ago

Fixes #12572: Custom node properties from inventory are not found in group search

History

#1 Updated by Benoît PECCATTE 7 months ago

  • Category set to Web - UI & UX
  • Target version set to 410
  • Severity set to Critical - prevents main use of Rudder | no workaround | data loss | security
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 76

#2 Updated by Benoît PECCATTE 6 months ago

  • Target version changed from 410 to 4.3.2

#3 Updated by François ARMAND 6 months ago

  • Description updated (diff)

#4 Updated by François ARMAND 6 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND

#5 Updated by François ARMAND 6 months ago

So, what is happening is:

- when the value comes from inventory, we only have it in inventory LDAP branch ("ou=Accepted Node, ou=inventories, etc).
- the search for group does not look at that place, so it is "normal" to not find it with that search,
- the quicksearch does look at that place and find it,

BUT when we add a proprety, "inventory", it copy all properties to node, making it searchable.

Moreover, it seems that only the last inventory property is added.

#6 Updated by François ARMAND 6 months ago

  • Related to User story #4670: Allows inventories to be augmented by the user with custom properties added

#8 Updated by François ARMAND 6 months ago

So, the copy bug was hidding the fact that the search is just plain missing on custom node properties from inventory.

So, the idea is to rework a little the way our search works to cleanly split search on node info apport from the one on inventories properties. It was not working eleganlty for NodeState in all case.

Basically, it means that each Criterion in DIT will be either an LDAP criterion (everything until now is such an LDAP criterion) or it will be a "node info criterion" (basically, a NodeInfo => Value => Boolean).

Then, we just post process these element correctly. We are already relying on NodeInfoService for that, we just have to extends a little the "getLDAPNodeInfo" method.

Finally, it will open-up the real of REAL JSON query (because, on node info, node properties are parsed JSON).

WIP here: https://github.com/fanf/rudder/commit/766b309930b9519b016da49e5a137a9b7bdc8492

Everything works for NodeState, now we need to build a NodeCriterion for NodeProperties and use it.

#9 Updated by François ARMAND 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/1960
  • Priority changed from 76 to 75

#10 Updated by François ARMAND 6 months ago

  • Subject changed from node properties from inventory are not well loaded when executing queries on the web Interface to Custom node properties from inventory are not found in group search

#11 Updated by François ARMAND 6 months ago

  • Related to Bug #9299: Extend groups search capabilities for complex JSON Properties / JsonPath added

#12 Updated by François ARMAND 6 months ago

  • Status changed from Pending technical review to Pending release

#13 Updated by Vincent MEMBRÉ 6 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.2 which was released today.

Also available in: Atom PDF