-
Notifications
You must be signed in to change notification settings - Fork 897
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
OpenStack Nova enable/disable service #6996
Conversation
@@ -34,6 +34,7 @@ def fetch(hash) | |||
end | |||
|
|||
def save_inventory_multi(association, hashes, deletes, find_key, child_keys = [], extra_keys = []) | |||
|
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 this whitespace change in this PR?
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.
Sorry about that - this is remnant of me playing with that code. I will remove that in next update of PR.
0605d72
to
47daa52
Compare
47daa52
to
49d9124
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
49d9124
to
ba688e6
Compare
ba688e6
to
4a474c6
Compare
@blomquisg please review |
4a474c6
to
864c8fc
Compare
@Ladas please can you look at this? |
nova_fog_service.enable | ||
end | ||
|
||
def nova_fog_disable_service |
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.
There was a comment by @blomquisg on my PR suggesting the removal of the fog-related part in the method name -- i.e. ironic_fog_set_node_maintenance shortened to set_node_maintenance. I'm not sure what the convention is for provider API calls that call out to fog, but these method names would be in a similar category -- whatever we do should probably be consistent across these features. Here's a link to the comment:
#7528 (comment)
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.
Yeah, I prefer to not prefix the methods with nova_fog
.
Also, is 'nova-compute'
going to be the only service that gets disabled/enabled?
I'm a bit confused by this PR. (Some of this repeats what I put in line comments)
@Ladas and @petrblaho, thoughts? |
Enabled/disabled for scheduling cannot be observed by parsing openstack-status report from host b/c this repost only refers to system services on that machine. Scheduling status is apart from active/enabled/disabled services on host and only means if this particular host (and service) will be considered as target when nova goes through decision on which host new VM will be spawned. So this has to be obtained via API call.
In the future we can enable/disable scheduling even for cinder - so when it is needed this functionality should (and will) be generalized. Currently I do not know of any other services in OpenStack that has enabling/disabling of scheduling feature. |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
864c8fc
to
c97bbde
Compare
Adds scheduling_status field for SystemService model. Adds set of methods in Host::Operations to enable and disable scheduling for Nova Compute service. Adds system_services to Openstack::CloudManager::RefreshParser with modification of save_system_services_inventory in EmsRefresh::SaveInventory - this is ugly but needed to bridge over a fact that data are coming from Cloud refresh but needed to be stored with Infra's Host's SystemServices. Modifies spec for Openstack Infra Refresher to include Infra + Cloud situation - these tests different number of records in DB after refresh of both Infra and Cloud is done. Updates VCR Cassettes to reflect refresh call to get Openstack Services information.
c97bbde
to
76376b9
Compare
Checked commit petrblaho@76376b9 with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1 app/models/ems_refresh/save_inventory.rb
app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb
spec/models/manageiq/providers/openstack/infra_manager/refresher_rhos_juno_spec.rb
|
end | ||
|
||
def parse_service(service) | ||
# <Fog::Compute::OpenStack::Service |
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.
delete these large comments please
def change | ||
add_column :system_services, :scheduling_status, :string | ||
end | ||
end |
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.
@petrblaho Can you please pull this migration out into a separate PR so that it can be merged independent of the rest of the changes in this PR? We are approaching the deadline for schema changes for the darga branch, and I don't want the rest of the requested fixes in this PR to hold that up.
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
Added and reorganized features under Chargeback Rates node to support changes in non-explorer version of Chargeback Rates screen. Follow up PR for ManageIQ/manageiq-ui-classic#7016 Fixes ManageIQ#6996
Added and reorganized features under Chargeback Rates node to support changes in non-explorer version of Chargeback Rates screen. Follow up PR for ManageIQ/manageiq-ui-classic#7016 Fixes ManageIQ#6996
Added and reorganized features under Chargeback Rates node to support changes in non-explorer version of Chargeback Rates screen. Follow up PR for ManageIQ/manageiq-ui-classic#7016 Fixes ManageIQ#6996
This is WIP PR for enabling/disabling nova scheduling for host - which is needed to implement scaling down.
Parts of code needs to be refactored and there are no tests now.