1、cinder-scheduler 也会启动一个工作流 volume_create_scheduler
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Flow 'volume_create_scheduler' (3a602319-9392-478e-9fd0-6985deb60c55) transitioned into state 'RUNNING' from state 'PENDING' {{(pid=21820) _flow_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:145}}
2、ExtractSchedulerSpecTask
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Task 'cinder.scheduler.flows.create_volume.ExtractSchedulerSpecTask;volume:create' (81bd2354-2fb4-4d22-b69b-11da166546ea) transitioned into state 'RUNNING' from state 'PENDING' {{(pid=21820) _task_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:194}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Task 'cinder.scheduler.flows.create_volume.ExtractSchedulerSpecTask;volume:create' (81bd2354-2fb4-4d22-b69b-11da166546ea) transitioned into state 'SUCCESS' from state 'RUNNING' with result '{'request_spec': RequestSpec(CG_backend=<?>,availability_zones=['nova'],backup_id=None,cgsnapshot_id=None,consistencygroup_id=None,group_backend=<?>,group_id=None,image_id=None,operation='create_volume',resource_backend=<?>,snapshot_id=None,source_replicaid=<?>,source_volid=None,volume=Volume(fe3d0886-6dfb-4cc6-898a-72e902fba912),volume_id=fe3d0886-6dfb-4cc6-898a-72e902fba912,volume_properties=VolumeProperties,volume_type=VolumeType(22bc1956-6fd6-4142-b72a-4ab6a487944a))}' {{(pid=21820) _task_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:183}}
3、ScheduleCreateVolumeTask(主要的filter、weighting工作)
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Task 'cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create' (409faacc-99c6-46f0-bc0c-942115c6606f) transitioned into state 'RUNNING' from state 'PENDING' {{(pid=21820) _task_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:194}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.api.openstack.wsgi None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin admin] http://10.12.30.21/volume/v3/9ed27f1df9814f91b370d1003b066b0a/volumes returned with HTTP 202
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG oslo_db.sqlalchemy.engines None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION {{(pid=21820) _check_effective_sql_mode /usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py:308}}
4、ScheduleCreateVolumeTask:更新两个计算节点信息
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Updating capabilities for DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1: {u'pool_name': u'lvmdriver-1', u'filter_function': None, u'goodness_function': None, u'multiattach': True, u'total_volumes': 1, u'provisioned_capacity_gb': 0.0, 'timestamp': datetime.datetime(2019, 6, 20, 9, 14, 59, 346371), u'allocated_capacity_gb': 0, 'volume_backend_name': u'lvmdriver-1', u'thin_provisioning_support': True, u'free_capacity_gb': 22.8, 'driver_version': u'3.0.0', u'location_info': u'LVMVolumeDriver:DevStack-Rocky-Controller-21:stack-volumes-lvmdriver-1:thin:0', u'total_capacity_gb': 22.8, u'thick_provisioning_support': False, u'reserved_percentage': 0, u'QoS_support': False, u'max_over_subscription_ratio': u'20.0', 'vendor_name': u'Open Source', 'storage_protocol': u'iSCSI', u'backend_state': u'up'} {{(pid=21820) update_from_volume_capability /opt/stack/cinder/cinder/scheduler/host_manager.py:358}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Updating capabilities for DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1: {u'pool_name': u'lvmdriver-1', u'filter_function': None, u'goodness_function': None, u'multiattach': True, u'total_volumes': 1, u'provisioned_capacity_gb': 0.0, 'timestamp': datetime.datetime(2019, 6, 20, 9, 15, 43, 514862), u'allocated_capacity_gb': 0, 'volume_backend_name': u'lvmdriver-1', u'thin_provisioning_support': True, u'free_capacity_gb': 22.8, 'driver_version': u'3.0.0', u'location_info': u'LVMVolumeDriver:DevStack-Rocky-Compute-22:stack-volumes-lvmdriver-1:thin:0', u'total_capacity_gb': 22.8, u'thick_provisioning_support': False, u'reserved_percentage': 0, u'QoS_support': False, u'max_over_subscription_ratio': u'20.0', 'vendor_name': u'Open Source', 'storage_protocol': u'iSCSI', u'backend_state': u'up'} {{(pid=21820) update_from_volume_capability /opt/stack/cinder/cinder/scheduler/host_manager.py:358}}
5、ScheduleCreateVolumeTask:AvailabilityZoneFilter,返回两个结果
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Starting with 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:95}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Filter AvailabilityZoneFilter returned 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:125}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Checking if host DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1 can create a 1 GB volume (fe3d0886-6dfb-4cc6-898a-72e902fba912) {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:62}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Checking provisioning for request of 1 GB. Backend: host 'DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.8, total_capacity_gb: 22.8,allocated_capacity_gb: 0, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 0.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-06-20 09:15:43.514862 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:134}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Space information for volume creation on host DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1 (requested / avail): 1/22.8 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:172}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Checking if host DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1 can create a 1 GB volume (fe3d0886-6dfb-4cc6-898a-72e902fba912) {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:62}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Checking provisioning for request of 1 GB. Backend: host 'DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.8, total_capacity_gb: 22.8,allocated_capacity_gb: 0, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 0.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-06-20 09:14:59.346371 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:134}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filters.capacity_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Space information for volume creation on host DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1 (requested / avail): 1/22.8 {{(pid=21820) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:172}}
6、ScheduleCreateVolumeTask:CapacityFilter,返回两个结果
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Filter CapacityFilter returned 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:125}}
7、ScheduleCreateVolumeTask:CapabilitiesFilter,返回两个结果
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_filter None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Filter CapabilitiesFilter returned 2 host(s) {{(pid=21820) get_filtered_objects /opt/stack/cinder/cinder/scheduler/base_filter.py:125}}
8、ScheduleCreateVolumeTask:CapacityWeigher,两个结果权重一样
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filter_scheduler None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Filtered [host 'DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.8, total_capacity_gb: 22.8,allocated_capacity_gb: 0, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 0.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-06-20 09:15:43.514862, host 'DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1':free_capacity_gb: 22.8, total_capacity_gb: 22.8,allocated_capacity_gb: 0, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 0.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-06-20 09:14:59.346371] {{(pid=21820) _get_weighted_candidates /opt/stack/cinder/cinder/scheduler/filter_scheduler.py:342}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.base_weight None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Weigher CapacityWeigher returned, weigher value is {max: 456.0, min: 456.0} {{(pid=21820) get_weighed_objects /opt/stack/cinder/cinder/scheduler/base_weight.py:153}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Weighed [WeighedHost [host: DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1, weight: 0.0], WeighedHost [host: DevStack-Rocky-Controller-21@lvmdriver-1#lvmdriver-1, weight: 0.0]] {{(pid=21820) get_weighed_backends /opt/stack/cinder/cinder/scheduler/host_manager.py:500}}
9、ScheduleCreateVolumeTask:选中节点DevStack-Rocky-Compute-22
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.filter_scheduler None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Choosing DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1 {{(pid=21820) _choose_top_backend /opt/stack/cinder/cinder/scheduler/filter_scheduler.py:563}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.host_manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Consumed 1 GB from backend: host 'DevStack-Rocky-Compute-22@lvmdriver-1#lvmdriver-1':free_capacity_gb: 21.8, total_capacity_gb: 22.8,allocated_capacity_gb: 1, max_over_subscription_ratio: 20.0,reserved_percentage: 0, provisioned_capacity_gb: 1.0,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2019-06-20 09:15:56.793673 {{(pid=21820) consume_from_volume /opt/stack/cinder/cinder/scheduler/host_manager.py:316}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.api.openstack.wsgi None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin admin] GET http://10.12.30.21/volume//
Jun 20 17:15:56 DevStack-Rocky-Controller-21 devstack@c-api.service: DEBUG cinder.api.openstack.wsgi None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin admin] Empty body provided in request {{(pid=21070) get_body /opt/stack/cinder/cinder/api/openstack/wsgi.py:718}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 devstack@c-api.service: DEBUG cinder.api.openstack.wsgi None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin admin] Calling method 'all' {{(pid=21070) _process_stack /opt/stack/cinder/cinder/api/openstack/wsgi.py:872}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 devstack@c-api.service: INFO cinder.api.openstack.wsgi None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin admin] http://10.12.30.21/volume// returned with HTTP 300
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Task 'cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create' (409faacc-99c6-46f0-bc0c-942115c6606f) transitioned into state 'SUCCESS' from state 'RUNNING' with result 'None' {{(pid=21820) _task_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:183}}
Jun 20 17:15:56 DevStack-Rocky-Controller-21 cinder-scheduler: DEBUG cinder.scheduler.manager None req-5eb13d6b-917f-48f6-a28c-17ae0d99c799 admin None] Flow 'volume_create_scheduler' (3a602319-9392-478e-9fd0-6985deb60c55) transitioned into state 'SUCCESS' from state 'RUNNING' {{(pid=21820) _flow_receiver /usr/lib/python2.7/site-packages/taskflow/listeners/logging.py:145}}