rename symbols

Maria Matejka maria.matejka at nic.cz
Tue Jan 24 07:44:47 CET 2023



On 24 January 2023 07:33:24 CET, Ondrej Zajicek <santiago at crfreenet.org> wrote:
>On Tue, Jan 24, 2023 at 06:57:01AM +0100, Maria Matejka via Bird-users wrote:
>> Hello!
>> 
>> > For example I may want to refactor the naming scheme for
>> > protocols/tables in my bird config. But when I apply the new config with
>> > the new names, such renamed protocols will be recreated or restarted,
>> > which may be undesired. So if I could rename protocols/tables in advance
>> > and then load the new config, I can hope than no changes would be found
>> > and the there would be no interruptions.
>> 
>> What I was thinking about some time ago, was not this kind of "renaming from
>> CLI" but a special clause "renamed XYZ to ABC" which could be put at the end
>> (!) of the new config. This would solve the problem with rewriting the
>> symbol in-place which is ugly.
>
>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. Yet you can do something like having base symbols like gdjdhcixsnrviowdh and use aliases for everything… which would make your logs and "show route" unreadable and you'd have to apply some additional machinery to address this.

Maria



More information about the Bird-users mailing list