On 08/12/10 02:20 PM, [email protected] wrote:
Hi Keith,
Thank you for the questions. Comments below.
Thank you,
Clay
On Thu, 12 Aug 2010, Keith Mitchell wrote:
Hi Clay,
Thanks for your diligence. I have just a few last minute nits. I only
looked at ai_sd.py, as that's the only file I had comments on from
the second round of review.
ai_sd.py:
465-466: This looks to be trying to use wanboot_conf_file twice?
Nah, this is just the Python idiom akin to C's operation:
condition ? exprA : exprB
The equivalent syntax is actually:
exprA if condition else exprB
http://docs.python.org/reference/expressions.html#conditional-expressions
However, a boolean operation similar to the one you have also works
here, since condition and exprA are the same:
exprA or exprB
http://docs.python.org/reference/expressions.html#boolean-operations
The phrasing of:
exprA and exprA or exprB
actually evaluates in the following order:
first, "exprA and exprA" is evaluated:
"The expression x and y first evaluates x, if x is false, its value is
returned; otherwise, y is evaluated and the resulting value is returned"
Thus, that portion simple returns the result of exprA regardless of what
exprA is, which then consolidates the statement to the one recommended
from above:
exprA or exprB
"The expression x or y first evaluates x; if x is true, its value is
returned; otherwise, y is evaluated and the resulting value is returned"
- which seems to be the desired behavior here.
In talking with Drew and Dave about this one of them recommended:
http://diveintopython.org/power_of_introspection/and_or.html
Perhaps that would help?
Indeed, it would - example 4.16 confirms my suspicions that the "and"
portion of the clause on line 465 isn't needed.
The "exprA and exprB or exprC" trick is reasonable (though less readable
than the official construct, and prone to caveats if you read the fine
print on that page) if exprA is different than exprB, but when they're
the same, a simple "or" suffices.
514: Filename in the error doesn't match what actually gets opened.
No, but I don't know what Filename will be; but I do know this should
be what I'm wanting to catch on -- and I'm ensuring for this to catch
that the filename did have wanboot in it.
I see what you're saying now, after staring at it for a few minutes -
pardon my slowness. Perhaps "/file_does_not_exist" should be passed to
the WANBootInfo constructor on line 512, to match what's "actually"
happening.
- Keith
573-585: "keys" no longer accurately reflects what this variable
contains.
Thank you; I'll change that to the more appropriate name values.
673-675: Like lines 465-466, the double use of dhcp_stderr is unclear.
Thank you, again, just Python idiom.
Thanks,
Keith
On 08/12/10 02:50 AM, [email protected] wrote:
Hi all,
If you have provided me feedback on the AI Multi-homed feature
code, could you please ensure your desired changes have been
affected? I would ideally like a go/no-go by COB Friday 8/13 (as I
will be OOTO next week).
Also, for everyone's information, it was requested that I add a
feature to allow a multi-homed server to error out, if one provides
an IP or network in the all_services/network property which is not
on the AI server. Note, this is different than what the design
specification originally called for. Output is included below[1].
Full webrev:
http://cr.opensolaris.org/~clayb/webrev_multihomed/final_full2/
Differential from last webrev:
http://cr.opensolaris.org/~clayb/webrev_multihomed/final_full2_diff_from_ff
Differential from initial webrev:
http://cr.opensolaris.org/~clayb/webrev_multihomed/final_diff2/
Original webrev:
http://cr.opensolaris.org/~clayb/webrev_multihomed/
Design Spec (updated for feature requests):
http://hub.opensolaris.org/bin/view/Project+caiman/Multi-homed+AI+server+support
Thank you,
Clay
[1]: Output if one has a misconfigured all_services/network property:
---------------------------------------------------------------------
r...@jumprope:/usr/lib/installadm# svcs -a|grep install/server
disabled 22:52:23 svc:/system/install/server:default
r...@jumprope:/usr/lib/installadm# svcadm enable
svc:/system/install/server:default
r...@jumprope:/usr/lib/installadm# svcs -a|grep install/server
maintenance 22:52:29 svc:/system/install/server:default
r...@jumprope:/usr/lib/installadm# svcs -x
svc:/system/install/server:default
svc:/system/install/server:default (Installadm Utility)
State: maintenance since Wed Aug 11 22:52:29 2010
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
See: http://sun.com/msg/SMF-8000-KS
See: installadm(1M)
See: /var/svc/log/system-install-server:default.log
Impact: This service is not running.
r...@jumprope:/usr/lib/installadm# tail
/var/svc/log/system-install-server:default.log
[ Aug 11 22:52:21 Executing stop method
("/lib/svc/method/svc-install-server stop"). ]
Stopping the service install_test_ai_sparc._OSInstall._tcp.local
[ Aug 11 22:52:23 Method "stop" exited with status 0. ]
[ Aug 11 22:52:29 Enabled. ]
[ Aug 11 22:52:29 Executing start method
("/lib/svc/method/svc-install-server start"). ]
The SMF all_services/networks property (192.168.1.1/22) does not
match a network interface on this server.
Automated Installations will not work with the current server
network setup.
Please check server network settings and try again.
Unable to enable install_test_ai_sparc
[ Aug 11 22:52:29 Method "start" exited with status 96. ]
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss