Home › Forums › FABRIC General Questions and Discussion › Two VLANs on one facility port
- This topic has 1 reply, 2 voices, and was last updated 3 weeks, 4 days ago by
Komal Thareja.
-
AuthorPosts
-
March 6, 2025 at 12:34 pm #8344
Hi,
we are trying to get the following scenario (see figure below) set up and are running into an issue on the FABRIC side.
So far we, have not been able to add both ports of the FPGA on two different facility ports that are within the VLAN range assigned to the OCT-MGHPCC facility port.
Below is the code from the Jupyter Notebook cell I’m using to allocate a slice.[code=python] # Create Slice. Note that by default submit() call will poll for 360 seconds every 10-20 seconds
# waiting for slice to come up. Normal expected time is around 2 minutes.
slice = fablib.new_slice(name=slice_name)# Add node with a 100G drive and a couple of CPU cores (default)
node = slice.add_node(name=node_name, site=site, disk=100,image=’default_ubuntu_22′)
fpga_comp=node.add_component(model=FPGA_CHOICE, name=’fpga1′)
fpga_p1 = fpga_comp.get_interfaces()[0]
fpga_p2 = fpga_comp.get_interfaces()[1]# try to add a facility port to the MASS site
facility_port=’OCT-MGHPCC’
# facility_port2=’OCT-MGHPCC2′
facility_port_site=’MASS’
facility_port1_vlan=’3112′
facility_port2_vlan=’3113′facility_port1 = slice.add_facility_port(name=facility_port, site=facility_port_site, vlan=facility_port1_vlan)
facility_port1_interface =facility_port1.get_interfaces()[0]
facility_port2 = slice.add_facility_port(name=facility_port, site=facility_port_site, vlan=facility_port2_vlan)
facility_port2_interface =facility_port2.get_interfaces()[0]
node.add_fabnet()print(f”facility_port.get_site(): {facility_port1.get_site()}”)
net1 = slice.add_l2network(name=f’net_facility_port1′, interfaces=[fpga_p1,facility_port1_interface])
net2 = slice.add_l2network(name=f’net_facility_port2′, interfaces=[fpga_p2,facility_port2_interface])#Submit Slice Request
slice.submit(); [/code]When executing this code I get the following error message.
[code]
--------------------------------------------------------------------------- PropertyGraphQueryException Traceback (most recent call last) Cell In[23], line 20 18 facility_port1 = slice.add_facility_port(name=facility_port, site=facility_port_site, vlan=facility_port1_vlan) 19 facility_port1_interface =facility_port1.get_interfaces()[0] ---> 20 facility_port2 = slice.add_facility_port(name=facility_port, site=facility_port_site, vlan=facility_port2_vlan) 21 facility_port2_interface =facility_port2.get_interfaces()[0] 22 node.add_fabnet() File ~/fabrictestbed-extensions/fabrictestbed_extensions/fablib/slice.py:1154, in Slice.add_facility_port(self, name, site, vlan, labels, peer_labels, bandwidth, mtu) 1124 def add_facility_port( 1125 self, 1126 name: str = None, (...) 1132 mtu: int = None, 1133 ) -> FacilityPort: 1134 """ 1135 Adds a new L2 facility port to this slice 1136 (...) 1152 :rtype: NetworkService 1153 """ -> 1154 return FacilityPort.new_facility_port( 1155 slice=self, 1156 name=name, 1157 site=site, 1158 vlan=vlan, 1159 labels=labels, 1160 peer_labels=peer_labels, 1161 bandwidth=bandwidth, 1162 mtu=mtu, 1163 ) File ~/fabrictestbed-extensions/fabrictestbed_extensions/fablib/facility_port.py:218, in FacilityPort.new_facility_port(slice, name, site, vlan, bandwidth, mtu, labels, peer_labels) 211 iface_tuple = ( 212 f"iface-{index}", 213 Labels(vlan=v), 214 capacities, 215 ) 216 interfaces.append(iface_tuple) --> 218 fim_facility_port = slice.get_fim_topology().add_facility( 219 name=name, 220 site=site, 221 capacities=capacities, 222 labels=labels, 223 peer_labels=peer_labels, 224 interfaces=interfaces, 225 ) 226 return FacilityPort(slice, fim_facility_port) File /opt/conda/lib/python3.11/site-packages/fim/user/topology.py:255, in Topology.add_facility(self, name, node_id, site, nstype, nslabels, interfaces, **kwargs) 241 """ 242 Add a facility node with VLAN service and FacilityPort interface as a single construct. 243 Works for aggregate topologies and experiment topologies the same way. (...) 252 :kwargs: parameters for the interface of the facility (bandwidth, mtu, LAN tags etc) 253 """ 254 # should work with deep sliver reconstruction --> 255 facn = self.add_node(name=name, node_id=node_id, site=site, ntype=NodeType.Facility) 256 facs = facn.add_network_service(name=name + '-ns', node_id=node_id + '-ns' if node_id else None, 257 nstype=nstype, labels=nslabels) 258 if not interfaces: 259 # if no interfaces are defined, use implicit definition and kwargs 260 # this is how the code was defined originally File /opt/conda/lib/python3.11/site-packages/fim/user/topology.py:210, in Topology.add_node(self, name, node_id, site, ntype, **kwargs) 208 raise TopologyException('Node names must be unique within topology.') 209 # add node to graph --> 210 n = Node(name=name, node_id=node_id, topo=self, site=site, 211 etype=ElementType.NEW, ntype=ntype, **kwargs) 212 return n File /opt/conda/lib/python3.11/site-packages/fim/user/node.py:103, in Node.__init__(self, name, node_id, topo, etype, ntype, site, ns_info, check_existing, **kwargs) 101 sliver.network_service_info = ns_info 102 sliver.set_properties(**kwargs) --> 103 self.topo.graph_model.add_network_node_sliver(sliver=sliver) 104 else: 105 assert node_id is not None File /opt/conda/lib/python3.11/site-packages/fim/graph/abc_property_graph.py:1211, in ABCPropertyGraph.add_network_node_sliver(self, sliver) 1207 assert sliver.node_id is not None 1209 if not self.check_node_unique(label=ABCPropertyGraph.CLASS_NetworkNode, 1210 name=sliver.resource_name): -> 1211 raise PropertyGraphQueryException(msg=f'Node name {sliver.resource_name} must be unique.', 1212 graph_id=self.graph_id, node_id=None) 1214 props = self.node_sliver_to_graph_properties_dict(sliver) 1215 self.add_node(node_id=sliver.node_id, label=ABCPropertyGraph.CLASS_NetworkNode, props=props) PropertyGraphQueryException: [Node name OCT-MGHPCC must be unique.] in d2dcbe66-80ed-4577-b97d-deecaa9dab15
[/code]
A couple of questions:
- Am I making a conceptual error? (or, is this even possible?)
- If it’s possible, how can I reuse the same facility port (but with different VLANs) on two different interfaces that are located in the same host?
- I cannot think of a way how to resolve the error message since the facility port name (OCT-MGHPCC in this case) is given by default.
Thanks,
Mike
March 6, 2025 at 1:14 pm #8345Hi Mike,
Could you try specifying multiple VLANs when adding the Facility port and then access the interfaces as shown below?
facility_port = slice.add_facility_port(name=facility_port, site=facility_port_site, vlan=['3300', '3301']) facility_port_interface_1 = facility_port.get_interfaces()[0] facility_port_interface_2 = facility_port.get_interfaces()[1]
P.S: Please change the vlans accordingly in the example above.
Thanks,
Komal-
This reply was modified 3 weeks, 4 days ago by
Komal Thareja.
-
AuthorPosts
- You must be logged in to reply to this topic.