-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add Cinder storage manager support: backend changes #11088
Add Cinder storage manager support: backend changes #11088
Conversation
Hui - thanks.
|
@@ -66,9 +66,12 @@ def ems_inv_to_hashes | |||
# get_hosts | |||
get_images | |||
get_servers | |||
# TODO: change spec to remove this | |||
# | |||
get_volumes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines - volumes, backups, snapshots - should be moved to the cinder_manager/refresh_parser.rb - which I think you already did - so these are redundant and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, will remove these eventually. The reason to keep it is to avoid Travis CI build failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to worry about Travis failures for WIP PRs. And I'm not sure why leaving Swift in Openstack and not pulling it out into separate files causes Travis failures.
f4ae900
to
25d305f
Compare
# TODO: (hsong) duplicate with ManageIQ::Providers::NetworkManager::EventParser | ||
# and ManageIQ::Providers::InfraManager::EventParser | ||
# | ||
module ManageIQ::Providers::StorageManager::CinderStorageManager::EventParser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Cinder generate events? What events are we parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether Cinder generate events or not, but seems like all kind of providers have their own event parser. If you sure we don't need it, I can remove it.
f4ae900
to
25d305f
Compare
when ManageIQ::Providers::ConfigurationManager then save_configuration_manager_inventory(ems, hashes, target) | ||
when ManageIQ::Providers::ContainerManager then save_ems_container_inventory(ems, hashes, target) | ||
when ManageIQ::Providers::NetworkManager then save_ems_network_inventory(ems, hashes, target) | ||
when ManageIQ::Providers::StorageManager::CinderStorageManager then save_ems_cloud_inventory(ems, hashes, target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "save_ems_cinder_inventory", right? And there should be a new save_inventory_cinder.rb under app/models/ems_refresh/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's better to have separate save_inventory for cinder. I'll add it accordingly. Thanks,
c9917e0
to
f10530e
Compare
:cloud_volumes, | ||
:cloud_volume_backups, | ||
:cloud_volume_snapshots, | ||
:vms, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should :vms be saved in cinder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vms shouldn't be saved, but I need to change this for the cross linking anyway. I say leave it in for now, and I'll clean it up in my PR.
01f5caf
to
fdb3d04
Compare
@@ -0,0 +1,173 @@ | |||
module ManageIQ::Providers::StorageManager::CinderManager::RefreshHelperMethods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you move these into a separate file? These aren't "helper methods" these methods are doing the actual parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just try to keep the same pattern as other helper_methods. Will combine together in the next PR if needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hsong-rh Actually, this is contrary to the existing pattern. All of the other parsers have all the parsing code in the same file. As I said, these aren't "helper methods" this is parsing code.
@blomquisg @Fryguy @Ladas we should have a conversation about this one. please dont merge this into euwe yet |
it should not be ManageIQ::Providers::StorageManager::CinderManager but: the same for ManageIQ::Providers::StorageManager::SwiftManager: or you will have a ManageIQ::Providers::Openstack::StorageManager for both block and storage, or subset |
Several discussions here with @roliveri @Fryguy @hsong-rh and myself about this. I believe the current naming might not be correct but your suggestions may not work either. Both Cinder and Swift can be fully separable and also integrated with other providers. They certainly should not be linked under Openstack. I will let the others here chime in when they log in today. |
@Ladas |
Add Cinder storage manager support: backend changes (cherry picked from commit 3b6744b)
Euwe Backport details: $ git log
commit 7fdd8b72122181614cf4f52656a013a5eef1b5e9
Author: Richard Oliveri <oliveri.richard.github@gmail.com>
Date: Wed Sep 21 15:58:35 2016 -0400
Merge pull request #11088 from hsong-rh/cinder_storage_manager_backend
Add Cinder storage manager support: backend changes
(cherry picked from commit 3b6744b19c45f34c3c4eb5df19396ca7e4ee1753) |
If we would follow our current naming and say there can be separate Swift and Cinder managers, then the naming should be ManageIQ::Providers::Swift::StorageManager and ManageIQ::Providers::Cinder::StorageManager @Fryguy or have you guys changed the naming schema, so all storage manager are in one dir StorageManager? There was another code lately, assuming 3rd position is always a provider name, but in case of ManageIQ::Providers::StorageManager::CinderManager, it's not. |
This adds all the changes necessary to implement the UI changes for the new StorageManager implemented via pull requests: ManageIQ#11458 for the SwiftManager and ManageIQ#11088 for the CinderManager. A new left-side menu is added containing sub-menus for the Storage Providers, Cloud Volumes, and Cloud Object Stores. The Cloud Volumes and Cloud Object Stores have been removed as selections under the Compute -> Clouds menu.
I still dont like the fact that provider details leak into the main codebase this way. Now I see
@blomquisg @Fryguy @roliveri I recommend to stick to our current naming scheme / where is only the namespace right now, but sometimes also a provider object. And is the defacto EMS or a submanager.
|
As I pointed out, that naming scheme doesn't work for the use cases we have for storage managers. You can't just call something "StorageManager" because there can be multiple types of storage managers for any given provider. Also some storage managers can be standalone - so, calling something "storage manager" is like calling a provider "provider". |
BTW, I agree with the |
@roliveri so what was the exact issue if we would follow the pattern and call them ManageIQ::Providers::Swift::StorageManager and ManageIQ::Providers::Cinder::StorageManager (..same for Ceph, Gluster, etc.) Afaik for standalone, you can then have e.g. ManageIQ::Providers::Swift::IdentityManager (following our manager split-up) The provider here is swift, so it should be wrapped under that. |
Because, logically, StorageManager is a higher-level classification than the specific type of storage manager. Wrapping storage manager implementations under the StorageManager namespace enables us to minimize namespace pollution and enables us to define common StorageManager specific classes and constructs without having to worry about clashing with classes of the same name defined outside the StorageManager namespace (which we've had to deal with int the past). It also enables us to maintain the code for storage managers under a common directory - admittedly, much less an issue once the managers are converted into GEMs. I think much of the confusion stems from the current provider/manager dichotomy, which seems to have evolved over time - and is probably still evolving. In my view, a Swift storage manager and a swift provider are two different things. The naming scheme you describe eliminates the distinction. A provider is something that can stand on its own and it may employ one or more managers. So, a standalone Swift provider would be under The original intent of the provider/manager scheme was to provide a means to provide multiple views of a given environment. Where the provider defined the environment (An OpenStack instance for example) and the managers provided the views (cloud vs infra). When the concept of manager was extended to include various components of the provider implementation, using provider as the top-level classification became less appropriate - especially when said managers could be mixed and matched between various providers and/or used standalone. |
I'm 👍 on this
I'm all in for your second paragraph, except this line. I dont see why this would be the case.
I still think this scheme makes sense. One Provider, multiple Managers. We still need to improve the visibility of the Provider concept in the UI and we need to work out interconnections of Providers and their managers. But all in all, this concept is, what the providers team is having as their world view :) @blomquisg please correct me if I'm wrong. @roliveri and please dont see this as an offense, I can understand your reasoning and view on this architectural decision. Its a valid point of view on this. |
@roliveri just saw the comment #11593 (comment) by @Fryguy that you had that intense discussion already :) |
@durandom I agree, we should be in alignment. Toward that end, we may need to consider adapting the current naming scheme to accommodate types of managers that don't conform to the original assumptions. The current scheme assumes a provider-specific view of managers - where the implementation of the manager is specific to the provider. For managers that are not provider-specific, the current scheme makes little sense. Forcing these managers into the current scheme results in a In my opinion, a single naming scheme may not be able to accommodate all types of managers in a logically optimal way. We may need one scheme that applies to provider-specific managers and another that applies to non-provider-specific managers. Going forward, we may encounter new types of managers that don't conform to our current set of assumptions. Not restricting ourselves to a single naming scheme would enable us to accommodate them more easily. |
@roliveri I don't see Swift as a But, you're bringing up an important point. Currently, we only really group Provider things together. And, we've sort of tacked on Manager things into that namespace (for instance, Maybe it's time to create a Then, we move the abstract manager things (and, I guess, the implementations) to Ugh, I'm also just seeing this overlapping with #11593 (comment). We probably need to either start a github issue to collect this, or have a face to face to get the basic points on the table and start over from there. |
@blomquisg I didn't say Swift was You're right, it makes a lot of sense to hammer things out at the Given the examples in your comment, I think we're pretty much in agreement, with some small changes. Just to give you an idea of some of the requirements we were considering for storage: given the addition of the Given we've probably broken the record for post-merge comments on a single PR, your suggestion to change venue is well taken. We used to discuss things like this in talk topics, but whatever venue people think is most appropriate is fine with me. |
This adds all the changes necessary to implement the UI changes for the new StorageManager implemented via pull requests: ManageIQ/manageiq#11458 for the SwiftManager and ManageIQ/manageiq#11088 for the CinderManager. A new left-side menu is added containing sub-menus for the Storage Providers, Cloud Volumes, and Cloud Object Stores. The Cloud Volumes and Cloud Object Stores have been removed as selections under the Compute -> Clouds menu. (transferred from ManageIQ/manageiq@9d11c0d) (transferred from ManageIQ/manageiq-ui-classic@6ea9e22)
This adds all the changes necessary to implement the UI changes for the new StorageManager implemented via pull requests: ManageIQ/manageiq#11458 for the SwiftManager and ManageIQ/manageiq#11088 for the CinderManager. A new left-side menu is added containing sub-menus for the Storage Providers, Cloud Volumes, and Cloud Object Stores. The Cloud Volumes and Cloud Object Stores have been removed as selections under the Compute -> Clouds menu. (transferred from ManageIQ/manageiq@9d11c0d) (transferred from manageiq-ui-classic@6ea9e22c5c5353e95833f516001263a0ea669242)
Purpose or Intent
Add Cinder storage manager to abstract all storage-related information from current Openstack cloud provider's detail page.
Steps for Testing/QA
After Openstack provider is added into appliance, the Cinder storage manager should be added in the 'Storage Providers' tab automatically.