rename symbols

Alexander Zubkov green at qrator.net
Tue Jan 24 08:12:10 CET 2023


On Tue, Jan 24, 2023 at 7:59 AM Ondrej Zajicek <santiago at crfreenet.org>
wrote:

> On Tue, Jan 24, 2023 at 07:44:47AM +0100, Maria Matejka wrote:
> > >Hello
> > >
> > >I thing that the most elegant way how to handle renaming of objects
> > >during reconfiguration is to allow multiple names / aliases. There could
> > >be be more symbols pointing to given object (but the object points back
> > >to its primary name).
> > >
> > >Reconfiguration to rename objects could be done in two steps - in the
> > >first step, the user would add alias for the new name.  In the second
> step,
> > >the old name would be removed.
> >
> > I think this keeps the problem with protocol restart when the renaming
> > of "base name" is done.
>
> The primary problem of renaming is matching existing objects with
> definitions from the new config. If that can be done (by finding
> existing objects through aliases), it is just a reconfiguration of
> object property, like any other. I.e. implementation problem instead
> of conceptual problem.
>
>
Adding aliases is an interesting option. But for example now in
protos_commit() it uses WALK_LIST(oc, old->protos), so it walks around old
protos first and then searches for a new ones. So it is not enough to add
another name pointing to the protocol, you need to search for protocol name
and also its aliases in the new protocols, or "invert" walking the lists in
all such places.
Probably might work if it is done in several steps:
1) name1
2) name1 + alias name2
3) name2 + alias name1
4) name2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230124/eb2a5c79/attachment.htm>


More information about the Bird-users mailing list