On 09/04/2009 20:50, Renee Danson wrote:
> On Wed, Apr 08, 2009 at 09:43:43AM +0100, Darren Kenny wrote:
>> I've been trying to use my OpenSolaris machine with the local IPS server
>> (there
>> by default, just not enabled, but "svcs enable pkg/server" fixes that...)
>>
>> My machine is a laptop (surprise) that has the hostname and nodename
>> starbug-r600.
>>
>> With NWAM Phase 1, when I connect to the network, and the Automatic location
>> is
>> enabled, the /etc/hosts file is replaced with a simple file.
>>
>> This has the "net" effect (pardon the pun) of making it impossible to resolve
>> the hostname - I used to have the hostname as an alias for localhost[1] - but
>> when the new hosts file is moved in (and the old to Legacy) - this alias
>> isn't
>> there.
>>
>> So when pkg/server gets started (and probably anything else like apache too)
>> then it enters maintenance mode since it can't resolve the hostname and in
>> turn
>> bind. Now, it's probably an issue in itself that pkg/server doesn't simply
>> fall
>> back to localhost, but that's another issue, IMO.
>>
>> Shouldn't try to ensure that whatever the network setup, we can resolve the
>> hostname to something?
>
> This is definitely a dicey area that need more attention than
> it's been given so far. The high-level questions are, what
> needs to be done for phase 1, and what can be done later?
>
> The behavior you're seeing now is not acceptable for phase 1.
> A couple ways to deal with it in the short-term would be:
>
> * Add the nodename as an alias for localhost in the Automatic
> /etc/hosts file. This might be exactly what the user wants
> (as in your case); but I'm concerned that it could cause more
> problems than it solves.
True, and I still think that pkg/server itself really has an issue in not
falling back to localhost.
I've logged a bug to see what the IPS people think of this:
http://defect.opensolaris.org/bz/show_bug.cgi?id=8145
>
> * Don't include an /etc/hosts file in the Automatic location.
> This is the conservative approach; shouldn't break anything,
> but also doesn't make any attempt to solve the problem of
> various services wanting to be able to resolve the nodename.
I think that this would certainly be a suitable solution, allowing the user to
do what they want.
As it stands, it's actually not clear to me how the replacing of /etc/hosts to
one configured in a location is of much benefit to the user - but maybe I'm
wrong - for example since I'm mobile a lot of the time, I like to have a hosts
file entry for my frequent machines on SWAN to be sure I can always get an IP
for them - regardless of my domain (e.g. at home, when punched in my domain is
always uk.sun.com, but in the office, it's ireland.sun.com).
If I want to do this with everything being Automatic, then it means that I need
to edit the Automatic location's hosts file - which seems counter intuitive -
actually what would make sense here is using something like cpp to allow for
#includes of a /etc/hosts.local file or similar - but that's another story.
>
> I'm inclined toward the latter; this just feels like the time
> to be conservative. But if someone has suggestions on other
> ways to address this problem in the near-term, I'd love to
> hear them! Discussion on how to address it in the long term
> would be good, too.
I think that would work in most cases - since AFAIR opensolaris _does_ create an
alias for the nodename to localhost in it's /etc/hosts file at install time.
Darren.