Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This resolves issue 12 Public IP isolation #2

Open
wants to merge 2 commits into
base: comet-mods
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ def getInterfaces(self, node):
returnxml.append(" <interface type='bridge'>")
returnxml.append(" <source bridge='%s'/>" % bridged_inter["device"])
returnxml.append(" <mac address='%s'/>" % bridged_inter["mac"])
returnxml.append(" <filterref filter='clean-traffic'>")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks too easy... Can you show us what did you do to test? Can you summarize how this is implemented in the host (i.e. dynamic iptables rules?). If iptables is restarted on the physical host what happens to this configuration? Do we need to add firewall rules to rocks and/or do an iptables-save on the physical host to prevent loss of this setting?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes... please check. If I recall correctly this was one of the gotchas.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented on the bottom in general discussion, otherwise this thread is shown in the code and it's not clear what's happening in the code.

returnxml.append(" <parameter name='IP' value='%s'/>" % bridged_inter["ip"])
returnxml.append(" </filterref>")
if bridged_inter["module"] == 'ovs-bridge':
returnxml.append(" <virtualport type='openvswitch'/>")
else:
Expand Down
2 changes: 1 addition & 1 deletion src/rocks-command/rocks/db/vmextend.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def getPhysBridgedDevicefromVnode(self, node):
# now find the physical device name corresponding to the subnets
# found in the previous query (Network table)
networkvirtual = sqlalchemy.orm.aliased(Network)
devices = s.query(Network.device, Network.vlanID, networkvirtual.mac, Network.options, Network.module).filter(
devices = s.query(Network.device, Network.vlanID, networkvirtual.mac, Network.options, Network.module, networkvirtual.ip).filter(
Network.node == node.vm_defs.physNode,
networkvirtual.node == node,
Network.subnet_ID == networkvirtual.subnet_ID,
Expand Down
2 changes: 1 addition & 1 deletion src/rocks-command/version.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME = rocks-command-kvm
RELEASE = 3.1
RELEASE = 3.2