we're in the process of adopting mstpd for our product. The primary
issue we're looking at right now, is a way to start/restart (and monitor)
the mstpd daemon by simply generating and updating a configuration
file, e.g., /etc/mstpd.conf and possibly support for sending SIGHUP to
mstpd so it reloads its configuration, like a regular UNIX daemon.
Another, less pressing issue is a way to dump status in a more generic
and easy to use/parse format, for further consumption by a CLI, Web UI
and SNMP.
Since we're also using teamd, for LACP link aggregation, we have the
Jansson[1] JSON parser on our target system. So, we are considering
using JSON as both a .conf- and a status-file format. Now:
Is there anyone else working on something similar?
Is this something that would be of use to other people?
Maybe we are completely off base here and should rather embrace
the current way of configuring and gathering status? Any thoughts
and input is valuable.
Regards
/Joachim Nilsson at Westermo Teleindustri, Sweden
Hi Joachim,
In the current mstpd code, there is a mechanism to write the mstpctl configuration in /etc/network/interfaces file and when mstpd starts/restarted, mstpd reads the new configuration present in that file. The code for this is in lib/ifupdown.sh, mstpctl_restart_config and the man-page mstpctl-utils-interfaces explains this with an example.
Sure, adding JSON format would be helpful too in the long run.
Thanks,
Satish
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Я тоже столкнулся с подобными проблемами о которых пишите вы.
поэтому немного изменил mstpd для возможности запускать с параметрами. И теперь запуск mstpd из скрипта у меня выглядит так:
local cmd_line = string.format("mstpd -b %d -h %d -m %d -f %d -r %d",
cfgFromFile[bridge_prior],
cfgFromFile[hello_time],
cfgFromFile[max_age],
cfgFromFile[forward_delay],
cfgFromFile[force_ver])
os.execute(cmd_line)
что касается форматированного вывода, то мне тоже его не хватало для cli и web. И самый простой способ для меня был это написание собственной утилиты типа mstpctl, только которая делала вывод в json формате.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
we're in the process of adopting mstpd for our product. The primary
issue we're looking at right now, is a way to start/restart (and monitor)
the mstpd daemon by simply generating and updating a configuration
file, e.g., /etc/mstpd.conf and possibly support for sending SIGHUP to
mstpd so it reloads its configuration, like a regular UNIX daemon.
Another, less pressing issue is a way to dump status in a more generic
and easy to use/parse format, for further consumption by a CLI, Web UI
and SNMP.
Since we're also using teamd, for LACP link aggregation, we have the
Jansson[1] JSON parser on our target system. So, we are considering
using JSON as both a .conf- and a status-file format. Now:
Maybe we are completely off base here and should rather embrace
the current way of configuring and gathering status? Any thoughts
and input is valuable.
Regards
/Joachim Nilsson at Westermo Teleindustri, Sweden
[1] - http://www.digip.org/jansson/
Hi Joachim,
In the current mstpd code, there is a mechanism to write the mstpctl configuration in /etc/network/interfaces file and when mstpd starts/restarted, mstpd reads the new configuration present in that file. The code for this is in lib/ifupdown.sh, mstpctl_restart_config and the man-page mstpctl-utils-interfaces explains this with an example.
Sure, adding JSON format would be helpful too in the long run.
Thanks,
Satish
привет Joachim.
автор к сожалению не отвечает.
Я тоже столкнулся с подобными проблемами о которых пишите вы.
поэтому немного изменил mstpd для возможности запускать с параметрами. И теперь запуск mstpd из скрипта у меня выглядит так:
local cmd_line = string.format("mstpd -b %d -h %d -m %d -f %d -r %d",
cfgFromFile[bridge_prior],
cfgFromFile[hello_time],
cfgFromFile[max_age],
cfgFromFile[forward_delay],
cfgFromFile[force_ver])
что касается форматированного вывода, то мне тоже его не хватало для cli и web. И самый простой способ для меня был это написание собственной утилиты типа mstpctl, только которая делала вывод в json формате.