Absence of recommendation spark job logs in NAPP support bundle on NSX Intelligence 3.2.0
search cancel

Absence of recommendation spark job logs in NAPP support bundle on NSX Intelligence 3.2.0

book

Article ID: 319040

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Symptoms:
Recommendation spark job log is not collected by NAPP support bundle on NSX Intelligence 3.2.0

Cause

When NAPP support bundle request is called, it does a substring search of the entries under components in servicemap.yaml file against the log filenames. If the substring of the file name matches the prefix or name under the component, the log will be picked and added to the NAPP support bundle.
 
The recommendation spark job component is missing in servicemap.yaml file on 3.2.0, so the substring search will not include the recommendation spark job logs in the NAPP support bundle.

Resolution

This issue is resolved in NSX Intelligence 3.2.1.

Workaround:
Get the recommendation spark job log from fluentd pod, then attach the logs separately to any Service Request.
 
1. SSH into the nsx manager. Enter the password and press enter.
ssh root@<nsx-manager>
 
2. Go to root location
cd ~
 
3. Create a .sh script file and enter insert mode
vim collect.sh
i

 
 
4. Copy and paste the following text, it will copy all the recommendation spark job driver logs and recommendation spark job executor logs into a logs directory under root.
 
#!/bin/sh
 
alias gc='kubectl --kubeconfig /config/vmware/napps/.kube/config -n nsxi-platform'
 
rm -rf logs
 
mkdir logs
 
for file in $(gc exec -it fluentd-0 -- /bin/bash -c "find opt/bitnami/fluentd/logs/buffers -name \"rec-*.log\"")
 
do
 
  file1=`echo $file | sed 's/\\r//g'`;
 
  echo "Copying file $file1";
 
  file2=`echo $file1| rev | cut -d'/' -f 1 | rev`;
 
  gc cp fluentd-0:$file1 ~/logs/$file2;
 
done
 
 
 
5. Save and exit the .sh file
press ESC button
type in   :wq!
 
6. Run the collect.sh file, wait until the script is done.
sh collect.sh
 
7. Exit the nsx-manager
exit
 
8. Copy the logs directory to your local machine. On the local machine, run the command below and enter the nsx-manager password.
scp -r root@<nsx-manager ip>:~/logs <location you want to store on your local machine>
 
9. Upload logs to Service Request

Additional Information

Impact/Risks:
It will be difficult to troubleshoot any recommendation spark job error without the logs in NAPP support bundle.