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

Bypass the superclass orchestrated destroy for this Provider. #209

Merged
merged 1 commit into from
Jan 25, 2018

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Jan 24, 2018

In the OpenStack provider, the Provider instance is only tightly coupled
to the InfraManager. That is, when the InfraManager is created, then
the Provider is created and vice-versa, when the InfraManager is
destroyed, we need to destroy the Provider. The CloudManager objects
associated to that Provider should not be destroyed, and only need to
be nullified. For other Providers, the Provider instance is what is
destroyed, so by default the orchestrated destroy destroys all of its
managers, but we here don't want that to happen, so we are bypassing.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538232

@Ladas @aufi Please review
cc @agrare @jameswnl

In the OpenStack provider, the Provider instance is only tightly coupled
to the InfraManager.  That is, when the InfraManager is created, then
the Provider is created and vice-versa, when the InfraManager is
destroyed, we need to destroy the Provider.  The CloudManager objects
associated to that Provider should *not* be destroyed, and only need to
be nullified.  For other Providers, the Provider instance is what is
destroyed, so by default the orchestrated destroy destroys all of its
managers, but we here don't want that to happen, so we are bypassing.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538232
@miq-bot
Copy link
Member

miq-bot commented Jan 24, 2018

Checked commit Fryguy@0938e66 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Member

@aufi aufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's funky, but this is what we need to keep the behavior. We should do a refactoring of the provider/manager connections (that will not be probably backported)

@aufi aufi merged commit 158b93f into ManageIQ:master Jan 25, 2018
@aufi aufi added this to the Sprint 78 Ending Jan 29, 2018 milestone Jan 25, 2018
simaishi pushed a commit that referenced this pull request Jan 25, 2018
Bypass the superclass orchestrated destroy for this Provider.
(cherry picked from commit 158b93f)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538240
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 53194e3ee7ef6f7fed17c09eba3def77661a82ac
Author: Marek Aufart <aufi.cz@gmail.com>
Date:   Thu Jan 25 10:39:52 2018 +0100

    Merge pull request #209 from Fryguy/fix_provider_destroy
    
    Bypass the superclass orchestrated destroy for this Provider.
    (cherry picked from commit 158b93f4315516a7d05b3baa1b75e5c90bc26285)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538240

@Fryguy Fryguy deleted the fix_provider_destroy branch January 25, 2018 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants