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

Failures when adding interfaces to a network #329

Closed
kthare10 opened this issue May 30, 2024 · 1 comment · Fixed by #330
Closed

Failures when adding interfaces to a network #329

kthare10 opened this issue May 30, 2024 · 1 comment · Fixed by #330
Assignees
Labels
bug Something isn't working

Comments

@kthare10
Copy link
Collaborator

Fabfed team noticed errors when adding interface to a network.

  • Create L2 Network
  • Add Basic Nic interface
  • Add Facility Port interface

Automatic NS Type computed in this case is L2PTP which is rejected as L2PTP is not supported for Basic NICs.

Fix: Update the calculate_ns_type to use L2STS when basic nics are attached.

@kthare10 kthare10 added the bug Something isn't working label May 30, 2024
@kthare10 kthare10 self-assigned this May 30, 2024
@kthare10
Copy link
Collaborator Author

Code snippet shared by Abdelilah:

slice_name = 'aes-chameleon'
network_name='net1'
slice = fablib.new_slice(name=slice_name)
fabric_site='TACC'
faciliy_port='Chameleon-TACC'
network_vlan=3210
fabric_facility_port = slice.add_facility_port(name=faciliy_port, site=fabric_site, vlan=str(network_vlan))
fabric_facility_port_iface = fabric_facility_port.get_interfaces()[0]
fabric_facility_port_iface.set_mode('manual')

node2 = slice.add_node(name="bnode", site="UTAH")
iface2 = node2.add_component(model='NIC_Basic', name='nic1').get_interfaces()[0]
iface2.set_mode('manual')

# CASE1: This does not work.
# net1 = slice.add_l2network(name=network_name, type="L2STS")
# net1.add_interface(iface2)
# net1.add_interface(fabric_facility_port_iface)
# Exception: ['Network type L2STS must include interfaces from exactly two sites. 0 sites requested: set()']

# CASE2: This does not work. Looks like type must be set. 
# net1 = slice.add_l2network(name=network_name, interfaces=[iface2,fabric_facility_port_iface])
# Exception: Network type L2PTP does not support interfaces of type 'NIC_Basic'

# CASE3: This works.
net1 = slice.add_l2network(name=network_name, type="L2STS", interfaces=[iface2,fabric_facility_port_iface])
slice.submit()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant