Forum Replies Created
-
AuthorPosts
-
I think that might be a side effect of NIC_Basic’s being SRIOV VFs with limited low level configuration available. Have you tried to use FABRIC’s dedicated NICs? theoretically it should give a bit more control.
- This reply was modified 2 years, 2 months ago by Arash SARABI.
Thank you very much. By ignoring the error, it appears that everything is fine.
Regarding the code you provided, I had previously fixed the quotes, and I think the error may caused by something else.Thank you for all your help,
When I use your code it will return an error:
---> 12 [ifaceRouterC,ifaceRouterS] = nodeRouter.add_component(model="NIC_ConnectX_5", name="cx5_nic").get_intefaces() 13 14 netC = slice.add_l2network(name='net_c', type='L2Bridge', interfaces=[ifaceclient, ifaceRouterC]) AttributeError: 'Component' object has no attribute 'get_intefaces'
and when I use my code with a different site that has available resources (STAR) it will go to the Active state but after some time it returns the following error:
ID Name Site Host Cores RAM Disk Image Management IP State Error ------------------------------------ ------ ------ -------------------------- ------- ----- ------ ----------------- -------------------------------------- ------- ------- 8da49cc5-568d-4262-93fa-15cecbf45017 client STAR star-w4.fabric-testbed.net 4 16 500 default_ubuntu_20 2001:400:a100:3030:f816:3eff:fe1d:28a2 Active 9e8cbc19-1e42-4244-a8a6-58f4310f58b3 server STAR star-w4.fabric-testbed.net 4 16 500 default_ubuntu_20 2001:400:a100:3030:f816:3eff:fe7e:474d Active 6f9725ff-f4e9-4c45-90f1-06425e8fa97c router STAR star-w5.fabric-testbed.net 2 8 10 default_ubuntu_20 2001:400:a100:3030:f816:3eff:fe8a:4cc1 Active Time to stable 168 seconds Running post_boot_config ... --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /tmp/ipykernel_551/3709344673.py in <module> 16 17 ---> 18 slice.submit() /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/slice.py in submit(self, wait, wait_timeout, wait_interval, progress, wait_jupyter) 1218 1219 if progress and wait_jupyter == 'text' and fablib.isJupyterNotebook(): -> 1220 self.wait_jupyter(timeout=wait_timeout, interval=wait_interval) 1221 return self.slice_id 1222 /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/slice.py in wait_jupyter(self, timeout, interval) 1162 1163 print("Running post_boot_config ... ", end="") -> 1164 self.post_boot_config() 1165 print(f"Time to post boot config {time.time() - start:.0f} seconds") 1166 /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/slice.py in post_boot_config(self) 1107 1108 for iface_thread in iface_threads: -> 1109 iface_thread.result() 1110 1111 /opt/conda/lib/python3.9/concurrent/futures/_base.py in result(self, timeout) 431 raise CancelledError() 432 elif self._state == FINISHED: --> 433 return self.__get_result() 434 435 self._condition.wait(timeout) /opt/conda/lib/python3.9/concurrent/futures/_base.py in __get_result(self) 387 def __get_result(self): 388 if self._exception: --> 389 raise self._exception 390 else: 391 return self._result /opt/conda/lib/python3.9/concurrent/futures/thread.py in run(self) 50 51 try: ---> 52 result = self.fn(*self.args, **self.kwargs) 53 except BaseException as exc: 54 self.future.set_exception(exc) /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/interface.py in ip_link_toggle(self) 284 285 """ --> 286 self.get_node().ip_link_down(None, self) 287 self.get_node().ip_link_up(None, self) 288 /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/node.py in ip_link_down(self, subnet, interface) 1238 """ 1239 -> 1240 if interface.get_network().get_layer() == NSLayer.L3: 1241 if interface.get_network().get_type() == ServiceType.FABNetv6: 1242 ip_command = "sudo ip -6" AttributeError: 'NoneType' object has no attribute 'get_layer'
It appears that I should check which site has more available.
I restarted the kernel, I am facing the following problem
ID Name Site Host Cores RAM Disk Image Management IP State Error
———————————— —— —— ————————– ——- —– —— —————– ————— ——- ——————————————————————————————-
96275a0f-f2f7-4928-b20a-f34fc6b2a1e1 client TACC tacc-w5.fabric-testbed.net 4 16 500 default_ubuntu_20 Closed TicketReviewPolicy: Closing reservation due to failure in slice
5517d25c-2b19-4815-8c0c-136395169d48 server TACC tacc-w5.fabric-testbed.net 4 16 500 default_ubuntu_20 Closed TicketReviewPolicy: Closing reservation due to failure in slice
46b000bf-ff65-4f7c-9cd5-8bef2f140a42 router TACC default_ubuntu_20 Closed Insufficient resources : Component of type: ConnectX-6 not available in graph node: 8QQBZC3Exception: node.execute: Management IP Invalid: None
Here is my code to submit slice:
slice = fablib.new_slice(name=SLICENAME)
nodeclient = slice.add_node(name=”client”, site=SITE, cores=1, ram=16,disk=900, image=’default_ubuntu_20′)
nodeserver = slice.add_node(name=”server”, site=SITE, cores=1, ram=16,disk=900, image=’default_ubuntu_20′)
nodeRouter = slice.add_node(name=”router”, site=SITE, image=’default_ubuntu_20′)ifaceclient = nodeclient.add_component(model=”NIC_ConnectX_5″, name=”if_client”).get_interfaces()[0]
ifaceserver = nodeserver.add_component(model=”NIC_ConnectX_5″, name=”if_server”).get_interfaces()[0]
ifaceRouterC = nodeRouter.add_component(model=”NIC_ConnectX_5″, name=”if_router_c”).get_interfaces()[0]
ifaceRouterS = nodeRouter.add_component(model=”NIC_ConnectX_5″, name=”if_router_s”).get_interfaces()[0]netC = slice.add_l2network(name=’net_c’, type=’L2Bridge’, interfaces=[ifaceclient, ifaceRouterC])
netS = slice.add_l2network(name=’net_s’, type=’L2Bridge’, interfaces=[ifaceserver, ifaceRouterS])slice.submit()
- This reply was modified 2 years, 4 months ago by Arash SARABI.
- This reply was modified 2 years, 4 months ago by Arash SARABI.
Thank you Paul,
I tried to replace NIC_Basic with NIC_ConnectX_5 it returns the following error:
/opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/slice.py in submit(self, wait, wait_timeout, wait_interval, progress, wait_jupyter)
1207 ssh_key=self.get_slice_public_key())
1208 if return_status != Status.OK:
-> 1209 raise Exception(“Failed to submit slice: {}, {}”.format(return_status, slice_reservations))
1210
1211 logging.debug(f’slice_reservations: {slice_reservations}’)Exception: Failed to submit slice: Status.FAILURE, (500)
Reason: INTERNAL SERVER ERROR
HTTP response headers: HTTPHeaderDict({‘Server’: ‘nginx/1.21.6’, ‘Date’: ‘Sun, 17 Jul 2022 20:04:56 GMT’, ‘Content-Type’: ‘text/html; charset=utf-8’, ‘Content-Length’: ‘130’, ‘Connection’: ‘keep-alive’, ‘Access-Control-Allow-Credentials’: ‘true’, ‘Access-Control-Allow-Headers’: ‘DNT, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range’, ‘Access-Control-Allow-Methods’: ‘GET, POST, PUT, DELETE, OPTIONS’, ‘Access-Control-Allow-Origin’: ‘*’, ‘Access-Control-Expose-Headers’: ‘Content-Length, Content-Range, X-Error’, ‘X-Error’: ‘PDP Authorization check failed – Policy Violation: Your project is lacking Component.SmartNIC tag to provision a VM with SmartNIC.’})
HTTP response body: PDP Authorization check failed – Policy Violation: Your project is lacking Component.SmartNIC tag to provision a VM with SmartNIC.I fixed the issue. Thank you
Thank you for all your help,
How can I use Bash “magic”? when I try to use the following command it returns an error.
%%bash -s “$FABRIC_SLICE_PRIVATE_KEY_FILE” “$FABRIC_BASTION_USERNAME” “$FABRIC_BASTION_HOST” “$ROMEO_USER” “$ROMEO_IP”
ssh -q -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null -i $1 -J $2@$3 $4@$5 << EOF
##############################################echo ‘Hello from:’; hostname
##############################################
exit
EOFHere is the error:
Warning: Permanently added ‘bastion-1.fabric-testbed.net,152.54.15.12’ (ECDSA) to the list of known hosts.
—————————————————————————
CalledProcessError Traceback (most recent call last)
/tmp/ipykernel_864/42773540.py in <module>
—-> 1 get_ipython().run_cell_magic(‘bash’, ‘-s “$FABRIC_SLICE_PRIVATE_KEY_FILE” “$FABRIC_BASTION_USERNAME” “$FABRIC_BASTION_HOST” “$ROMEO_USER” “$ROMEO_IP”‘, “ssh -q -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null -i $1 -J $2@$3 $4@$5 << EOF\n##############################################\n\necho ‘Hello from:’; hostname\n\n##############################################\nexit\nEOF\n”)/opt/conda/lib/python3.9/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2401 with self.builtin_trap:
2402 args = (magic_arg_s, cell)
-> 2403 result = fn(*args, **kwargs)
2404 return result
2405/opt/conda/lib/python3.9/site-packages/IPython/core/magics/script.py in named_script_magic(line, cell)
140 else:
141 line = script
–> 142 return self.shebang(line, cell)
143
144 # write a basic docstring:<decorator-gen-103> in shebang(self, line, cell)
/opt/conda/lib/python3.9/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it’s overkill for just that one bit of state.
186 def magic_deco(arg):
–> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):/opt/conda/lib/python3.9/site-packages/IPython/core/magics/script.py in shebang(self, line, cell)
243 sys.stderr.flush()
244 if args.raise_error and p.returncode!=0:
–> 245 raise CalledProcessError(p.returncode, cell, output=out, stderr=err)
246
247 def _run_script(self, p, cell, to_close):CalledProcessError: Command ‘b”ssh -q -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null -i $1 -J $2@$3 $4@$5 << EOF\n##############################################\n\necho ‘Hello from:’; hostname\n\n##############################################\nexit\nEOF\n”‘ returned non-zero exit status 255.
Yes, Thank you
still I am getting an error, (I checked both paths and everything looks good.)
try:
node1 = slice.get_node(name=node1_name)
node1.upload_file(local_file_path=os.environ[‘HOME’]+’/work/Server.py’, remote_file_path=’/home/ubuntu/’)except Exception as e:
print(f”Exception: {e}”)SCP upload fail. Slice: ArashTest3, Node: Node1, trying again
Fail: Failure
SCP upload fail. Slice: ArashTest3, Node: Node1, trying again
Fail: Failure
Exception: FailureJune 18, 2022 at 10:20 pm in reply to: When attempting to create a new slice, an error occurs. #2151Thank you. Do you have any suggestions for transferring my Python file and running it on the node? (With JupyterLab)
The file is already on my jupyterLab.
Thank you; that pretty much solved my problem. I also wondered how I could select the ISO (select ubuntu instead of RedHat) or even upload my preconfigured ISO file.
When I try to create a new slice, I also get the following error:
any advice?
try:
slice = fablib.new_slice(name=”MySlice”)
node = slice.add_node(name=”Node1″)
slice.submit()
except Exception as e:
print(f”Exception: {e}”)
Exception: ‘NoneType’ object has no attribute ‘resources’ -
AuthorPosts