Bug #25701
closedSearch on RAM fails in node groups
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
Updated by Clark ANDRIANASOLO 2 months 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: ''
Updated by François ARMAND about 2 months ago
- Category changed from Web - Compliance & node report to Web - Config management
- Priority changed from To review to 1 (highest)
Updated by François ARMAND about 2 months ago
- Status changed from New to In progress
Updated by François ARMAND about 2 months 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)), ...
Updated by François ARMAND about 2 months 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
Updated by Anonymous about 2 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|ecf75e12e6c7fcc123b4f607cfdd5a326665954d.
Updated by Alexis Mousset about 2 months ago
- Fix check changed from To do to Checked
Updated by Vincent MEMBRÉ about 1 month ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.1.8 and 8.2.1 which were released today.