* RFC for enablement of slpd on openbmc
@ 2016-10-19 17:49 Ratan Gupta
2016-10-19 20:09 ` Rick Altherr
2016-10-19 21:32 ` Patrick Williams
0 siblings, 2 replies; 6+ messages in thread
From: Ratan Gupta @ 2016-10-19 17:49 UTC (permalink / raw)
To: openbmc
[-- Attachment #1: Type: text/plain, Size: 1863 bytes --]
Hi All,
*Enabling SLP Server on openBMC*
What is SLP
=======
Service Location Protocol (SLP) is a protocol that provides a framework
to allow networking applications to discover the existence, location,
and configuration of networked services in enterprise networks.
openSLP is widely accepted in the industry
What do we need to do?
==============
1) Bring SLP(OpenSLP) in image:- Write the bitbake recipe(didn't find
the readily available bitbake recipe)
2) Configure the services through Settings daemon.
3) Write the .service file as it needs to start after network is
up(after networkd-online.target)
How to configure the services which needs to be registered with slpd
============================================
Option 1:- settingsd
Note: Gives the flexibility to change the configured services @ runtime.
Do we require this functionality?
Option 2:conf file for discovery services
Note: During build time we can get the service info(service-name,port)
from the existing infra(discoveryservice.bbclass)
How to register the services
==================
1) Static Registration:- will not work as we need ip/host-name details
which we don't have @build time.
2) Application(new DBUS app) will register the configured services to
the slpd on startup.
We need to provide the dynamic registration support on BMC as IP of BMC
can change any time. Registration of services with slpd takes the URL
of the service which includes ip and port of the service which needs to
be registered.
Create a DBUS service application
=====================
1) Once the service starts it registers the configured services with slpd.
2) listening on RTNETLINK event for ip change: raise a dbus signal(for
the IP change)
if there is IP change then dereg the old service followed by reg
service as the ip has changed.
Regards
Ratan Gupta
[-- Attachment #2: Type: text/html, Size: 4166 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC for enablement of slpd on openbmc
2016-10-19 17:49 RFC for enablement of slpd on openbmc Ratan Gupta
@ 2016-10-19 20:09 ` Rick Altherr
2016-10-19 20:31 ` Patrick Williams
2016-10-19 21:32 ` Patrick Williams
1 sibling, 1 reply; 6+ messages in thread
From: Rick Altherr @ 2016-10-19 20:09 UTC (permalink / raw)
To: Ratan Gupta; +Cc: OpenBMC Maillist
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
Please make sure there is a distro feature for this that can be turned off
to remove SLP entirely from the image.
On Wed, Oct 19, 2016 at 10:49 AM, Ratan Gupta <ratagupt@linux.vnet.ibm.com>
wrote:
> Hi All,
>
>
> *Enabling SLP Server on openBMC*
>
> What is SLP
>
> =======
>
> Service Location Protocol (SLP) is a protocol that provides a framework to
> allow networking applications to discover the existence, location, and
> configuration of networked services in enterprise networks.
>
> openSLP is widely accepted in the industry
>
> What do we need to do?
>
> ==============
>
> 1) Bring SLP(OpenSLP) in image:- Write the bitbake recipe(didn't find the
> readily available bitbake recipe)
>
> 2) Configure the services through Settings daemon.
>
> 3) Write the .service file as it needs to start after network is up(after
> networkd-online.target)
>
> How to configure the services which needs to be registered with slpd
>
> ============================================
>
> Option 1:- settingsd
>
> Note: Gives the flexibility to change the configured services @ runtime.
> Do we require this functionality?
>
> Option 2:conf file for discovery services
>
> Note: During build time we can get the service info(service-name,port)
> from the existing infra(discoveryservice.bbclass)
>
> How to register the services
> ==================
>
> 1) Static Registration:- will not work as we need ip/host-name details
> which we don't have @build time.
>
> 2) Application(new DBUS app) will register the configured services to the
> slpd on startup.
>
> We need to provide the dynamic registration support on BMC as IP of BMC
> can change any time. Registration of services with slpd takes the URL of
> the service which includes ip and port of the service which needs to be
> registered.
>
> Create a DBUS service application
>
> =====================
>
> 1) Once the service starts it registers the configured services with slpd.
>
> 2) listening on RTNETLINK event for ip change: raise a dbus signal(for the
> IP change)
>
> if there is IP change then dereg the old service followed by reg
> service as the ip has changed.
>
> Regards
> Ratan Gupta
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>
>
[-- Attachment #2: Type: text/html, Size: 4694 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC for enablement of slpd on openbmc
2016-10-19 20:09 ` Rick Altherr
@ 2016-10-19 20:31 ` Patrick Williams
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Williams @ 2016-10-19 20:31 UTC (permalink / raw)
To: Rick Altherr; +Cc: Ratan Gupta, OpenBMC Maillist
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On Wed, Oct 19, 2016 at 01:09:11PM -0700, Rick Altherr wrote:
> Please make sure there is a distro feature for this that can be turned off
> to remove SLP entirely from the image.
>
Agreed. We did structure the Avahi support that way and this should be
done the same.
--
Patrick Williams
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC for enablement of slpd on openbmc
2016-10-19 17:49 RFC for enablement of slpd on openbmc Ratan Gupta
2016-10-19 20:09 ` Rick Altherr
@ 2016-10-19 21:32 ` Patrick Williams
2016-10-20 13:55 ` Ratan Gupta
1 sibling, 1 reply; 6+ messages in thread
From: Patrick Williams @ 2016-10-19 21:32 UTC (permalink / raw)
To: Ratan Gupta; +Cc: openbmc
[-- Attachment #1: Type: text/plain, Size: 5298 bytes --]
On Wed, Oct 19, 2016 at 11:19:26PM +0530, Ratan Gupta wrote:
> *Enabling SLP Server on openBMC*
>
> What is SLP
>
> =======
>
> Service Location Protocol (SLP) is a protocol that provides a framework
> to allow networking applications to discover the existence, location,
> and configuration of networked services in enterprise networks.
>
> openSLP is widely accepted in the industry
What are the aspects of SLP that are requirements for the intended
use-case? SLP as a protocol has both direct query and an optional
"directory" implementation that aggregates SLP results. In your
experience is that necessary or used?
What is the anticipated size footprint of using openSLP? The RFC
doesn't seem that significant, so if we do not need the directory aspect
might it be more beneficial to write a small daemon ourself to give SLP
responses rather than trying to mold openSLP to fit our needs?
I'm certainly not advocating avoiding using existing open source. But,
with there not being an update to openSLP since 2013 and all the aspects
we are going to have to work around below, I'm wondering on the benefit.
> What do we need to do?
>
> ==============
>
> 1) Bring SLP(OpenSLP) in image:- Write the bitbake recipe(didn't find
> the readily available bitbake recipe)
>
> 2) Configure the services through Settings daemon.
We do have a .bbclass for "registration" we need to ensure that this is
utilized for SLP as much as possible.
>
> 3) Write the .service file as it needs to start after network is
> up(after networkd-online.target)
This service file is for the openslp daemon, correct?
> How to configure the services which needs to be registered with slpd
>
> ============================================
>
> Option 1:- settingsd
>
> Note: Gives the flexibility to change the configured services @ runtime.
> Do we require this functionality?
>
> Option 2:conf file for discovery services
>
> Note: During build time we can get the service info(service-name,port)
> from the existing infra(discoveryservice.bbclass)
I don't entirely understand how these aren't phases of the same
solution.
The problem space as I see it:
1. An application provides a service to be advertised by SLP.
2. The application is currently started via a .service or a .socket
file.
a. Some services are always running.
b. Some services use socket-activation.
3. We need to register this service with the SLP daemon, somehow.
Do we need to ensure the application is running (or available to run via
socket activation) before we do the registration? If the application is
being restarted should we remove the registration and add it back after
it comes back?
You mentioned dealing with IP address changes. It is pretty annoying
that openSLP doesn't do this for you (a custom daemon could). How are
you handling multiple network interfaces? How to we flag internal vs
external interfaces? Isn't there a mechanism via systemd (or networkd) to
identify when the ip address changes? Ideally, this would be a restart
of a .service.
I could see us building a very small application that performs three
functions:
1. slp-register register <service>
2. slp-register deregister <service>
3. slp-register ip-change
For each registered service "foo.service", we can generate
foo-slp-register.service. The foo-slp-register.service will depend on
foo.service, so it is started immediately after and stopped when the
foo.service is stopped. The 'start' will be to call 'slp-register
register' and the 'stop' will be to call 'slp-register deregister'.
We also can then keep off of something in systemd / networkd to run
'slp-register ip-change' whenever the IP changes. This could either
restart *-slp-register.service or it could extract all of the SLP
registrations and update them with new IP addresses. Putting all of the
*-slp-register.service into a 'target' might make restarting them very
simple.
With this approach we do not need a long running application.
> How to register the services
> ==================
>
> 1) Static Registration:- will not work as we need ip/host-name details
> which we don't have @build time.
It is unfortunate about this. We can solve this with a custom
slp-daemon.
>
> 2) Application(new DBUS app) will register the configured services to
> the slpd on startup.
I am not understanding what the 'dbus app' aspect of this would be.
What would be the dbus interfaces?
> We need to provide the dynamic registration support on BMC as IP of BMC
> can change any time. Registration of services with slpd takes the URL
> of the service which includes ip and port of the service which needs to
> be registered.
>
> Create a DBUS service application
>
> =====================
>
> 1) Once the service starts it registers the configured services with slpd.
>
> 2) listening on RTNETLINK event for ip change: raise a dbus signal(for
> the IP change)
Who is getting this signal?
>
> if there is IP change then dereg the old service followed by reg
> service as the ip has changed.
>
> Regards
> Ratan Gupta
--
Patrick Williams
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC for enablement of slpd on openbmc
2016-10-19 21:32 ` Patrick Williams
@ 2016-10-20 13:55 ` Ratan Gupta
2016-10-21 13:25 ` Patrick Williams
0 siblings, 1 reply; 6+ messages in thread
From: Ratan Gupta @ 2016-10-20 13:55 UTC (permalink / raw)
To: Patrick Williams; +Cc: openbmc
[-- Attachment #1: Type: text/plain, Size: 7074 bytes --]
Hi Patrick,
Thanks for giving the feedback,please find my comments inline.
Regards
Ratan Gupta
On Thursday 20 October 2016 03:02 AM, Patrick Williams wrote:
> On Wed, Oct 19, 2016 at 11:19:26PM +0530, Ratan Gupta wrote:
>> *Enabling SLP Server on openBMC*
>>
>> What is SLP
>>
>> =======
>>
>> Service Location Protocol (SLP) is a protocol that provides a framework
>> to allow networking applications to discover the existence, location,
>> and configuration of networked services in enterprise networks.
>>
>> openSLP is widely accepted in the industry
> What are the aspects of SLP that are requirements for the intended
> use-case? SLP as a protocol has both direct query and an optional
> "directory" implementation that aggregates SLP results. In your
> experience is that necessary or used?
Slp supports three agents
1) UA(slptool)
2) SA(in our case it would be new app which we have to write for
reg of services)
3) DA(where the reg info stores) it could be on network or on the
same machine..but it is required to support the RFC.
>
> What is the anticipated size footprint of using openSLP? The RFC
> doesn't seem that significant, so if we do not need the directory aspect
> might it be more beneficial to write a small daemon ourself to give SLP
> responses rather than trying to mold openSLP to fit our needs?
runtime foot print TOP Command shows
214 1 daemon S *3620* 3% 0% slpd -l /tmp/slpd.log >>>3.5K
file size which will take in flash
slpd:- 100.4K
libslp:-69.7K
>
> I'm certainly not advocating avoiding using existing open source. But,
> with there not being an update to openSLP since 2013 and all the aspects
> we are going to have to work around below, I'm wondering on the benefit.
I think we are not doing any workaround here,It is slp (as per the
RFC)which expects
IP in their reg url as the slp needs ip in the reg url,we are
catering that need via de
>> What do we need to do?
>>
>> ==============
>>
>> 1) Bring SLP(OpenSLP) in image:- Write the bitbake recipe(didn't find
>> the readily available bitbake recipe)
>>
>> 2) Configure the services through Settings daemon.
> We do have a .bbclass for "registration" we need to ensure that this is
> utilized for SLP as much as possible.
> Yes we would be using it
>
> 3) Write the .service file as it needs to start after network is
> up(after networkd-online.target)
> This service file is for the openslp daemon, correct?
Yes
How to configure the services which needs to be registered with slpd
============================================
Option 1:- settingsd
Note: Gives the flexibility to change the configured services @ runtime.
Do we require this functionality?
Option 2:conf file for discovery services
Note: During build time we can get the service info(service-name,port)
from the existing infra(discoveryservice.bbclass)
> I don't entirely understand how these aren't phases of the same
> solution.
>
> The problem space as I see it:
> 1. An application provides a service to be advertised by SLP.
> 2. The application is currently started via a .service or a .socket
> file.
> a. Some services are always running.
> b. Some services use socket-activation.
> 3. We need to register this service with the SLP daemon, somehow.
>
> Do we need to ensure the application is running (or available to run via
> socket activation) before we do the registration? If the application is
> being restarted should we remove the registration and add it back after
> it comes back?
I believe that is not needed as the application(SA) would be dependent
on the conf
and out policy suggest that network services should restart always
so it would be unnecessary
to do reg and unreg
>
> You mentioned dealing with IP address changes. It is pretty annoying
> that openSLP doesn't do this for you (a custom daemon could). How are
> you handling multiple network interfaces? How to we flag internal vs
> external interfaces? Isn't there a mechanism via systemd (or networkd) to
> identify when the ip address changes? Ideally, this would be a restart
> of a .service.
>
> I could see us building a very small application that performs three
> functions:
> 1. slp-register register <service>
> 2. slp-register deregister <service>
> 3. slp-register ip-change
>
> For each registered service "foo.service", we can generate
> foo-slp-register.service. The foo-slp-register.service will depend on
> foo.service, so it is started immediately after and stopped when the
> foo.service is stopped. The 'start' will be to call 'slp-register
> register' and the 'stop' will be to call 'slp-register deregister'.
>
> We also can then keep off of something in systemd / networkd to run
> 'slp-register ip-change' whenever the IP changes. This could either
> restart *-slp-register.service or it could extract all of the SLP
> registrations and update them with new IP addresses. Putting all of the
> *-slp-register.service into a 'target' might make restarting them very
> simple.
>
> With this approach we do not need a long running application.
I agree but do we really need to dereg and reg in the case when the
service is going down as.
Our service policy is restart always whenever the network service
goes down. so service would be down for a moment
Long running application i was asking for the IP change event,I am
not aware if systemd-networkd send some event
whenever the ip change occurs.
>> How to register the services
>> ==================
>>
>> 1) Static Registration:- will not work as we need ip/host-name details
>> which we don't have @build time.
> It is unfortunate about this. We can solve this with a custom
> slp-daemon.
Agree but the custom one would not be implementing the full RFC.
>
>> 2) Application(new DBUS app) will register the configured services to
>> the slpd on startup.
> I am not understanding what the 'dbus app' aspect of this would be.
> What would be the dbus interfaces?
I thought of if some other app(netman.py) wants to do the reg and
unreg. so thought of exposing the
Register Service
unregister Service
Raising the DBUS signal in case of IP change.
>> We need to provide the dynamic registration support on BMC as IP of BMC
>> can change any time. Registration of services with slpd takes the URL
>> of the service which includes ip and port of the service which needs to
>> be registered.
>>
>> Create a DBUS service application
>>
>> =====================
>>
>> 1) Once the service starts it registers the configured services with slpd.
>>
>> 2) listening on RTNETLINK event for ip change: raise a dbus signal(for
>> the IP change)
> Who is getting this signal?
This one was required,if certain application is interested in IP
change event then it can use.
today no application is interested in this event.
>
>> if there is IP change then dereg the old service followed by reg
>> service as the ip has changed.
>>
>> Regards
>> Ratan Gupta
[-- Attachment #2: Type: text/html, Size: 9481 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC for enablement of slpd on openbmc
2016-10-20 13:55 ` Ratan Gupta
@ 2016-10-21 13:25 ` Patrick Williams
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Williams @ 2016-10-21 13:25 UTC (permalink / raw)
To: Ratan Gupta; +Cc: openbmc
[-- Attachment #1: Type: text/plain, Size: 3434 bytes --]
On Thu, Oct 20, 2016 at 07:25:32PM +0530, Ratan Gupta wrote:
> > What is the anticipated size footprint of using openSLP? The RFC
> > doesn't seem that significant, so if we do not need the directory aspect
> > might it be more beneficial to write a small daemon ourself to give SLP
> > responses rather than trying to mold openSLP to fit our needs?
> runtime foot print TOP Command shows
> 214 1 daemon S *3620* 3% 0% slpd -l /tmp/slpd.log >>>3.5K
> file size which will take in flash
> slpd:- 100.4K
> libslp:-69.7K
Not horrible then.
> > I'm certainly not advocating avoiding using existing open source. But,
> > with there not being an update to openSLP since 2013 and all the aspects
> > we are going to have to work around below, I'm wondering on the benefit.
> I think we are not doing any workaround here,It is slp (as per the
> RFC)which expects
> IP in their reg url as the slp needs ip in the reg url,we are
> catering that need via de
What I mean by a "workaround" is that for localhost reasons it would be
much more convenient to have the daemon do this work of automatically
updating the URL when the IP changes. The non-local IP case isn't
especially interesting for the BMC.
> > Do we need to ensure the application is running (or available to run via
> > socket activation) before we do the registration? If the application is
> > being restarted should we remove the registration and add it back after
> > it comes back?
> I believe that is not needed as the application(SA) would be dependent
> on the conf
> and out policy suggest that network services should restart always
> so it would be unnecessary
> to do reg and unreg
We currently do it this way for Avahi so I am fine doing the same for
SLP. Someone ambitious could enhance this aspect in the future.
> > We also can then keep off of something in systemd / networkd to run
> > 'slp-register ip-change' whenever the IP changes. This could either
> > restart *-slp-register.service or it could extract all of the SLP
> > registrations and update them with new IP addresses. Putting all of the
> > *-slp-register.service into a 'target' might make restarting them very
> > simple.
> >
> > With this approach we do not need a long running application.
> I agree but do we really need to dereg and reg in the case when the
> service is going down as.
> Our service policy is restart always whenever the network service
> goes down. so service would be down for a moment
> Long running application i was asking for the IP change event,I am
> not aware if systemd-networkd send some event
> whenever the ip change occurs.
Correct. I don't feel it is needed now.
> >> 2) Application(new DBUS app) will register the configured services to
> >> the slpd on startup.
> > I am not understanding what the 'dbus app' aspect of this would be.
> > What would be the dbus interfaces?
> I thought of if some other app(netman.py) wants to do the reg and
> unreg. so thought of exposing the
> Register Service
> unregister Service
> Raising the DBUS signal in case of IP change.
I don't think we need to dynamically do these, other than the IP change.
We can handle that through a service restart rather than a long running
dbus process for an infrequent operation?
--
Patrick Williams
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-21 13:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-19 17:49 RFC for enablement of slpd on openbmc Ratan Gupta
2016-10-19 20:09 ` Rick Altherr
2016-10-19 20:31 ` Patrick Williams
2016-10-19 21:32 ` Patrick Williams
2016-10-20 13:55 ` Ratan Gupta
2016-10-21 13:25 ` Patrick Williams
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.