Bug #25701
closed
Search on RAM fails in node groups
Added by Nicolas CHARLES about 1 month ago.
Updated 14 days ago.
Category:
Web - Config management
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
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: ''
- Category changed from Web - Compliance & node report to Web - Config management
- Priority changed from To review to 1 (highest)
- Assignee set to François ARMAND
- Status changed from New to In progress
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)),
...
- 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
- Status changed from Pending technical review to Pending release
- Fix check changed from To do to Checked
- 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.
Also available in: Atom
PDF