GithubHelp home page GithubHelp logo

Comments (7)

jhernand avatar jhernand commented on July 29, 2024

We are still seeing this problem, and I think it is related to the how the names of the IAM roles are calculated during installation and during uninstallation. During the installation the name of the role is calculated here:

https://github.com/openshift/installer/blob/ac006ae671a645553d58c8a29c676968dfa3d85f/data/data/aws/bootstrap/main.tf#L48

That cluster_name comes from the clusterdeployment.spec.config.clusterID. In my case that is api-tests. As a result the following roles are created:

$ aws iam list-roles | jq -r .Roles[].RoleName | grep api-tests
api-tests-bootstrap-role
api-tests-master-role
api-tests-worker-role

But when Hive tries to delete the cluster it calls the installer, which calculates again this names, this time in the Go code:

https://github.com/openshift/installer/blob/ac006ae671a645553d58c8a29c676968dfa3d85f/pkg/destroy/aws/aws.go#L813

The result of this is different, according to the logs:

time="2018-12-20T15:56:06Z" level=debug msg="Deleting IAM resources (map[openshiftClusterID:1d7eae0b-bb0b-484d-bf05-5b566d37b09e])"
time="2018-12-20T15:56:06Z" level=debug msg="deleting role: api-tests-2k2xt-master-role"

Note that the name here is api-tests-2k2xt-master-role instead of api-tests-master-role. api-tests-2k2xt is the name of the clusterdeployment object. So I believe that the problem is that Hive is passing to the uninstaller a value that is inconsistent with what it passes to the installer.

The net result is that when Hive fails after creating the IAM roles, for whatever the reason, it is impossible to create a cluster with the same name, neither with the automatic retry done by Hive nor manually. The only alternative is to manually remove the IAM roles from AWS.

@joelddiaz @wking @dgoodwin any suggestion?

from hive.

dgoodwin avatar dgoodwin commented on July 29, 2024

Looks like another bug in hive not being prepared for the use of GenerateName. Should be a simple fix to use the Cluster name not generate name.

from hive.

dgoodwin avatar dgoodwin commented on July 29, 2024

This might explain a lot of failed deprovision jobs in opshive.

from hive.

joelddiaz avatar joelddiaz commented on July 29, 2024

We're just blindly using the ungenerated clustername at the uninstall call. If we would simply read the cd.Spec.Config.ClusterID and pass that to the uninstall, i think we'd be okay

I haven't tried this, but I'd think that somewhere around here we can grab/save the data out of the clusterdeployment: https://github.com/openshift/hive/blob/master/contrib/pkg/installmanager/installmanager.go#L164-L186

from hive.

dgoodwin avatar dgoodwin commented on July 29, 2024

Haven't seen in awhile.

from hive.

jhernand avatar jhernand commented on July 29, 2024

I still see it frequently, with the version of Hive that we have in our environment.

from hive.

dgoodwin avatar dgoodwin commented on July 29, 2024

https://jira.coreos.com/browse/CO-173

from hive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.