incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Yadav <rohit.ya...@citrix.com>
Subject Re: Review Request: Bugfix CLOUDSTACK-591: Fixed bridge name parsing in security_group.py to support bridge names that include dashes
Date Thu, 13 Dec 2012 23:35:56 GMT
Thanks Bill applied on master, pl. close the review and help verify if that works now for you.

Regards.

On 13-Dec-2012, at 3:27 PM, Bill Rich <bill.rich@gmail.com<mailto:bill.rich@gmail.com>>
wrote:

Cool. Thank you!

On Thu, Dec 13, 2012 at 3:16 PM, Rohit Yadav <rohit.yadav@citrix.com<mailto:rohit.yadav@citrix.com>>
wrote:
Hi Bill,

No need to wait now, people had their chances :)
I'll commit that right away, may be remove some bloat as well.

Regards.

On 13-Dec-2012, at 2:39 PM, Bill Rich <bill.rich@gmail.com<mailto:bill.rich@gmail.com>>
wrote:

Hi Rohit,

Would you still like to wait to give others a chance to review?

Bill

On Fri, Dec 7, 2012 at 9:56 AM, Rohit Yadav <rohit.yadav@citrix.com<mailto:rohit.yadav@citrix.com>>
wrote:
This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8406/


Looks good, if ^BR is not found, it would skip replacing. tsp, anyone else want to take a
look?


- Rohit


On December 7th, 2012, 5:21 p.m., Bill Rich wrote:

Review request for cloudstack.
By Bill Rich.

Updated Dec. 7, 2012, 5:21 p.m.

Description

When checking for rebooted VMs, security_group.py assumed bridge names would not include dashed.
The original code split the name found in iptables and used the 2nd member of the returned
array. In a case where the bridge had a hyphen in the name, only a partial name was returned.
For example, with a bridge named br-public, the line 'iptables-save  |grep physdev-is-bridged
|grep FORWARD |grep BF |grep '\-o' |awk '{print $9}'' returns BF-br-public. The name is parsed
by splitting the name by hyphens and taking the 2nd member of the array. This returns br resulting
in the script attempting to modify chains 'BF-br-IN' and 'BF-br-OUT' which don't exist.

I changed the code to use regular expressions to remove "^BF-" from the chain name. This will
consistently remove just the unwanted part of the chain name to get the standard brname used
throughout the rest of the script.


Testing

-Modified /var/run/cloud/<VM>.log on hv to include a different ID.
-Waited for security_group.py get_rule_logs_for_vms to be run.
-Checked /var/log/cloud/security_group.log for errors and that the correct information was
being parsed
-Confirmed network connectivity for VM


Bugs: CLOUDSTACK-591
Diffs

 *   scripts/vm/network/security_group.py (b079890)

View Diff<https://reviews.apache.org/r/8406/diff/>






Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message