Closed disprosium8 closed 4 months ago
@disprosium8
I plan to look inot this and fix it this today.
@disprosium8
So far I have not seen. BTW the -plan tells what is supposed to happen. In this case I changed the config to add the janus service. ...
Keep in mind that cloudlab does not handle modify. And so if you change the number of cloudlab nodes the -apply would destroy cloudlab resources and reprovision ....
The only providers that handle modify are chameleon and fabric.
(fabfed-dev-beta-1.5.0) cloudlab$fabfed workflow -s clab -plan -summary
summaries:
- label: cnet@network
attributes:
to_be_created: 0
to_be_deleted: 0
- label: fabric_network@network
attributes:
to_be_created: 0
to_be_deleted: 0
- label: fabric_node@node
attributes:
to_be_created: 0
to_be_deleted: 0
- label: cnode@node
attributes:
to_be_created: 0
to_be_deleted: 0
- label: dtn_service@service
attributes:
to_be_created: 1
to_be_deleted: 0
2024-05-06 17:45:23,752 [fabfed.py:219] [WARNING] Applying this plan would create 1 resource(s) and destroy 0 resource(s)
@disprosium8
It actually worked as "advertised". :-)
The previous was done with the cloudlab under jupyter/examples. Now using the config under examples directory ....
summaries:
- label: cnet@network
attributes:
to_be_created: 1
to_be_deleted: 0
- label: fabric_node@node
attributes:
to_be_created: 1
to_be_deleted: 0
- label: fabric_network@network
attributes:
to_be_created: 1
to_be_deleted: 0
- label: cnode@node
attributes:
to_be_created: 1
to_be_deleted: 0
2024-05-06 18:13:50,052 [fabfed.py:219] [WARNING] Applying this plan would create 4 resource(s) and destroy 0 resource(s)
It seems to be an issue with the length of the session name and truncation in the provider?
Try a longer session name. Compare:
2024-05-06 22:15:02,362 [controller.py:228] [INFO] Starting ADD_PHASE: Calling ADD ... for 4 resource(s)
2024-05-06 22:15:02,362 [fabric_provider.py:89] [INFO] Initializing slice ezra-cl-test
2024-05-06 22:15:16,116 [fabric_slice_helper.py:133] [INFO] Created fresh slice ezra-cl-test:state=None
2024-05-06 22:15:16,117 [fabric_provider.py:116] [INFO] Done initializing slice ezra-cl-test
2024-05-06 22:15:16,117 [fabric_provider.py:125] [INFO] Initialized slice ezra-cl-test
2024-05-06 22:15:16,117 [node.py:193] [INFO] Adding node: ezra-cl-test-fabric_node-0, slice: ezra-cl-test, site: UTAH
2024-05-06 22:15:16,119 [fabric_node.py:17] [INFO] Node ezra-cl-test-fabric_node-0 construtor called ...
2024-05-06 22:15:16,120 [provider.py:246] [INFO] Adding fabric_network@network to pending using fabric_provider@fabric
2024-05-06 22:15:16,120 [provider.py:251] [INFO] Handling internal dependencies cnode@node using provider cloudlab_provider@cloudlab
2024-05-06 22:15:16,120 [dependency_reslover.py:70] [INFO] Resolving: Dependency(key='network', resource=cnet@network, attribute='', is_external=False) for cnode@node: value=<fabfed.provider.cloudlab.cloudlab_network.CloudNetwork object at 0x7fd98fabba90> using cloudlab_provider@cloudlab
2024-05-06 22:15:16,120 [dependency_reslover.py:100] [INFO] Resolved dependency Dependency(key='network', resource=cnet@network, attribute='', is_external=False) for cnode@node using cloudlab_provider@cloudlab
2024-05-06 22:15:16,120 [dependency_reslover.py:21] [INFO] Checking if all dependencies are resolved for cnode@node using cloudlab_provider@cloudlab
2024-05-06 22:15:16,120 [dependency_reslover.py:41] [INFO] Checking if all dependencies are resolved for cnode@node using cloudlab_provider@cloudlab:ret=True
2024-05-06 22:15:16,120 [dependency_reslover.py:126] [INFO] Extracted Values: [(<fabfed.provider.cloudlab.cloudlab_network.CloudNetwork object at 0x7fd98fabba90>,)]:cnode@node:network using cloudlab_provider@cloudlab
2024-05-06 22:15:16,121 [controller.py:264] [INFO] Starting APPLY_PHASE for 4 resource(s)
2024-05-06 22:15:16,121 [provider.py:319] [INFO] Creating cnet@network using cloudlab_provider@cloudlab: ['cnet@network', 'cnode@node']
2024-05-06 22:15:16,121 [cloudlab_provider.py:205] [INFO] Deleting cloudlab resources ....
2024-05-06 22:15:20,073 [cloudlab_provider.py:218] [INFO] Done deleting cloudlab resources ....
2024-05-06 22:15:23,981 [cloudlab_network.py:71] [INFO] Network ezra-cl-test-cne not found, creating... {'profile': 'fabfed,fabfed-stitch-v2', 'proj': 'fabfed', 'name': 'ezra-cl-test-cne', 'asjson': True, 'bindings': '{"vlan": "3400", "cluster": "urn:publicid:IDN+utah.cloudlab.us+authority+cm", "node_count": "1", "ip_subnet": "192.168.1.0/24"}'}
with
2024-05-06 22:16:08,095 [controller.py:159] [INFO] Starting PLAN_PHASE for 4 resource(s)
2024-05-06 22:16:08,095 [controller.py:228] [INFO] Starting ADD_PHASE: Calling ADD ... for 4 resource(s)
2024-05-06 22:16:08,096 [fabric_provider.py:89] [INFO] Initializing slice clab2
2024-05-06 22:16:10,360 [fabric_slice_helper.py:133] [INFO] Created fresh slice clab2:state=None
2024-05-06 22:16:10,361 [fabric_provider.py:116] [INFO] Done initializing slice clab2
2024-05-06 22:16:10,361 [fabric_provider.py:125] [INFO] Initialized slice clab2
2024-05-06 22:16:10,361 [node.py:193] [INFO] Adding node: clab2-fabric_node-0, slice: clab2, site: UTAH
2024-05-06 22:16:10,364 [fabric_node.py:17] [INFO] Node clab2-fabric_node-0 construtor called ...
2024-05-06 22:16:10,364 [provider.py:246] [INFO] Adding fabric_network@network to pending using fabric_provider@fabric
2024-05-06 22:16:10,364 [provider.py:251] [INFO] Handling internal dependencies cnode@node using provider cloudlab_provider@cloudlab
2024-05-06 22:16:10,365 [dependency_reslover.py:70] [INFO] Resolving: Dependency(key='network', resource=cnet@network, attribute='', is_external=False) for cnode@node: value=<fabfed.provider.cloudlab.cloudlab_network.CloudNetwork object at 0x7f8d5db73c50> using cloudlab_provider@cloudlab
2024-05-06 22:16:10,365 [dependency_reslover.py:100] [INFO] Resolved dependency Dependency(key='network', resource=cnet@network, attribute='', is_external=False) for cnode@node using cloudlab_provider@cloudlab
2024-05-06 22:16:10,365 [dependency_reslover.py:21] [INFO] Checking if all dependencies are resolved for cnode@node using cloudlab_provider@cloudlab
2024-05-06 22:16:10,365 [dependency_reslover.py:41] [INFO] Checking if all dependencies are resolved for cnode@node using cloudlab_provider@cloudlab:ret=True
2024-05-06 22:16:10,365 [dependency_reslover.py:126] [INFO] Extracted Values: [(<fabfed.provider.cloudlab.cloudlab_network.CloudNetwork object at 0x7f8d5db73c50>,)]:cnode@node:network using cloudlab_provider@cloudlab
2024-05-06 22:16:10,365 [controller.py:264] [INFO] Starting APPLY_PHASE for 4 resource(s)
2024-05-06 22:16:10,365 [provider.py:319] [INFO] Creating cnet@network using cloudlab_provider@cloudlab: ['cnet@network', 'cnode@node']
2024-05-06 22:16:14,335 [cloudlab_network.py:78] [INFO] Network already exists, checking status
@disprosium8
I see. This is just one corner case caused by truncating silently. I think we should just throw an exception telling the user that clab cannot handle long session names .... What do you think?
An exception works or create a mapping between a generated cloudlab experiment name and the session name. The important thing is that the user doesn't get unexpected behavior.
Fixed.
Branch: develop Example: examples/cloudlab
Used the existing Cloudlab example config in the branch and the initial workflow completed without errors. When I run subsequent
-apply
steps after adding the Janus service, FabFed deletes only the Cloudlab resources and then recreates them. Everything goes back to working but there is this unneeded recreation of the Cloudlab resources.