Re: [VCL 2.2.1] [Power7] Problem with image reservation

2011-06-08 Thread Josh Thompson
Sunil,

I don't recall seeing any documentation on those parts.  I had to poke around 
looking at parts of xCAT to see how it worked.  It's been a few years since I 
did that; so, I don't remember much about the process.  My recommendation 
would be to start looking at things in the rootimg.gz image.  Looking at it 
now, I see that /opt/xcat/xcatdsklspost gets run when rootimg.gz boots.  It 
looks like it downloads all of the postscripts from the management node and 
then run getpostscript.awk which issues a command to xcatd to get the primary 
postscript for that machine.  I've forgotten how xcatd then builds the primary 
postscript.  I do remember that in the partimageng.pm module, I had it add the 
partimageng postscript.

So, you'll really have to start digging through how the xcat postscript system 
works.

Josh

On Tuesday June 07, 2011, Sunil Venkatesh wrote:
 Josh,
 
 Is there any place I could find some details on
 
 ... /Once the compute node is booted with the stateless
 image, it uses NFS to mount some things from the management node, and then
 runs some xcat postscripts,/ 
 
 I have the stateless images ready with partimage compiled for PPC. For
 the compute node (power 7) to boot using the stateless images, i need to
 configure the yaboot instead of pxeboot (which is specific to x86). I
 wanted to know where in the startup files the execution of partimage and
 NFS mount is configured. Is it configured by the genimage command
 itself? Considering the way in which the nodes are configured in the
 network, it would not be a good idea to let xcat take care of
 configuring the details like DHCPD for netboot. So, I need to make
 changes to the configuration files manually, which is why this query
 came up.
 
 Thanks in advance.
 
 Regards,
 Sunil
 
 On 6/1/11 1:39 PM, Josh Thompson wrote:
  Sunil,
  
  The stateless image I refer to is what is actually booted on the
  compute node containing the image to be captured.  It's called stateless
  because it is loaded completely in RAM and does not maintain any state
  when a reboot occurs.
  
  The partimage binary is part of this stateless image and actually runs on
  the compute node.  It does not run on the management node.  The
  management node does not have block level access to the disk on the
  compute node to be able to capture the image from the disk.
  
  I'll try to describe the process a little better.  The management node
  issues a reboot command to the compute node.  The compute node uses PXE
  to load and boot a kernel (vmlinuz), initial RAM disk (initrd.img), and
  a root filesystem (rootimg.gz) from the management node.  All three of
  these together make up the stateless image.  Once the compute node is
  booted with the stateless image, it uses NFS to mount some things from
  the management node, and then runs some xcat postscripts, one of which
  is the partimageng postscript.  This postscript determines what
  partitions are on the compute node and, depending on how the postscript
  is configured, uses partimage or partimageng to capture an image of the
  compute node disk that is then saved to the management node. When it is
  finished capturing the image, it notifies xcat on the management node
  and then reboots.  xcat reconfigures itself to tell the compute node to
  boot off of disk at next boot.  When the compute node comes up, it uses
  PXE to ask the management node how to boot.  The management node tells
  it to boot off of disk.
  
  I hope that clarifies how the system works.  If any of it is unclear,
  please ask for further clarification.
  
  Josh
  
  On Wednesday June 01, 2011, Sunil Venkatesh wrote:
  Josh,
  
  I had one more clarification.
  
  partimage binaries run in the management node to capture an (stateless)
  image from the compute node right? In that case, is there a need for
  these binaries to go into the rootimg.gz??
  
  My assumption is, partimage runs on the management node (an intel blade
  in our case) to capture a stateless image from a compute node (a power 7
  blade) and stores these images under  /install  of the management
  node. Please correct me if I am wrong here.
  
  Regards,
  Sunil
  
  On 6/1/11 9:58 AM, Josh Thompson wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
  
  On Tuesday May 31, 2011, Sunil Venkatesh wrote:
  Hi,
  
  I used the steps that were mentioned under
  
  https://cwiki.apache.org/confluence/display/VCL/Adding+support+for+par
  ti mag e+and+partimage- ng+to+xCAT+2.x+%28unofficial%29
  
  to enable partimage support for xcat. I wasn't sure if I need to
  change references to x86   x86_64 (as directories) to reflect the
  ppc architecture, as the web page says The architecture for the node
  must always be set to x86 for this... I have with me the vmlinuz
  (kernel image) and initrd for the capture process. The 2 nodeset
  commands
  
  By this, do you mean you have vmlinuz and initrd for your power blades,
  not the ones linked to off of the page you 

Re: VCL xCAT2.x BladeCenter

2011-06-08 Thread Prem Kumar
hi Josh,

no i do not have the 'os' filed set to 'image' in the nodetype table.
also i do not have the 'arch' field set to 'x86', instead i have it set to
'x86_64'.

this probably explains why it is not progressing.

just so i understand this correctly, this has been my approach, can you
confirm if i am following the right trial of path.

- first i got my xcat to work, so that i can install an os on baremetal
using pxe boot with kickstart templates.
- second i got the vcl code setup with unoffical-partimage-setup
information.
- third i followed the instructions at
https://cwiki.apache.org/VCL/create-a-linux-base-image.html to capture the
baremetal install of the 'os' on a blade.

back to the partimage plugin:

i read around line number 142:
unless (-r $installroot/image/$arch/$profile.img or
-r $installroot/image/$arch/$profile.gz or
-r $installroot/image/$arch/$profile-parta1.gz)

does the above imply that if my 'profile' in nodetype table is set to
'vcl_rhel_node_template' then i need to have the following file
under $installroot/image/$arch/

vcl_rhel_node_template.img
vcl_rhel_node_template.gz
vcl_rhel_node_template-parta1.gz

??

regards,
prem



-BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Prem,

 Make sure you have partimageng.pm in /opt/xcat/lib/perl/xCAT_plugin.

 The os field in nodetype needs to be image and the arch field needs
 to
 be x86.

 Can you confirm that is what you have specified in nodetype?

 Josh

 On Tuesday June 07, 2011, Prem Kumar wrote:
  hello,
 
  i am trying to get bare metal installs to work with vcl2.2 and xcat 2.x
  using the info provided at:
 
 https://cwiki.apache.org/VCL/adding-support-for-partimage-and-partimage-ng-
  to-xcat-2x-unofficial.html
 
  my xcat installation works fine: i have successfully installed rhel nodes
  using the following commands
  nodeset nodename install=Template
  rpower nodename boot
 
 
  now when i want to first image and then install using the partimage i am
  having issues as follows:
 
  i am running into following error the moment I type in: nodeset node
  image even after rebooting the management node there has been no change
 in
  this error.
 
 
  baremetal-chassis1-13: Unable to identify plugin for this command, check
  relevant tables: nodetype.os
  Error: Some nodes failed to set up image resources, aborting
 
 
  to my understanding, for some reason partimage plugin is not being fond
 or
  recognized by xcat.
 
  can anybody please help.
 
  regards,
  prem.
 - --
 - ---
 Josh Thompson
 VCL Developer
 North Carolina State University




Re: VCL xCAT2.x BladeCenter

2011-06-08 Thread Prem Kumar
hi Josh, kindly bare with other inline questions before i try out your
suggestions -

  'vcl_rhel_node_template' then i need to have the following file
  under $installroot/image/$arch/
 
  vcl_rhel_node_template.img
  vcl_rhel_node_template.gz
  vcl_rhel_node_template-parta1.gz

 The above code means that you must have at least one of those files present in
 $installroot/image/$arch/.  Those are the disk image files created by
 partimageng (any .img files) or partimage (any .gz files).  The partimage
 stuff documented at the unofficial page always uses x86 as for $arch.  It
 will still handle imaging/restoring x86_64 images.  Since both x86 and x86_64
 were handled the same way, I never bothered making it distinguish between
 them.  So, all images captured with partimage using those instruction will be
 under $installroot/image/x86/

as i understand:
essentially files vcl_rhel_node_template.img 'or'
vcl_rhel_node_template.gz gets created for the first time after i have
successfully captured an image using the partimageng or partimage
respectfully?

and this is done using the command 'nodeset node image'

also do you think having ssh communicate to private management node
over eth1, and compute nodes accessible to end users with ext_ssh
over eth0, an issue with the 'vcl code' at any point?

regards,
prem.


Re: VCL xCAT2.x BladeCenter

2011-06-08 Thread Josh Thompson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday June 08, 2011, Prem Kumar wrote:
 hi Josh, kindly bare with other inline questions before i try out your
 suggestions -
 
   'vcl_rhel_node_template' then i need to have the following file
   under $installroot/image/$arch/
   
   vcl_rhel_node_template.img
   vcl_rhel_node_template.gz
   vcl_rhel_node_template-parta1.gz
  
  The above code means that you must have at least one of those files
  present in $installroot/image/$arch/.  Those are the disk image files
  created by partimageng (any .img files) or partimage (any .gz files).
   The partimage stuff documented at the unofficial page always uses x86
  as for $arch.  It will still handle imaging/restoring x86_64 images.
   Since both x86 and x86_64 were handled the same way, I never bothered
  making it distinguish between them.  So, all images captured with
  partimage using those instruction will be under $installroot/image/x86/
 
 as i understand:
 essentially files vcl_rhel_node_template.img 'or'
 vcl_rhel_node_template.gz gets created for the first time after i have
 successfully captured an image using the partimageng or partimage
 respectfully?

Correct.

 and this is done using the command 'nodeset node image'

Correct.

 also do you think having ssh communicate to private management node
 over eth1, and compute nodes accessible to end users with ext_ssh
 over eth0, an issue with the 'vcl code' at any point?

I don't think it will be a problem.  At one point in the past, eth0 had to be 
used for the private network and eth1 for the public.  However, I believe all 
places that were hard coded to one or the other have been updated to be 
configurable.

Josh
- -- 
- ---
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk3vmIcACgkQV/LQcNdtPQP9MQCfUbNU+p9i5994kzm7PH47x1av
5T8AmgOAfuUgtS6evSG2IBN7pBOSaQsC
=1qDh
-END PGP SIGNATURE-


Re: VCL xCAT2.x BladeCenter

2011-06-08 Thread Prem Kumar
hi Josh,

made some progress with 'os' and 'arch' in nodetype set to 'image' and
'x86', yet i am missing something.

kindly could you confirm where i went wrong from below in reference to
xcat and partimage setup:

- successfully installed a compute node with pxe boot and  'ks'
template located under: /install/custom/install/rh

- copied vmlinuz and initrd.img from
here(https://cwiki.apache.org/VCLDOCS/adding-support-for-partimage-and-partimage-ng-to-xcat-2x-unofficial.html)
to /tftpboot/xcat/image/x86/

- also copied rootimg.gz to /install/image/x86/installer_files/

++since the above images were built with eth0 as the primary nic,
i changed it to eth1 because that being my primary nic.
++ not sure if the rootimg.gz here has to be the cpio image from
the install of the compute node in the first step? and the vmlinuz and
initrd.img from the disk or rhel used to install the compute node.

- then set 'os' and 'arch' in nodetype table  to 'image' and 'x86' respectively

- next typed in the following command:

nodeset node image
++ at this point it complained that it could not find:
/opt/xcat/share/xcat/install/image/createimage.x86.tmpl , i was hoping
my file /opt/xcat/share/xcat/install/image/vcl_rhel_template.tmpl with
this single line(#INCLUDE:../scripts/post.rh#) in it should have done
the job. not sure why it only needs createimage.x86.tmpl ?

after creating the required(createimage.x86.tmpl) file, and the typing
the above command creates appropriate pxe configuration files in
/tftpboot/pxelinux.cfg/ with the url and action to save the image etc,
which seems right.

- now type in the following command to boot the node so as to save the
image upon reboot
 rpower node boot

at this point if everything is right, following should happen
  the stateless image will be used to boot in initial ram disk
 then use the postinstall partimage script to save the image of the current 
 installation of the 'os' onto the location on management node.
+++ here i don't see when does one gets the post install
scripts(partimage) from management node?
 this should finish the capture process

hope this is correct?

regards,
prem.