Jira (PDB-5256) Puppet Query should have proper error message when it is failed

23 views
Skip to first unread message

Henry Wang (Jira)

unread,
Sep 7, 2021, 2:28:05 AM9/7/21
to puppe...@googlegroups.com
Henry Wang created an issue
 
PuppetDB / Improvement PDB-5256
Puppet Query should have proper error message when it is failed
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2021/09/06 11:27 PM
Environment:

PE 2021.2

Priority: Normal Normal
Reporter: Henry Wang

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. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Austin Boyd (Jira)

unread,
Sep 7, 2021, 2:29:02 AM9/7/21
to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,
Sep 7, 2021, 2:29:03 AM9/7/21
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 45721

Henry Wang (Jira)

unread,
Sep 7, 2021, 2:34:02 AM9/7/21
to puppe...@googlegroups.com
Henry Wang updated an issue
Change By: Henry Wang
Attachment: puppet-error.txt

Bogdan Irimie (Jira)

unread,
Sep 9, 2021, 3:12:02 AM9/9/21
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Sep 9, 2021, 3:12:03 AM9/9/21
to puppe...@googlegroups.com
Bogdan Irimie assigned an issue to Sebastian Miclea
Change By: Bogdan Irimie
Assignee: Bogdan Irimie Sebastian Miclea

Bogdan Irimie (Jira)

unread,
Sep 16, 2021, 3:21:03 AM9/16/21
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Sep 16, 2021, 3:22:03 AM9/16/21
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Sep 16, 2021, 3:24:03 AM9/16/21
to puppe...@googlegroups.com

Sebastian Miclea (Jira)

unread,
Oct 5, 2021, 9:29:03 AM10/5/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages