[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2015-07-09 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14620249#comment-14620249
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

[~dahn] - I'm not sure why we supported this, perhaps discuss on dev ML and 
work on a fix if needed?

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2015-07-08 Thread Daan Hoogland (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618563#comment-14618563
 ] 

Daan Hoogland commented on CLOUDSTACK-7974:
---

[~bhaisaab]should we also create a ticket that says thas cloudstack should make 
sure hostnames are case insensitively unique?


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240990#comment-14240990
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

[~jayapal] Since multiple nics/entries are not possible for the same host in a 
network I'm going to remove this line and test it. Can you comment if this will 
impact any other network topology? About dnsmasq I see there is a 
dnsmasq_edithosts.sh which looks like it should clean up old leases and restart 
dns service but it is using $DHCP_LEASES that is not defined anywhere, can you 
confirm if this actually works, if this $DHCP_LEASES is available from 
environment and if so does it go through /etc/hosts files to decide which 
entries to keep and which to purge?

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread Jayapal Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241006#comment-14241006
 ] 

Jayapal Reddy commented on CLOUDSTACK-7974:
---

[~bhaisaab]
We are using the following file, we are not using dnsmasq_edithosts.sh
cloudstack/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh

Currently I don't think there are impacts, If I come across I will let you know.

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241017#comment-14241017
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

I just tested in both shared and isolated networks, the script is called only 
when a new VM is deployed and this makes sure we removed any old entry with the 
VM's hostname. There is no script that removes entries as we remove VMs at all.

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241019#comment-14241019
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

Now, the issue is we need to trigger a script when vms are deleted that would 
go and remove the entry from /etc/hosts and reload dnsmasq service. Any pointer 
how to do it since this affects several components?

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread Jayapal Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241025#comment-14241025
 ] 

Jayapal Reddy commented on CLOUDSTACK-7974:
---

1. On VM deployment if we can remove the entry with VM name combination then no 
need to run script to while destroying VM.

If we want to remove entry while deleting VM, I think we can check how user 
data is handled while deleting VM.
Delete entry when VM entered to expunge state NOT destroyed state.


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241038#comment-14241038
 ] 

ASF subversion and git services commented on CLOUDSTACK-7974:
-

Commit 63298d9b742811919717ffd6303c8a2e9d37a3dd in cloudstack's branch 
refs/heads/4.3 from [~rohit.ya...@shapeblue.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=63298d9 ]

CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM

When adding a VM, it adds an entry to /etc/hosts file on the VR but does not
clear up any older entries for the VM with a same name. The fix uncomments the
command that removes any old entries in the VM.

Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241040#comment-14241040
 ] 

ASF subversion and git services commented on CLOUDSTACK-7974:
-

Commit 5bc2d06c400331c828edcc4de2ba4a773ad42cb5 in cloudstack's branch 
refs/heads/4.4 from [~rohit.ya...@shapeblue.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5bc2d06 ]

CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM

When adding a VM, it adds an entry to /etc/hosts file on the VR but does not
clear up any older entries for the VM with a same name. The fix uncomments the
command that removes any old entries in the VM.

Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com
(cherry picked from commit 63298d9b742811919717ffd6303c8a2e9d37a3dd)
Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241041#comment-14241041
 ] 

ASF subversion and git services commented on CLOUDSTACK-7974:
-

Commit f38c2f87b11f5a00730e386759c2d46c2eef93c1 in cloudstack's branch 
refs/heads/4.5 from [~rohit.ya...@shapeblue.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=f38c2f8 ]

CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM

When adding a VM, it adds an entry to /etc/hosts file on the VR but does not
clear up any older entries for the VM with a same name. The fix uncomments the
command that removes any old entries in the VM.

Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com
(cherry picked from commit 63298d9b742811919717ffd6303c8a2e9d37a3dd)
Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241046#comment-14241046
 ] 

ASF subversion and git services commented on CLOUDSTACK-7974:
-

Commit aae393dcd5bb5d96267ada1f6ed142b63a39f685 in cloudstack's branch 
refs/heads/master from [~rohit.ya...@shapeblue.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=aae393d ]

CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM

When adding a VM, it adds an entry to /etc/hosts file on the VR but does not
clear up any older entries for the VM with a same name. The fix uncomments the
command that removes any old entries in the VM.

Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com
(cherry picked from commit 63298d9b742811919717ffd6303c8a2e9d37a3dd)
Signed-off-by: Rohit Yadav rohit.ya...@shapeblue.com


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-10 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241051#comment-14241051
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

I've opened a new issue https://issues.apache.org/jira/browse/CLOUDSTACK-8060 
that aims to add an improvement to delete entries when VM is destroyed.

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
Assignee: Rohit Yadav
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread Jayapal Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231299#comment-14231299
 ] 

Jayapal Reddy commented on CLOUDSTACK-7974:
---

[~bhaisaab] If I understand you correctly If we lowecase the hostname it 
resolves to lower case. But user access with original name it fails to resolve. 
One solution I am thinking is while removing the entry from the hosts.txt find 
the row with combination (mac, ip, hostname) and remove it.
This way if we add another vm with same name as destroyed vm, there won't be 
duplicate entries.


 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231280#comment-14231280
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

[~jayapal] how about this fix -- we lowercase and then set the hostnames and 
remove any entry that matches the loweredcase string value of the host? Can you 
suggest if this needs to be done only in edithosts.sh or somewhere else and 
only for /etc/hosts file or dhcphosts.txt file as well?

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231391#comment-14231391
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

[~jayapal] The issue that I found was this: add a VM with name myVM1, delete it 
and now add a VM with name MYVM1. I see both such entries in VR's /etc/hosts 
file and in dhcphosts file. If I ping (resolve) myvm1, it round robins between 
the two IPs. Does case really matter when resolving hostnames?

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread ChunFeng (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231396#comment-14231396
 ] 

ChunFeng commented on CLOUDSTACK-7974:
--


after view the edithosts.sh ,  I found that there is no delete action to file : 
DHCP_HOSTS by $host .

I will submit a patch for review .


regards,
ChunFeng

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231435#comment-14231435
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

That would be great [~chunfeng]!

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread Jayapal Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231573#comment-14231573
 ] 

Jayapal Reddy commented on CLOUDSTACK-7974:
---

# don't want to do this in the future, we can have same VM with multiple 
nics/entries
#sed -i  /$host,/d $DHCP_HOSTS

[~chunfeng]
I think multiple nics in same network is not holds righ now.
Please at look the comment and think see the impact of uncommenting. I don't 
know the reason why this line got commented.

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-12-02 Thread Paul Angus (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14231592#comment-14231592
 ] 

Paul Angus commented on CLOUDSTACK-7974:


FYI - After cleaning up the /etc/hosts file I also had to restart the dnsmasq 
service.  I believe dnsmasq is caching the dns response.

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-11-28 Thread Rohit Yadav (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14228226#comment-14228226
 ] 

Rohit Yadav commented on CLOUDSTACK-7974:
-

One potential issue we found today was, if we deploy VMs with similar hostnames 
it causes VR to round robin pings between VMs. 

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-11-28 Thread Paul Angus (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14228235#comment-14228235
 ] 

Paul Angus commented on CLOUDSTACK-7974:


Using 4.3.0:

Today I destroyed some VMs and re-added a few with the same host name. I had 
some connectivity issues within the network to the hostname being alternately 
returned with the new and old IP addresses.

Checking /etc/hosts on the VR I found a load of old entries including the 
hostname of my new instance twice, once with the old IP and once with the new 
IP.
I removed the old entries but the problem persisted. So i restarted the VR and 
the issue cleared.

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

2014-11-26 Thread Jayapal Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14227252#comment-14227252
 ] 

Jayapal Reddy commented on CLOUDSTACK-7974:
---

Are there any issues seen with the entries for a deleted VM in the 
dhcphosts.txt file ?

The edithosts.sh script deletes the matching entries before adding into 
dhcphosts.txt.
There is no specific script to delete.

-Jayapal

 deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on 
 virtual router
 

 Key: CLOUDSTACK-7974
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
  Components: Virtual Router
Affects Versions: 4.3.0
Reporter: Yiping Zhang
 Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2


 We have noticed that entries for hosts which have been destroyed for a long 
 time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our 
 Virtual Routers.
 To reproduce this bug,  just create an instance, note down its MAC and IP 
 address, then destroy the instance from web UI.  Now check virtual router, 
 and you will find that the entries still exist in /etc/dhcphosts.txt and 
 /etc/hosts files.
 I did a bit more digging on virtual router, and immediately noticed the 
 following:
 1. /root/edithosts.sh script is only called when an instance is created, but 
 not when an instance is destroyed.
 2. After reading /root/edithosts.sh script, I am pretty certain that the 
 function of this script is to add info about newly created instances into 
 /etc/hosts and /etc/dhcphosts.txt files.  So the script should really be 
 renamed as /root/addhosts.sh to reflect its true function.
 3.  there is no script to properly delete entries from /etc/hosts and 
 /etc/dhcphosts.txt file when instances are destroyed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)