Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39F2E119FB for ; Mon, 18 Aug 2014 18:26:19 +0000 (UTC) Received: (qmail 23850 invoked by uid 500); 18 Aug 2014 18:26:19 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 23820 invoked by uid 500); 18 Aug 2014 18:26:19 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 23810 invoked by uid 500); 18 Aug 2014 18:26:19 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 23807 invoked by uid 99); 18 Aug 2014 18:26:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2014 18:26:19 +0000 Date: Mon, 18 Aug 2014 18:26:19 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-7193) Rebooting a VM doesn't update iptables rules MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-7193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14101005#comment-14101005 ] ASF subversion and git services commented on CLOUDSTACK-7193: ------------------------------------------------------------- Commit 5a68f031ce3fe211dce2287d6ca67294e582b84f in cloudstack's branch refs/heads/4.4 from [~vbernat] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5a68f03 ] CLOUDSTACK-7193: handle domain ID being an int Recent versions of libvirt (at least 0.9.8) will return an int when queried for the ID of a domain, not a string. This breaks some parts of the `security_group.py` script which expects a string containing an int. Notably, this breaks the part handling VM reboots which is therefore not executed. Signed-off-by: Vincent Bernat Signed-off-by: Sebastien Goasguen > Rebooting a VM doesn't update iptables rules > -------------------------------------------- > > Key: CLOUDSTACK-7193 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7193 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: KVM > Affects Versions: 4.3.0 > Environment: Ubuntu Lucid 12.04 and more recent > Reporter: Vincent Bernat > > Hi! > Rebooting a VM doesn't update the iptables rules despite the change on the interface name. To reproduce: > 1. Starts two VM > 2. Stop the first one. > 3. Reboot the second one. It will use the vnet device of the first one. > 4. Checks that the iptables rules for the second one are still referencing the old interface. > The defect seems to be in security_group.py. The periodic "get_rule_logs_for_vm" which also handles rebooted VM fails because of the following traceback: > {code} > 2014-07-28 15:15:19,035 - 'int' object has no attribute 'isdigit' > Traceback (most recent call last): > File "/usr/share/cloudstack-common/scripts/vm/network/security_group.py", line 705, in get_rule_logs_for_vms > network_rules_for_rebooted_vm(name) > File "/usr/share/cloudstack-common/scripts/vm/network/security_group.py", line 637, in network_rules_for_rebooted_vm > [curr_domid, old_domid] = check_domid_changed(vm_name) > File "/usr/share/cloudstack-common/scripts/vm/network/security_group.py", line 619, in check_domid_changed > if (curr_domid is None) or (not curr_domid.isdigit()): > AttributeError: 'int' object has no attribute 'isdigit' > {code} > This exception is catched by some try...except. > On Ubuntu Lucid 12.04, a domain ID is an integer. This is with libvirt 0.9.8. I also checked that this is still the case with libvirt 1.2.4. -- This message was sent by Atlassian JIRA (v6.2#6252)