<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 03/24/2016 07:10 PM, Stanislav Laznicka wrote:<br>
<blockquote cite="mid:56F42D93.5050505@redhat.com" type="cite">On
03/23/2016 08:13 PM, Martin Basti wrote:
<br>
<blockquote type="cite">[...]
<br>
Can you please update design
<br>
<a class="moz-txt-link-freetext" href="http://www.freeipa.org/page/V4/Manage_replication_topology_4_4">http://www.freeipa.org/page/V4/Manage_replication_topology_4_4</a>
(mainly
<br>
the --suffix option)? Also there are missing clean-ruv and
list-ruv
<br>
commands in design, and fix usage at the bottom.
<br>
<br>
1)
<br>
I don't understand this expression
<br>
+ if dirman_passwd is None or (
<br>
+ not dirman_passwd and args[0] in
cs_enabled_commands):
<br>
<br>
You already tested if subcommand belongs to cs_enabled_commands
few
<br>
lines above, IMO the 'dirman_password is None' expression is
enough.
<br>
</blockquote>
If I understand it well, when empty password is entered, the
program continues and uses Kerberos credentials for some
operations. E.g. for list-ruv, if empty password is entered, the
command would only display RUVs for domain tree but not for the CA
tree no matter if CA is set up or not (in the current state of the
patch, after get_ruv refactoring). This here is one possible way
around this, although the check for non-empty password might
probably just as well be in get_ruv_both_suffixes.
<br>
<blockquote type="cite">2)
<br>
+# tuple of commands that work with ca tree and need Directory
Manager
<br>
password
<br>
+cs_enabled_commands = ("list-ruv", "clean-ruv",
"abort-clean-ruv")
<br>
<br>
this variable is used only toi detect if dirman passwd is
needed, I
<br>
suggest to rename it to commands_req_dirman_passwd, or something
better.
<br>
<br>
3)
<br>
Q: Do we need is_cs_set() function?
<br>
A: Yes!
<br>
<br>
I wanted to give you ultimate NACK, but then I checked how
get_ruv code
<br>
works and I changed my mind.
<br>
<br>
Please write a comment where is_cs_set function is used, why we
need
<br>
extra function instead of catching an exception, possibly you
can open a
<br>
refactoring ticket.
<br>
</blockquote>
After the refactoring changes, is_cs_set should not be needed
anymore, removed it.
<br>
<blockquote type="cite">
<br>
Shame:
<br>
1)
<br>
+ if not test_connection(realm, host, options.nolookup)
or\
<br>
Please use parentheses instead of backslash
<br>
<br>
2)
<br>
+ args[0] in cs_enabled_commands:
<br>
<br>
+ not dirman_passwd and args[0] in
cs_enabled_commands):
<br>
<br>
Indentation is not multiplication of 4
<br>
</blockquote>
Shame on me indeed, fixed it.
<br>
<blockquote type="cite">
<br>
Nitpicks (I don't insist on fixing these):
<br>
1)
<br>
+ if servers.get('ca', None):
<br>
<br>
None is default
<br>
<br>
2)
<br>
+ for (netloc, rid) in servers['ca']:
<br>
parentheses are not needed
<br>
<br>
3)
<br>
+ print("\t%s: %s" % (netloc, rid))
<br>
Would be nice to use .format() instead of %
<br>
<br>
Martin^2
<br>
<br>
<br>
<br>
I changed my mind, ultimate NACK.
<br>
Please fix get_ruv function, is_cs_set will not help. In case
there are no RUVs but CA is installed, sys.exit there prevents
us from removing RUVs (or any else operation) on domain suffix,
and vice versa.
<br>
I propose to move ticket to 4.4 milestone because I would like
to avoid breaking something in 4.3, as this will hit many places
in ipa-replica-manage.
<br>
<br>
Please provide the refactoring of get_ruv as separate patch a
put these patches on top of it.
<br>
<br>
Martin2
<br>
</blockquote>
Did the refactoring. There also seemed to be duplicit code in
abort_clean_ruv for some reason, removed it (I hope it does not
break anything, but it seemed rather useless). Also had to change
the numbers of the patches so that they would apply.
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
Self NACK. As I was updating the design today, I found out I omitted
the information that abort-clean-ruv should now be called with
--force by default. Updated the arguments of the abort call + man
page in the patchset.<br>
<br>
</body>
</html>