The Puppet agent daemon is disabled on some of your nodes. You'd like to know which nodes are enabled and which nodes are disabled in the command line or in the console.
Version and installation information
PE version: 2017.3 to 2019.2
OS: Unix, Windows
Note: If you’re using a version of the puppetlabs-support_tasks
module older than 1.1.1 (2020 17 January), please update the module to use these steps. We renumbered all the tasks in the module at that time.
Solution
Identify which nodes are enabled and disabled by running tasks in the support_tasks
module.
Note: You can use the output from the tasks in this article to enable the daemon on nodes where it is disabled.
-
Download and install the
support_tasks
module which includes the tasks for this solution.
Note: The Windows task was added in version 1.1 of thesupport_tasks
module. If you have an earlier version installed, update the module. -
Use the appropriate task in the command line or in the console.
PE version OS task number 2019.0.x to 2019.2.x Unix or Windows st0285 2017.3.x to 2018.1.x Unix st0285a 2017.3.x to 2018.1.x Windows st0285b On the command line:
Select the appropriate task. If you need to run two tasks, run the second task when the first task is finished running.
Create a list of disabled nodes in a file (
nodefile.txt
) by running a task on the master. For example:puppet task run support_tasks::st0285_find_disabled_agents --no-color --query 'nodes[certname] { }' | grep Finished | awk '{printf "%s%s",sep,$NF; sep=",\n"}' > nodefile.txt
To show a list of disabled nodes on the screen in PE 2019.2, on the master, run:
puppet task run support_tasks::st0285_find_disabled_agents --no-color --query 'nodes[certname] { }' | grep Finished | awk '{printf "%s%s",sep,$NF; sep=",\n"}' && echo
In the console:
Follow the instructions in our documentation for using tasks in the console. You can select nodes using a PQL query, node list, or node group. Select the appropriate task. You can't run two tasks at the same time. If you need to run two tasks, run the second task when the first task is finished running.
For example, to select all nodes, under Inventory select PQL and under common queries select All nodes. Click Submit query and click Refresh to update the node results. Click Run job.
Example output:
The output for enabled nodes contains an error so that you can sort enabled and disabled nodes in the console:
Started on pe-201813-master.platform9.puppet.net ...
Failed on pe-201813-master.platform9.puppet.net
Error: Task finished with exit-code 1
STDOUT:
Puppet agent is enabled
Job failed. 1 node failed, 0 nodes skipped, 0 nodes succeeded.
Duration: 0 sec
The output for a disabled node:
Started on pe-201813-master.platform9.puppet.net ... Finished on node pe-201813-master.platform9.puppet.net STDOUT: Puppet agent is disabled Job completed. 1/1 nodes succeeded. Duration: 0 sec
Comments
0 comments
Please sign in to leave a comment.