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

after enabling sharding, the application cannot be updated normally. #6433

Open
zxbyoyoyo opened this issue Jan 3, 2024 · 0 comments
Open
Labels
type/bug Something isn't working

Comments

@zxbyoyoyo
Copy link
Contributor

zxbyoyoyo commented Jan 3, 2024

Describe the bug

To Reproduce

  1. make a test application
cat <<EOF | kubectl apply -f -
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: app-normal
spec:
  components:
    - name: comp-normal
      type: webservice
      properties:
        image: nginx
  policies:
    - name: topology
      type: topology
      properties:
        clusters: ["local"]
EOF
  1. switch on Controller sharding
vela install  -v 1.9.5 --set sharding.enabled=true
vela addon enable vela-core-shard-manager nShards=2
  1. update the test application
cat <<EOF | kubectl apply -f -
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: app-normal
spec:
  components:
    - name: comp-normal
      type: webservice
      properties:
        image: nginx
  policies:
    - name: topology
      type: topology
      properties:
        clusters: ["local"]
EOF

What happens: when updating the application, the application mutating webhook will assign a random shard-id if it finds that the application does not have a shard-id. but it doesn't add the shard-id to the related apprev and rt resources. because of this, the slave controller will report that it can't find the apprevision resource when it is processing the application.

How to solve: we can try to adjust the application mutating webhook logic to make it also add a shard-id to the application, apprev, rt and other related resources. but in the test, we found that the master controller will get the apprev, rt data from the cache (at this point, there is no apprev, rt data in the cache. Once the sharding is activated, the master controller will only cache resources with the shard-id: master label).

Expected behavior

Screenshots

image

KubeVela Version
v 1.9.5

Cluster information

Additional context

@dhiguero dhiguero added the type/bug Something isn't working label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants