Giter Club home page Giter Club logo

Comments (11)

zerobfd avatar zerobfd commented on July 18, 2024

Can you post details of the OS/shell for the machine running asmcli?

from anthos-service-mesh-packages.

stabenfeldt avatar stabenfeldt commented on July 18, 2024

Sure, @zerobfd it´s a macOS Monterey Version 12.3.1.
asmcli was started from zsh 5.8 (x86_64-apple-darwin21.0)

from anthos-service-mesh-packages.

stabenfeldt avatar stabenfeldt commented on July 18, 2024

Here´s a snippet of the failing code.
./asmcli: line 4137: autopilot-cluster-1/kpt: No such file or directory

4118 #######
4119 # run_command takes a list of arguments that represents a command
4120 # If DRY_RUN or VERBOSE is enabled, it will print the command, and if DRY_RUN is
4121 # not enabled it runs the command.
4122 #######
4123 run_command() {
4124   local DRY_RUN; DRY_RUN="$(context_get-option "DRY_RUN")"
4125   local VERBOSE; VERBOSE="$(context_get-option "VERBOSE")"
4126
4127   if [[ "${DRY_RUN}" -eq 1 ]]; then
4128     warn "Would have executed: ${*}"
4129     return
4130   elif [[ "${VERBOSE}" -eq 0 ]]; then
4131     "${@}" 2>/dev/null
4132     return "$?"
4133   fi
4134   info "Running: '${*}'"
4135   info "-------------"
4136   local RETVAL
4137   { "${@}"; RETVAL="$?"; } || true
4138   return $RETVAL
4139 }

from anthos-service-mesh-packages.

stabenfeldt avatar stabenfeldt commented on July 18, 2024

I created a new autopilot GKE cluster and tried again.
This time I got a different error message:

[cut 100 of similar lines..]
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
asmcli: Running: 'kpt pkg get --auto-set=false https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/[email protected]+config2 asm'
asmcli: -------------
./enable.sh: line 18: 63473 Segmentation fault: 11  ./asmcli install -p $PROJECT_ID -l $LOCATION -n $CLUSTER_NAME --managed --verbose --output_dir $CLUSTER_NAME --use_managed_cni --channel regular --enable-all
bash-3.2$ 

enable.sh

#!/bin/bash

# https://cloud.google.com/service-mesh/docs/unified-install/asmcli-overview

export PROJECT_ID=my_project
export LOCATION=europe-west1
export CLUSTER_NAME=my_cluster

./asmcli install \
    -p $PROJECT_ID \
    -l $LOCATION \
    -n $CLUSTER_NAME \
    --managed \
    --verbose \
    --output_dir $CLUSTER_NAME \
    --use_managed_cni \
    --channel regular \
    --enable-all

from anthos-service-mesh-packages.

stabenfeldt avatar stabenfeldt commented on July 18, 2024

I ran asmcli again and now it failed with this error again.
(I added set -xto the top of asmcli)

+ curl -L https://storage.googleapis.com/gke-release/asm/istio-1.13.2-asm.5-osx.tar.gz
+ tar xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41.8M  100 41.8M    0     0  19.1M      0  0:00:02  0:00:02 --:--:-- 19.1M
+ ln -s istio-1.13.2-asm.5/bin/istioctl .
ln: ./istioctl: File exists

That made me remember that I had executed asmcli twice on my first cluster.
The first runs fails with a segmentation fault and the second run fails because istioctl is already
there.

from anthos-service-mesh-packages.

zerobfd avatar zerobfd commented on July 18, 2024

I know this probably isn't the answer you want, but we don't support macOS for precisely these reasons. Apple seems fond of finding small ways to introduce incompatible changes to the shell/coreutils with every release, and we just don't have the testing resources to keep up and make it compatible.

To double-check whether this is the root cause, could you try running from Cloud Shell or a Linux machine? Or maybe a Docker container if that's more convenient?

from anthos-service-mesh-packages.

jacekszlachtass avatar jacekszlachtass commented on July 18, 2024

I just got a very similar error on Linux. In your output_dir, do you already have an istioctl symlink created by a previous version of asmcli? If so, rename your output_dir and try again.

from anthos-service-mesh-packages.

stabenfeldt avatar stabenfeldt commented on July 18, 2024

@zerobfd It worked when I ran it in a Docker container. 🎉

May I suggest that asmcli aborts with a message saying something like this? "macOS is not supported. Run asmcli in a Docker container if you´re on macOS. Or try anyway if you know what you´re doing by using the --run-on-macOS flag.

from anthos-service-mesh-packages.

stabenfeldt avatar stabenfeldt commented on July 18, 2024

I have been struggling to get ASM working through Pelumi and Terraform too. I suggest it boils down to the same macOS issue. The error message I suggested might have helped me in the right direction earlier.

from anthos-service-mesh-packages.

zerobfd avatar zerobfd commented on July 18, 2024

Glad it worked from a container! We actually used to block macOS completely, but we got a lot of requests to just allow folks to run it anyways so we removed that check. I know that some customers have already put asmcli into automated pipelines, so I can't introduce something that requires a new flag to run, but I'll see if I can think of a way to put up a banner or something.

Is there something with Pelumi/Terraform that you want to verify first, or can I close this issue out?

from anthos-service-mesh-packages.

Amazingzzl avatar Amazingzzl commented on July 18, 2024

maybe you should delete output_dir ,seem as rm -rf $CLUSTER_NAME

from anthos-service-mesh-packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.