Discussion:
[p4] When a Mac gets a hostname renamed, the user thinks the workspace is "gone" and Perforce is broken.
Peter Hecht
2008-10-13 23:32:17 UTC
Permalink
Hello,

I work with Mac people. They are OK, really! But some how every once and awhile a Mac OS X 10.4/5 gets a different host name. When that happens, I have to clear out the host field in the P4 client. Once that is done, everything is OK. I don't think it is P4V.app that is causing it, it seems like a DHCP issue. Yet, it never happens on Windows machines. The users think it is Perforce's fault. I don't but my position doesn't matter when it stops them from working.

I guess I will have to write a script to reset the host on Mac clients.

Any one have any ideas?

Sincerely,
Peter Hecht
Michael Mirman
2008-10-14 00:14:12 UTC
Permalink
Our users routinely use different hosts accessing the same clients.
Because of that, we prefer not to have the Hosts field in the client spec at all. If you do this, I can't think why it would be a problem if a Mac changed its name.
IOW, instead of changing the Hosts field to the current host name, just remove it.

My 0.02

--
Michael Mirman Tel: (508) 647-7555
The MathWorks, Inc. FAX: (508) 647-7061
-----Original Message-----
Sent: Monday, October 13, 2008 7:32 PM
To: Perforce Users
Subject: [p4] When a Mac gets a hostname renamed, the user thinks the
workspace is "gone" and Perforce is broken.
Hello,
I work with Mac people. They are OK, really! But some how every once and
awhile a Mac OS X 10.4/5 gets a different host name. When that happens, I
have to clear out the host field in the P4 client. Once that is done,
everything is OK. I don't think it is P4V.app that is causing it, it seems
like a DHCP issue. Yet, it never happens on Windows machines. The users
think it is Perforce's fault. I don't but my position doesn't matter when
it stops them from working.
I guess I will have to write a script to reset the host on Mac clients.
Any one have any ideas?
Sincerely,
Peter Hecht
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Gabor Maghera
2008-10-14 00:50:03 UTC
Permalink
We have run into the same issue on our Mac based clients. Besides blanking
out the host name in the client spec as someone has already sugested, you
can also edit /etc/hostconfig, by adding a line
HOSTNAME=<yourhostnamegoeshere>.

A word of caution. Not sure about all the details, but /etc/hostconfig is
being deprecated, you'll see a line at the top of that file saying "This
file is going away". I am on the latest version of OS X and I can assure
you it does still work.

The documentation I've read so far points the user towards giving the
computer a name via the GUI in System Preferences->Sharing as the new way
instead of using /etc/hostconfig. In my experience that did not work, DHCP
would override that setting (but it didn't override /etc/hostconfig).

And I agree with you, changing the computer name on the fly without the
user's knowledge seems silly.

Cheers,
Gabor

On Mon, Oct 13, 2008 at 5:14 PM, Michael Mirman <
Post by Michael Mirman
Our users routinely use different hosts accessing the same clients.
Because of that, we prefer not to have the Hosts field in the client spec
at all. If you do this, I can't think why it would be a problem if a Mac
changed its name.
IOW, instead of changing the Hosts field to the current host name, just remove it.
My 0.02
--
Michael Mirman Tel: (508) 647-7555
The MathWorks, Inc. FAX: (508) 647-7061
-----Original Message-----
Sent: Monday, October 13, 2008 7:32 PM
To: Perforce Users
Subject: [p4] When a Mac gets a hostname renamed, the user thinks the
workspace is "gone" and Perforce is broken.
Hello,
I work with Mac people. They are OK, really! But some how every once
and
awhile a Mac OS X 10.4/5 gets a different host name. When that happens,
I
have to clear out the host field in the P4 client. Once that is done,
everything is OK. I don't think it is P4V.app that is causing it, it
seems
like a DHCP issue. Yet, it never happens on Windows machines. The users
think it is Perforce's fault. I don't but my position doesn't matter
when
it stops them from working.
I guess I will have to write a script to reset the host on Mac clients.
Any one have any ideas?
Sincerely,
Peter Hecht
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Gabor Maghera
2008-10-14 01:03:22 UTC
Permalink
After some searching I've come across this command which is supposed to keep
sudo hostname my-permanent-name; sudo scutil –set LocalHostName
$(hostname); sudo scutil –set HostName $(hostname)
(Borrowed from: http://ma.tt/2004/07/os-x-hostname/)

I have not tried this yet, use it at your own risk.
We have run into the same issue on our Mac based clients. Besides blanking
out the host name in the client spec as someone has already sugested, you
can also edit /etc/hostconfig, by adding a line
HOSTNAME=<yourhostnamegoeshere>.
A word of caution. Not sure about all the details, but /etc/hostconfig is
being deprecated, you'll see a line at the top of that file saying "This
file is going away". I am on the latest version of OS X and I can assure
you it does still work.
The documentation I've read so far points the user towards giving the
computer a name via the GUI in System Preferences->Sharing as the new way
instead of using /etc/hostconfig. In my experience that did not work, DHCP
would override that setting (but it didn't override /etc/hostconfig).
And I agree with you, changing the computer name on the fly without the
user's knowledge seems silly.
Cheers,
Gabor
On Mon, Oct 13, 2008 at 5:14 PM, Michael Mirman <
Post by Michael Mirman
Our users routinely use different hosts accessing the same clients.
Because of that, we prefer not to have the Hosts field in the client spec
at all. If you do this, I can't think why it would be a problem if a Mac
changed its name.
IOW, instead of changing the Hosts field to the current host name, just remove it.
My 0.02
--
Michael Mirman Tel: (508) 647-7555
The MathWorks, Inc. FAX: (508) 647-7061
-----Original Message-----
Sent: Monday, October 13, 2008 7:32 PM
To: Perforce Users
Subject: [p4] When a Mac gets a hostname renamed, the user thinks the
workspace is "gone" and Perforce is broken.
Hello,
I work with Mac people. They are OK, really! But some how every once
and
awhile a Mac OS X 10.4/5 gets a different host name. When that happens,
I
have to clear out the host field in the P4 client. Once that is done,
everything is OK. I don't think it is P4V.app that is causing it, it
seems
like a DHCP issue. Yet, it never happens on Windows machines. The
users
think it is Perforce's fault. I don't but my position doesn't matter
when
it stops them from working.
I guess I will have to write a script to reset the host on Mac clients.
Any one have any ideas?
Sincerely,
Peter Hecht
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
http://maillist.perforce.com/ma
Zoltan Grose
2008-10-14 00:16:12 UTC
Permalink
I've never had my host name spontaneously change itself.
Post by Peter Hecht
I guess I will have to write a script to reset the host on Mac
clients.
System Preferences... Sharing... Computer Name

Unless you really, really want to write a script. =)

-z
Post by Peter Hecht
Hello,
I work with Mac people. They are OK, really! But some how every
once and awhile a Mac OS X 10.4/5 gets a different host name. When
that happens, I have to clear out the host field in the P4 client.
Once that is done, everything is OK. I don't think it is P4V.app
that is causing it, it seems like a DHCP issue. Yet, it never
happens on Windows machines. The users think it is Perforce's
fault. I don't but my position doesn't matter when it stops them
from working.
I guess I will have to write a script to reset the host on Mac
clients.
Any one have any ideas?
Sincerely,
Peter Hecht
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Loading...