In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
How to achieve nova-scheduler module scheduling, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Openstack creates a virtual machine or performs a cold migration of a virtual machine based on the filters configured by scheduler_default_filters and scheduler_available_filters in the nova.conf file
Filter the host and select the appropriate destination host.
The following according to the nova M version of the source code analysis and scheduling of different filters.
1. The conductor service invokes the select_destinations of the scheduler service SchedulerManager class through rpc, thus entering the host filtering phase.
The main purpose of this phase is to call the filter configured in advance in the nova.conf file to select the appropriate compute node.
File nova/scheduler/manager.py
Line 104, self.driver is actually the FileterScheduler configured in the nova.conf file
II. Nova/scheduler/filter_scheduler.py file
Line 52, num_instances is the number of compute nodes to select.
Line 53, self._schedule is the actual scheduling function, in which the functions of each filter are scheduled.
3. _ schedule function
Line 94, loading the json file can configure the filtering rules in the json file, and now the m-version json file doesn't work.
Line 104, get the current state of all compute nodes from the database before filtering.
112 lines for host filtering
120 lines, the host that gets the filter calculates the weight and returns a list sorted by weight.
IV. Nova/scheduler/host_manager.py file
The value passed in the parameter filter_class_names in the get_filtered_host function is None, which enters the branch 517.
Line 517, filters is a list of all filter class names, returned by the self._choose_host_filters function
_ choose_host_filters (), the function picks out the filter to use based on the scheduler_default_filters and scheduler_available_filters in the nova.conf file
Self._load_filters () loads the scheduler_default_filters entry in the nova.conf file, and all filters under nova/scheduler/filters are turned on by default.
Line 545, call BaseFilterHandler::get_filtered_objects in the nova/filters.py file, the parameter filters is the list of filter classes to use, and hosts is all the compute nodes.
5. Nova/filters.py file
Line 81, call the filter in a loop
Line 85, call the filter_all method of the filter class to filter the host and use the AvailabilityZoneFilter class to describe the calling relationship
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.