stolostron / deploy

Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

helmreleases.app.ibm.com does not get deleted; multicloudhub-operator/uninstall.sh hangs

berenss opened this issue · comments

Describe the bug
multicloudhub-operator/uninstall.sh hangs

To Reproduce
Steps to reproduce the behavior:

% cd multicloudhub-operator

% kubectl delete -k .
service "open-cluster-management-registry" deleted
deployment.apps "open-cluster-management-registry" deleted
operatorgroup.operators.coreos.com "default" deleted
catalogsource.operators.coreos.com "open-cluster-management" deleted
subscription.operators.coreos.com "multicloudhub-operator-bundle" deleted

 % ./uninstall.sh 
Already on project "open-cluster-management" on server "https://api.sberens-demo.acm-demo.azure.devcluster.openshift.com:6443".
clusterserviceversion.operators.coreos.com "multicloudhub-operator.v0.0.1" deleted
clusterserviceversion.operators.coreos.com "etcdoperator.v0.9.4" deleted
clusterserviceversion.operators.coreos.com "multicloud-operators-subscription.v0.1.2" deleted
customresourcedefinition.apiextensions.k8s.io "multicloudhubs.operators.multicloud.ibm.com" deleted
customresourcedefinition.apiextensions.k8s.io "channels.app.ibm.com" deleted
customresourcedefinition.apiextensions.k8s.io "deployables.app.ibm.com" deleted
customresourcedefinition.apiextensions.k8s.io "helmreleases.app.ibm.com" deleted


^C
% oc get customresourcedefinition.apiextensions.k8s.io/helmreleases.app.ibm.com
NAME                       CREATED AT
helmreleases.app.ibm.com   2020-03-11T19:49:21Z
% oc describe customresourcedefinition.apiextensions.k8s.io/helmreleases.app.ibm.com
Name:         helmreleases.app.ibm.com
Namespace:    
Labels:       <none>
Annotations:  <none>
API Version:  apiextensions.k8s.io/v1
Kind:         CustomResourceDefinition
Metadata:
  Creation Timestamp:             2020-03-11T19:49:21Z
  Deletion Grace Period Seconds:  0
  Deletion Timestamp:             2020-03-12T05:12:49Z
  Finalizers:
    customresourcecleanup.apiextensions.k8s.io
  Generation:        1
  Resource Version:  2964709
  Self Link:         /apis/apiextensions.k8s.io/v1/customresourcedefinitions/helmreleases.app.ibm.com
  UID:               3f28d79f-a0f3-403c-90d5-eb6c7db104d7
Spec:
  Conversion:
    Strategy:  None
  Group:       app.ibm.com
  Names:
    Kind:                   HelmRelease
    List Kind:              HelmReleaseList
    Plural:                 helmreleases
    Singular:               helmrelease
  Preserve Unknown Fields:  true
  Scope:                    Namespaced
  Versions:
    Name:  v1alpha1
    Schema:
      openAPIV3Schema:
        Description:  HelmRelease is the Schema for the subscriptionreleases API
        Properties:
          API Version:
            Description:  APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
            Type:         string
          Kind:
            Description:  Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
            Type:         string
          Metadata:
            Type:  object
          Spec:
            Description:  HelmReleaseSpec defines the desired state of HelmRelease
            Properties:
              Chart Name:
                Description:  ChartName is the name of the chart within the repo
                Type:         string
              Config Map Ref:
                Description:  Configuration parameters to access the helm-repo defined in the CatalogSource
                Properties:
                  API Version:
                    Description:  API version of the referent.
                    Type:         string
                  Field Path:
                    Description:  If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.
                    Type:         string
                  Kind:
                    Description:  Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
                    Type:         string
                  Name:
                    Description:  Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                    Type:         string
                  Namespace:
                    Description:  Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
                    Type:         string
                  Resource Version:
                    Description:  Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
                    Type:         string
                  UID:
                    Description:  UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
                    Type:         string
                Type:             object
              Secret Ref:
                Description:  Secret to use to access the helm-repo defined in the CatalogSource.
                Properties:
                  API Version:
                    Description:  API version of the referent.
                    Type:         string
                  Field Path:
                    Description:  If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.
                    Type:         string
                  Kind:
                    Description:  Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
                    Type:         string
                  Name:
                    Description:  Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                    Type:         string
                  Namespace:
                    Description:  Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
                    Type:         string
                  Resource Version:
                    Description:  Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
                    Type:         string
                  UID:
                    Description:  UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
                    Type:         string
                Type:             object
              Source:
                Description:  INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html Source holds the url toward the helm-chart
                Properties:
                  Github:
                    Description:  GitHub provides the parameters to access the helm-chart located in a github repo
                    Properties:
                      Branch:
                        Type:  string
                      Chart Path:
                        Type:  string
                      Urls:
                        Items:
                          Type:  string
                        Type:    array
                    Type:        object
                  Helm Repo:
                    Description:  HelmRepo provides the urls to retrieve the helm-chart
                    Properties:
                      Urls:
                        Items:
                          Type:  string
                        Type:    array
                    Type:        object
                  Type:
                    Description:  SourceTypeEnum types of sources
                    Type:         string
                Type:             object
              Values:
                Description:  Values is a string containing (unparsed) YAML values
                Type:         string
              Version:
                Description:  Version is the chart version
                Type:         string
            Type:             object
          Status:
            Description:  HelmReleaseStatus struct containing the status
            Properties:
              Last Update:
                Format:  date-time
                Type:    string
              Message:
                Type:  string
              Phase:
                Description:  HelmReleaseStatusEnum defines the status of a Subscription release
                Type:         string
              Reason:
                Type:  string
            Required:
              lastUpdate
            Type:  object
        Type:      object
    Served:        true
    Storage:       true
    Subresources:
      Status:
Status:
  Accepted Names:
    Kind:       HelmRelease
    List Kind:  HelmReleaseList
    Plural:     helmreleases
    Singular:   helmrelease
  Conditions:
    Last Transition Time:  2020-03-11T19:49:21Z
    Message:               no conflicts found
    Reason:                NoConflicts
    Status:                True
    Type:                  NamesAccepted
    Last Transition Time:  2020-03-11T19:49:16Z
    Message:               the initial names have been accepted
    Reason:                InitialNamesAccepted
    Status:                True
    Type:                  Established
    Last Transition Time:  2020-03-12T05:12:49Z
    Message:               CustomResource deletion is in progress
    Reason:                InstanceDeletionInProgress
    Status:                True
    Type:                  Terminating
  Stored Versions:
    v1alpha1
Events:  <none>

Expected behavior
I expect the deploy uninstall.sh to clear up any related items cleanly.

Screenshots
NA

Desktop (please complete the following information):

  • OS: mac
  • Browser: chrome
  • Snapshot:1.0.0-SNAPSHOT-2020-03-11-12-21-26

Additional context

  • OCP 4.4 nightly on Azure

Is this covered under https://github.com/open-cluster-management/backlog/issues/995 ?
If not, can you move this over to backlog?

@gghezzo Yes it's covered by open-cluster-management/backlog#995

This problem is now resolved in this repo by the uninstall.sh script