Hello,
I would like to know if there is a command someone can run in a non
global zone to determine the globale zone and the name of the command of
course?
Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
9/18/2007 9:28:54 AM |
|
Hi,
Thomas Glanzmann wrote:
> Hello,
> I would like to know if there is a command someone can run in a non
> global zone to determine the globale zone and the name of the command of
> course?
What do you want to do?
The global zone has always the name "global".
The command zonename(1) tells you the name of the zone you are on.
HTH
Ewald
|
|
0
|
|
|
|
Reply
|
Ewald
|
9/18/2007 1:56:40 PM
|
|
Hello Ewald,
I have 6 v490 running the veritas cluster suite and veritas filesystems.
We have a lot of zones on this machines running. But one zone is only
running on one machine at a time. What I want is to tell as user of one
_non global_ zone on which of our 6 v490 the zone is running.
Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
9/18/2007 1:59:51 PM
|
|
Thomas Glanzmann <sithglan@stud.uni-erlangen.de> wrote:
> What I want is to tell as user of one
> _non global_ zone on which of our 6 v490 the zone is running.
How about creating a file which contains the output of "hostname" run
on the global zone and then make that file available to every non-global
zone? Like /master, and then the user could simply do a cat /master?
Alexander Skwar
|
|
0
|
|
|
|
Reply
|
Alexander
|
9/18/2007 2:04:37 PM
|
|
Hello,
> How about creating a file which contains the output of "hostname" run
> on the global zone and then make that file available to every
> non-global zone? Like /master, and then the user could simply do a cat
> /master?
I know how to work around it. What I want is a way to tell from the non
global zone to tell on what host I am running on.
Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
9/18/2007 2:09:50 PM
|
|
Hello,
but the idea isn't that stupid but there must be a better documented
way. Hopefully.
Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
9/18/2007 2:10:32 PM
|
|
Thomas Glanzmann <sithglan@stud.uni-erlangen.de> wrote:
> Hello,
>
>> How about creating a file which contains the output of "hostname" run
>> on the global zone and then make that file available to every
>> non-global zone? Like /master, and then the user could simply do a cat
>> /master?
>
> I know how to work around it. What I want is a way to tell from the non
> global zone to tell on what host I am running on.
Yes. That file "/master" should be accessible by the non-global
zones, of course.
Alexander Skwar
|
|
0
|
|
|
|
Reply
|
Alexander
|
9/18/2007 2:15:18 PM
|
|
Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:
>
>but the idea isn't that stupid but there must be a better documented
>way. Hopefully.
>
It appears that Sun has not provided a way for processes in a
non-global zone to learn the hostname of the global zone. Not
even a command that the root user would invoke from a shell
command line.
There was a previous discussion of this in this newsgroup,
and one Sun person responded "We never thought it would be
necessary for a non-global zone to know the global zone's
hostname." This is true, in theory.
However, in practice it's a very important piece of information
that should be available to the non-global zone. How does a
sysadmin find out which global zone (i.e. physical server)
controls the cpu and memory resources for a particular zone,
in a network with a dozen servers and a hundred zones? Or more?
Or how does a new sysadmin pick up the pieces at a site whose
old sysadmin unexpectedly quit without documenting the server
configurations? Everyone else at the site can tell the sysadmin
the hostname/ip of the mail server, the file server, and the DNS
server(s), but when those are non-global zones, how can the
sysadmin find out the hostname/ip of the global zones that
control them?
Sun apparently thinks the sysadmin should keep good records
of global zones on paper or a database external to the servers.
This is not a bad idea, but there needs to be a way to learn
this information from the non-global zones themselves.
Now that zones can be easily migrated from one server to another,
we have the new possibility that the sysadmin's external records
are incorrect. Zone migration from one server to another can be
automated as part of a home-built high availability scheme, and
the zone is no longer on the original server. Or even that zones
were migrated from a failed server to a working server late at
night to fix an outage, and the external records weren't updated.
Until Sun sees these things and provides a way for a non-global
zone to learn the hostname of its controlling global zone, we
sysadmins will have to create workarounds.
The most often suggested workaround is to create a file in a
filesystem that the global zone shares with all non-global
zones, and put the global zone's hostname or IP address in
that file.
Of course, this won't work for non-global zones that don't
share any filesystems with the global zone. That's why the
zone itself should be able to tell us, Sun.
-Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.
|
|
0
|
|
|
|
Reply
|
gerg
|
9/18/2007 4:43:18 PM
|
|
quoting Thomas Glanzmann (18 Sep 2007 14:10:32 GMT):
> but the idea isn't that stupid but there must be a better documented
> way. Hopefully.
Alexander's idea provides the information you want. So, why should there
be a 'better' way? The info won't change ;-)
A.f.a.i.k. you can't run a command from within a non-global zone that
provides data from the global zone. That would be a security risk.
--
Dick Hoogendijk -- PGP/GnuPG key: 01D2433D
++ http://nagual.nl/ | Solaris 10 / XDE ++
|
|
0
|
|
|
|
Reply
|
Dick
|
9/18/2007 4:51:13 PM
|
|
· Greg Andrews <gerg@panix.com>:
> However, in practice it's a very important piece of information
> that should be available to the non-global zone. How does a
> sysadmin find out which global zone (i.e. physical server)
> controls the cpu and memory resources for a particular zone,
> in a network with a dozen servers and a hundred zones? Or more?
Why should he? In theory, that piece of information is of
no matter at all to the sysadmin of a non-global zone. It's
just none of his business. He's there to admin the non-global
zone. Name of the global zone is nothing he should worry
about.
Now, how does a sysadmin of a global zone find out? "Simple":
He's having a look in the documentation. That's where the
relationship "non-global zone" -> "global zone" is to be
found, IMO.
> This is not a bad idea, but there needs to be a way to learn
> this information from the non-global zones themselves.
Why? What for?
> Of course, this won't work for non-global zones that don't
> share any filesystems with the global zone. That's why the
> zone itself should be able to tell us, Sun.
I disagree.
Anyway - wouldn't it work to figure out the MAC adress of the
NIC and then do a ARP lookup to get the IP and then do a nslookup
to get the name for the IP? Or do "virtual" interfaces have
distinct MAC adresses?
Alexander Skwar
--
QOTD:
How can I miss you if you won't go away?
|
|
0
|
|
|
|
Reply
|
Alexander
|
9/18/2007 5:58:42 PM
|
|
Besides all the other valid points raised on this, what do you
mean by the hostname of a system? This really isn't well defined
in the first place.
Also, there's no reason for a local and global zone to be using
the same naming schemes, so the name by which each knows itself
(however you defined hostname above) does not necessarily have
the same (or any) meaning to the other one, and might actually
be completely misleading.
--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
|
|
0
|
|
|
|
Reply
|
andrew
|
9/18/2007 7:08:18 PM
|
|
Greg Andrews wrote:
> Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:
>
>>but the idea isn't that stupid but there must be a better documented
>>way. Hopefully.
>>
>
>
> It appears that Sun has not provided a way for processes in a
> non-global zone to learn the hostname of the global zone. Not
> even a command that the root user would invoke from a shell
> command line.
>
> There was a previous discussion of this in this newsgroup,
> and one Sun person responded "We never thought it would be
> necessary for a non-global zone to know the global zone's
> hostname." This is true, in theory.
>
> However, in practice it's a very important piece of information
> that should be available to the non-global zone. How does a
> sysadmin find out which global zone (i.e. physical server)
> controls the cpu and memory resources for a particular zone,
> in a network with a dozen servers and a hundred zones? Or more?
>
> Or how does a new sysadmin pick up the pieces at a site whose
> old sysadmin unexpectedly quit without documenting the server
> configurations? Everyone else at the site can tell the sysadmin
> the hostname/ip of the mail server, the file server, and the DNS
> server(s), but when those are non-global zones, how can the
> sysadmin find out the hostname/ip of the global zones that
> control them?
>
> Sun apparently thinks the sysadmin should keep good records
> of global zones on paper or a database external to the servers.
> This is not a bad idea, but there needs to be a way to learn
> this information from the non-global zones themselves.
>
It's not just Sun that thinks so. A good Sysadmin documents his
systems! A Sysadmin who does not document is not good! It's that
simple. Shit happens! Someone else, who is far less knowledgeable, may
have to take over for as much as a couple of months while the Sysadmin
recovers from a heart attack. Or maybe her husband found her in bed
with someone else and shot them both! Shit happens!
System documentation should include:
a. The hardware configuration including model and serial numbers.
b. The software configuration; listing the name and version of each
product installed on that system.
c. The network configuration.
d. The storage configuration.
e. Shutdown and startup procedures. In some shops the order in which
systems are powered up and booted may be significant. Likewise the
order in which things are shut down may be significant. Document it!
f. The contact information for hardware and software support.
g. The names and contact information for the stakeholders; e.g. the
managers who depend on that system for some essential service. This
should indicate which managers rely on which applications.
h. The backup strategy; e.g. when and how do you back up, how do you
restore those backups if necessary, etc. It's not a bad idea to include
a detailed description of how backups and restores are done, including
the exact text of the commands to do a backup or a restore. Man pages
may not be available if the system is down!
i. A record of the software licenses including license keys if any.
There may well be other things that should be included but I think that
the above is the minimum. A good manager will insist that his Sysadmin
write and maintain such documentation. Unfortunately, GOOD managers are
usually in very short supply so just do it anyway. Once it's done, it
must be maintained. Review it from time to time and make the necessary
changes.
|
|
0
|
|
|
|
Reply
|
Richard
|
9/18/2007 7:40:41 PM
|
|
[Andrew Gabriel]:
>
> Besides all the other valid points raised on this, what do you
> mean by the hostname of a system? This really isn't well defined
> in the first place.
s/hostname/nodename/, then
> Also, there's no reason for a local and global zone to be using
> the same naming schemes, so the name by which each knows itself
> (however you defined hostname above) does not necessarily have the
> same (or any) meaning to the other one, and might actually be
> completely misleading.
sure, but that's your problem to sort out if you don't use FQDN.
--
Kjetil T.
|
|
0
|
|
|
|
Reply
|
Kjetil
|
9/18/2007 10:45:49 PM
|
|
[Alexander Skwar]:
>
> � Greg Andrews <gerg@panix.com>:
> > This is not a bad idea, but there needs to be a way to learn
> > this information from the non-global zones themselves.
>
> Why? What for?
I set up ident in a non-global zone. the problem is that the zone has
no access to the TCP state tables needed to look up the user owning
the connection, so instead my patched identd contacts the global zone
and asks for the information. this is hard to do without knowing at
least one the global zone's IPs.
> > Of course, this won't work for non-global zones that don't
> > share any filesystems with the global zone. That's why the
> > zone itself should be able to tell us, Sun.
>
> I disagree.
I however agree 100% with Greg Andrews.
> Anyway - wouldn't it work to figure out the MAC adress of the NIC
> and then do a ARP lookup to get the IP and then do a nslookup to
> get the name for the IP? Or do "virtual" interfaces have distinct
> MAC adresses?
that's certainly not going to work for my ident daemon, but in any
case it's very error prone. for once -- the global zone might use
bge0 while the zone uses bge1 (in such a setup the admin will almost
certainly have to turn on unique MAC addresses per interface).
furthermore, you will only find a match if both the zone and the
global zone are in the ARP cache. in other words, you will have to
ping all potential candidates before checking the ARP cache, and hope
the entry hasn't expired in the interim.
(I "solved" it by storing an extra CNAME for each zone, pointing at
its master. others probably object to publishing this information to
the world :-)
--
Kjetil T.
|
|
0
|
|
|
|
Reply
|
Kjetil
|
9/18/2007 11:00:01 PM
|
|
On 18 Sep., 11:28, Thomas Glanzmann <sithg...@stud.uni-erlangen.de>
wrote:
> Hello,
> I would like to know if there is a command someone can run in a non
> global zone to determine the globale zone and the name of the command of
> course?
>
> Thomas
Hi
No command, but look at /etc/net/tic*/hosts files
We found there the global Zone Host
cu
|
|
0
|
|
|
|
Reply
|
cypherpunks
|
9/19/2007 4:30:19 AM
|
|
|
14 Replies
278 Views
(page loaded in 0.139 seconds)
Similiar Articles: Is there a way to determine the host machine from within the local ...Hello, I would like to know if there is a command someone can run in a non global zone to determine the globale zone and the name of the command of co... Using TCPIP Services local MX records for mail routing internal vs ...So is there any way to do ... server for that zone is that local dns server on the microsoft machine. ... Is there a way to determine the host machine from within the local ... ... How to detect if solaris is running as a guest machine - comp.unix ...... command is present in the global zone (physical machine). Hence there ... Is there a way to determine the host machine from within the local ... How to detect if solaris is ... Finding global zone name from a non-global - comp.unix.solaris ...Is there a way to determine the host machine from within the local ... Hello, I would like to know if there is a command someone can run in a non global zone to determine ... ping hostname failed while ping IP_Address working Options - comp ...Is there a way to determine the host machine from within the local ... ping hostname failed while ping IP_Address ... zone boot failed - comp.unix.solaris ping hostname ... How to find out Global Zone's ip from Local Zone?? - comp.unix ...Is there a way to determine the host machine from within the local ... How to find out Global Zone's ip from Local Zone ... from within the local ... utc to local time conversion with dst considered? - comp.soft-sys ...Mountain Time Zone) from the utc time stamp based on ... Is there a way to determine the host machine from within the local ... How to detect if daylight savings time are ... How does the hosts file work? - comp.os.ms-windows.networking ...Is there a way to determine the host machine from within the local ... I know how to work around it. ... is a way to tell from the non > global zone to tell on what host I ... zone shutdown - comp.unix.solarisThere's also a ceiling of 500 seconds in the ... and the removal of its services ... to determine the host machine from within the local ..... run on the global zone ... w32tm DC error - comp.protocols.time.ntpThat 0x1 after the host name looks strange; I see ... The local computer may not have the necessary ... But is there a way to find out if you are in an university network ... ntpd, boot time, and hot plugging - comp.protocols.time.ntp ...... and possible hot-plugged local time sources. There was ... things run freely, or you could find some way ... is located on the same machine as your ntpd server, there could be ... problem with synchronizing two comps to each other - comp ...... the right way. This means setting up one machine as the "master", which syncs only to the system local ... to keep this machine within ... maybe more, if there is no way ... NTP over redundant peer links, undetected loops - comp.protocols ...Is there a way to tell xntpd to identify the IPs GW1_4, GW1 ... is that I don't need to consider where a client machine ... you're going to use a single refid for the NTP host ... merge field part missing - comp.databases.filemakerOn the local host they function ... relative' path and is there fore looking at where the files would be on the local machine if it ... and ... and I can't find a way ... NTP - best practice if there is a local stratum 2 server - comp ...Is there any way to make use of a local server if ... the other >local machine ... is less than Host's stratum - comp.protocols.time ... NTP - best practice if there is a local ... Is there a way to determine the host machine from within the local ...Hello, I would like to know if there is a command someone can run in a non global zone to determine the globale zone and the name of the command of course? Thomas Is there a way to determine the host machine from within the local ...Hello, I would like to know if there is a command someone can run in a non global zone to determine the globale zone and the name of the command of co... 7/27/2012 10:55:30 AM
|