[
https://issues.apache.org/jira/browse/CLOUDSTACK-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572957#comment-13572957
]
Sheng Yang commented on CLOUDSTACK-1139:
----------------------------------------
IPv4 has the same issue. We didn't clean dhcp entry when VM expunged.
> Ipv6 - Even after the Vm is "Expunged" we see the entry still being present
> in the router in /etc/dhcphosts.txt
> ---------------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-1139
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1139
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.1.0
> Environment: Latest build from refcator branch.
> Reporter: Sangeetha Hariharan
> Assignee: Sheng Yang
> Fix For: 4.1.0
>
>
> Steps to reproduce the problem:
> create a IPV6 network.
> Deploy few vms in the network.
> Destroy a Vm (in my case - n1-vm2-pam).
> Wait for expunge interval. Vms get Expunged as expected.
> But the entry relating to this VM is still present in the router in
> /etc/dhcphosts.txt
> This could cause issues if the same Ip adress gets assigned to another Vm at
> a later point.
> root@r-4-VM:~# cat /etc/dhcphosts.txt
> id:00:03:00:01:06:42:80:00:00:22,[fc00:3:1371::a2f0],n1-vm1,infinite
> id:00:03:00:01:06:5a:86:00:00:24,[fc00:3:1371::d6ee],n1-vm2-pam,infinite
> id:00:03:00:01:06:4e:52:00:00:25,[fc00:3:1371::41a6],n1-vm3-admin,infinite
> id:00:03:00:01:06:5b:00:00:00:26,[fc00:3:1371::29a6],n1-vm4,infinite
> Management server logs:
> 2013-02-01 19:10:03,303 INFO [cloud.vm.UserVmManagerImpl]
> (UserVm-Scavenger-1:null) Found 1 vms to expunge.
> 2013-02-01 19:10:03,303 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (UserVm-Scavenger-1:null) Stopped called on VM[User|n1-vm2-pam] but the state
> is Destroyed
> 2013-02-01 19:10:03,322 DEBUG [cloud.capacity.CapacityManagerImpl]
> (UserVm-Scavenger-1:null) VM state transitted from :Destroyed to Expunging
> with event: ExpungeOperationvm's original host id: 1 new host id: null host
> id before state transition: null
> 2013-02-01 19:10:03,323 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (UserVm-Scavenger-1:null) Destroying vm VM[User|n1-vm2-pam]
> 2013-02-01 19:10:03,323 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (UserVm-Scavenger-1:null) Cleaning up NICS
> 2013-02-01 19:10:03,323 DEBUG [cloud.network.NetworkManagerImpl]
> (UserVm-Scavenger-1:null) Cleaning network for vm: 5
> 2013-02-01 19:10:03,334 DEBUG [cloud.network.NetworkModelImpl]
> (UserVm-Scavenger-1:null) Service SecurityGroup is not supported in the
> network id=204
> 2013-02-01 19:10:03,340 DEBUG [network.guru.DirectNetworkGuru]
> (UserVm-Scavenger-1:null) Deallocate network: networkId: 204, ip: null
> 2013-02-01 19:10:03,364 DEBUG [cloud.network.NetworkManagerImpl]
> (UserVm-Scavenger-1:null) Removed nic id=11
> 2013-02-01 19:10:03,372 DEBUG [cloud.storage.StorageManagerImpl]
> (UserVm-Scavenger-1:null) Cleaning storage for vm: 5
> 2013-02-01 19:10:03,398 DEBUG [cloud.storage.StorageManagerImpl]
> (UserVm-Scavenger-1:null) Expunging Vol[5|vm=5|ROOT]
> 2013-02-01 19:10:03,410 DEBUG [agent.transport.Request]
> (UserVm-Scavenger-1:null) Seq 1-641531930: Sending { Cmd , MgmtId:
> 206915885080248, via: 1, Ver: v1, Flags: 100111,
> [{"storage.DestroyCommand":{"vmName":"i-4-5-VM","volume":{"id":5,"name":"ROOT-5","mountPoint":"/export/home/sangeetha/ipv6new/primary","path":"b4ff356c-7b03-47c8-97c1-8b962b10ac89","size":21474836480,"type":"ROOT","storagePoolType":"NetworkFilesystem","storagePoolUuid":"f25ff224-0796-32aa-9414-48fccf5b0567","deviceId":0},"wait":0}}]
> }
> 2013-02-01 19:10:03,516 DEBUG [agent.transport.Request]
> (AgentManager-Handler-8:null) Seq 1-641531930: Processing: { Ans: , MgmtId:
> 206915885080248, via: 1, Ver: v1, Flags: 110,
> [{"Answer":{"result":true,"details":"Success","wait":0}}] }
> 2013-02-01 19:10:03,516 DEBUG [agent.manager.AgentAttache]
> (AgentManager-Handler-8:null) Seq 1-641531930: No more commands found
> 2013-02-01 19:10:03,516 DEBUG [agent.transport.Request]
> (UserVm-Scavenger-1:null) Seq 1-641531930: Received: { Ans: , MgmtId:
> 206915885080248, via: 1, Ver: v1, Flags: 110, { Answer } }
> 2013-02-01 19:10:03,523 DEBUG [cloud.storage.StorageManagerImpl]
> (UserVm-Scavenger-1:null) Volume successfully expunged from 200
> 2013-02-01 19:10:03,523 DEBUG [cloud.vm.VirtualMachineManagerImpl]
> (UserVm-Scavenger-1:null) Expunged VM[User|n1-vm2-pam]
> 2013-02-01 19:10:03,523 DEBUG [cloud.vm.UserVmManagerImpl]
> (UserVm-Scavenger-1:null) Starting cleaning up vm VM[User|n1-vm2-pam]
> resources...
> 2013-02-01 19:10:03,562 DEBUG [network.firewall.FirewallManagerImpl]
> (UserVm-Scavenger-1:null) No firewall rules are found for vm id=5
> 2013-02-01 19:10:03,562 DEBUG [cloud.vm.UserVmManagerImpl]
> (UserVm-Scavenger-1:null) Firewall rules are removed successfully as a part
> of vm id=5 expunge
> 2013-02-01 19:10:03,566 DEBUG [network.rules.RulesManagerImpl]
> (UserVm-Scavenger-1:null) No port forwarding rules are found for vm id=5
> 2013-02-01 19:10:03,566 DEBUG [cloud.vm.UserVmManagerImpl]
> (UserVm-Scavenger-1:null) Port forwarding rules are removed successfully as a
> part of vm id=5 expunge
> 2013-02-01 19:10:03,576 DEBUG [cloud.vm.UserVmManagerImpl]
> (UserVm-Scavenger-1:null) Removed vm id=5 from all load balancers as a part
> of expunge process
> 2013-02-01 19:10:03,578 DEBUG [cloud.vm.UserVmManagerImpl]
> (UserVm-Scavenger-1:null) Successfully cleaned up vm VM[User|n1-vm2-pam]
> resources as a part of expunge process
> mysql> select * from vm_instance where id=5;
> +----+------------+--------------------------------------+---------------+-----------+----------------+-------------+---------------------+--------------------+---
>
> -----+----------------+---------+--------------+----------+---------------------+----------------------------------------------+------------+---------------+------
>
> --------+---------------------+---------------------+---------------------+------+---------+------------+-----------+---------------------+----------------+-------
> ----------+
> | id | name | uuid | instance_name |
> state | vm_template_id | guest_os_id | private_mac_address |
> private_ip_address | po d_id | data_center_id | host_id |
> last_host_id | proxy_id | proxy_assign_time | vnc_password
> | ha_enabled | limit_cpu_use | updat e_count
> | update_time | created | removed | type |
> vm_type | account_id | domain_id | service_offering_id | reservation_id |
> hyperv isor_type |
> +----+------------+--------------------------------------+---------------+-----------+----------------+-------------+---------------------+--------------------+---
>
> -----+----------------+---------+--------------+----------+---------------------+----------------------------------------------+------------+---------------+------
>
> --------+---------------------+---------------------+---------------------+------+---------+------------+-----------+---------------------+----------------+-------
> ----------+
> | 5 | n1-vm2-pam | f9f9a1b3-ddaa-404b-8588-84cc9b022a13 | i-4-5-VM |
> Expunging | 201 | 100 | 06:5a:86:00:00:24 | NULL
> | 1 | 1 | NULL | 1 |
> 2 | 2013-02-02 02:24:13 | 8XAp8vRjKls6SrSlrHw6u2ahtjTTBKREExTJjAo4emo=
> | 0 | 0 | 8 | 2013-02-02
> 03:10:03 | 2013-02-02 02:08:00 | 2013-02-02 03:10:03 | User | User |
> 4 | 1 | 11 | NULL | KVM
> |
> +----+------------+--------------------------------------+---------------+-----------+----------------+-------------+---------------------+--------------------+---
>
> -----+----------------+---------+--------------+----------+---------------------+----------------------------------------------+------------+---------------+------
>
> --------+---------------------+---------------------+---------------------+------+---------+------------+-----------+---------------------+----------------+-------
> ----------+
> 1 row in set (0.00 sec)
> mysql> select * from nics where instance_id=5;
> +----+--------------------------------------+-------------+-------------------+-------------+---------+---------+---------+---------------+------------+------+----
>
> ----------+----------+-------------------+----------------+-----------+---------------------+---------------+-------------------+---------------+------------------
>
> +-------------+---------+---------------------+---------------------+
> | id | uuid | instance_id | mac_address
> | ip4_address | netmask | gateway | ip_type | broadcast_uri | network_id |
> mode | sta te | strategy | reserver_name |
> reservation_id | device_id | update_time | isolation_uri |
> ip6_address | ip6_gateway | ip6_cidr |
> default_nic | vm_type | created | removed |
> +----+--------------------------------------+-------------+-------------------+-------------+---------+---------+---------+---------------+------------+------+----
>
> ----------+----------+-------------------+----------------+-----------+---------------------+---------------+-------------------+---------------+------------------
>
> +-------------+---------+---------------------+---------------------+
> | 11 | c80a4c3f-b146-4ea0-bb9b-96158a5266b9 | 5 | 06:5a:86:00:00:24
> | NULL | NULL | NULL | Ip6 | vlan://1371 | 204 |
> Dhcp | llocating | Create | DirectNetworkGuru | NULL
> | 0 | 2013-02-01 19:10:03 | vlan://1371 | fc00:3:1371::d6ee
> | fc00:3:1371:: | fc00:3:1371:: | 1 | User
> | 2013-02-02 02:08:00 | 2013-02-02 03:10:03 |
> +----+--------------------------------------+-------------+-------------------+-------------+---------+---------+---------+---------------+------------+------+
>
> ----------+----------+-------------------+----------------+-----------+---------------------+---------------+-------------------+---------------+--------------
>
> +-------------+---------+---------------------+---------------------+
> 1 row in set (0.00 sec)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira