Skip to content

Allow force installing to replace or overwrite existing resources #1174

Closed

Description

@soltysh

Version

$ openshift-install version
unreleased-master-191-g810b13a90e881b87935d86fc4b84f25daa6e2516

Platform (aws|libvirt|openstack):

aws

What happened?

I was installing cluster and stumbled upon the following error message:

 2 errors occurred:                           
ERROR 	* module.masters.aws_iam_instance_profile.master: 1 error occurred: 
ERROR 	* aws_iam_instance_profile.master: Error creating IAM instance profile maszulik-master-profile: EntityAlreadyExists: Instance Profile maszulik-master-profile already exists. 
ERROR 	status code: 409, request id: 4ef868f7-2612-11e9-9385-61fa1054d42b 

which prevents me from processing further. I need to either switch to other region or 🤷‍♂️

What you expected to happen?

I'd like to be able to force install so that the existing resources will get overridden by the new installation.

How to reproduce it (as minimally and precisely as possible)?

In my case it was I left the cluster up and running last week and that go automatically cleaned during the weekend. Now, I'm struggling with the described situation, but I don't think that's easily reproducible.

/cc @tnozicka who also experienced similar issues last week

Activity

  1. tnozicka commented on Feb 1, 2019

    @tnozicka
    Contributor

    I have encountered the same thing, got more errors but including this one as well. Generally the issue is the installer tells me the same resources already exist and it fails on that. Might be they didn't got cleaned up on destroy or I didn't run it a month ago, doesn't really matter - installer should be able to replace those with flag --overwrite or --force.

    Heard it from another guy as well - the unfortunate solution seems to be changing cluster names / regions which you run out of soon.

  2. soltysh commented on Feb 1, 2019

    @soltysh
    ContributorAuthor

    the unfortunate solution seems to be changing cluster names / regions which you run out of soon.

    That didn't work for me, just tried 😭

  3. wking commented on Feb 1, 2019

    @wking
    Member

    Lots more chit-chat here if you want short-term debugging/recovery. Mid-term, #762 will solve "new clusters collide with existing clusters". But you'll want to reliably run destroy cluster to avoid leaking cruft, regardless.

  4. tnozicka commented on Feb 4, 2019

    @tnozicka
    Contributor

    But you'll want to reliably run destroy cluster to avoid leaking cruft, regardless.

    Relying on a person to ALWAYS destroy his cluster is a faulty assumption. People do mistakes. e.g. running this in the installer dir and doing git clean -xfd or using tmpdir or just accidentally deleting it are common things in dev env, that's why it's not a production and people do mistakes also there. If you intend to keep such important info in local file system you have to account for a path when it is lost. Not even talking about working from more then one laptop.

    Implementing --overwrite would seem to account for those cases.

  5. wking commented on Feb 4, 2019

    @wking
    Member

    Relying on a person to ALWAYS destroy his cluster is a faulty assumption.

    #746 has some more discussion on this, and serious accounts will want some way to backstop leaked resources (openshift-dev uses this script). And again, once we address #762, leaked resources won't block new clusters (and an installer --overwrite would end up as useless cruft). The backstops protect you from forgetful users, so you need them, but proactively calling destroy cluster saves you money and helps keep the account under its limits by removing unused resources before the backstops gets to them.

  6. eparis commented on Feb 18, 2019

    @eparis
    Member

    Anyone who has instance profiles they need to delete. Do it by hand for example:
    aws --region=eu-west-2 iam delete-instance-profile --instance-profile-name eparis1-worker-profile

    This (almost certainly) happened because you left your cluster running for 48h in openshift-dev instead of cleaning it up like you should have. Please feel free to comment in the DPP ticket that their cleanup affected you.

    https://jira.coreos.com/browse/DPP-1130

  7. eparis commented on Feb 20, 2019

    @eparis
    Member

    I'm going to close this issue. I do not believe we should implement a --overwrite feature.

    #1268
    should allow destroy cluster to work even after the DPP scripts have cleaned things up partially. Until then you'll have to clean up by hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions