You are on page 1of 13

Logo

OpenSAF Startup Procedures


Vishal Soni Senior Software Engineer Emerson Network Power Embedded Computing. OpenSAF MDS, VDS and Build Environment Maintainer. vishal.soni@emerson.com 16/OCT/2008
1

Logo

OpenSAF Installation Directories

/etc/opt/opensaf OpenSAF configuration files. (LSB compliance) /opt/opensaf/controller Main OpenSAF installation directory scripts Start/Stop scripts bin - Binaries lib/lib64 Libraries /var/opt/opensaf For Log files nidlog Logging done by NID Stdouts Logging done by services started by scap (only stdout) log Log generated by DTSv service for individual services. mdslog MDS logging

Logo

OpenSAF Configuration Files


/etc/opt/opensaf/slot_id /etc/opt/opensaf/chassis_id /etc/opt/opensaf/rde.conf
export CONTROLLER1=10.130.97.114 export CONTROLLER2=10.130.97.115 export RDE_PORT_NUMBER=5003

/etc/opt/opensaf/NCSSystemBOM.xml /var/opt/opensaf/pssv_spcn_list
AVM XML AVD XML

Logo

OpenSAF Configuration Files (Contd.)

/etc/opt/opensaf/nodeinit.conf
Format of entries: App-File:AppName:AppType:[CLeanup File]:Time-Out:[Priority]:[n-rspawn]:[n-reset]:[App params]:[Cleanup Parms] Eg. /opt/opensaf/controller/scripts/nid_tipc.sh:TIPC:S:/opt/opensaf/controller/scripts/nid_tipc.s h:4000::2:1:start eth0 1234:stop

/etc/opt/opensaf/reboot
(soft-link, point it to a script which intimates user with an echo)

Logo

OpenSAF Startup Flow


How to start OpenSAF node? What is NID? How does NID starts services? Sequence of Service startup
TIPC (Installing TIPC + node_id construction) RDE (Negotiating Role) DRBD (optional) SNMP (optional) DTS (Log service) MAS PSS (Reformating PSS store) EDS SNMP-SUBAGT SCAP (Parsing + AMF)
5

Logo

TIPC and NCS node ids


TIPC NODE ID format <z,c,n> <8bit,12bit,12bit> <1,1,ncs-node-id> Eg of ncs node-id 0x0002010F 2 chassis_id (fixed at present in MDS) 1 slot_id F sub_slot_id (not used at present) Corresponding TIPC id will be 0x0100101F <1,1,1F> in <z,c,n> notation
6

Logo

What went wrong ???


Did TIPC Fail to start properly? Check syslog and /var/opt/opensaf/nidlog/NID_TIPC.log Did any other process other than SCAP failed to start? Check /var/opt/opensaf/nidlog/NID_<service name>.log Did SCAP failed to start? Check /var/opt/opensaf/nidlog/NID_SCAP.log Do you see some of component started by SCAP failed to start? Check Stdout Logs for that services /var/opt/opensaf/stdouts * Both controllers coming up as Active? Check your RDE configuration, TIPC net-id and TIPC link establishment in syslog. Seeing TIPC link up/down in syslog? Probably you are running your cluster on corporate LAN.
7

Logo

How to Integrate a New Service in OpenSAF framework Type of service


Services spawned by NID (pre AMF or pre SCAP) and dont interact with AMF. Eg. TIPC. Add startup script. Either same script with start/stop as argument or different scripts. Start script should write status to NID pipe. Modify nodeinit.conf. modify include/nid_api.h & include/nid_err.h to include new service as well as new error code for your service.
8

Logo

How to Integrate a New Service in OpenSAF framework


Services spawned by SCAP and interact with AMF. Eg. Any SAF service like CPSv, MQSv etc. Modify NCSSystemBOM.xml file to add description of your service. Add Startup and Cleanup script in controller/payload, depending on where your service will be started. Your service should register with AMF and honour its callbacks like
saAmfHealthcheckCallback saAmfCSISetCallback saAmfCSIRemoveCallback saAmfComponentTerminateCallback

To know more, you can take reference of any OpenSAF service.


9

Logo

How to Integrate a New Service in OpenSAF framework


Hybrid. Service spawned by NID and at later point of time when AMF is available registers with it. Eg. RDE, DTSv
Add NID startup scripts. Either same script with start/stop as argument or different scripts. Start script should write status to NID pipe. Modify nodeinit.conf. modify include/nid_api.h & include/nid_err.h to include new service as well as new error code for your service. Modify NCSSystemBOM.xml file to add description of your service. Add one more set of startup and cleanup script, which will be called by SCAP. Your service should do AMF registration only after SCAP comes up, so you need a mechanism in your service to wait for SCAP to come up. Generally in Signal and Pipe is used used to do so. In your code you should wait on a Signal/Pipe for doing AMF registration. Your Startup script should write on that pipe/send signal, after checking that process is already running.
10

Logo

OpenSAF Demo on UML cluster

Live Demo

11

Logo

Questions ?

For User queries, please post it to users@list.opensaf.org.

Logo

Thank You!

vishal.soni@emerson.com

You might also like