13
1 Logo Vishal Soni Senior Software Engineer Emerson Network Power – Embedded Computing. OpenSAF MDS, VDS and Build Environment Maintainer. [email protected] 16/OCT/2008 OpenSAF Startup Procedures OpenSAF Startup Procedures

Opensaf Startup Procedures

Embed Size (px)

DESCRIPTION

opensaf start up procedure

Citation preview

Page 1: Opensaf Startup Procedures

1

Logo

Vishal Soni

Senior Software Engineer

Emerson Network Power – Embedded Computing.

OpenSAF MDS, VDS and Build Environment Maintainer.

[email protected]

16/OCT/2008

OpenSAF Startup ProceduresOpenSAF Startup Procedures

Page 2: Opensaf Startup Procedures

2

Logo

OpenSAF Installation DirectoriesOpenSAF 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

Page 3: Opensaf Startup Procedures

3

Logo

OpenSAF Configuration FilesOpenSAF Configuration Files

• /etc/opt/opensaf/slot_id• /etc/opt/opensaf/chassis_id• /etc/opt/opensaf/rde.conf

export CONTROLLER1=10.130.97.114export CONTROLLER2=10.130.97.115export RDE_PORT_NUMBER=5003

• /etc/opt/opensaf/NCSSystemBOM.xml• /var/opt/opensaf/pssv_spcn_list

AVM XMLAVD XML

Page 4: Opensaf Startup Procedures

4

Logo

OpenSAF Configuration Files (Contd.)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.sh:4000::2:1:start eth0 1234:stop

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

Page 5: Opensaf Startup Procedures

5

Logo

OpenSAF Startup FlowOpenSAF 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)

Page 6: Opensaf Startup Procedures

6

Logo

TIPC and NCS node idsTIPC 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

Page 7: Opensaf Startup Procedures

7

Logo

What went wrong ???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.

Page 8: Opensaf Startup Procedures

8

Logo

How to Integrate a New Service in How to Integrate a New Service in OpenSAF frameworkOpenSAF framework

Type of service

• Services spawned by NID (pre AMF or pre SCAP) and don’t 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.

Page 9: Opensaf Startup Procedures

9

Logo

How to Integrate a New Service in How to Integrate a New Service in OpenSAF frameworkOpenSAF 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.

Page 10: Opensaf Startup Procedures

10

Logo

How to Integrate a New Service in How to Integrate a New Service in OpenSAF frameworkOpenSAF 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.

Page 11: Opensaf Startup Procedures

11

Logo

OpenSAF Demo on UML clusterOpenSAF Demo on UML cluster

Live Demo

Page 12: Opensaf Startup Procedures

Logo

Questions ?

For User queries, please post it toFor User queries, please post it [email protected]@list.opensaf.org..

Page 13: Opensaf Startup Procedures

Logo

Thank You! Thank You!

[email protected]