Skip to content
New issue

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

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

Already on GitHub? # to your account

rework fixedEndpoint #840

Open
ahelsing opened this issue Jun 23, 2015 · 3 comments
Open

rework fixedEndpoint #840

ahelsing opened this issue Jun 23, 2015 · 3 comments
Assignees
Milestone

Comments

@ahelsing
Copy link
Member

The --fixedEndpoint option exists to do a couple things

  • force stitcher to consider this a stitching request, though the link has only 1 AM
  • After calling SCS, add a fake node/interface, so that IG based AMs don't give an error

It would be nice to not have to add this fake node/interface. Work with the Utah folks on an alternative, including

  • add a component_id="eth1" on the single real interface (a work-around suggested by Jon that I've confirmed works), OR
  • they fix something

At the same time, we currently decide whether to call the SCS strictly based on the main body link. But if the main body has a link with interfaces only at 1 AM, and the same link has a path in the stitching extension that covers 2+ AMs, then we should call the SCS. In fact, we only need the stitching path with 2+ AMs; a match to such a main body link seems not necessary. Adding this logic would remove the need for the logic to force stitcher to consider this a stitching request.

Note that once we add more logic to force stitcher to consider this a stitching request, it might be nice to be able to force stitcher to not call the SCS, so see issue #839.

@ahelsing ahelsing self-assigned this Jun 23, 2015
@ahelsing ahelsing added this to the 2.10 milestone Jun 23, 2015
@ahelsing
Copy link
Member Author

New code to add at the end of mustCallSCS, allowing stitcher to treat other things as needing the SCS / are stitching, so that use of --fixedEndpoint can be removed:

         # End of loop over links

        if not needSCS and requestRSpecObject.stitching and requestRSpecObject.stitching.paths:
            # If we have a stitching extension with 2+ links at 2+ AMs, then need the SCS I think to ensure path is complete

            # Helper to parse the authority out of a possibly bad URN
            def authFromBadURN(urn):
                if not urn:
                    return urn
                spl = urn.split('+')
                if len(spl) < 2:
                    return urn
                return urn_to_string_format(spl[1])

            for path in requestRSpecObject.stitching.paths:
                ams = set()
                for hop in path.hops:
                    if hop.aggregate:
                        ams.add(authFromBadURN(str(hop.aggregate)))
                    else:
                        ams.add(authFromBadURN(str(hop.urn)))
                if len(path.aggregates) > 1:
                    self.logger.debug("Stitching path %s uses %d AMs, so need SCS", path, len(path.aggregates))
                    needSCS = True
                    break
                elif len(ams) > 1:
                    self.logger.debug("Stitching path %s uses hops with %d AMs, so need SCS", path, len(ams))
                    needSCS = True
                    break
                else:
                    self.logger.debug("Stitching path %s uses %d AMs (%d from hops), so do not need SCS", path, len(path.aggregates), len(ams))
         return needSCS

@ahelsing
Copy link
Member Author

Jon says use the eth1 hack. So stitcher should add this component_id to the interface.
Specifically: If a link has interface_refs from only a single AM, whose node is bound to an PG AM, then on the <interface> element, add the attribute component_id="eth1"

ahelsing added a commit to ahelsing/geni-tools that referenced this issue Jun 23, 2015
…ing if it has a stitched path with >1 AMs. DStill need to write the method that sets the component_id on some interface
@ahelsing
Copy link
Member Author

Partially implemented on the ah-fork branch. In stitchhandler see ensureIrefCID: not implemented. Then needs testing.

@ahelsing ahelsing modified the milestones: 2.10, 3.0 Dec 9, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant