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:

when testing I noticed an incompleteness in the topologysegment-mod
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 ?


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.,:

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. 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'],

The attribute was made read-only so it can't be modified using
segment-mod but segment-show would show its status.

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