标签:nova
1 compute node修改了主机名,重启服务导致原来运行中的虚拟机都消失了
原因:
nova数据库的instances和neutron数据库的ml2_port_bindings都依赖主机名
先来看下instances表结构:
desc instances;
+--------------------------+-----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------------+-----------------------+------+-----+---------+----------------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| internal_id | int(11) | YES | | NULL | |
| user_id | varchar(255) | YES | | NULL | |
| project_id | varchar(255) | YES | MUL | NULL | |
| image_ref | varchar(255) | YES | | NULL | |
| kernel_id | varchar(255) | YES | | NULL | |
| ramdisk_id | varchar(255) | YES | | NULL | |
| launch_index | int(11) | YES | | NULL | |
| key_name | varchar(255) | YES | | NULL | |
| key_data | mediumtext | YES | | NULL | |
| power_state | int(11) | YES | | NULL | |
| vm_state | varchar(255) | YES | | NULL | |
| memory_mb | int(11) | YES | | NULL | |
| vcpus | int(11) | YES | | NULL | |
| hostname | varchar(255) | YES | | NULL | |
| host | varchar(255) | YES | MUL | NULL | |
| user_data | mediumtext | YES | | NULL | |
| reservation_id | varchar(255) | YES | MUL | NULL | |
| scheduled_at | datetime | YES | | NULL | |
| launched_at | datetime | YES | | NULL | |
| terminated_at | datetime | YES | MUL | NULL | |
| display_name | varchar(255) | YES | | NULL | |
| display_description | varchar(255) | YES | | NULL | |
| availability_zone | varchar(255) | YES | | NULL | |
| locked | tinyint(1) | YES | | NULL | |
| os_type | varchar(255) | YES | | NULL | |
| launched_on | mediumtext | YES | | NULL | |
| instance_type_id | int(11) | YES | | NULL | |
| vm_mode | varchar(255) | YES | | NULL | |
| uuid | varchar(36) | YES | UNI | NULL | |
| architecture | varchar(255) | YES | | NULL | |
| root_device_name | varchar(255) | YES | | NULL | |
| access_ip_v4 | varchar(39) | YES | | NULL | |
| access_ip_v6 | varchar(39) | YES | | NULL | |
| config_drive | varchar(255) | YES | | NULL | |
| task_state | varchar(255) | YES | MUL | NULL | |
| default_ephemeral_device | varchar(255) | YES | | NULL | |
| default_swap_device | varchar(255) | YES | | NULL | |
| progress | int(11) | YES | | NULL | |
| auto_disk_config | tinyint(1) | YES | | NULL | |
| shutdown_terminate | tinyint(1) | YES | | NULL | |
| disable_terminate | tinyint(1) | YES | | NULL | |
| root_gb | int(11) | YES | | NULL | |
| ephemeral_gb | int(11) | YES | | NULL | |
| cell_name | varchar(255) | YES | | NULL | |
| node | varchar(255) | YES | | NULL | |
| deleted | int(11) | YES | | NULL | |
| locked_by | enum(‘owner‘,‘admin‘) | YES | | NULL | |
| cleaned | int(11) | YES | | NULL | |
| ephemeral_key_uuid | varchar(36) | YES | | NULL | |
+--------------------------+-----------------------+------+-----+---------+----------------+
发现有host字段
再来看下ml2_port_bindings表结构
desc ml2_port_bindings;
+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| port_id | varchar(36) | NO | PRI | NULL | |
| host | varchar(255) | NO | | | |
| vif_type | varchar(64) | NO | | NULL | |
| driver | varchar(64) | YES | | NULL | |
| segment | varchar(36) | YES | MUL | NULL | |
| vnic_type | varchar(64) | NO | | normal | |
| vif_details | varchar(4095) | NO | | | |
| profile | varchar(4095) | NO | | | |
+-------------+---------------+------+-----+---------+-------+
发现也有host字段
所以,如果改变compute node的主机名对现在运行的虚拟机还是影响很大的。
本文出自 “the-way-to-cloud” 博客,请务必保留此出处http://iceyao.blog.51cto.com/9426658/1600156
OpenStack Juno - Trouble Shooting
标签:nova
原文地址:http://iceyao.blog.51cto.com/9426658/1600156