28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
# Puppet
|
|
|
|
## Manually Retrieve Node Information From Puppet Server
|
|
|
|
To manually check the node information on the Puppet server for given host, do
|
|
```bash
|
|
FQDN=$(hostname --fqdn)
|
|
curl \
|
|
--cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \
|
|
--cert /etc/puppetlabs/puppet/ssl/certs/$FQDN.pem \
|
|
--key /etc/puppetlabs/puppet/ssl/private_keys/$FQDN.pem \
|
|
"https://puppet01.psi.ch:8140/puppet/v3/node/$FQDN?environment=prod&configured_en" \
|
|
| jq .
|
|
```
|
|
|
|
## PSON
|
|
|
|
Sometimes the puppet agent emits:
|
|
```
|
|
Info: Unable to serialize catalog to json, retrying with pson. PSON is deprecated and will be removed in a future release
|
|
```
|
|
These should be fixed in the puppet code as with Puppet 8 this will fail hard.
|
|
|
|
To figure out what part of the catalog is concerned, look at `/opt/puppetlabs/puppet/cache/client_data/catalog/$(hostname --fqdn).json`.
|
|
Then search for `\u` which starts a binary (non-utf8) character in PSON in a way that is still valid JSON.
|
|
|
|
Please improve the Puppet code wherever such non-utf8 strings are used. Be aware that not only resources, but also arguments to profiles, classes, etc. end up in the catalog.
|