sfPPP / openstack-note

note
5 stars 0 forks source link

Openstack pike nova 模块常用数据库表说明 #93

Open sfPPP opened 6 years ago

sfPPP commented 6 years ago

openstack数据库初始化过程解析

NOVA数据库 block_device_mapping ---- 块设备映射表

+---------------------+---------------------+---------------------+----+-------------+-----------------------+-------------+-----------+-------------+-----------+-----------------+--------------------------------------+---------+-------------+------------------+--------------+-------------+----------+------------+--------------------------------------+------+---------------+--------------------------------------+
| created_at          | updated_at          | deleted_at          | id | device_name | delete_on_termination | snapshot_id | volume_id | volume_size | no_device | connection_info | instance_uuid                        | deleted | source_type | destination_type | guest_format | device_type | disk_bus | boot_index | image_id                             | tag  | attachment_id | uuid                                 |
+---------------------+---------------------+---------------------+----+-------------+-----------------------+-------------+-----------+-------------+-----------+-----------------+--------------------------------------+---------+-------------+------------------+--------------+-------------+----------+------------+--------------------------------------+------+---------------+--------------------------------------+
| 2018-07-25 03:00:27 | 2018-07-25 03:00:27 | 2018-07-25 03:10:00 |  1 | /dev/vda    |                     1 | NULL        | NULL      |        NULL |         0 | NULL            | ada775ad-8761-4a6b-b474-d5058b805864 |       1 | image       | local            | NULL         | disk        | NULL     |          0 | 52cea228-854a-4898-9440-b7c7730692e7 | NULL | NULL          | 78bab97c-d0b1-4f6d-976f-2818085508d6 |
| 2018-07-25 03:00:43 | 2018-07-25 03:00:43 | 2018-07-25 03:10:00 |  2 | /dev/vda    |                     1 | NULL        | NULL      |        NULL |         0 | NULL            | e2af2078-63c7-47b3-a52a-64ec1d44c12b |       2 | image       | local            | NULL         | disk        | NULL     |          0 | 52cea228-854a-4898-9440-b7c7730692e7 | NULL | NULL          | 2685ecff-92f4-4d53-8c80-3be58cdbc9d6 |
+---------------------+---------------------+---------------------+----+-------------+-----------------------+-------------+-----------+-------------+-----------+-----------------+--------------------------------------+---------+-------------+------------------+--------------+-------------+----------+------------+--------------------------------------+------+---------------+--------------------------------------+

compute_nodes -------nova-compute 服务节点信息

+---------------------+---------------------+------------+----+------------+-------+-----------+----------+------------+----------------+---------------+-----------------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-------------+--------------+------------------+-------------+---------------------+---------+--------------+--------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------------+----------------------+--------------------------------------+-----------------------+--------+
| created_at          | updated_at          | deleted_at | id | service_id | vcpus | memory_mb | local_gb | vcpus_used | memory_mb_used | local_gb_used | hypervisor_type | hypervisor_version | cpu_info                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | disk_available_least | free_ram_mb | free_disk_gb | current_workload | running_vms | hypervisor_hostname | deleted | host_ip      | supported_instances                                                                                    | pci_stats                                                                                                                                                                         | metrics | extra_resources | stats                                                                                                                                                             | numa_topology                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | host       | ram_allocation_ratio | cpu_allocation_ratio | uuid                                 | disk_allocation_ratio | mapped |
+---------------------+---------------------+------------+----+------------+-------+-----------+----------+------------+----------------+---------------+-----------------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-------------+--------------+------------------+-------------+---------------------+---------+--------------+--------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------------+----------------------+--------------------------------------+-----------------------+--------+
| 2018-07-25 02:09:41 | 2018-08-02 06:35:37 | NULL       |  1 |       NULL |    40 |    130961 |     1806 |          0 |            512 |             0 | QEMU            |            2010000 | {"vendor": "Intel", "model": "Broadwell", "arch": "x86_64", "features": ["pge", "avx", "xsaveopt", "clflush", "sep", "rtm", "tsc_adjust", "tsc-deadline", "dtes64", "invpcid", "tsc", "fsgsbase", "xsave", "smap", "vmx", "erms", "xtpr", "cmov", "hle", "smep", "pcid", "est", "pat", "monitor", "smx", "pbe", "lm", "msr", "adx", "3dnowprefetch", "nx", "fxsr", "syscall", "tm", "sse4.1", "pae", "sse4.2", "pclmuldq", "acpi", "fma", "vme", "popcnt", "mmx", "osxsave", "cx8", "mce", "de", "rdtscp", "ht", "dca", "lahf_lm", "abm", "rdseed", "pdcm", "mca", "pdpe1gb", "apic", "sse", "f16c", "pse", "ds", "invtsc", "pni", "tm2", "avx2", "aes", "sse2", "ss", "ds_cpl", "arat", "bmi1", "bmi2", "ssse3", "fpu", "cx16", "pse36", "mtrr", "movbe", "rdrand", "x2apic"], "topology": {"cores": 10, "cells": 2, "threads": 2, "sockets": 1}} |                  792 |      130449 |         1806 |                0 |           0 | controller          |       0 | 10.98.98.249 | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["x86_64", "qemu", "hvm"], ["x86_64", "kvm", "hvm"]] | {"nova_object.version": "1.1", "nova_object.changes": ["objects"], "nova_object.name": "PciDevicePoolList", "nova_object.data": {"objects": []}, "nova_object.namespace": "nova"} | []      | NULL            | {}                                                                                                                                                                | {"nova_object.version": "1.2", "nova_object.changes": ["cells"], "nova_object.name": "NUMATopology", "nova_object.data": {"cells": [{"nova_object.version": "1.2", "nova_object.changes": ["cpu_usage", "memory_usage", "cpuset", "mempages", "pinned_cpus", "memory", "siblings", "id"], "nova_object.name": "NUMACell", "nova_object.data": {"cpu_usage": 0, "memory_usage": 0, "cpuset": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "pinned_cpus": [], "siblings": [[1, 21], [0, 20], [25, 5], [8, 28], [9, 29], [24, 4], [27, 7], [2, 22], [3, 23], [26, 6]], "memory": 65425, "mempages": [{"nova_object.version": "1.1", "nova_object.changes": ["total", "used", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 16748824, "reserved": 0, "size_kb": 4}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["total", "used", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 2048}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["total", "used", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 1048576}, "nova_object.namespace": "nova"}], "id": 0}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.2", "nova_object.changes": ["cpu_usage", "memory_usage", "cpuset", "mempages", "pinned_cpus", "memory", "siblings", "id"], "nova_object.name": "NUMACell", "nova_object.data": {"cpu_usage": 0, "memory_usage": 0, "cpuset": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], "pinned_cpus": [], "siblings": [[35, 15], [10, 30], [16, 36], [11, 31], [32, 12], [17, 37], [18, 38], [19, 39], [33, 13], [34, 14]], "memory": 65536, "mempages": [{"nova_object.version": "1.1", "nova_object.changes": ["total", "used", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 16777216, "reserved": 0, "size_kb": 4}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["total", "used", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 2048}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["total", "used", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 1048576}, "nova_object.namespace": "nova"}], "id": 1}, "nova_object.namespace": "nova"}]}, "nova_object.namespace": "nova"} | controller |                  1.2 |                    4 | 12a7774f-3bf6-4221-a75d-e3ea165a5bc5 |                     2 |      1 |
| 2018-07-25 02:44:43 | 2018-08-02 06:35:14 | NULL       |  2 |       NULL |    40 |    130959 |     1856 |          4 |           8704 |           160 | QEMU            |            2010000 | {"vendor": "Intel", "model": "Broadwell", "arch": "x86_64", "features": ["pge", "avx", "xsaveopt", "clflush", "sep", "rtm", "tsc_adjust", "tsc-deadline", "dtes64", "invpcid", "tsc", "fsgsbase", "xsave", "smap", "vmx", "erms", "xtpr", "cmov", "hle", "smep", "pcid", "est", "pat", "monitor", "smx", "pbe", "lm", "msr", "adx", "3dnowprefetch", "nx", "fxsr", "syscall", "tm", "sse4.1", "pae", "sse4.2", "pclmuldq", "acpi", "fma", "vme", "popcnt", "mmx", "osxsave", "cx8", "mce", "de", "rdtscp", "ht", "dca", "lahf_lm", "abm", "rdseed", "pdcm", "mca", "pdpe1gb", "apic", "sse", "f16c", "pse", "ds", "invtsc", "pni", "tm2", "avx2", "aes", "sse2", "ss", "ds_cpl", "arat", "bmi1", "bmi2", "ssse3", "fpu", "cx16", "pse36", "mtrr", "movbe", "rdrand", "x2apic"], "topology": {"cores": 10, "cells": 2, "threads": 2, "sockets": 1}} |                 1511 |      122255 |         1696 |                0 |           1 | compute2            |       0 | 10.98.98.251 | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["x86_64", "qemu", "hvm"], ["x86_64", "kvm", "hvm"]] | {"nova_object.version": "1.1", "nova_object.changes": ["objects"], "nova_object.name": "PciDevicePoolList", "nova_object.data": {"objects": []}, "nova_object.namespace": "nova"} | []      | NULL            | {"num_task_None": "1", "io_workload": "0", "num_instances": "1", "num_os_type_None": "1", "num_proj_02ba9af481524f869269f4a1349d1e10": "1", "num_vm_active": "1"} | {"nova_object.version": "1.2", "nova_object.changes": ["cells"], "nova_object.name": "NUMATopology", "nova_object.data": {"cells": [{"nova_object.version": "1.2", "nova_object.changes": ["cpu_usage", "memory_usage", "cpuset", "pinned_cpus", "siblings", "memory", "mempages", "id"], "nova_object.name": "NUMACell", "nova_object.data": {"cpu_usage": 0, "memory_usage": 0, "cpuset": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "pinned_cpus": [], "siblings": [[1, 21], [0, 20], [25, 5], [8, 28], [9, 29], [24, 4], [27, 7], [2, 22], [3, 23], [26, 6]], "memory": 65423, "mempages": [{"nova_object.version": "1.1", "nova_object.changes": ["used", "total", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 16748504, "reserved": 0, "size_kb": 4}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["used", "total", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 2048}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["used", "total", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 1048576}, "nova_object.namespace": "nova"}], "id": 0}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.2", "nova_object.changes": ["cpu_usage", "memory_usage", "cpuset", "pinned_cpus", "siblings", "memory", "mempages", "id"], "nova_object.name": "NUMACell", "nova_object.data": {"cpu_usage": 0, "memory_usage": 0, "cpuset": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], "pinned_cpus": [], "siblings": [[35, 15], [10, 30], [16, 36], [11, 31], [32, 12], [17, 37], [18, 38], [19, 39], [33, 13], [34, 14]], "memory": 65536, "mempages": [{"nova_object.version": "1.1", "nova_object.changes": ["used", "total", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 16777216, "reserved": 0, "size_kb": 4}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["used", "total", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 2048}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.1", "nova_object.changes": ["used", "total", "reserved", "size_kb"], "nova_object.name": "NUMAPagesTopology", "nova_object.data": {"used": 0, "total": 0, "reserved": 0, "size_kb": 1048576}, "nova_object.namespace": "nova"}], "id": 1}, "nova_object.namespace": "nova"}]}, "nova_object.namespace": "nova"} | compute2   |                  1.2 |                    4 | ab84e1e2-441b-4a28-bc86-44d42ec88277 |                     2 |      1 |
+---------------------+---------------------+------------+----+------------+-------+-----------+----------+------------+----------------+---------------+-----------------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-------------+--------------+------------------+-------------+---------------------+---------+--------------+--------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------------+----------------------+--------------------------------------+-----------------------+--------+

instance_actions ---------对数据库操作的记录

+---------------------+---------------------+------------+----+--------+--------------------------------------+------------------------------------------+----------------------------------+----------------------------------+---------------------+-------------+---------+---------+
| created_at          | updated_at          | deleted_at | id | action | instance_uuid                        | request_id                               | user_id                          | project_id                       | start_time          | finish_time | message | deleted |
+---------------------+---------------------+------------+----+--------+--------------------------------------+------------------------------------------+----------------------------------+----------------------------------+---------------------+-------------+---------+---------+
| 2018-06-29 06:45:49 | 2018-06-29 06:46:02 | NULL       |  1 | create | ae927ed8-3c0a-4f92-8c81-1a4c4f1908ae | req-48ef02b4-4aa9-42c6-a94b-3bba1b6f5a72 | f4b4d7a95e924981a2d45a8416c2fcf9 | f1308eebc2954a048429ec8b3015c104 | 2018-06-29 06:45:44 | NULL        | NULL    |       0 |
| 2018-06-29 06:48:36 | 2018-06-29 06:48:39 | NULL       |  2 | reboot | ae927ed8-3c0a-4f92-8c81-1a4c4f1908ae | req-c63002bd-1307-4845-8a5d-e5b864634af3 | f4b4d7a95e924981a2d45a8416c2fcf9 | f1308eebc2954a048429ec8b3015c104 | 2018-06-29 06:48:36 | NULL        | NULL    |       0 |
+---------------------+---------------------+------------+----+--------+--------------------------------------+------------------------------------------+----------------------------------+----------------------------------+---------------------+-------------+---------+---------+

instance_actions_events ----对虚拟机进行操作的详细信息记录(出错的会有记录)

+---------------------+---------------------+------------+----+------------------------------------+-----------+---------------------+---------------------+---------+-----------+---------+------+---------+
| created_at          | updated_at          | deleted_at | id | event                              | action_id | start_time          | finish_time         | result  | traceback | deleted | host | details |
+---------------------+---------------------+------------+----+------------------------------------+-----------+---------------------+---------------------+---------+-----------+---------+------+---------+
| 2018-06-29 06:45:49 | 2018-06-29 06:46:02 | NULL       |  1 | compute__do_build_and_run_instance |         1 | 2018-06-29 06:45:49 | 2018-06-29 06:46:02 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 06:48:36 | 2018-06-29 06:48:39 | NULL       |  2 | compute_reboot_instance            |         2 | 2018-06-29 06:48:36 | 2018-06-29 06:48:39 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:02 | 2018-06-29 09:33:08 | NULL       |  3 | compute__do_build_and_run_instance |         3 | 2018-06-29 09:33:02 | 2018-06-29 09:33:08 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:52 | 2018-06-29 09:34:03 | NULL       |  4 | compute__do_build_and_run_instance |         4 | 2018-06-29 09:33:52 | 2018-06-29 09:34:03 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:52 | 2018-06-29 09:34:03 | NULL       |  5 | compute__do_build_and_run_instance |         5 | 2018-06-29 09:33:52 | 2018-06-29 09:34:03 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:52 | 2018-06-29 09:33:58 | NULL       |  6 | compute__do_build_and_run_instance |         6 | 2018-06-29 09:33:52 | 2018-06-29 09:33:58 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:52 | 2018-06-29 09:34:00 | NULL       |  7 | compute__do_build_and_run_instance |         7 | 2018-06-29 09:33:52 | 2018-06-29 09:34:00 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:52 | 2018-06-29 09:34:09 | NULL       |  8 | compute__do_build_and_run_instance |         8 | 2018-06-29 09:33:52 | 2018-06-29 09:34:09 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:33:52 | 2018-06-29 09:34:07 | NULL       |  9 | compute__do_build_and_run_instance |         9 | 2018-06-29 09:33:52 | 2018-06-29 09:34:07 | Success | NULL      |       0 | NULL | NULL    |
| 2018-06-29 09:36:23 | 2018-06-29 09:36:33 | NULL       | 10 | compute__do_build_and_run_instance |        10 | 2018-06-29 09:36:23 | 2018-06-29 09:36:33 | Success | NULL      |       0 | NULL | NULL    |
+---------------------+---------------------+------------+----+------------------------------------+-----------+---------------------+---------------------+---------+-----------+---------+------+---------+

instance_faults 对虚拟机操作出错的记录

+---------------------+------------+---------------------+----+--------------------------------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+------------+---------+
| created_at          | updated_at | deleted_at          | id | instance_uuid                        | code | message                                                                                                                                          | details                                                                                                                                               | host       | deleted |
+---------------------+------------+---------------------+----+--------------------------------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+------------+---------+
| 2018-07-10 03:05:13 | NULL       | 2018-07-10 03:15:48 |  1 | 2895fa88-01d8-4013-aa94-874aad12e070 |  500 | Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance 2895fa88-01d8-4013-aa94-874aad12e070. |   File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 580, in build_instances
    raise exception.MaxRetriesExceeded(reason=msg)
 | controller |       1 |
| 2018-07-10 03:05:27 | NULL       | 2018-07-10 03:15:48 |  2 | 2a6bfdc9-b750-4e2f-8f4f-894c42e21177 |  500 | Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance 2a6bfdc9-b750-4e2f-8f4f-894c42e21177. |   File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 580, in build_instances
    raise exception.MaxRetriesExceeded(reason=msg)
 | controller |       2 |
+---------------------+------------+---------------------+----+--------------------------------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+------------+---------+

instances --------记录所有虚拟机信息

+---------------------+---------------------+---------------------+----+-------------+----------------------------------+----------------------------------+--------------------------------------+-----------+------------+--------------+----------+----------+-------------+----------+-----------+-------+----------+------------+-----------+----------------+---------------------+---------------------+--------------+---------------------+-------------------+--------+---------+-------------+------------------+---------+--------------------------------------+--------------+------------------+--------------+--------------+--------------+------------+--------------------------+---------------------+----------+------------------+--------------------+-------------------+---------+--------------+-----------+------------+---------+-----------+---------+--------------------+
| created_at          | updated_at          | deleted_at          | id | internal_id | user_id                          | project_id                       | image_ref                            | kernel_id | ramdisk_id | launch_index | key_name | key_data | power_state | vm_state | memory_mb | vcpus | hostname | host       | user_data | reservation_id | launched_at         | terminated_at       | display_name | display_description | availability_zone | locked | os_type | launched_on | instance_type_id | vm_mode | uuid                                 | architecture | root_device_name | access_ip_v4 | access_ip_v6 | config_drive | task_state | default_ephemeral_device | default_swap_device | progress | auto_disk_config | shutdown_terminate | disable_terminate | root_gb | ephemeral_gb | cell_name | node       | deleted | locked_by | cleaned | ephemeral_key_uuid |
+---------------------+---------------------+---------------------+----+-------------+----------------------------------+----------------------------------+--------------------------------------+-----------+------------+--------------+----------+----------+-------------+----------+-----------+-------+----------+------------+-----------+----------------+---------------------+---------------------+--------------+---------------------+-------------------+--------+---------+-------------+------------------+---------+--------------------------------------+--------------+------------------+--------------+--------------+--------------+------------+--------------------------+---------------------+----------+------------------+--------------------+-------------------+---------+--------------+-----------+------------+---------+-----------+---------+--------------------+
| 2018-06-29 06:45:46 | 2018-06-29 09:37:14 | 2018-06-29 09:37:14 |  1 |        NULL | f4b4d7a95e924981a2d45a8416c2fcf9 | f1308eebc2954a048429ec8b3015c104 | ea7d3ee9-abee-497c-9616-936b43962f53 |           |            |            0 | NULL     | NULL     |           0 | deleted  |       512 |     1 | test     | controller | NULL      | r-ej20v54f     | 2018-06-29 06:46:02 | 2018-06-29 09:37:14 | test         | NULL                | nova              |      0 | NULL    | controller  |                1 | NULL    | ae927ed8-3c0a-4f92-8c81-1a4c4f1908ae | NULL         | /dev/vda         | NULL         | NULL         |              | NULL       | NULL                     | NULL                |        0 |                1 |                  0 |                 0 |       1 |            0 | NULL      | controller |       1 | NULL      |       1 | NULL               |
| 2018-06-29 09:32:59 | 2018-06-29 09:37:14 | 2018-06-29 09:37:14 |  2 |        NULL | f4b4d7a95e924981a2d45a8416c2fcf9 | f1308eebc2954a048429ec8b3015c104 | ea7d3ee9-abee-497c-9616-936b43962f53 |           |            |            0 | NULL     | NULL     |           0 | deleted  |       512 |     1 | test2    | controller | NULL      | r-zrxlnq95     | 2018-06-29 09:33:08 | 2018-06-29 09:37:14 | test2        | NULL                | nova              |      0 | NULL    | controller  |                1 | NULL    | 139c7da8-5af9-4743-a8df-015a36e804a1 | NULL         | /dev/vda         | NULL         | NULL         |              | NULL       | NULL                     | NULL                |        0 |                1 |                  0 |                 0 |       1 |            0 | NULL      | controller |       2 | NULL      |       1 | NULL               |
+---------------------+---------------------+---------------------+----+-------------+----------------------------------+----------------------------------+--------------------------------------+-----------+------------+--------------+----------+----------+-------------+----------+-----------+-------+----------+------------+-----------+----------------+---------------------+---------------------+--------------+---------------------+-------------------+--------+---------+-------------+------------------+---------+--------------------------------------+--------------+------------------+--------------+--------------+--------------+------------+--------------------------+---------------------+----------+------------------+--------------------+-------------------+---------+--------------+-----------+------------+---------+-----------+---------+--------------------+

services -----nova相关服务的记录

+---------------------+---------------------+------------+----+------------+--------------------+-------------+--------------+----------+---------+-----------------+---------------------+-------------+---------+--------------------------------------+
| created_at          | updated_at          | deleted_at | id | host       | binary             | topic       | report_count | disabled | deleted | disabled_reason | last_seen_up        | forced_down | version | uuid                                 |
+---------------------+---------------------+------------+----+------------+--------------------+-------------+--------------+----------+---------+-----------------+---------------------+-------------+---------+--------------------------------------+
| 2018-06-29 05:48:26 | 2018-08-02 07:07:45 | NULL       |  1 | controller | nova-conductor     | conductor   |       273684 |        0 |       0 | NULL            | 2018-08-02 07:07:45 |           0 |      30 | 29d7c6bb-1a10-472c-8608-08ad8e36ee96 |
| 2018-06-29 05:48:26 | 2018-08-02 07:07:38 | NULL       |  2 | controller | nova-scheduler     | scheduler   |       273587 |        0 |       0 | NULL            | 2018-08-02 07:07:38 |           0 |      30 | 2938b618-0486-433e-a5d1-f59195054883 |
| 2018-06-29 05:48:26 | 2018-08-02 07:07:36 | NULL       |  3 | controller | nova-consoleauth   | consoleauth |       273680 |        0 |       0 | NULL            | 2018-08-02 07:07:36 |           0 |      30 | e1e51cf5-5f92-46ac-a83a-e87a9ef4062a |
| 2018-06-29 05:48:28 | NULL                | NULL       |  4 | 0.0.0.0    | nova-osapi_compute | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      30 | 3b004966-7912-441a-b675-d6913bd35c00 |
| 2018-06-29 05:48:28 | NULL                | NULL       |  5 | 0.0.0.0    | nova-metadata      | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      30 | 4496ad81-bec1-44b8-9bc4-1c857661ec32 |
| 2018-06-29 06:10:58 | 2018-08-02 07:07:38 | NULL       |  7 | controller | nova-compute       | compute     |       273075 |        0 |       0 | NULL            | 2018-08-02 07:07:38 |           0 |      30 | 36e757fc-58ae-4022-8fed-fa6b862da08f |
+---------------------+---------------------+------------+----+------------+--------------------+-------------+--------------+----------+---------+-----------------+---------------------+-------------+---------+--------------------------------------+

_NOVAAPI数据库 consumers 对虚拟机信息的记录(uuid对于虚拟机的ID)

+---------------------+------------+----+--------------------------------------+------------+---------+
| created_at          | updated_at | id | uuid                                 | project_id | user_id |
+---------------------+------------+----+--------------------------------------+------------+---------+
| 2018-06-29 06:45:49 | NULL       |  1 | ae927ed8-3c0a-4f92-8c81-1a4c4f1908ae |          1 |       1 |
| 2018-06-29 09:33:01 | NULL       |  2 | 139c7da8-5af9-4743-a8df-015a36e804a1 |          1 |       1 |

flavors --------- 实例flavor信息的存储;

+---------------------+------------+--------------+----+-----------+-------+------+-------------+--------------------------------------+-------------+---------+--------------+----------+-----------+-------------+
| created_at          | updated_at | name         | id | memory_mb | vcpus | swap | vcpu_weight | flavorid                             | rxtx_factor | root_gb | ephemeral_gb | disabled | is_public | description |
+---------------------+------------+--------------+----+-----------+-------+------+-------------+--------------------------------------+-------------+---------+--------------+----------+-----------+-------------+
| 2018-05-07 09:21:19 | NULL       | small        |  1 |      1024 |     1 |    0 |        NULL | bbf0e250-cb56-4836-b46a-65009bfd1d6f |           1 |       1 |            0 |        0 |         1 | NULL        |
| 2017-09-14 16:01:11 | NULL       | m2.2c-2g-10g | 22 |      2048 |     2 |    0 |        NULL | 39445bad-f133-476d-a239-bc9c49d5a132 |           1 |      10 |            0 |        0 |         1 | NULL        |
+---------------------+------------+--------------+----+-----------+-------+------+-------------+--------------------------------------+-------------+---------+--------------+----------+-----------+-------------+

host_mappings -----主机映射信息

+---------------------+------------+----+---------+------------+
| created_at          | updated_at | id | cell_id | host       |
+---------------------+------------+----+---------+------------+
| 2018-06-29 06:11:24 | NULL       |  2 |       2 | controller |
| 2018-07-02 02:30:31 | NULL       |  3 |       2 | compute2   |
| 2018-07-10 10:17:30 | NULL       |  5 |       2 | compute222 |
| 2018-07-13 09:13:26 | NULL       |  6 |       2 | compute3   |
| 2018-07-13 09:13:26 | NULL       |  7 |       2 | compute1   |

inventories -------各个节点资源信息的统计


+---------------------+---------------------+----+----------------------+-------------------+--------+----------+----------+----------+-----------+------------------+
| created_at          | updated_at          | id | resource_provider_id | resource_class_id | total  | reserved | min_unit | max_unit | step_size | allocation_ratio |
+---------------------+---------------------+----+----------------------+-------------------+--------+----------+----------+----------+-----------+------------------+
| 2018-06-29 06:11:03 | 2018-07-13 09:05:20 |  4 |                    2 |                 0 |     40 |        0 |        1 |       40 |         1 |               16 |
| 2018-06-29 06:11:03 | 2018-07-13 09:05:20 |  5 |                    2 |                 1 | 130960 |      512 |        1 |   130960 |         1 |              1.5 |
| 2018-06-29 06:11:03 | 2018-07-13 09:05:20 |  6 |                    2 |                 2 |   1833 |        0 |        1 |     1833 |         1 |                2 |

alocations 记录各个节点虚拟机资源占用情况(在scheduler的时候会用到,虚拟机删除之后记录会清除)

+---------------------+------------+------+----------------------+--------------------------------------+-------------------+------+
| created_at          | updated_at | id   | resource_provider_id | consumer_id                          | resource_class_id | used |
+---------------------+------------+------+----------------------+--------------------------------------+-------------------+------+
| 2018-06-29 12:09:19 | NULL       |   55 |                    2 | 849b9b85-bd0a-47eb-9224-3f9ce48be53f |                 0 |    4 |
| 2018-06-29 12:09:19 | NULL       |   56 |                    2 | 849b9b85-bd0a-47eb-9224-3f9ce48be53f |                 1 | 8192 |
| 2018-06-29 12:09:19 | NULL       |   57 |                    2 | 849b9b85-bd0a-47eb-9224-3f9ce48be53f |                 2 |  160 |
| 2018-07-10 02:08:12 | NULL       |   73 |                    2 | 06e5a956-d1c1-4a4a-bc8b-0586289e2280 |                 0 |    2 |
| 2018-07-10 02:08:12 | NULL       |   74 |                    2 | 06e5a956-d1c1-4a4a-bc8b-0586289e2280 |                 1 | 2048 |
| 2018-07-10 02:08:12 | NULL       |   75 |                    2 | 06e5a956-d1c1-4a4a-bc8b-0586289e2280 |                 2 |   50 |
| 2018-07-19 03:30:07 | NULL       | 1439 |                    2 | 4116eb6d-0f69-4f81-b3c5-b84063e2c5b2 |                 0 |    4 |
| 2018-07-19 03:30:07 | NULL       | 1440 |                    2 | 4116eb6d-0f69-4f81-b3c5-b84063e2c5b2 |                 1 | 8192 |
| 2018-07-19 03:30:07 | NULL       | 1441 |                    2 | 4116eb6d-0f69-4f81-b3c5-b84063e2c5b2 |                 2 |  160 |
| 2018-07-24 06:20:22 | NULL       | 2543 |                    2 | 498035f0-104c-48b7-8fd8-8df77c23eaaa |                 0 |    4 |
| 2018-07-24 06:20:22 | NULL       | 2544 |                    2 | 498035f0-104c-48b7-8fd8-8df77c23eaaa |                 1 | 4096 |
| 2018-07-24 06:20:22 | NULL       | 2545 |                    2 | 498035f0-104c-48b7-8fd8-8df77c23eaaa |                 2 |   40 |
| 2018-07-24 08:18:35 | NULL       | 2573 |                    2 | f56b3768-5748-4395-a37a-b199844699a0 |                 0 |    2 |
| 2018-07-24 08:18:35 | NULL       | 2574 |                    2 | f56b3768-5748-4395-a37a-b199844699a0 |                 1 | 2048 |
| 2018-07-24 08:18:35 | NULL       | 2575 |                    2 | f56b3768-5748-4395-a37a-b199844699a0 |                 2 |   10 |
| 2018-07-30 07:48:15 | NULL       | 2843 |                    2 | d8d1eaca-d323-4dcf-aadd-b1fdc7eb68af |                 0 |    2 |
| 2018-07-30 07:48:15 | NULL       | 2844 |                    2 | d8d1eaca-d323-4dcf-aadd-b1fdc7eb68af |                 1 | 2048 |
| 2018-07-30 07:48:15 | NULL       | 2845 |                    2 | d8d1eaca-d323-4dcf-aadd-b1fdc7eb68af |                 2 |   10 |

quotas ------ 记录项目配额信息

+----+---------------------+------------+----------------------------------+-----------------------------+------------+
| id | created_at          | updated_at | project_id                       | resource                    | hard_limit |
+----+---------------------+------------+----------------------------------+-----------------------------+------------+
|  1 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | injected_file_content_bytes |    1024000 |
|  2 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | metadata_items              |     128000 |
|  3 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | ram                         |   51200000 |
|  4 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | key_pairs                   |      10000 |
|  5 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | instances                   |      10000 |
|  6 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | injected_files              |        500 |
|  7 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | cores                       |      20000 |
|  8 | 2018-06-29 09:35:56 | NULL       | f1308eebc2954a048429ec8b3015c104 | injected_file_path_bytes    |       2550 |

resource_providers -----节点和id的对应关系

+---------------------+---------------------+------+--------------------------------------+------------+------------+----------+------------------+--------------------+
| created_at          | updated_at          | id   | uuid                                 | name       | generation | can_host | root_provider_id | parent_provider_id |
+---------------------+---------------------+------+--------------------------------------+------------+------------+----------+------------------+--------------------+
| 2018-06-29 06:05:42 | 2018-06-29 06:05:45 |    1 | 228b4ce7-51f7-4f83-b6c6-9b83e3bdf39a | compute1   |          1 |     NULL |                1 |               NULL |
| 2018-06-29 06:11:03 | 2018-08-02 06:27:44 |    2 | 19f90e72-d7b1-4296-8556-39ed9ef657f0 | controller |       1165 |     NULL |                2 |               NULL |
| 2018-07-02 02:15:32 | 2018-07-02 02:15:32 |    3 | 1eabca7a-1270-4f2a-8a3b-bf852b43b71c | compute2   |          1 |     NULL |                3 |               NULL |
| 2018-07-10 04:41:14 | 2018-07-10 04:41:14 |   80 | 625a6a49-a90a-42f5-8902-00ba56c6a512 | compute3   |          1 |     NULL |               80 |               NULL |
| 2018-07-10 10:16:21 | 2018-07-19 12:12:08 |  597 | f144e02e-b72d-460b-a120-026c61cfa35d | compute222 |        306 |     NULL |              597 |               NULL |
| 2018-07-13 07:15:04 | 2018-07-19 11:46:53 | 2261 | ab3c3a5a-2d44-454e-9df9-55be3a593571 | compute11  |        186 |     NULL |             2261 |               NULL |
| 2018-07-13 07:26:59 | 2018-07-23 09:59:35 | 2262 | 85f50f3a-5208-4df3-ac38-4728e2eefbd9 | compute10  |        258 |     NULL |             2262 |               NULL |

cell_mapping cell信息的记录

+---------------------+------------+----+--------------------------------------+-------+-------------------------------------------+--------------------------------------------------------+
| created_at          | updated_at | id | uuid                                 | name  | transport_url                             | database_connection                                    |
+---------------------+------------+----+--------------------------------------+-------+-------------------------------------------+--------------------------------------------------------+
| 2018-06-29 05:47:17 | NULL       |  1 | 00000000-0000-0000-0000-000000000000 | cell0 | none:///                                  | mysql+pymysql://nova:NOVA_DBPASS@controller/nova_cell0 |
| 2018-06-29 05:47:24 | NULL       |  2 | cb8e58c1-8170-462c-97a5-d6c101b47b50 | cell1 | rabbit://openstack:RABBIT_PASS@controller | mysql+pymysql://nova:NOVA_DBPASS@controller/nova       |
+---------------------+------------+----+--------------------------------------+-------+-------------------------------------------+--------------------------------------------------------+