openstack 建立雲主機No valid host was found. There are not enough hosts available.
1.openstack建立雲主機時介面報錯:No valid host was found. There are not enough hosts available.
2.檢視nova下的排程資訊出現(nova-scheduler.log)
2016-12-08 09:40:57.394 1269 WARNING nova.scheduler.host_manager [req-c721e8e3-53b3-446a-a71c-5a185f1bc3a4 7858bcc09cd14e8fbbff141fc1e7181f c5daa5b11e9448a7a494901b8f25f2ae - - -] Host mitaka has more disk space than database expected (25 GB > 17 GB)
2016-12-08 09:40:57.395 1269 INFO nova.filters [req-c721e8e3-53b3-446a-a71c-5a185f1bc3a4 7858bcc09cd14e8fbbff141fc1e7181f c5daa5b11e9448a7a494901b8f25f2ae - - -] Filtering removed all hosts for the request with instance ID 'a6b1e821-ee1d-4a01-b938-686dcad02c4e'. Filter results: ['RetryFilter: (start: 1, end: 1)', 'AvailabilityZoneFilter: (start: 1, end: 1)', 'RamFilter: (start: 1, end: 1)', 'DiskFilter: (start: 1, end: 0)']
3.解決方案:
修改nova的 配置檔案,使得排程過濾器能夠通過設定
#scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
新增本句設定:scheduler_default_filters=AllHostsFilter
重啟服務可以建立新例項了