On 05/18/2015 06:05 PM, Ludwig Krispenz wrote:
I started this discussion with Petr, but he thinks it should be better discussed here.
-------- Original Message --------
Subject:        Re: ipa topology command
Date:   Mon, 18 May 2015 17:48:10 +0200
From:   Petr Vobornik <pvobo...@redhat.com>
To:     Ludwig Krispenz <lkris...@redhat.com>

On 05/18/2015 04:25 PM, Ludwig Krispenz wrote:
> Hi,
> when testing I noticed an incompleteness in the topologysegment-mod
> function.
> A segment can be onedirectional or bidirectional, and with
> topologysegment-mod one should be able to modify params of the
> corresponding replication agreement(s). In the design I had  a concept of
> attributename[;left | ;right ] to apply the change to one or both
> directions. In the plugin this is implemented, but in the ipa comand it
> isn't. I thought it wouldn't matter since in ipa we want to have
> replication agreements identical.
> But there is one important exception: init ( nsds5beginreplicarefresh ),
> which should always be onedirectional.
> Do you have an idea how to simply chnage this ?
> Thanks,
> Ludwig

This should be probably discussed on the devel list, feel free to resend
it there.

I'm not sure if I understand the issue correctly. But will try.

Subtypes are not widely used in ipalib yet so there might be some
dragons. I general an attribute with known subtypes should be handled as
multiple distinct attributes(params in ipalib), e.g.,:
ok, for this special attribute it would make sense since initializatiion (refresh should be only in one direction), same is probably true for 'enable'.
for other manage attrs,
attributename: value should apply to both directions (in a bidirectional segment)
attributename;left: value
attributename;right: value

should override the settings for one direction, at the moment I don't see a valid use case, but since a bidirectional segment handles two replication agreements, I did at least provide the possibility. But except nsds5beginreplicarefresh I don't think we need to provide this in the first versioj of the ipa command.

The main question is for which attributes we should support specifying
both direction.

Wrt init:
I actually didn't know what the attribute was for but after reading [1]
I think that this attribute shouldn't be handled as a free-form string
attribute because it starts an operation and then displays its status
until it finishes.
it just updates the attribute of the segment, the modification is replicated to all other servers and the master whom it concerns will start an online init, no automatic monitoring provided. If you want this, we need to extend what status information is mainained in the shared tree.
If the plugin updates the attribute with the
initialization state then IMHO these are the step we should take
(details could be different):
1. create both attributes:

         label='Left node initialization',      
         doc='Status of initialization of left node',
         flags=['no_create', 'no_update', 'no_search'],

         label='Right node initialization',
         doc='Status of initialization of right node',
         flags=['no_create', 'no_update', 'no_search'],
yes that would do it, maybe init-fromleft or init-from-right would be clearer

The attribute was made read-only so it can't be modified using
segment-mod but segment-show would show its status.
what do you mean by was made read-only ?

2. Create:  ipa topologysegment-init SEGMENT 'left'|'right'

It would set 'start' to:
nsds5beginreplicarefresh;left or nsds5beginreplicarefresh;right

This would start the initialization process of the chosen node.

3. Create: ipa topologysegment-stop-init SEGMENT 'left'|'right'

It would set 'stop' to:
nsds5beginreplicarefresh;left or nsds5beginreplicarefresh;right

This would stop the initialization process of the chosen node.

An alternative could be `ipa topologysegment-init SEGMENT 'left'|'right'

4. Examine other nsds5* attributes if they require similar change or a
change in accepted values (eg, int for nsds5replicatimeout, on|off for
nsds5replicaenabled, ...)

Btw, what about nsDS5ReplicaLastInitStart|Status|End attrs, is there a
plan to support them by the plugin and management UI?

For the alpha, we could go just with bare params and mod command enabled
and then add the separate commands later.

Petr Vobornik

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to