| On 2011-10-19 19:51:23, Patrick Stahl wrote:
| Did we find a firm solution to doing this?  Can we look "up" yet?  I've seen 
good suggestions on how to work around if you're in on the "build" phase, but 
we have an implementation group that builds our frames out.  Another group 
working on the virtuals, ldoms and non-global zones.  We've gotten so "big" and 
"efficient" (not) with our thousands upon millions of server instances that no 
one seems to remember to tell us little SAs on the front line all those pesky 
details details.  CMDB is used for the business side and little things like 
what physical frame/host/cd/sd is the ldom I'm logged into on are trivial and 
left out?  When it's time for a change that requires access to the parent or 
host control domain or service domain, it takes an act of God to find someone 
that can put their finger on the right physical host.  Can't count the number 
of times we've found out the hard way when a site engineer (hands/feet) trips 
over the wrong cable in China.  Watching the keno-patter
|  of red boxes light up amongst all the green on monitor I usually turn to my 
coworker and tell him to "pay up" - told you that's where that ldom was!
| I'm fed up and want to write a scan that will run with root priviledge to 
look "up" from inside our logical domains and non-global zones to find the 
parents name / IP / host system / something tangible (or even obscure - I'll do 
a resolve after against something).  I need to know the hook to look for. 

Haven't used LDOMs, but with ngz it's trivial. You can just write or mount
files from the global zone to the ngz:

  # zonecfg -z foo
  zonecfg:foo> info fs
        dir: /etc/globalzone
        special: /etc/nodename
        raw not specified
        type: lofs
        options: [ro,nodevices]

Which, in the ngz, mounts the global's /etc/nodename as /etc/globalzone. I use
this in my bash profile so I know which zone is on which host without doing a
lookup in our groups database:

  [root@pride]:[~]# zlogin foo
  [Connected to zone 'foo' pts/11]
  Last login: Thu Oct 20 04:05:12 from logs Oracle Corporation  SunOS 5.10  
Generic Patch January 2005

  if [ -e /etc/globalzone ] ; then
    GLOBAL="[`cat /etc/globalzone`]"
  PS1="$GLOBAL:[\u@\h]:[\w]\$PR "

You can do the same for whatever piece of gz data you want. But you have to add
these yourself; there's no magical way in an ngz to do it.

cyberpunk is dead. long live cyberpunk.
zones-discuss mailing list

Reply via email to