Jira (PDB-4389) Query for deactivated nodes
Title: Message Title Jarret Lavallee commented on PDB-4389 Re: Query for deactivated nodes Austin Blatt Would it be possible to get node_state documented into the query parameters of https://puppet.com/docs/puppetdb/6.3/api/query/v4/nodes.html#query-fields? I think that is auto generated from https://github.com/puppetlabs/puppetdb/blob/6.x/documentation/api/query/v4/nodes.markdown I suspect we can close this ticket out if customers can find it in the docs. It would be nice to have an example in https://puppet.com/docs/puppetdb/6.3/api/query/examples-pql.html. The example could help customers identify expired nodes. nodes[certname] { node_state = "inactive" and expired is not null } Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit
Jira (PDB-4389) Query for deactivated nodes
Title: Message Title Austin Blatt commented on PDB-4389 Re: Query for deactivated nodes Maheswaran Shanmugam Unfortunately, there's no easy way to fix that bug. Every time a node that is triggering that bug submits a catalog the node will be re-created and you'll see it in the console again. Currently, you'll have to downgrade to 2018.1.7 (or lower), or wait for 2018.1.9 to be released. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.310994.155953334.46217.1560442740375%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4389) Query for deactivated nodes
Title: Message Title Maheswaran Shanmugam commented on PDB-4389 Re: Query for deactivated nodes Austin Blatt Can you suggest how to remove these nodes permanently from the console and db. This behaviour is fixed with the latest release as per Jira ticket # PDB-4390 "https://tickets.puppetlabs.com/browse/PDB-4390" Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.310994.155953334.45814.1560392880607%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4389) Query for deactivated nodes
Title: Message Title Austin Blatt commented on PDB-4389 Re: Query for deactivated nodes Hi Maheswaran Shanmugam, you will need to add node_state = "inactive" to your query because deactivated is not null will not work on its own on nodes endpoint because by default the endpoint only includes active nodes. We likely need to improve our docs because it is difficult to find the proper query for deactivated nodes so I've included a few examples here. So the full query for all deactivated and expired nodes, would look like {{nodes[certname] { node_state = "inactive"} }} If you only want the deactivated nodes it'd look like nodes[certname] { node_state = "inactive" and deactivated is not null} Let me know if this fixes your issue. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.310994.155953334.31552.1559579520585%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4389) Query for deactivated nodes
Title: Message Title Maheswaran Shanmugam commented on PDB-4389 Re: Query for deactivated nodes This ticket is raised to address the customer ticket "https://puppetlabs.zendesk.com/agent/tickets/34919". The nodes are showing in puppetdb and console. However, it's not getting deleted when purging. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.310994.155953334.31105.1559534040618%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4389) Query for deactivated nodes
Title: Message Title Maheswaran Shanmugam created an issue PuppetDB / PDB-4389 Query for deactivated nodes Issue Type: Improvement Assignee: Unassigned Created: 2019/06/02 8:42 PM Environment: This test is carried out on PE 2018.1.8 puppetdb version: 5.2.8 puppet-query v1.2.5 Priority: Normal Reporter: Maheswaran Shanmugam Hello, puppet query command is not listing out deactivated or expired nodes. [root@pe-201818-master ~]# puppet query 'nodes[] { deactivated is not null }' [] [root@pe-201818-master ~]# puppet query 'nodes[] { deactivated is not null or expired is not null }' [] Steps followed to reproduce: 1) puppet query all nodes. ```puppet query "nodes[certname] {}"``` 2) Manually deactivate the node ```puppet node deactivate ``` 3) Run puppet query looking for the node marked "deactivated is not null" ```puppet query 'nodes[] { deactivated is not null } '``` 4) Login into pe-puppetdb and select specific node from ```certnames``` table to ensure this node is deactiviated. ``` [root@pe-201818-master ~]# su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/psql -d pe-puppetdb" psql (9.6.12) Type "help" for help. pe-puppetdb=# select * from certnames where certname = 'yc3ctpdm4eyv3ni.delivery.puppetlabs.net'; id | certname | latest_report_id | deactivated | expired | package_hash | latest_report_timestamp -- 3 | yc3ctpdm4eyv3ni.delivery.puppetlabs.net | 120 | 2019-06-02 20:11:35.303-07 | | | 2019-05-29 08:48:05.553-07 (1 row) ```