| When Puppet Query fails, for example, due to a syntax issue, it should give some error message like: "server encountered an error processing search request (more information might be found in puppetdb server’s log files)" Currently, the error message is misleading:
[root@pe-202100-master ~]# puppet query 'inventory[certname, facts.os.family, facts.puppetversion] { certname in nodes { latest_report_status = "failed" } }' --urls http://localhost:8080 |
|
2021/09/05 23:48:34 ERROR - &{ } (*models.ServerError) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface |
|
(and puppetdb log file says to report this as a bug, see attached file from excerpted from puppetdb.log) |
Actually, the above error is just because the query is missing a field:
[root@pe-202100-master ~]# puppet query 'inventory[certname, facts.os.family, facts.puppetversion] { certname in nodes[certname] { latest_report_status = "failed" } }' --urls http://localhost:8080 |
[ |
{ |
"certname": "pe-202100-master.puppetdebug.vlan", |
"facts.os.family": "RedHat", |
"facts.puppetversion": "7.8.0" |
} |
] |
Proposing the output should be enhanced with a more proper error message. |