Troubleshooting Continuous Delivery for PE
Use this guidance to troubleshoot issues youmight encounter with your Continuous Delivery for Puppet Enterprise (PE) installation.
Look up a source control webhook
Continuous Delivery for PE creates a webhook and attempts to automatically deliver it to your source control system when you add a new control repo or module to your workspace. You can look up this webhook if you ever need to manually add (or re-add) it to your source control repository.
Manually configure a Puppet Enterprise integration
When you add credentials for a Puppet Enterprise (PE) instance, Continuous Delivery for PE attempts to look up the endpoints for PuppetDB, Code Manager, orchestrator, and node classifier, and it attempts to access the primary SSL certificate generated during PE installation. If this information can't be located, such as in cases where your PE instance uses customized service ports, you must enter it manually.
If you want code deployments to skip unavailable compilers, go to Enable compiler maintenance mode.
Restart Continuous Delivery for PE
Continuous Delivery for PE is run in a managed Kubernetes cluster, and restarting the pod is an appropriate first step when troubleshooting.
kubectl rollout restart deployment cd4pe
kubectl rollout
command, refer to the Kubernetes documentation.Stop Continuous Delivery for PE
In rare circumstances, you might need to shut down, or force stop, Continuous Delivery for Puppet Enterprise (PE).
Force stopping Continuous Delivery for PE can cause errors. Only use these commands under specific circumstances, preferably with guidance from Support.
We recommend that you initially try to Restart Continuous Delivery for PE, which is different and less disruptive than a force stop.
Logs
Because Continuous Delivery for PE is run in a managed Kubernetes cluster, you must use the kubectl logs
command to access the logs.
kubectl logs deployment/cd4pe
kubectl logs statefulset/postgres
Trace-level logging
- In Puppet Application Manager (PAM), go tot he Config page.
- Locate the Advanced configuration and tuning section.
- Toggle the Enable trace logging setting according to your preference.
PE component errors in logs
The logs include errors for both Continuous Delivery for PE and the numerous PE components used by Continuous Delivery for PE. Sometimes an error in the Continuous Delivery for PE logs might actually indicate an issue with Code Manager, r10k, or another PE component.
Module Deployment failed for PEModuleDeploymentEnvironment[nodeGroupBranch=cd4pe_lab,
nodeGroupId=a923c759-3aa3-43ce-968a-f1352691ca02, nodeGroupName=Lab environment,
peCredentialsId=PuppetEnterpriseCredentialsId[domain=d3, name=lab-MoM],
pipelineDestinationId=null, targetControlRepo=null, targetControlRepoBranchName=null,
targetControlRepoHost=null, targetControlRepoId=null].
Puppet Code Deploy failure: Errors while deploying environment 'cd4pe_lab' (exit code: 1):
ERROR -> Unable to determine current branches for Git source 'puppet' (/etc/puppetlabs/code-staging/environments)
Original exception: malformed URL 'ssh://git@bitbucket.org:mycompany/control_lab.git'
at /opt/puppetlabs/server/data/code-manager/worker-caches/deploy-pool-3/ssh---git@bitbucket.org-mycompany-control_lab.git
For help resolving issues with PE components, go to the PE Troubleshooting documentation.
Error IDs in web UI error messages
For security reasons, these errors don't report any additional details. If you have root access to the Continuous Delivery for PE host system, you can search for the error ID the logs to learn more.
Duplicate job logs after reinstall
Job logs are housed in object storage after jobs are complete. If you reinstall Continuous Delivery for PE and you reuse the same object storage without clearing it, you might notice logs for multiple jobs with the same job number, or you might notice job logs already present when a new job has just started.
To remove duplicate job logs and prevent creation of duplicate job logs, make sure you clear both the object storage and the database when reinstalling Continuous Delivery for PE.
Name resolution
Continuous Delivery for PE uses CoreDNS for name resolution. In the logs, many
can't reach
and timeout
connecting
errors are actually DNS lookup failures.
configmap
file in a text editor:
kubectl -n kube-system edit configmaps coredns
configmap
file, add a hosts
stanza directly after the kubernetes
stanza according to the following
format:hosts /etc/hosts <DOMAIN> {
<IP ADDRESS> <HOSTNAME> [ALIASES]
fallthrough
}
configmap
file with the hosts
stanza
added:apiVersion: v1
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
hosts /etc/hosts puppetdebug.vlan {
10.234.4.29 pe-201922-master.puppetdebug.vlan pe-201922-master
fallthrough
}
prometheus :9153
forward . /etc/resolv.conf
cache 30
loop
reload
loadbalance
}
kind: ConfigMap
metadata:
creationTimestamp: "2020-08-25T17:34:17Z"
name: coredns
namespace: kube-system
resourceVersion: "10464"
selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
uid: ba2907be-0067-4382-b103-fc248974719a
Looking up information about Continuous Delivery for PE
Use kubectl
commands to access information about your
Continuous Delivery for PE installation.
Look up the environment variables in use
kubectl describe deployments.apps cd4pe
Look up your Continuous Delivery for PE version
kubectl get deployment cd4pe -o jsonpath='{.spec.template.spec.containers[0].image}' ; printf "\n"
Drain a node
Drain impacted nodes when performing maintenance on your Kubernetes cluster, such as upgrading system packages or rebooting the system.
/opt/ekco/shutdown.sh
Resize an existing volume
The Continuous Delivery for PE database stores historical data and over time the accumulation of this data can exhaust disk space allocated to container volumes. You can adjust the size of existing volumes as needed to adjust for this data storage.
A PersistentVolumeClaim (PVC) can be increased in size, but not reduced. Attempting to reduce the size of a PVC results in an error.
The current free space in each PVC can be monitored on the administration console dashboard in the Volume Available Storage (%) Prometheus graph.
Ensure there is sufficient storage available to allocate the newly configured storage amount.
Reset root account password
If you need to reset your Continuous Delivery for PE root account password, use this process.
- Log into the PAM UI and navigate to Config.
- Update the password in the Root account password field.
- Save the configuration and re-deploy Continuous Delivery for PE to update the password.