sassoftware / viya4-ark

SAS Viya Administration Resource Kit for Containerized Deployments. Tools and utilities to help SAS Customers with SAS Viya running in containers.
Apache License 2.0
33 stars 13 forks source link

failure of the deployment report generation with Viya stable 2022.11/K8s 1.23.10 #187

Closed raphaelpoumarede closed 1 year ago

raphaelpoumarede commented 1 year ago

Hello I have a working deployed stable 2022.11 Viya (running on K8s 1.23.10 with nginx 1.19.9). The python script fails with :

[cloud-user@pdcesx03181 viya4-ark]$ python3 viya-ark.py deployment-report --namespace gelenv

Generating deployment report......................DONE
Traceback (most recent call last):
  File "viya-ark.py", line 139, in <module>
    main(sys.argv[1:])
  File "viya-ark.py", line 77, in main
    command.run(argv[1:])
  File "/home/cloud-user/viya4-ark/deployment_report/deployment_report.py", line 48, in run
    main(argv)
  File "/home/cloud-user/viya4-ark/deployment_report/deployment_report.py", line 139, in main
    include_pod_log_snips=args.include_pod_log_snips)
  File "/home/cloud-user/viya4-ark/deployment_report/model/viya_deployment_report.py", line 294, in gather_details
    ingress_version = ingress_util.get_ingress_version(kubectl)
  File "/home/cloud-user/viya4-ark/deployment_report/model/utils/ingress_util.py", line 124, in get_ingress_version
    " --field-selector=status.phase==Running" + \
TypeError: must be str, not NoneType

`

erharb commented 1 year ago

@raphaelpoumarede can you make sure you're using the latest code pulled from the default branch, and also provide the following info:

raphaelpoumarede commented 1 year ago

I use Viya ARK 1.9.0 I'm testing in an opensource K8s env (Rancher) Python 3.6.8

It was working with previous Viya ARK and K8s versions. Also when I tried with the -i option, then I get a message that "the nginx namespace can't be found". However I can see it when I list my namespaces with the "kubectl get ns" command.

[cloud-user@pdcesx03181 viya4-ark]$ python3 viya-ark.py deployment-report --ingress-namespace "nginx" -n gelenv

ERROR: The ingress namespace [nginx] was not found in the target environment.

[cloud-user@pdcesx03181 viya4-ark]$ python3 viya-ark.py deployment-report --ingress-namespace nginx -n gelenv

ERROR: The ingress namespace [nginx] was not found in the target environment.
raphaelpoumarede commented 1 year ago

Same result when I'm using the "master" branch instead of 1.9.0

erharb commented 1 year ago

I believe there are two issues that have been found here, both related to PR #174 and PR #175

erharb commented 1 year ago

As a workaround, one could make the following change in viya_ark_library/k8s/sas_k8s_ingress.py locally after downloading the latest code to match the nginx ingress namespace "nginx" when it differs from the default expected "ingress-nginx":

NS_NGINX = "nginx"

And then run without the --ingress-namespace override python3 viya-ark.py deployment-report --namespace gelenv

cuddlehub commented 1 year ago

Thanks to report the issue. I'll check into it.

kevinlinglesas commented 1 year ago

This issue addressed in Release 1.9.1