anthos-service-mesh-packages icon indicating copy to clipboard operation
anthos-service-mesh-packages copied to clipboard

asmcli install with dry-run option fails

Open tetsuya28 opened this issue 3 years ago • 2 comments

asmcli ( 1.11.5-asm.3+config1 ) install command with --dry-run option fails in cloudshell. I tried to run the same command without --dry-run option succeeded. What should I do for dry-run?

***@cloudshell:~ (***)$ ./asmcli install --project_id *** --cluster_name *** --cluster_location *** -v --enable_all --dry-run
2022-01-07T05:09:27.072352 asmcli: Setting up necessary files...
2022-01-07T05:09:27.106698 asmcli: Creating temp directory...
2022-01-07T05:09:27.142886 asmcli:
2022-01-07T05:09:27.177457 asmcli: *****************************
2022-01-07T05:09:27.211293 asmcli: No output folder was specified with --output_dir|-D, so configuration and
2022-01-07T05:09:27.249060 asmcli: binaries will be stored in the following directory.
2022-01-07T05:09:27.282814 asmcli: /tmp/tmp.Hy4h71EKhD
2022-01-07T05:09:27.318037 asmcli: *****************************
2022-01-07T05:09:27.351487 asmcli:
2022-01-07T05:09:29.405858 asmcli: Using /tmp/tmp.Hy4h71EKhD/asm_kubeconfig as the kubeconfig...
2022-01-07T05:09:29.444671 asmcli: Checking installation tool dependencies...
2022-01-07T05:09:29.514515 asmcli: Fetching/writing GCP credentials to kubeconfig file...
2022-01-07T05:09:29.559279 asmcli: [WARNING]: Would have executed: /usr/bin/gcloud container clusters get-credentials *** --project=*** --zone=***
2022-01-07T05:09:29.625041 asmcli: [WARNING]: Would have executed: /usr/bin/kubectl --kubeconfig /tmp/tmp.Hy4h71EKhD/asm_kubeconfig config current-context
2022-01-07T05:09:29.668913 asmcli: [WARNING]: nc not found, skipping k8s connection verification
2022-01-07T05:09:29.702639 asmcli: [WARNING]: (Installation will continue normally.)
2022-01-07T05:09:29.745955 asmcli: Getting account information...
2022-01-07T05:09:29.798683 asmcli: [WARNING]: Would have executed: /usr/bin/gcloud auth list --project=*** --filter=status:ACTIVE --format=value(account)
2022-01-07T05:09:29.852642 asmcli: [ERROR]: Failed to get account name from gcloud. Please authorize and re-try installation.

tetsuya28 avatar Jan 07 '22 05:01 tetsuya28

That's definitely a bug that got introduced in a refactor. I'll try and schedule time for the fix soon.

zerobfd avatar Jan 07 '22 18:01 zerobfd

I just got this while using . what might be the cause ?

./asmcli --version
1.18.2-asm.4+config1

Output

<REDACTED>@cloudshell:~ (<REDACTED>)$ ./asmcli install   --project_id <REDACTED>   --cluster_name <REDACTED>   --cluster_location us-east4   --fleet_id <REDACTED>   --output_dir /tmp/j/   --ca mesh_ca   --dry-run
asmcli: Setting up necessary files...
asmcli: Using /tmp/j/asm_kubeconfig as the kubeconfig...
asmcli: Checking installation tool dependencies...
asmcli: Fetching/writing GCP credentials to kubeconfig file...
asmcli: [WARNING]: Would have executed: /usr/bin/gcloud container clusters get-credentials svc-demo --project=svc-gcp-d349 --zone=us-east4
asmcli: [WARNING]: Would have executed: /usr/bin/kubectl --kubeconfig /tmp/j/asm_kubeconfig config current-context
asmcli: [WARNING]: nc not found, skipping k8s connection verification
asmcli: [WARNING]: (Installation will continue normally.)
asmcli: Getting account information...
asmcli: [WARNING]: Would have executed: /usr/bin/gcloud auth list --project=<REDACTED> --filter=status:ACTIVE --format=value(account)
asmcli: [ERROR]: Failed to get account name from gcloud. Please authorize and re-try installation.

jeunii avatar Sep 26 '23 16:09 jeunii