nova.compute.api.py >> API >> _create_instance()
[ DB 신규 row 입력 ]
create_db_entry_for_new_instance
nova.compute.manager.py >> ComputeManager >> _run_instance()
request_spec = {
"block_device_mapping": [],
"image": {
"status": "active",
"name": "tty-linux",
"deleted": false,
"container_format": "ami",
"created_at": "2012-12-16T10:37:48.000000",
"disk_format": "ami",
"updated_at": "2012-12-16T10:37:49.000000",
"properties": {
"kernel_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"ramdisk_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78"
},
"min_disk": 0,
"min_ram": 0,
"checksum": "10047a119149e08fb206eea89832eee0",
"owner": "0c74b5d96202433196af2faa9bff4bde",
"is_public": false,
"deleted_at": null,
"id": "011a6a61-70fa-470b-a9cc-fbc7753833fb",
"size": 25165824
},
"instance_type": {
"memory_mb": 512,
"root_gb": 0,
"deleted_at": null,
"name": "m1.tiny",
"deleted": false,
"created_at": null,
"ephemeral_gb": 0,
"updated_at": null,
"disabled": false,
"vcpus": 1,
"extra_specs": {},
"swap": 0,
"rxtx_factor": 1.0,
"is_public": true,
"flavorid": "1",
"vcpu_weight": null,
"id": 2
},
"instance_properties": {
"vm_state": "building",
"availability_zone": null,
"launch_time": "2012-12-24T16:45:50Z",
"ramdisk_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"instance_type_id": 2,
"user_data": null,
"vm_mode": null,
"reservation_id": "r-gzio9556",
"user_id": "034120010ad64ecfb1eeb2ac5f16854d",
"display_description": "test01",
"key_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiyiud+EmmdRZ50aPPbC7Ys3Td19qp6q3Xnl+W8aFHJ21IbdnCNXZo3pXpeTJy8rvFTitYxpvD5WzGlmPdXoEryJibA6hbPg6hPLINul+SwtuXlqv6pucy+eMVuWhi9MfOKv/uuJpCFIwZuEHGHg3xeW6uVyWSURW9FGH/E6tKdGrB9T2afkPaROOBnK2BRy3Bj55ExZq8qjfsYKDibwoDPddW9rR5zRn7N3pY6rhnULjyWJAd7Ll3UltKMkl3V2BZV0cyvd3c+TMtVtaa8hE9ComrxKOucd84d2+dOyUaV8hr3N3sfe/oXnvlK23Uo9TKwmYfXvTykOtAtaYRss/z nova@folsom\n",
"power_state": 0,
"progress": 0,
"project_id": "0c74b5d96202433196af2faa9bff4bde",
"config_drive": "",
"ephemeral_gb": 0,
"access_ip_v6": null,
"access_ip_v4": null,
"kernel_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"key_name": "mykey",
"display_name": "test01",
"config_drive_id": "",
"architecture": null,
"root_gb": 0,
"locked": false,
"launch_index": 0,
"memory_mb": 512,
"vcpus": 1,
"image_ref": "011a6a61-70fa-470b-a9cc-fbc7753833fb",
"root_device_name": null,
"auto_disk_config": null,
"os_type": null,
"metadata": {}
},
"security_group": [
"default"
],
"instance_uuids": [
"1be889ba-fe3b-4eb6-8730-157db1582f88"
]
}
filter_properties = {
"config_options": {},
"limits": {
"memory_mb": 3000.0
},
"request_spec": {
"block_device_mapping": [],
"image": {
"status": "active",
"name": "tty-linux",
"deleted": false,
"container_format": "ami",
"created_at": "2012-12-16T10:37:48.000000",
"disk_format": "ami",
"updated_at": "2012-12-16T10:37:49.000000",
"properties": {
"kernel_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"ramdisk_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78"
},
"min_disk": 0,
"min_ram": 0,
"checksum": "10047a119149e08fb206eea89832eee0",
"owner": "0c74b5d96202433196af2faa9bff4bde",
"is_public": false,
"deleted_at": null,
"id": "011a6a61-70fa-470b-a9cc-fbc7753833fb",
"size": 25165824
},
"instance_type": {
"memory_mb": 512,
"root_gb": 0,
"deleted_at": null,
"name": "m1.tiny",
"deleted": false,
"created_at": null,
"ephemeral_gb": 0,
"updated_at": null,
"disabled": false,
"vcpus": 1,
"extra_specs": {},
"swap": 0,
"rxtx_factor": 1.0,
"is_public": true,
"flavorid": "1",
"vcpu_weight": null,
"id": 2
},
"instance_properties": {
"vm_state": "building",
"availability_zone": null,
"launch_time": "2012-12-24T16:45:50Z",
"ramdisk_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"instance_type_id": 2,
"user_data": null,
"vm_mode": null,
"reservation_id": "r-gzio9556",
"user_id": "034120010ad64ecfb1eeb2ac5f16854d",
"display_description": "test01",
"key_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiyiud+EmmdRZ50aPPbC7Ys3Td19qp6q3Xnl+W8aFHJ21IbdnCNXZo3pXpeTJy8rvFTitYxpvD5WzGlmPdXoEryJibA6hbPg6hPLINul+SwtuXlqv6pucy+eMVuWhi9MfOKv/uuJpCFIwZuEHGHg3xeW6uVyWSURW9FGH/E6tKdGrB9T2afkPaROOBnK2BRy3Bj55ExZq8qjfsYKDibwoDPddW9rR5zRn7N3pY6rhnULjyWJAd7Ll3UltKMkl3V2BZV0cyvd3c+TMtVtaa8hE9ComrxKOucd84d2+dOyUaV8hr3N3sfe/oXnvlK23Uo9TKwmYfXvTykOtAtaYRss/z nova@folsom\n",
"power_state": 0,
"progress": 0,
"project_id": "0c74b5d96202433196af2faa9bff4bde",
"config_drive": "",
"ephemeral_gb": 0,
"access_ip_v6": null,
"access_ip_v4": null,
"kernel_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"key_name": "mykey",
"display_name": "test01",
"config_drive_id": "",
"architecture": null,
"root_gb": 0,
"locked": false,
"launch_index": 0,
"memory_mb": 512,
"vcpus": 1,
"image_ref": "011a6a61-70fa-470b-a9cc-fbc7753833fb",
"root_device_name": null,
"auto_disk_config": null,
"os_type": null,
"metadata": {}
},
"security_group": [
"default"
],
"instance_uuids": [
"1be889ba-fe3b-4eb6-8730-157db1582f88"
]
},
"instance_type": {
"memory_mb": 512,
"root_gb": 0,
"deleted_at": null,
"name": "m1.tiny",
"deleted": false,
"created_at": null,
"ephemeral_gb": 0,
"updated_at": null,
"disabled": false,
"vcpus": 1,
"extra_specs": {},
"swap": 0,
"rxtx_factor": 1.0,
"is_public": true,
"flavorid": "1",
"vcpu_weight": null,
"id": 2
},
"retry": {
"num_attempts": 1,
"hosts": [
"folsom"
]
},
"scheduler_hints": {}
}
requested_networks = [
[
"0802c791-d4aa-473b-94a8-46d2b4aff91b",
"192.168.100.5"
]
]
injected_files = []
admin_password = "6Ty7wZA9wc5w"
is_first_time = true
instance = {
"vm_state": "building",
"availability_zone": null,
"terminated_at": null,
"ephemeral_gb": 0,
"instance_type_id": 2,
"user_data": null,
"vm_mode": null,
"deleted_at": null,
"reservation_id": "r-gzio9556",
"id": 4,
"security_groups": [
{
"project_id": "0c74b5d96202433196af2faa9bff4bde",
"user_id": "034120010ad64ecfb1eeb2ac5f16854d",
"name": "default",
"deleted": false,
"created_at": "2012-12-16T11:47:01.000000",
"updated_at": null,
"rules": [
{
"from_port": 22,
"protocol": "tcp",
"deleted": false,
"created_at": "2012-12-16T11:47:26.000000",
"updated_at": null,
"id": 1,
"to_port": 22,
"parent_group_id": 1,
"cidr": "0.0.0.0/0",
"deleted_at": null,
"group_id": null
},
{
"from_port": -1,
"protocol": "icmp",
"deleted": false,
"created_at": "2012-12-16T11:47:41.000000",
"updated_at": null,
"id": 2,
"to_port": -1,
"parent_group_id": 1,
"cidr": "0.0.0.0/0",
"deleted_at": null,
"group_id": null
}
],
"deleted_at": null,
"id": 1,
"description": "default"
}
],
"disable_terminate": false,
"root_device_name": null,
"user_id": "034120010ad64ecfb1eeb2ac5f16854d",
"uuid": "1be889ba-fe3b-4eb6-8730-157db1582f88",
"server_name": null,
"default_swap_device": null,
"info_cache": {
"instance_uuid": "1be889ba-fe3b-4eb6-8730-157db1582f88",
"deleted": false,
"created_at": "2012-12-24T16:45:50.000000",
"updated_at": null,
"network_info": "[]",
"deleted_at": null,
"id": 4
},
"hostname": "test01",
"launched_on": null,
"display_description": "test01",
"key_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiyiud+EmmdRZ50aPPbC7Ys3Td19qp6q3Xnl+W8aFHJ21IbdnCNXZo3pXpeTJy8rvFTitYxpvD5WzGlmPdXoEryJibA6hbPg6hPLINul+SwtuXlqv6pucy+eMVuWhi9MfOKv/uuJpCFIwZuEHGHg3xeW6uVyWSURW9FGH/E6tKdGrB9T2afkPaROOBnK2BRy3Bj55ExZq8qjfsYKDibwoDPddW9rR5zRn7N3pY6rhnULjyWJAd7Ll3UltKMkl3V2BZV0cyvd3c+TMtVtaa8hE9ComrxKOucd84d2+dOyUaV8hr3N3sfe/oXnvlK23Uo9TKwmYfXvTykOtAtaYRss/z nova@folsom\n",
"deleted": false,
"scheduled_at": "2012-12-24T16:45:50.413093",
"power_state": 0,
"default_ephemeral_device": null,
"progress": 0,
"project_id": "0c74b5d96202433196af2faa9bff4bde",
"launched_at": null,
"config_drive": "",
"ramdisk_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"access_ip_v6": null,
"access_ip_v4": null,
"kernel_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"key_name": "mykey",
"updated_at": "2012-12-24T16:45:50.441013",
"host": null,
"display_name": "test01",
"task_state": "scheduling",
"shutdown_terminate": false,
"root_gb": 0,
"locked": false,
"name": "instance-00000004",
"created_at": "2012-12-24T16:45:50.000000",
"launch_index": 0,
"memory_mb": 512,
"instance_type": {
"memory_mb": 512,
"root_gb": 0,
"name": "m1.tiny",
"deleted": false,
"created_at": null,
"ephemeral_gb": 0,
"updated_at": null,
"disabled": false,
"vcpus": 1,
"flavorid": "1",
"swap": 0,
"rxtx_factor": 1.0,
"is_public": true,
"deleted_at": null,
"vcpu_weight": null,
"id": 2
},
"vcpus": 1,
"image_ref": "011a6a61-70fa-470b-a9cc-fbc7753833fb",
"architecture": null,
"auto_disk_config": null,
"os_type": null,
"metadata": []
}
image_meta = {
"status": "active",
"name": "tty-linux",
"deleted": false,
"container_format": "ami",
"created_at": "2012-12-16T10:37:48.000000",
"disk_format": "ami",
"updated_at": "2012-12-16T10:37:49.000000",
"properties": {
"kernel_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78",
"ramdisk_id": "619a49c6-e653-4ca2-93f0-2e0e8cb50e78"
},
"min_disk": 0,
"min_ram": 0,
"checksum": "10047a119149e08fb206eea89832eee0",
"owner": "0c74b5d96202433196af2faa9bff4bde",
"is_public": false,
"deleted_at": null,
"id": "011a6a61-70fa-470b-a9cc-fbc7753833fb",
"size": 25165824
}
network_info = [
{
"network": {
"bridge": "br100",
"subnets": [
{
"ips": [
{
"meta": {},
"version": 4,
"type": "fixed",
"floating_ips": [],
"address": "192.168.100.2"
}
],
"version": 4,
"meta": {
"dhcp_server": "192.168.100.1"
},
"dns": [
{
"meta": {},
"version": 4,
"type": "dns",
"address": "8.8.8.8"
}
],
"routes": [],
"cidr": "192.168.100.0/24",
"gateway": {
"meta": {},
"version": 4,
"type": "gateway",
"address": "192.168.100.1"
}
},
{
"ips": [],
"version": null,
"meta": {
"dhcp_server": null
},
"dns": [],
"routes": [],
"cidr": null,
"gateway": {
"meta": {},
"version": null,
"type": "gateway",
"address": null
}
}
],
"meta": {
"tenant_id": null,
"should_create_bridge": true,
"bridge_interface": "br100"
},
"id": "da8b8d70-6522-495a-b9f7-9bfadb931a8f",
"label": "private"
},
"meta": {},
"id": "fe9cd80f-c807-4869-9933-cafce241ac0e",
"address": "fa:16:3e:31:f5:00"
}
]
block_device_info = {
"block_device_mapping": [],
"root_device_name": null,
"ephemerals": [],
"swap": null
}
injected_files = []
nova.compute.manager.py >> ComputeManager >> _allocate_network()
vm_states = BUILDING
task_states = NETWORKING
expected_task_states = None
nova.network.api.py >> API >> allocate_for_instance()
nova.network.manager.py >> NetworkManager >> allocate_for_instance()
nova.network.manager.py >> NetworkManager >> _allocate_mac_address()
nova.network.manager.py >> RPCAllocateFixedIP >> _allocate_fixed_ips()
nova.network.manager.py >> NetworkManager >> get_instance_nw_info()
nova.compute.manager.py >> ComputeManager >> _prep_block_device()
vm_states = BUILDING
task_states = BLOCK_DEVICE_MAPPING
nova.compute.manager.py >> ComputeManager >> _spawn()
[ VM 생성 시작할 때 ]
vm_states = BUILDING
task_states = SPAWNING
expected_task_states = BLOCK_DEVICE_MAPPING
[ 생성 종료된 후 ]
power_state = current_power_state
vm_state = ACTIVE
task_state = None
expected_task_states = SPAWNING
nova.virt.libvirt.driver.py >> LibvirtDriver >> spawn()