Skip to content

Kubernetes cluster stuck in Stopping state #6456

@saffronjam

Description

@saffronjam
ISSUE TYPE
  • Bug Report
COMPONENT NAME

API

CLOUDSTACK VERSION

4.17.0 (cloud have occurred on 4.16.1)

CONFIGURATION

Single host running management server and database

OS / ENVIRONMENT

Ubuntu 20.04

SUMMARY

When attempting to delete a Kubernetes cluster, it gets stuck in Stopping state.
cluster-stuck-in-stopping-state

And every time a kubernetes-related API call is made, such as "deleteKubernetesCluster", error 530 appears
error-530

Investigating the cloudstack-management.service logs, there seem to be an unhandled null pointer exception when issuing some string operation (perhaps a toString() on a null reference). Looking into the source code, it appears to be the case.
error-logs

STEPS TO REPRODUCE

Removing clusters was possible, but this time it appears as some reference was deleted in database, which nullified a field in a row in the table kubernetes_supported_version, or related table. Therefore, it would be hard to write steps to reproduce.

EXPECTED RESULTS

Friendlier error message, recoverable state. How can such a field become null?

ACTUAL RESULTS

Kubernetes clusters stuck in stopping state, refuses to be deleted, prompting multiple error code 530 messages
(every delete operation is ignored since a cluster cannot be deleted while in the stopping state)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions