From e35cc6c738f078a93cc21e1c38026020a1e8980e Mon Sep 17 00:00:00 2001 From: jackalstar88 Date: Wed, 5 Jun 2019 20:50:18 +1000 Subject: [PATCH] Collect /var/run/aws-node/ipam.json L-IPAMD now checkpoints IPAM state to a file. Collect /var/run/aws-node/ipam.json file (if present) for debugging. See also aws/amazon-vpc-cni-k8s#972 --- log-collector-script/linux/eks-log-collector.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/log-collector-script/linux/eks-log-collector.sh b/log-collector-script/linux/eks-log-collector.sh index a9f2507..053b4c9 100644 --- a/log-collector-script/linux/eks-log-collector.sh +++ b/log-collector-script/linux/eks-log-collector.sh @@ -377,7 +377,7 @@ get_k8s_info() { KUBECONFIG="/var/lib/kubelet/kubeconfig" command -v kubectl > /dev/null && kubectl get --kubeconfig=${KUBECONFIG} svc > "${COLLECT_DIR}"/kubelet/svc.log command -v kubectl > /dev/null && kubectl --kubeconfig=${KUBECONFIG} config view --output yaml > "${COLLECT_DIR}"/kubelet/kubeconfig.yaml - + else echo "======== Unable to find KUBECONFIG, IGNORING POD DATA =========" >> "${COLLECT_DIR}"/kubelet/svc.log fi @@ -406,7 +406,7 @@ get_k8s_info() { get_ipamd_info() { if [[ "${ignore_introspection}" == "false" ]]; then - try "collect L-IPAMD introspectioon information" + try "collect L-IPAMD introspection information" for entry in ${IPAMD_DATA[*]}; do curl --max-time 3 --silent http://localhost:61679/v1/"${entry}" >> "${COLLECT_DIR}"/ipamd/"${entry}".json done @@ -421,6 +421,9 @@ get_ipamd_info() { echo "Ignoring Prometheus Metrics collection as mentioned"| tee -a "${COLLECT_DIR}"/ipamd/ipam_metrics_ignore.txt fi + try "collect L-IPAMD checkpoint" + cp /var/run/aws-node/ipam.json "${COLLECT_DIR}"/ipamd/ipam.json + ok }