Project

General

Profile

Actions

Bug #25701

open

Search on RAM fails in node groups

Added by Nicolas CHARLES 8 days ago. Updated 1 day ago.

Status:
Pending technical review
Priority:
1 (highest)
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

I have node with 960 MB RAM

Searching for all nodes with less than 16GB RAM doesn't report anything in Rudder 8.1
Searching for all nodes with less than 16000MB RAM doesn't report anything in Rudder 8.1
Searching for all nodes with less than 16000000 RAM doesn't report anything in Rudder 8.1
Searching for all nodes with less than 1600000000 RAM doesn't report anything in Rudder 8.1

the units seem somehow broken both in storing and searching ram

Same node has 1.91 GB swap, searching for nodes with less than 2GB swap does find it

Actions #1

Updated by Clark ANDRIANASOLO 8 days ago

Debug logs suggest that the syntax is incorrect with 999MB :

2024-10-18 10:13:47+0000 DEBUG query.node-fact - [node.ram lteq 999MB]
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   --'server.rudder.local' (root)--
2024-10-18 10:13:47+0000 TRACE query.node-fact -     - '999MB' can not be parsed into correct type: false'
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   = [false] on 'server.rudder.local' (root)
2024-10-18 10:13:47+0000 DEBUG query.node-fact - [node.ram lteq 999MB]
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   --'agent1.rudder.local' (0cd6636e-e0b7-4698-87a0-6f657fc518d8)--
2024-10-18 10:13:47+0000 TRACE query.node-fact -     - '999MB' can not be parsed into correct type: false'
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   = [false] on 'agent1.rudder.local' (0cd6636e-e0b7-4698-87a0-6f657fc518d8)
2024-10-18 10:13:47+0000 DEBUG query.node-fact - [node.ram lteq 999MB]
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   --'relay.rudder.local' (57d62556-f8b8-4f29-8ccf-9b04c4fe19e7)--
2024-10-18 10:13:47+0000 TRACE query.node-fact -     - '999MB' can not be parsed into correct type: false'
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   = [false] on 'relay.rudder.local' (57d62556-f8b8-4f29-8ccf-9b04c4fe19e7)
2024-10-18 10:13:47+0000 DEBUG query.node-fact - [node.ram lteq 999MB]
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   --'server.rudder.local' (93e6987e-1ab6-4b84-af62-e80474b284ab)--
2024-10-18 10:13:47+0000 TRACE query.node-fact -     - '999MB' can not be parsed into correct type: false'
2024-10-18 10:13:47+0000 DEBUG query.node-fact -   = [false] on 'server.rudder.local' (93e6987e-1ab6-4b84-af62-e80474b284ab)
2024-10-18 10:13:47+0000 DEBUG query.node-fact.metrics - Run query in 21 ms
2024-10-18 10:13:47+0000 DEBUG query.node-fact - Found 0 results
2024-10-18 10:13:47+0000 TRACE query.node-fact - Matching nodes: ''

Actions #2

Updated by François ARMAND 1 day ago

  • Category changed from Web - Compliance & node report to Web - Config management
  • Priority changed from To review to 1 (highest)
Actions #3

Updated by François ARMAND 1 day ago

  • Assignee set to François ARMAND
Actions #4

Updated by François ARMAND 1 day ago

  • Status changed from New to In progress
Actions #5

Updated by François ARMAND 1 day ago

The LDAP matcher is correct (memory matcher) but it is not used anymore since we have node fact.
Now, it's a Long matcher on node fact, which fails obviously.

  ObjectCriterion(
      OC_NODE,
      Chunk(
        Criterion("OS", NodeOstypeComparator, NodeCriterionMatcherString(_.os.os.kernelName.wrap)),
....
        Criterion(A_OS_RAM, MemoryComparator, NodeCriterionMatcherLong(_.ram.map(_.size).toChunk)),
...
Actions #6

Updated by François ARMAND 1 day ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Clark ANDRIANASOLO
  • Pull Request set to https://github.com/Normation/rudder/pull/5962
Actions

Also available in: Atom PDF