Drop the implementation of CHECK_SRVIDS control

Amitay Isaacs amitay at gmail.com
Fri Aug 25 04:00:17 UTC 2017


On Fri, Aug 25, 2017 at 1:22 PM, Volker Lendecke <Volker.Lendecke at sernet.de>
wrote:

> On Fri, Aug 25, 2017 at 12:53:30PM +1000, Amitay Isaacs via
> samba-technical wrote:
> > Just another thought.  CTDB also has SERVER_ID related controls.
> > That might be well suited to identify each process registered with CTDB.
> > And treat SRVID as pure messaging construct.
>
> Right. But they are implemented as control_not_implemented(), so I
> thought they would go soon as well.
>

Oops. I did not actually look at the implementation.  I already dropped
the implementation since it was not being used.  I have been trying
to minimize the protocol as we get closer to splitting the daemons.

We can always add the implementation back if required.


> For the pure process existence check I'd be happy to do what the local
> check does: Look whether the process exists and the unique ID matches.
> This can be done fine if every process registers both PID and unique
> ID with the messaging-related CTDB_CONTROL_REGISTER_SRVID call. And
> then have another control that checks both to exist on a single
> socket. I know that's overloading the messaging IDs, but they are
> kindof overloaded for local messaging too.
>

Well ideally that's what server_id is.  It's rather unfortunate that we are
now using srvid for not just for messaging but also for identifying
a process.

In the srvid implementation there is no check to see if there are
unique registrations since multiple processes can register for
same srvid if they are interested in the "message" corresponding
to that srvid.  That's why I don't like the idea of using srvid
for identifying unique processes.

But to support your requirement we need a control that checks
if a PID has registered for SRVID?  Is that correct?

CONTROL_CHECK_PID_SRVID

input - { pid_t pid; uint64_t srvid }
output - { int result } 0 if match found, -1 if not

That way you don't need 2 separate controls -- one for process_exists
and one to check if srvid exists.

Amitay.


More information about the samba-technical mailing list