sassoftware / viya4-deployment

This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
71 stars 64 forks source link

Error on TASK [vdm : kustomize - Generate deployment manifest] #117

Closed YuryShkoda closed 3 years ago

YuryShkoda commented 3 years ago

Script:

ansible-playbook \
  -e BASE_DIR=$HOME/viya4-deployment \
  -e CONFIG=$HOME/viya4-deployment/ansible-vars.yaml \
  -e TFSTATE=$HOME/viya4-deployment/terraform.tfstate \
  -e JUMP_SVR_PRIVATE_KEY=$HOME/viya4-deployment/keys/id_rsa \
  playbook.yaml --tags "baseline,viya,install"

Error:

TASK [vdm : kustomize - Generate deployment manifest] *************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["kustomize", "build", "/home/yurshk/viya4-deployment/yurshk-aks/viya4test", "--load-restrictor=none", "-o", "/home/yurshk/viya4-deployment/yurshk-aks/viya4test/site.yaml"], "delta": "0:00:00.032798", "end": "2021-07-15 07:33:46.342834", "msg": "non-zero return code", "rc": 1, "start": "2021-07-15 07:33:46.310036", "stderr": "Error: unknown flag: --load_restrictor", "stderr_lines": ["Error: unknown flag: --load-restrictor"], "stdout": "", "stdout_lines": []}

PLAY RECAP ********************************************************************************************************************************************************************************
localhost                  : ok=81   changed=17   unreachable=0    failed=1    skipped=48   rescued=0    ignored=0  

Kustomize current version:

{Version:kustomize/v3.7.0 GitCommit:42d1f7b792a80af34828ec4c89af99e1043351a7 BuildDate:2020-07-04T19:15:46Z GoOs:linux GoArch:amd64}

Also tried the latest version of Kustomize

vaibhav90 commented 2 years ago

Hello @YuryShkoda , any update on this error? I am facing the same issue.

Kustomize current version:

{Version:kustomize/v4.5.7 GitCommit:56d82a8378dfc8dc3b3b1085e5a6e67b82966bd7 BuildDate:2022-08-02T16:35:54Z GoOs:linux GoArch:amd64} Error:

`TASK [vdm : kustomize - Generate deployment manifest] ** fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["kustomize", "build", "/home/vki/Desktop/repos/viya4-deployment/test-sas-viya-4-aks/kube-system", "--load_restrictor=none", "-o", "/home/vki/Desktop/repos/viya4-deployment/test-sas-viya-4-aks/kube-system/site.yaml"], "delta": "0:00:00.038902", "end": "2022-08-04 12:06:26.939365", "msg": "non-zero return code", "rc": 1, "start": "2022-08-04 12:06:26.900463", "stderr": "Error: unknown flag: --load_restrictor", "stderr_lines": ["Error: unknown flag: --load_restrictor"], "stdout": "", "stdout_lines": []}

PLAY RECAP ***** localhost : ok=83 changed=18 unreachable=0 failed=1 skipped=74 rescued=0 ignored=0 `

thpang commented 2 years ago

Kustomize must be version 3.7.0 as stated in the docs: https://github.com/sassoftware/viya4-deployment/blob/7bebc136e4df0f4f8da92896d98ab2cb43dda58a/docs/user/Dependencies.md#dependency-versions Once you try and validate with 3.7.0 let us know. If it's still a problem we'll keep this open. If not please close this issue. Thx.

vaibhav90 commented 2 years ago

Thank you for your help. Switched back the Kustomize version from 4 to 3.7 and it works.