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]1.0 pg cluster restart failed #8498

Closed
tianyue86 opened this issue Nov 21, 2024 · 2 comments
Closed

[BUG]1.0 pg cluster restart failed #8498

tianyue86 opened this issue Nov 21, 2024 · 2 comments
Assignees
Labels
kind/bug Something isn't working severity/major Great chance user will encounter the same problem
Milestone

Comments

@tianyue86
Copy link

Describe the env

Kubernetes: v1.30.4-eks-a737599
KubeBlocks: 1.0.0-beta.3
kbcli: 1.0.0-beta.2

To Reproduce
Steps to reproduce the behavior:

  1. Create pg cluster in running status
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: postgres-sfhcgj
  namespace: default
spec:
  terminationPolicy: WipeOut
  clusterDef: postgresql
  topology: replication
  componentSpecs:
    - name: postgresql
      labels:
        apps.kubeblocks.postgres.patroni/scope: postgres-sfhcgj-postgresql
      replicas: 2
      serviceAccountName:
      disableExporter: true
      resources:
        limits:
          cpu: 100m
          memory: 0.5Gi
        requests:
          cpu: 100m
          memory: 0.5Gi
      volumeClaimTemplates:
        - name: data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 3Gi
NAMESPACE   NAME              CLUSTER-DEFINITION   TERMINATION-POLICY   STATUS     AGE
default     postgres-sfhcgj   postgresql                          WipeOut                            Running    4h2m
  1. Restart it
    kbcli cluster restart postgres-sfhcgj --auto-approve --force=true --namespace default
  2. Check the cluster status: always in Updating status
NAMESPACE   NAME              CLUSTER-DEFINITION   TERMINATION-POLICY   STATUS     AGE
default     postgres-sfhcgj   postgresql           WipeOut              Updating   4h2m
  1. Check resources
k get pod
NAME                                                     READY   STATUS    RESTARTS   AGE
postgres-sfhcgj-postgresql-0                             4/4     Running   0          110m
postgres-sfhcgj-postgresql-1                             4/4     Running   0          110m

k get cmp
NAME                         DEFINITION                         SERVICE-VERSION   STATUS     AGE
postgres-sfhcgj-postgresql   postgresql-16-1.0.0-alpha.0        16.4.0            Updating   4h17m

k describe cmp postgres-sfhcgj-postgresql
Name:         postgres-sfhcgj-postgresql
Namespace:    default
Labels:       app.kubernetes.io/component=postgresql-16-1.0.0-alpha.0
              app.kubernetes.io/instance=postgres-sfhcgj
              app.kubernetes.io/managed-by=kubeblocks
              apps.kubeblocks.io/component-name=postgresql
              componentdefinition.kubeblocks.io/name=postgresql-16-1.0.0-alpha.0
Annotations:  apps.kubeblocks.io/cluster-uid: 49e48198-acf3-41e9-8617-e82324272c77
              kubeblocks.io/generation: 5
API Version:  apps.kubeblocks.io/v1
Kind:         Component
Metadata:
  Creation Timestamp:  2024-11-21T05:21:43Z
  Finalizers:
    cluster.kubeblocks.io/finalizer
    component.kubeblocks.io/finalizer
  Generation:  2
  Owner References:
    API Version:           apps.kubeblocks.io/v1
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  Cluster
    Name:                  postgres-sfhcgj
    UID:                   49e48198-acf3-41e9-8617-e82324272c77
  Resource Version:        52778318
  UID:                     856fe45f-621b-468d-97f5-162e9f4075a4
Spec:
  Comp Def:          postgresql-16-1.0.0-alpha.0
  Disable Exporter:  false
  Labels:
    apps.kubeblocks.postgres.patroni/scope:  postgres-sfhcgj-postgresql
  Replicas:                                  2
  Resources:
    Limits:
      Cpu:     100m
      Memory:  512Mi
    Requests:
      Cpu:          100m
      Memory:       512Mi
  Service Version:  16.4.0
  Volume Claim Templates:
    Name:  data
    Spec:
      Access Modes:
        ReadWriteOnce
      Resources:
        Requests:
          Storage:  3Gi
Status:
  Conditions:
    Last Transition Time:  2024-11-21T05:21:44Z
    Message:               The operator has started the provisioning of Cluster: postgres-sfhcgj-postgresql
    Observed Generation:   2
    Reason:                PreCheckSucceed
    Status:                True
    Type:                  ProvisioningStarted
    Last Transition Time:  2024-11-21T07:57:32Z
    Message:               the component phase is Updating
    Observed Generation:   2
    Reason:                Unavailable
    Status:                False
    Type:                  Available
    Last Transition Time:  2024-11-21T05:23:12Z
    Message:               kbadmin,kbdataprotection,kbprobe,kbmonitoring,kbreplicator
    Observed Generation:   1
    Reason:                AllProvisioned
    Status:                True
    Type:                  SystemAccountProvision
  Observed Generation:     2
  Phase:                   Updating
Events:                    <none>

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@tianyue86 tianyue86 added the kind/bug Something isn't working label Nov 21, 2024
@tianyue86 tianyue86 added this to the Release 1.0.0 milestone Nov 21, 2024
@tianyue86 tianyue86 added the severity/major Great chance user will encounter the same problem label Nov 26, 2024
@shanshanying
Copy link
Contributor

should have been fixed by PR #8535, pls veify

@tianyue86
Copy link
Author

Verified and fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/major Great chance user will encounter the same problem
Projects
None yet
Development

No branches or pull requests

3 participants