All entries for Thursday 24 February 2011

February 24, 2011

OpsCenter and ISC DHCP server

We have recently received a new OpsCentre (center?) installation. I must say, I am suitably (sadly, predictably) underwhelmed. It is slow, sluggish and fairly non-intuitive. It often fails on seemingly the most simple task (such as server discovery) for the most unfathomable of reasons. The error messages within the GUI for the tasks it fails are also meaningless.

One of the most recent failures I experienced with OpsCentre was during the import of a pre-cooked jet template and flash archive. I managed to create the profile and plan (although it didn’t seem to like my compressed flar archive and I had to switch to an uncompressed one). I was hoping, given that I know both the flash archive and the template are good that this would be as simple as pointing OpsCenter at the necessary files and it would do the rest. However, when I attempted to apply this new deployment plan and profile to a client I received the following errors:

The DeploymentPlan execution job failed because the DeploymentProvider OSDeployment
 for Step Provision OS failed to generate tasks for the job: 
com.sun.xvm.services.osdeployment.OSDeploymentException: Cannot prepare OS profile: 
com.sun.xvm.services.osdeployment.OSDeploymentException: Failed to retrieve Profile 
Information from database. (32557). Contact My Oracle Support if the problem persists. (10445)

At this point I asked myself why I was wasting time using a non-functional GUI when I could quite easily use the command line and configure the local ISC DHCP server on the OpsCentre controller to be my local DHCP server for a local client and then instruct the client to install from our existing, but ‘subnet-remote’ Jet jumpstart server using a flash archive over NFS.

Before I continue, I should probably concede that OpsCentre does seem to be quite good at patching. It will keep track of baselines, let you select baselines for application to clients, check dependencies and download/install all the dependent patches and install them for you in a hands-off manner. Apparently this is the pre-existing portion of the product that Sun/Oracle obtained when they bought the company…. anyway, enough of that.

The ISC DHCP server

For a while now I’ve heard talk about the ISC (Internet Software Consortium) DHCP server as an alternative to the Sun standard DHCP server without actually taking/finding the time to investigate it. Although I used to loath the Sun DHCP server, I have grown to love, like, ok, I’ve just about become accustomed to it. The fact that this is bundled with OpsCentre presented me with a perfect opportunity to test drive the ISC DHCP server. I will admit, based on first impressions, it is far easier to configure and seems more predictable in behaviour than the Sun DHCP server.

First, (and this will be different for a ISC DHCP server that you down load) I note that the service is managed by the following SMF service:

-bash-3.00$ svcs dhcpd 
STATE          STIME    FMRI
online         13:36:26 svc:/application/scn/dhcpd:default
-bash-3.00$ 

One of the first thing that you need to know is that on start/stop it logs to

/var/svc/log/application-scn-dhcpd:default.log

A successful startup will end with the lines:

Starting dhcpd: nxge0Internet Software Consortium DHCP Server V3.0pl2
Copyright 1995-2003 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Listening on DLPI/nxge0/00:14:4f:f3:43:f2/10.20.30.0/24
Sending on   DLPI/nxge0/00:14:4f:f3:43:f2/10.20.30.0/24
Sending on   Socket/fallback/fallback-net
[ Feb  2 13:36:26 Method "start" exited with status 0 ]

The configuration file for the ISC DHCP server is located in /etc and is named dhcpd.conf

-bash-3.00$ ls -l /etc/dhcpd.conf
-rw-r--r--   1 root     sys         7100 Feb  2 12:51 /etc/dhcpd.conf

One of the first changes I made was to enable syslog logging for the service. This is acheived by adding a line similar to the following to the config file:

log-facility local6;

You’ll then need something like the following added to the /etc/syslog.conf file – don’t forget any whitespace must be tab only.

local6.info;local6.notice;local6.warn;local6.err;local6.debug   /var/log/dhcpd.log

The /var/log/dhcpd.log file will be your friend during any troubleshooting of client boot problems.

Then, rather than edit the file directly any further, I opted for an include file in which I place all the configuration options for the client(s) I wis to DHCP boot. The very last line of my dhcpd.conf, therefore, reads:

include "/export/dhcp/sol10_x86_dhcpd.conf";

The sol10_x86_dhcpd.conf file contains the following to setup the required Sun macros:

group {
  use-host-decl-names on;
  filename "pxegrub.I86PC.Solaris_10-1";
  next-server 10.20.30.40;
  vendor-option-space SUNW;
  option SUNW.JumpStart-server "192.168.10.1:/opt/SUNWjet";
  option SUNW.root-server-hostname "jumpstart-svr";
  option SUNW.root-server-ip-address 192.168.10.1;
  option SUNW.root-path-name "/export/install/media/x86/solaris10u9/boot";
  option SUNW.install-path "/export/install/media/x86/solaris10u9";

host utah {
        hardware ethernet 0:21:28:5f:32:16;
        fixed-address 10.20.30.41;
        option SUNW.sysid-config-file-server = "192.168.10.1:/opt/SUNWjet/Clients/utah";
        }
}

This configuration sets the required dhcp options which enable the client to reach a remote jumpstart install and sysidcfg server across the network. The client will also need instructions in the grub boot menu it receives from the dhcp server; this file is usually found in /tftpboot on the server; I edited this to include the following

-bash-3.00$ more /tftpboot/menu.lst.010021285F3216
default=0
timeout=2
min_mem64 1024
title Solaris_10 Jumpstart
        kernel$ /I86PC.Solaris_10-1/multiboot kernel/$ISADIR/unix  - install dhcp -B \ 
console=ttya install_config=192.168.10.1:/opt/SUNWjet,sysid_config=192.168.10.1: \
/opt/SUNWjet/Clients/utah,install_media=192.168.10.1:/export/install/media \
/x86/solaris10u9,install_boot=192.168.10.1:/export/install/media/x86/solaris10u9/boot
        module$ /I86PC.Solaris_10-1/$ISADIR/x86.miniroot

The jet / jumpstart server will of course need to be configured appropriately for the client. The /etc/SUNWjet/etc/dhcp.conf should set the following option to NOOP because the jet / jumpstart server itself is not going to be used as the DHCP server;

# DHCP_FORMAT   Which dhcp server type is supported. SUN is currently supported,
#               however, ISC is still in development. If REMOTE_DHCP is set,
#               you must set DHCP_FORMAT to SUN.  Valid entries are "SUN" 
#               and "NOOP". NOOP can be used if you are manually setting
#               up your own DHCP server with the required parameters.
#
DHCP_FORMAT="NOOP"

Once all this is straight, you should be able to jumpstart install your client. A useful command for troubleshooting the dhcp conversation between the client and the dhcp server is snoop. You should see DHCPDISCOVER broadcast from the client and DHCPOFFER sent back. The client should then return an accept pdu so that the server knows the client is accepting the IP address and the lease with a DHCPREQUEST, finally a DHCPACK will be sent from the server to the client. To see this in detail (including a display of the DHCP options sent by the server, use the following;

bash-3.00# snoop -vvv -d nxge0 port bootpc or port bootps
Using device nxge0 (promiscuous mode)

This output will be useful, but quite verbose – a shorter summary will be seen in the dhcpd.log file configured in syslog;

Feb  2 15:58:43 client1 dhcpd: [ID 702911 local6.info] DHCPDISCOVER from 0:2:8:5:3:16 via nxge0
Feb  2 15:58:43 turkana dhcpd: [ID 702911 local6.info] DHCPOFFER on 10.20.30.41 to 0:2:8:5:3:16 via nxge0
Feb  2 15:58:46 client1 dhcpd: [ID 702911 local6.info] DHCPREQUEST for 10.20.30.41 (10.20.30.40) from 0:2:8:5:3:16 via nxge0
Feb  2 15:58:46 client1 dhcpd: [ID 702911 local6.info] DHCPACK on 10.20.30.41 to 0:2:8:5:3:16 via nxge0

Paul.


February 2011

Mo Tu We Th Fr Sa Su
Jan |  Today  | Mar
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28                  

Search this blog

Tags

Galleries

Most recent comments

  • Started sorting out new vers for sparc: http://blogs.warwick.ac.uk/mariamaccallum/entry/apache_249_i… by Maria MacCallum on this entry
  • Solaris 11.1 is slightly different, I only had to do this before starting ipfilter: svccfg –s setpro… by Maria MacCallum on this entry
  • Really useful information, thanks a lot! I do a NAT using IPFILTER and all was working good, until I… by Nilton on this entry
  • Paul, Thanks for your information. It got me started quickly. I have discovered , thought I've not s… by Tom C on this entry
  • Are you familiar with the Monty Python sketch? by Ian Eiloart on this entry

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXIX