kubevela / kubevela.github.io

KubeVela documentations and website (https://kubevela.io).
Apache License 2.0
48 stars 208 forks source link

No status for application when following "Deploy First Application" tutorial #1319

Closed mattwelke closed 5 months ago

mattwelke commented 5 months ago

When following the tutorial at https://kubevela.io/docs/quick-start/, everything works for me until I get to the part where I should run vela status first-vela-app. The tutorial says that I should see output like the following:

About:

  Name:         first-vela-app
  Namespace:    prod
  Created at:   2022-05-16 15:45:18 +0800 CST
  Status:       workflowSuspending

Workflow:

  ...

Services:

  - Name: express-server
    Cluster: local  Namespace: default
    Type: webservice
    Healthy Ready:1/1
    Traits:
      ✅ scaler

Instead, I see this:

maxprocs.go:47: maxprocs: Leaving GOMAXPROCS=20: CPU quota undefined
About:

  Name:         first-vela-app               
  Namespace:    prod                         
  Created at:   2024-04-03 13:51:39 -0400 EDT
  Status:                                    

(We can ignore "maxprocs.go:47: maxprocs: Leaving GOMAXPROCS=20: CPU quota undefined" for now. I get this error regardless of which vela command I run, and it doesn't seem to stop anything from working. The vela commands do begin to run.)

My application doesn't seem to have a status yet.

The next steps in the tutorial are about port forwarding and then resuming the workflow.

When I run vela port-forward first-vela-app 8000:8000, I get the following output:

maxprocs.go:47: maxprocs: Leaving GOMAXPROCS=20: CPU quota undefined
Error: no pod found in your application

I wonder if this issue (there being no pod associated with my application) is related to the fact that there is no status for my application yet.

Then, when I run vela workflow resume first-vela-app, which I understand to be the command I would run to get the workflow to resume (it appears designed to halt with a manual approval step), I get this output:

maxprocs.go:47: maxprocs: Leaving GOMAXPROCS=20: CPU quota undefined
Error: the workflow in application first-vela-app is not start

So it appears that I can't resume my workflow yet because of some issue that KubeVela encounters early on after I deploy my app, and it probably is related to me not seeing a status at all for my app.

Some info that might be useful for troubleshooting:

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.10
Release:    23.10
Codename:   mantic
> kubectl version
Client Version: v1.29.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.2

(using kind)

> kubectl get crd
NAME                                   CREATED AT
applicationrevisions.core.oam.dev      2024-04-03T17:02:27Z
applications.core.oam.dev              2024-04-03T17:02:27Z
componentdefinitions.core.oam.dev      2024-04-03T17:02:27Z
definitionrevisions.core.oam.dev       2024-04-03T17:02:27Z
policies.core.oam.dev                  2024-04-03T17:02:27Z
policydefinitions.core.oam.dev         2024-04-03T17:02:27Z
resourcetrackers.core.oam.dev          2024-04-03T17:02:27Z
traitdefinitions.core.oam.dev          2024-04-03T17:02:27Z
workflows.core.oam.dev                 2024-04-03T17:02:27Z
workflowstepdefinitions.core.oam.dev   2024-04-03T17:02:27Z
workloaddefinitions.core.oam.dev       2024-04-03T17:02:27Z

(KubeVela install appears to have succeeded)

> kubectl get pod -A
NAMESPACE            NAME                                              READY   STATUS    RESTARTS   AGE
kube-system          coredns-76f75df574-9zzk8                          1/1     Running   0          58m
kube-system          coredns-76f75df574-s5ctt                          1/1     Running   0          58m
kube-system          etcd-vela-test-control-plane                      1/1     Running   0          58m
kube-system          kindnet-r9zp9                                     1/1     Running   0          58m
kube-system          kube-apiserver-vela-test-control-plane            1/1     Running   0          58m
kube-system          kube-controller-manager-vela-test-control-plane   1/1     Running   0          58m
kube-system          kube-proxy-w9245                                  1/1     Running   0          58m
kube-system          kube-scheduler-vela-test-control-plane            1/1     Running   0          58m
local-path-storage   local-path-provisioner-7577fdbbfb-7nqwt           1/1     Running   0          58m
vela-system          kubevela-cluster-gateway-78f7c5b6bd-fj4p5         1/1     Running   0          57m
vela-system          kubevela-vela-core-5c96bf4bf4-4zq9s               1/1     Running   0          57m

(KubeVela pods appear to be running... I expect that at least one of these pods should react to my application by reconciling it)

> kubectl get app -A
NAMESPACE   NAME             COMPONENT        TYPE         PHASE   HEALTHY   STATUS   AGE
prod        first-vela-app   express-server   webservice                              9m19s

(app appears to have been at least applied to the Kube API)

mattwelke commented 5 months ago

Some more info. When I look at the logs of the kubevela-vela-core-<n> pod, I see errors:

"msg"="Reconciler error" "error"="cannot update application status: the server could not find the requested resource (patch applications.core.oam.dev first-vela-app)" "Application"={"name":"first-vela-app","namespace":"prod"} "controller"="application" "controllerGroup"="core.oam.dev" "controllerKind"="Application" "name"="first-vela-app" "namespace"="prod" "reconcileID"="e8ede21d-9334-4ede-a415-5f7500b2b11a"

mattwelke commented 5 months ago

Was able to fix this by downgrading my vela CLI to 1.9.6 (that was the version my colleague was using and things worked fine for them).

I was running 1.9.10 before.

mattwelke commented 5 months ago

May be related to https://github.com/kubevela/kubevela/issues/6493, a bug logged for 1.9.10.

Kolossi commented 5 months ago

Instead, I see this:

maxprocs.go:47: maxprocs: Leaving GOMAXPROCS=20: CPU quota undefined
About:

  Name:       first-vela-app               
  Namespace:  prod                         
  Created at: 2024-04-03 13:51:39 -0400 EDT
  Status:                             

Yes, that's the same output (no status output) I got before raising https://github.com/kubevela/kubevela/issues/6493

Go back to v1.9.9 and you will be fine, v1.9.10 wasn't a substantial update anyway.

For picking up kubevela, you will be fine with v1.9.9. Don't let this put you off, Kubevela is great! 🙂

Kolossi commented 5 months ago

Ah, please also note you've raised this on the "kubevela.github.io" repo, which is for the website.

The one for the software is "kubevela" - as with my ticket 🙂

mattwelke commented 5 months ago

Ah, please also note you've raised this on the "kubevela.github.io" repo, which is for the website.

Yes, it's clear now the issue isn't with the tutorial, but with the software itself.

Closing this since there's nothing to do with docs and the software bug has already been logged.