Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Getting Cluster.server has invalid type: got string, want pointer when creating project on a different cluster #154

Closed
roi-codefresh opened this issue Aug 11, 2021 · 2 comments · Fixed by #176
Labels
bug Something isn't working

Comments

@roi-codefresh
Copy link
Contributor

When adding a new project on a different cluster, getting:

panic: field github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster.server has invalid type: got string, want pointer

image (4)

@roi-codefresh roi-codefresh added the bug Something isn't working label Aug 11, 2021
@umesh-cloudside
Copy link

umesh-cloudside commented Aug 11, 2021

Thanks, @roi-codefresh for filing the issue. Here is some additional information on the environment. I have also added text version of the errors shown in the screenshot. argocd-autopilot project create cs-aks --dest-kube-context cs-aks --port-forward --port-forward-namespace argocd INFO cloning git repository: https://github.com/umesh-cloudside/argo-autopilot.git Enumerating objects: 25, done. Counting objects: 100% (25/25), done. Compressing objects: 100% (20/20), done. Total 25 (delta 3), reused 24 (delta 2), pack-reused 0 INFO using revision: "", installation path: "/" INFO adding cluster: cs-aks WARNING: This will create a service account argocd-manageron the cluster referenced by contextcs-aks with full cluster level admin privileges. Do you want to continue [y/N]? y E0811 13:35:50.767922 5778 portforward.go:372] error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:54436->127.0.0.1:54438: write tcp4 127.0.0.1:54436->127.0.0.1:54438: write: broken pipe panic: field github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster.server has invalid type: got string, want pointer

goroutine 1 [running]:
google.golang.org/protobuf/internal/impl.fieldInfoForScalar(0x1031a4db8, 0x1400048bb00, 0x102a5dfcc, 0x6, 0x0, 0x0, 0x1031a4fd8, 0x102abeba0, 0x102a5dfd4, 0x30, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/internal/impl/message_reflect_field.go:228 +0x618
google.golang.org/protobuf/internal/impl.(*MessageInfo).makeKnownFieldsFunc(0x14000c56500, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0x14000d8c000, 0x14000d8c060, 0x14000d8c090, 0x14000d8c0c0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/internal/impl/message_reflect.go:67 +0x624
google.golang.org/protobuf/internal/impl.(*MessageInfo).makeReflectFuncs(0x14000c56500, 0x1031a4fd8, 0x102f68040, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0x14000d8c000, 0x14000d8c060, 0x14000d8c090, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/internal/impl/message_reflect.go:36 +0x44
google.golang.org/protobuf/internal/impl.(*MessageInfo).initOnce(0x14000c56500)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/internal/impl/message.go:90 +0x144
google.golang.org/protobuf/internal/impl.(*MessageInfo).init(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/internal/impl/message.go:72
google.golang.org/protobuf/internal/impl.(*messageReflectWrapper).ProtoMethods(0x14000e4e010, 0x0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/internal/impl/message_reflect_gen.go:150 +0x60
google.golang.org/protobuf/proto.protoMethods(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/proto/proto_methods.go:18
google.golang.org/protobuf/proto.UnmarshalOptions.unmarshal(0x101, 0x103116860, 0x140001e9c20, 0x14000bd6000, 0xeab, 0xeab, 0x10319c168, 0x14000e4e010, 0xeab, 0x105f5c5b8, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/proto/decode.go:80 +0x58
google.golang.org/protobuf/proto.UnmarshalOptions.UnmarshalState(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/proto/decode.go:64
github.com/golang/protobuf/proto.UnmarshalMerge(0x14000bd6000, 0xeab, 0xeab, 0x103145dc8, 0x140010ba000, 0x102f70a20, 0x14000e4cc01)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/golang/[email protected]/proto/wire.go:67 +0x118
github.com/golang/protobuf/proto.Unmarshal(0x14000bd6000, 0xeab, 0xeab, 0x103145dc8, 0x140010ba000, 0x1, 0x0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/golang/[email protected]/proto/wire.go:58 +0x5c
google.golang.org/grpc/encoding/proto.codec.Unmarshal(0x14000bd6000, 0xeab, 0xeab, 0x102f70a20, 0x140010ba000, 0x2, 0x2)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/encoding/proto/proto.go:53 +0x60
google.golang.org/grpc.recv(0x14000662288, 0x12cdd82b8, 0x104c25c48, 0x140010a8100, 0x0, 0x0, 0x102f70a20, 0x140010ba000, 0xc800000, 0x0, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/rpc_util.go:760 +0xb8
google.golang.org/grpc.(*csAttempt).recvMsg(0x14000a3e100, 0x102f70a20, 0x140010ba000, 0x0, 0x0, 0x0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/stream.go:929 +0xb8
google.golang.org/grpc.(*clientStream).RecvMsg.func1(0x14000a3e100, 0x5, 0x5)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/stream.go:780 +0x40
google.golang.org/grpc.(*clientStream).withRetry(0x14000df6360, 0x14000c66f48, 0x14000c66f18, 0x140010e8000, 0x14000276448)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/stream.go:638 +0xbc
google.golang.org/grpc.(*clientStream).RecvMsg(0x14000df6360, 0x102f70a20, 0x140010ba000, 0x0, 0x0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/stream.go:779 +0xa4
google.golang.org/grpc.invoke(0x10315f848, 0x140000580d0, 0x10244de30, 0x1e, 0x102f10fa0, 0x14000a2e6c0, 0x102f70a20, 0x140010ba000, 0x14000fe0380, 0x14000a3c320, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/call.go:73 +0xf4
github.com/grpc-ecosystem/go-grpc-middleware/retry.UnaryClientInterceptor.func1(0x10315f848, 0x140000580d0, 0x10244de30, 0x1e, 0x102f10fa0, 0x14000a2e6c0, 0x102f70a20, 0x140010ba000, 0x14000fe0380, 0x1030a0988, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/grpc-ecosystem/[email protected]/retry/retry.go:43 +0x17c
google.golang.org/grpc.(*ClientConn).Invoke(0x14000fe0380, 0x10315f848, 0x140000580d0, 0x10244de30, 0x1e, 0x102f10fa0, 0x14000a2e6c0, 0x102f70a20, 0x140010ba000, 0x0, ...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/google.golang.org/[email protected]/call.go:35 +0xa8
github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster.(*clusterServiceClient).Create(0x14000206100, 0x10315f848, 0x140000580d0, 0x14000a2e6c0, 0x0, 0x0, 0x0, 0x14000a85400, 0x4ff, 0x0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/argoproj/argo-cd/[email protected]/pkg/apiclient/cluster/cluster.pb.go:338 +0xa4
github.com/argoproj/argo-cd/v2/cmd/argocd/commands.NewClusterAddCommand.func1(0x140005a1b80, 0x14000df37b0, 0x1, 0x1)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/argoproj/argo-cd/[email protected]/cmd/argocd/commands/cluster.go:141 +0x538
github.com/spf13/cobra.(*Command).execute(0x140005a1b80, 0x14000df3780, 0x1, 0x1, 0x140005a1b80, 0x14000df3780)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x1d0
github.com/spf13/cobra.(*Command).ExecuteC(0x140005a1180, 0x140001fcae0, 0x2, 0x2)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x258
github.com/spf13/cobra.(*Command).Execute(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:890
github.com/argoproj-labs/argocd-autopilot/pkg/argocd.(*addClusterImpl).Execute(0x140001fcc20, 0x10315f810, 0x14000641c00, 0x16fb1793b, 0x6, 0x1, 0x500)
/private/tmp/argocd-autopilot-20210802-93323-7kmiwe/pkg/argocd/argocd.go:100 +0xa0
github.com/argoproj-labs/argocd-autopilot/cmd/commands.RunProjectCreate(0x10315f810, 0x14000641c00, 0x14000c67ca0, 0x140002eb800, 0x14000c17ce8)
/private/tmp/argocd-autopilot-20210802-93323-7kmiwe/cmd/commands/project.go:191 +0xaa4
github.com/argoproj-labs/argocd-autopilot/cmd/commands.NewProjectCreateCommand.func2(0x140005a0f00, 0x140008a9020, 0x1, 0x6, 0x0, 0x0)
/private/tmp/argocd-autopilot-20210802-93323-7kmiwe/cmd/commands/project.go:118 +0xb8
github.com/spf13/cobra.(*Command).execute(0x140005a0f00, 0x140008a8fc0, 0x6, 0x6, 0x140005a0f00, 0x140008a8fc0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x320
github.com/spf13/cobra.(*Command).ExecuteC(0x140005a0000, 0x140005a0000, 0x14000a9ff48, 0x2)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x258
github.com/spf13/cobra.(*Command).Execute(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:890
main.main()
/private/tmp/argocd-autopilot-20210802-93323-7kmiwe/cmd/main.go:26 +0x2a8`.

@umesh-cloudside
Copy link

argocd-autopilot version: v0.2.13 ArgoCD version: v2.1.0-rc1+a92c240, GKE k8s Version:1.18.20-gke.900 AKS k8s version: 1.19.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants