48ca86c193c8cb0bc3931a95fcffa699.ppt
- Количество слайдов: 139
November 15 -18, 2010 ~ Santa Clara Marriott, Santa Clara, CA Open Pegasus CIM Server Our 10 th Year ~ Karl Schopmeyer Project Coordinator, Pegasus Open Source Project k. schopmeyer@opengroup. org V 1. 0 10 Nov 2010 11/18/2010 MDC 2010 Open. Pegasus 1
Agenda • Part 1 – 1. What is Open. Pegasus? – 2. What’s New? – 3. Pegasus Features Overview – 4. Technical Subjects – 5. How to use and work with Pegasus – 6. Issues – 7. Discussion and Feedback 11/18/2010 • Part 2 –Advanced Topics – The Pull Operations – Registering Pegasus Providers – CIM_Error – Debugging in the Pegasus Environment MDC 2010 Open. Pegasus If you have subjects for the advanced topics we can try to get them on the list. 2
Part 1. 1 Quick Pegasus Overview • Goals • The Project • Architectural Overview V 1. 1, 18 Nov – Add CIM_Error discussion 11/18/2010 MDC 2010 Open. Pegasus 3
Open. Pegasus Objectives Open Source Standards Based MIT License DMTF CIM/WBEM specifications Portable Linux, Unix, Windows, etc. today Efficient And Lightweight 11/18/2010 Open. Pegasus Production Quality MDC 2010 Open. Pegasus Continuity Modular And Extensible 4
Overview Of Our Objectives Pr od uc e rc u So nse n e p e Lic O IT M ti o n Q ua lit y Open. Pegasus Co *n ix, P V M wi o rt S , ndo ab l Z w e O s, s, M e A tc C. Built On DMTF And SNIA Specifications 11/18/2010 MDC 2010 Open. Pegasus mm un con ity P t ro r o j e ls, sch ct wi edu t h c les ont i , et nui ty, c. 5
Open. Pegasus Architecture • Pegasus Components • CIM Client and Listener infrastructure • CIMServer Client CIM Clients Listeners C++ client APIs MOF compiler • Server Repository CIM-XML client interface • CIM Provider Interfaces • CIM Providers • MOF Compiler Open Pegasus CIM Server C++ • Build and Test Environment • Public Interfaces • Pegasus C++ Client Interface Class & Instance Repository C++ / C (CMPI)/ Java (JMPI), Provider APIs today Client CIM Client Providers • CMPI & C++ Provider Interface • SNIA Java Client Interface 11/18/2010 MDC 2010 Open. Pegasus 6
Additional Components • SNIA Java Client and browser – Pegasus-Java. CIMClient module in Open. Pegasus cvs repository • WS-Management Server Frontend – pegasus-unsupported module in Open. Pegasus cvs repository • WS-Management client components – pegasus-unsupported cvs module in Open. Pegasus cvs repository • WMI mapper – pegasus cvs module (pegasus/src/WMIMapper) • configure – Build configure script in pegasusunsupported module 11/18/2010 MDC 2010 Open. Pegasus Unsupported but sometimes obsolete tools, components, etc. 7
Pegasus Project • Community Project Open Group – Multiple supporters – Multiple developers – Multiple users Pegasus mgt Committee (PMC) • Open source-code, open project • Documented processes – Support tools (bugzilla, websites, etc. ) – Defined releases, commit procedures, etc. 11/18/2010 Pegasus Arch. Team Bugzilla MDC 2010 Open. Pegasus CVS Repository PEPs 8
Part 1. 2 What’s New This Year 11/18/2010 MDC 2010 Open. Pegasus 9
What’s New in 2010 • Open. Pegasus 2. 10. 0 Release – February 2009 • Open. Pegasus version updates TBD – 2. 9. 2 (September 2010) • Open. Pegasus 2. 11 nearing completion – Function Complete December 2010 – Release, February 2011 11/18/2010 MDC 2010 Open. Pegasus 10
Open. Pegasus Release History 2004 Q 2 Q 3 Q 4 Q 1 Q 2 Q 3 2007 2006 2005 Q 4 Q 1 Q 2 Q 3 Q 4 Q 1 Q 2 2009 2008 Q 3 Q 4 Q 1 Q 2 Q 3 Q 1 Open. Pegasus 2. 5. 1 PEP 239 Open. Pegasus 2. 3. 2 Process Indications Significant Defect Fixes Security Enhancements Configuration Enhancements Experimental Linux RPMs (SDK, Runtime) CMPI Providers Globalization Support C++ Listener Pluggable Provider Manager SLP Discovery Association Providers 11/18/2010 Open. Pegasus 2. 5 Open. Pegasus 2. 4 Linux RPMs Pluggable Provider Managers CIM 2. 8 Schema Association Providers CMPI Providers Out-of-Process Providers Globalization Support Certificate-based Authentication HTTP Chunking (Client Side) SLP Discovery CIM Server Statistic Monitoring Binary Repository +++Performance Improvement Open. Pegasus 2. 6 PEP 218 CIM_Error Support Embedded Instance Support JMPI Java Providers SMIs Server Profile Experimental Out-of-Process Providers Globalization Support Certificate-based Authentication HTTP Chunking (Client Side) CIM Server Statistic Monitoring SLP Discovery Binary Repository Remote CMPI Providers Java Providers and Clients Experimental Initial CQL Support HTTP Chunking (Server Side) Binary Repository Remote CMPI Providers Java Providers Initial Lifecycle Indication Support Embedded Object Support Embedded Instance Support Open. Pegasus 2. 7 Extend CIM Error Support Privilege Separation Remote CMPI providers Audit Tools, IPV 6 MDC 2010 Open. Pegasus 2. 8 • Server Embedding • Profiles • WS_Management (partial) • … Open. Pegasus 2. 9 • Server Embedding • Profiles • WS_Management (cont) • Performance Open. Pegasus 2. 10 • WS_Management (cont) • Performance • (Jan 2010) 11
Major Functionality By Version • Version 2. 4 (PEP 97) – – – – • Version 2. 5 (PEP 180) Linux RPMs Pluggable Provider Managers CIM 2. 8 Schema Association Providers CMPI Providers Out-of-Process Providers Globalization Support Certificate-based Authentication HTTP Chunking (Client Side) CIM Server Statistic Monitoring SLP Discovery Binary Repository Remote CMPI Providers Java Providers and Clients – HTTP Chunking and Internal Response Segmentation – Remote CMPI Providers – Shared Namespaces – Java Providers (JMPI) – Initial Lifecycle Indication Support – CQL – Stage 1 – Dynamic CIM Listener – Compressed Repository – Static Memory Size Reduction • Version 2. 5. 1 – Performance enhancement for Operations (approx 10 – 1) • Version 2. 5. 2 – Size reduction and static build options 11/18/2010 MDC 2010 Open. Pegasus 12
Major Functionality By Version • Version 2. 6 (PEP 218) – – – • Version 2. 7 (PEP 296) Initial CIM_Error support Integrate SMIs server profile Embedded instance support Server footprint reduction (~40%) Repository archive utility CMPI provider interface current to V 2 specification Add server audit log Add indications to remote CMPI SSL trust store utilities SLP enhancements Indication Subscription management utility – Support for IBM i 5/PASE platform – Create privilege separation executor – Support for IPV 6 – Enable Remote CMPI for Windows – Enhanced log file support – Refactoring Queuing and OS primitives for performance (~ +30%) – Refactoring Class objects – Audit Logging (special log for operations that modify information) • Version 2. 7 Feature status changes – See the feature page • Version 2. 6. 1 – IPV 6 Support, experimental normally disabled 11/18/2010 MDC 2010 Open. Pegasus 13
Pegasus 2. 8 New functionality • Version 2. 8 – Embedded Server Extensions (Memory Resident Repository) – Initial WS-Management integrated support (Infrastructure, get, put) – DMTF Indication Profile partial support – DMTF Profile Registration Profile – Pluggable Provider Manager support – Support Indication statistics – Internal Server support (improved tracing, etc. ) – Python provider manager (available from Novell) – Incremental performance improvements – Build and configuration options 11/18/2010 MDC 2010 Open. Pegasus 14
Pegasus 2. 9 New Functionality • Planned Function Changes for 2. 9 (January 2009) – SQLite based alternate class and instance repository – Expand WS-Management integrated support • ws-enumerate) – Server performance enhancements (out-of-process providers) – Solaris port enhanced – Binary internal and Client protocol • What will not make it into 2. 9 – – – 11/18/2010 A Wish List is not a Pull Operations commitment. Complete Embedded Server extensikons Commitments only Integrate Simplified Policy Language (SPL) come when someone agrees to do the Improved configuration utility work, not just need the result. JSR 48 Java provider manager MDC 2010 Open. Pegasus 15
2. 10 Functionality • Speed Improvements – Single-Object Memory model for at least some SMO functionality • Expanded Indication support – Indication Profile – Algorithms to improve delivery reliability • Support for multiple Pegasus in a single system • Expanded WS-Man support 11/18/2010 MDC 2010 Open. Pegasus 16
2. 11 Planned Functionality • Pull Operations (DSP 0200 V 1. 3) • WS_Man – extend to include Association filters (DSP 0227, Sect 8. 2) • TBD 11/18/2010 MDC 2010 Open. Pegasus 17
Part 1. 3 Pegasus Features Overview 11/18/2010 MDC 2010 Open. Pegasus 18
Open Pegasus Features • CIMServer – – – – 11/18/2010 Core Infrastructure CIM Operations Indication Processing Query Languages Server Configuration Provider Management Indication Subscription Management Local Domain Sockets Chunked Transfer Localization Object Normalizer Out. Of. Process Providers Statistics • Repository – – – Core MOF Compiler Encodings Shared Schema Upgrade Utility Archive • Provider Interfaces – – – MDC 2010 Open. Pegasus C++ CMPI JMPI Remote CMPI Python User Context 19
Features (cont) • Providers • Security – Interop Provider – Mgd. Server Providers – Profile Providers • DMTF Provider registration profile • DMTF Indication Profile • SNIA Server Profile • Client Interfaces • Indication Handlers – – 11/18/2010 CIM-XML SNMP Sys. Log Email – – – – SSL Local Authentication PAM Authentication Mgt Cert based Auth SSL Cert Management Privilege Separation Audit Logging • SLP – Internal – Open. SLP • WMI Mapper MDC 2010 Open. Pegasus 20
Pegasus Functionality - Server • CIMServer – – – – • CIM Export Ops • Indication Consumer Client • CIM Operations Listener • Connectivity Support • XML Support • Connectivity • XML • HTTP Core Infrastructure CIM Operations Indication Processing Query Languages Server Configuration • State Control • Threading Provider Management Server • Messaging Indication Subscription Core SNMP • Sys Interfaces Management Indication Handler Local Domain Sockets Chunked Transfer • CIM Objects cimxml CIM • Containers Localization Indication Handler Object • Utility Objects Object Normalizer Implementation Out-Of-Process syslog C++ Providers Indication Handler Statistics • HTTP email • XML Decode CIM Indication Handler Operations • XML Encode Processing • Op Dispatcher Indication Handlers • Aggregator • Configuration General • Start/Stop Support • Logging • *QL parser • Classes • Instances Repositories • Associations • Indication Subscription CIM Indication Service Processing • Indication Handler Service Pluggable Provider Manager Service Subscription Processing Interop Schema Provider Configuration Provider User Provider Registration Provider Control Providers JMPI C++ Provider Manger Provider Manager 11/18/2010 MDC 2010 Open. Pegasus Loadable Provider 21
Client Interface (cim-xml today) Acceptor Authentication Operation Routing • Dispatched based on provider registration & operation type. • Get, create, modify, delete – single provider • Enum, assoc – all providers for object and all subclasses • Repository treated as provider (optional) • Only one provider allowed per class Response Routing • Single object responses & errors routed directly to source • Multiple object & provider responses aggregated & segmented. • Aggregation for multiple providers • Segmented to limit memory use and provide response chunking • Error analysis in aggregation 11/18/2010 xxx Http Delegator Http xxx XML Decoder Encoder CIM XML Comm Module CIM Operations Processing subsystem Authorization Operations Request Dispatcher Repository Response generator Operations Response Aggregator Issued as separate threads C++ Provider CMPI Provider Manager Provider Mgr Subsystem MDC 2010 Open. Pegasus provider Formal Provider Interface 22
Pegasus Indication Support • Lifecycle and process indications CIM Listener • Only indications supported by providers CIM/XML Indication Export Messages • Support both CQL and Pegasus CIMServer WQL queries – Dynamic parsing and evaluation • Multiple indication handlers • Persistent indication subscriptions • Indication Consumer Provider Type • Accept External Indications 11/18/2010 CIM-XML Indication Handler SNMP Indication Handler Service Externally Indications CIM Client Subscriptions Indication Server Service Indication Output Service Indication Subscription Service Class & Instance Repository (subscription Instance & Provider Registration store) … Indication Handler Indication Consumer Provider MDC 2010 Open. Pegasus Provider Generated Indications Subscriptions Info & Enable / disable indication Indication Provider 23
Indication Handlers • Indication Handlers represent Indication delivery protocols • Service extensions to core server • Separate services for each handler type • Support today for: – CIM-XML handler – SNMP trap handler – Syslog handler – Email handler 11/18/2010 MDC 2010 Open. Pegasus CIM-XML Indication Handler SNMP Indication Handler Service … Indication Handler 24
Query Language Support • WQL – Complete support (remember no spec) • Dynamic parser & evaluator – Minor extensions for SNIA specials – Primary objective is Indication Subscription • CQL – Support for most required functions – Defined and implemented from early preliminary spec. Indication Subscription Output Service – Indication Subscription Support 11/18/2010 MDC 2010 Open. Pegasus 25
Open. Pegasus Repository • Characteristics – Class and Instance repositories – Supports all CIM operations Class & Instance Repository • except query and life cycle indications – Default. Disk File based repository • Xml, binary, compressed encodings – Off-line and on-line MOF compilers • Cimmof – online communicates to server • Cimmofl – offline communicates directly with repository – Optional Memory Resident Repository • MOF classes compiled into a c++ file which is compiled – Alternate persistent store implementations (2. 9) • SQLite – Internal cache for performance 11/18/2010 MDC 2010 Open. Pegasus 26
Pegasus Public Interfaces • CIM Client Public Interfaces – – • Open Pegasus CIM Server Provider APIs Listener setup Indication reception Indication consumers CIMObjects* Class & Instance Repository Client CIM Providers Implement Provider Types (Instance, Method, Association, Query) Mimic Client Operation APIs Extend with Context container for security, etc. CIM Objects* Multiple language bindings through multiple provider managers C, C++. Java, etc. CIM C++ Objects – Manipulate CIM Objects – Class, instance, property, method, Value, etc. • MOF compiler Cim. Xml client interface CIM Provider Interfaces – – – • CIM Clients CIM Listener Interfaces – – • Implement CIM Operations Implement Server Connection CIM Objects* SLP Discovery Client • Public Interfaces • Frozen • Versioned • Backwards Binary Compatibility • Available through SDK (rpms) Selected CLI Functions (ex. Compiler, admin tools) – CLI cmd line interfaces maintain compatibility between versions 11/18/2010 MDC 2010 Open. Pegasus 27
Pegasus Provider Interface Characteristics • Pegasus Provider Types – Instance (get, enumerate, create, delete, modify instances) – Method (invoke. Method) – Association (References, referencenames, associatiors, associatornames) – Indication • • Pegasus CIM Server Enable, disable, create, modify, delete subscriptions Indications generated through the same interface as operation responses – Instance. Query (Exec. Query) – Indication. Consumer (Sink for indications) Provider Control – Initialize() terminate() functions – Providers are dynamically loaded AND unloaded Provider Access to Other Providers – CIMOMHandle – – Allows all CIM operations back to Cimom binary interface Access point provided with initialize • Client requests To server (CIMOMHandle) Provider Security Deliver response objects To server Provider. Operation. Context – Part of every operation request to provider • Provider Manager • – User information, etc. out of process providers • – Run as (server permissions, user permissions, etc. ) Provider can also be Clients • – Use client library Pegasus operation response interface is incremental • • • – Deliver partial responses (individual objects, subset of total responses, etc. ) – Important to control memory usage. – Generated indications delivered through this interface Implement Out-Of-Process providers CMPI provider manager implements Remote Providers dynamically registered 11/18/2010 CIM Operation Requests & Indication enable/disalbe MDC 2010 Open. Pegasus Provider External Client Requests (CIMClient) 28
Internal Providers • Internal Providers (Control Providers) – Linked to CIM server – Internal registration • Registration defined in an internal table – Control Provider functions today • __Namespace, CIM_Namespace, interop, usr/auth mgt, statistics, DMTF Indications Profile and profile registration profile 11/18/2010 MDC 2010 Open. Pegasus 29
Out-of-process Providers • Execute Providers in separate processes • Objectives – – Prevent providers from damaging CIMOM Binary compatible for Providers Run providers within different security contexts Run existing providers off all types Provider Manager • Configuration based – Configuration moves providers Client requests To server (CIMOMHandle) • Authorization defined by user-context • Number of process determined by modules and user-context definition • User contexts are permissions oriented – Requestor, Designated, Privileged, CIMServer • NOTE: Significant performance improvement in 2. 9 (~ 300%) 11/18/2010 MDC 2010 Open. Pegasus Deliver response objects To server CIM Operation Requests & Indication enable/disalb cimprovagt Provider External Client Requests (CIMClient) 30
Pegasus Provider Management • Provider Installation – Put provider into Pegasus provider directory – Register provider • Provider Registration – Create instances of provider registration classes (providermodule, provider capabilities – Registration can be static or dynamic • Dynamic provider state control – Enable / disable (cimprovider utility) 11/18/2010 MDC 2010 Open. Pegasus 31
Security • Security – SSL – Local Authentication – PAM Authentication – Authentication Management – Cert based Authentication – SSL Certificate Management – Privilege Separation – Audit Logging 11/18/2010 MDC 2010 Open. Pegasus 32
SLP • Pegasus Provides capability for: – SLP Service Agent • Manages DMTF compatible SLP advertisement – UA and UA interface • Generating and processing client side SLP queries • Pegasus allows alternate SLP SA implementations – Internal Pegasus SLP libraries ( SA and UA) • Started and controlled by Open. Pegasus server – Open. SLP – Supplier specific SLP libraries 11/18/2010 MDC 2010 Open. Pegasus 33
Pegasus CIMClient support • Multi-Thread C++ Client Infrastructure CIM Client – CIM-XML based today – Provides all DMTF defined operations – Local Domain socket connection option (localconnect) (Pegasus specific) – Supports basic authentication, SSL with client side certificates. – Released public C++ Client Interface API – Limited to CIM/XML today • Experimental ws-man client (see pegasus_unsupported) • Java Client 11/18/2010 MDC 2010 Open. Pegasus 34
Indication Listeners • Static Listener CIM Listener – Statically defined Indication consumers Indication Consumer Export Client • Dynamic Listener – Dynamically add indication consumers 11/18/2010 MDC 2010 Open. Pegasus CIM/XML Indication Export Messages 35
Pegasus Admin Utilities • Admin tools are separate command-line utilities – – • Included in production release Security controlled to limit access to adminstrator Communicate with server using localconnect Provide off-line view options where possible Major Utilities today – cimconfig • Modify static and dynamic server configuration parameters cimmofl – cimprovider • Determine and set state of providers (enable, disable, remove) – cimuser • Set user information (only selected environments) – cimtrust • Manage certificates Admin Utilities cimmof – cimauth • Manage user authorizations (effectively obsolete) – cimmof • On-line MOF compiler. Uses client interface – cimmofl • Off-line MOF compiler. USE WITH CAUTION 11/18/2010 MDC 2010 Open. Pegasus CIMServer Class & Instance Repository 36
Providers Today • Pegasus includes a number of Providers with the source distribution – Control providers • Server functions for Admin and certain Profiles – Sample Providers • demonstrate coding – Test Providers • Test Pegasus functionality – Limited Server Management Providers • Unique to certain OS 11/18/2010 MDC 2010 Open. Pegasus 37
Profile Support • Trying to support several generic profiles for DMTF and SNIA – Indication Profile – WBEM Server profile 11/18/2010 MDC 2010 Open. Pegasus 38
Part 1. 4 Technical Subjects • Embedded System Support – Pegasus 2. 9 and 2. 10 • WS-management support 11/18/2010 MDC 2010 Open. Pegasus 39
Pegasus and Embedded Systems • Embedded System Significant Characteristics – Resources (cpu, memory, disk) • Open. Pegasus Issues • Limited resources • Hard limits rather than soft limits • Static - big • Dynamic – No limits – Administration Issues • • Often limited Typically remote Often Specialized Sometimes OS Limited – Disk utilization • extensive – Deployment model • Software Deployed with hardware • Complete Deployment (no add-ons post delivery • Minimal updates (replace everything) – High Availability • Expected to run without restarts, etc. – Management Integrated with OS and other Apps – Support a limited set of profiles • Specific management goals – Server Performance – Administration • Based on local admin model – Deployment model • Server based deployment – Tied to specific hardware – Deterministic operation • Embedded systems want to be sure everything works. – OS’s are often limited • Simplified Interfaces • Simplified concepts of users and security 11/18/2010 – Server Resource Utilization MDC 2010 Open. Pegasus – Modularity and Flexibility – Supporting split development environment 40
Embedded CIM Server Size • Static Object Code Size • Dynamic Memory Usage – Issue • Server was 7 – 9 MB • Multiple Shared Libraries • Limit dynamic memory use • Control limits of memory use – Solution • Static Build – Reduce server to 3– 5 MB (With memory repository) • Function build configurability. Eliminate unused Server components – Not everybody requires the complete server 11/18/2010 – Solution • Add memory limits to allocator • Control execution of operations / indication flow – Note: Pull operations will help this also MDC 2010 Open. Pegasus 41
Disk Footprint • Issue – Currently large footprint with many shared libraries – Difficult to separate server components from other build components – Large disk footprint for repository (~ 20 MB) • Solutions – Reduce footprint by building a single image server (on single file) – Modify build process to allow build of components rather than simply the whole environment – Create much smaller repository representation • i. e. memory-resident repository 11/18/2010 MDC 2010 Open. Pegasus 42
Memory Resident Repository • Goal – Class and instance repository independent of disk files – Significantly reduce size of class repository – Disallow schema modification (no create class …) • Implementation MOF & Namespaces – Class repository • • MOF compiler compiles c++ code representing class repository. Code linked into embedded system Memory-resident repository implementation converts to internal CIMClass form Class closure filtering. – Compile from leaf classes using only required superclasses – Instance Repository • • Instance repository is memory only. Load and checkpoint functions to restore and save memoryresident instance repository • • Implement as user definable callbacks Performance – Class repository size about 5% of disk repository. • • 1. 2 MB for complete repository vs. 20 MB on disk <. 5 MB with Description Qualifiers removed – Performance – Faster but no real metrics to date 11/18/2010 MDC 2010 Open. Pegasus Instances Classes C++ Initial instances can be created with MOF compiler Potential to reduce size by maintaining internally in serialized form. – • MOF Compiler binary Class/Qualifier Representation instance representation Compile with Server Load when Server Starts Checkpoint When changes occur 43
Server Performance • Issues – Embedded CPUs often very slow – Performance issues become much more obvious with embedded systems • Solutions – Continuous work on performance improvement • 15+ times speed up starting with Version 2. 5. 1 • Additional performance increases in 2. 6 and 2. 7, 2. 8 • Goal – Continued work on performance • Code improvement, algorithm improvement 11/18/2010 MDC 2010 Open. Pegasus 44
Server Size Reduction • Static server linking – Eliminate unused code – Static code size is smaller • Move unused functionality to conditional compile • Today – Capable of 5. 5 MB server image with memoryresident repository (~ 4 MB without repository) (10 MB with multiple providers) • Embeded system developer – Writes wrapper – Compiles classes with memory resident repository option – Modifies Make to build the static structure 11/18/2010 MDC 2010 Open. Pegasus Server Wrapper Server as library Static Providers Class Repository Server Single Image 45
Static linked Providers • Goal – Deterministic Providers • No loading / unloading – Single Image with no dynamic libraries – No dynamic provider installation/registration • Implementation – CMPI / C++ providers integrated into static build. – Provider egistration integrated into server startup • Eliminates at least some of registration functionality 11/18/2010 MDC 2010 Open. Pegasus 46
Limited File System Support • Issue – Embedded systems often have limited file systems and/or very little disk space • Goal – Greatly reduce server dependence on file systems – Lower limit is no file system support • Implementation – Memory resident repository – External management of Certificates, passwords, etc. – Callback functions for getting info on Certificates, passwords, instance persistence, etc. – Provide user based functions output functions for other file issues such as logging output, trace output, etc. • Embedded system developer handles I/O from the callbacks 11/18/2010 MDC 2010 Open. Pegasus 47
CIM Server Management • Issue – Pegasus administration today is extensive • Includes both configuration and dynamic parameterization – Based largely on local user interface • Root based adminstration and Pegasus admin tools • Goals – Limit administration of the server – Move some functionality from CIM Server to environment – Fix most parameterization (build time) • Typical dynamic functions in embedded system – User setup – SSL certificate mgt – Minimal dynamic parameters (ex. Traces, log levels, etc. ) • Move all dynamic admin functions to: – Adopter responsibility (ex. User management, cert management) – Remote administration (ex. Setting trace levels, etc. ) 11/18/2010 MDC 2010 Open. Pegasus 48
Externalize main() • Issue – Embedded system additional and configuration functionality built-in rather than configured or parameterized • Goal – Improve modifiability without integrator developer having to modify Pegasus released components • Externalize main – Pegasus becomes library – Main is created by the integrator developer • Outside the Pegasus source release – Includes functions like: • Load memory-resident repository • Install call backs for log, trace, instance persistence, configuration, etc. • Provider static registration 11/18/2010 MDC 2010 Open. Pegasus 49
Build Environment • Extend build environment for split development (host and embedded system targets) – Selective component builds • i. e. Server build for target • MOF clients built in host • MOF compiled in host – Test functions in both host and target – Tests Run in combination of target and host 11/18/2010 MDC 2010 Open. Pegasus 50
Vx. Works Port (2. 9/2. 10) • Use embedded server characteristics defined above • Create platform definitions for Vx. Works – Version 6. x • Server performance optimizations for – XScale Processor • Modified build process – Separate Server/Client builds – Add external main() to allow integration of Embedded Server characteristics – Allow multiple builds (host/target) in single source environment • Goal – Vx. Works and General Embedded Server characteristics available in Pegasus 2. 8 (partial) and 2. 9 complete 11/18/2010 MDC 2010 Open. Pegasus 51
WS-Management and Pegasus • Issue – Extend Pegasus environment to implement DMTF wsmanagement specifications (operation and indication) • Goal – Integrate ws-management operation and ws-eventing support new protocol adapter and indication handler • Status – Stand-alone front end (see pegasus_unsupported cvs) – Integrated support partially complete • 2. 8 – WS_Man infrastructure, get, put • 2. 9 - Added WS-Enumeration • 2. 10 - Adding wsmid: Identify, WS_Enumeration filter support (WQL) and Custom Actions (i. e. CIM extrinsic Methods) 11/18/2010 MDC 2010 Open. Pegasus 52
The Standalone Front end • Done as a demo project. • However the code is still viable today for some things: – Included association filters – Integrated wsman into the Pegasus client • However it is NOT production – Based on an external library (g. Soap) that made this Goal code unusable in the long term Pegasus Client API Pegasus Client 11/18/2010 Wsman-cim Operation translation Pegasus Wsman client wsman protocol MDC 2010 Open. Pegasus wsman CIM-XML Front-end CIM-XML CIM Server (wsman-cimxml) 53
WS-Management integrated • This is the production solution • Will grow with subsequent versions of Pegasus • Performance roughly equilavent to the CIM/XML paths • No changes to core processing or providers CIM/XML Frontend Core CIMServer WS-Man Frontend 11/18/2010 MDC 2010 Open. Pegasus 54
WS-Management – Not Done • Work to Do – Complete integrated support (association filters, etc. ) – Add ws-eventing – Integrate Client support (common interface, multiple protocols) – Fragments 11/18/2010 MDC 2010 Open. Pegasus 55
Part 1. 5 Working With Pegasus And the Pegasus Project 11/18/2010 MDC 2010 Open. Pegasus 56
Working With the Pegasus Project • Using Pegasus Source Code – Free for use. Multiple and growing number of sources for access to Pegasus • Contributing to the Project – Outside contributors • In Company • Specific financed projects • Contribute via patches or authorized developers – Join or follow the PEPs and Architecture Team • No commitment to join required to participate • There is no free lunch. – Join the Steering Committee • Influences priorities, commitments, releases. 11/18/2010 MDC 2010 Open. Pegasus 57
Sources for access to Pegasus • Open. Pegasus CVS – All Releases source code – Current unreleased work (head of tree) • Linux Source RPM’s for releases – Pegasus web site • Release source tarballs – Pegasus web site • Redhat AS and Fedora – Binary rpms • Open. SUSE – Binary rpms • Inova. Development web site ( in process now) – Binaries for multiple platforms combined with development tools • WBEM Solutions SDK – Next version to begin to integrate binary Pegasus releases. 11/18/2010 MDC 2010 Open. Pegasus 58
Pegasus Who’s Who • The Major Pegasus Contributors – – – – EMC HP IBM Microsoft Sun Symantec Inova Development Who Uses Pegasus? 11/18/2010 • Major Pegasus Users Today we know of: – – – – We only know who is using Pegasus through those who – participate (bugs, questions, contributions). In fact we don’t really know how much MDC 2010 Open. Pegasus is being used. EMC HP IBM Novell Open. SUSE Red. Hat Enterprise Server Symantec SNIA embedded systems … 59
Getting Support • Ask the Pegasus mailing Lists • File Bugs – And follow up • Attend the Pegasus calls – Sqeaking wheels and all that • Contract 3 rd Party for support/maintenance 11/18/2010 MDC 2010 Open. Pegasus 60
The Pegasus Project Acts only as neutral facilitator Open Group DMTF Major Contributors DMTF Work Groups Pegasus Arch. Team Other Contributors And Users 11/18/2010 Pegasus PMC Bugzilla MDC 2010 Open. Pegasus CVS Repository PEPs 61
Pegasus Feature Status Information • Documented in Features Page for each release – www. opengroup. org/ -> Feature Status Page • Goal - summarize Features and Status – Status - functionality and Quality • • • Red – Alpha level not extensively tested Yellow – Beta level, reasonable tests, outstanding bugs Green – Candidates for inclusion in production release White – Status Unknown Major Feature Categories Today – – – CIM Server Repository Provider Interface Providers Client Interfaces Indication Listeners Indication Handlers Security SLP WMI Mapper Packaging and Releases 11/18/2010 MDC 2010 Open. Pegasus 63
Working on the Pegasus Project • Working with the Code • Documentation • Understand releases & state of Pegasus • • – CVS, snapshots – API documentation – PEPs – Readme documents – Nightly build status, bugs, release definition PEPs, View. CVS, Blocker bug list Understanding and future directions – Release Definition PEPs Contributing Bugs and Corrections – Open. Pegasus bugzilla – Team Reviews Contributing New Functionality – Define with PEPs – Team Review Defining future “Requirements” – Get Involved 11/18/2010 MDC 2010 Open. Pegasus 64
Getting More Information Open. Pegasus Home http: //www. openpegasus. org/page. tpl? CALLER=index. tpl&ggi d=799 Open. Pegasus CVS http: // cvs. opengroup. org/cgi-bin/viewcvs. cgi/ Open. Pegasus Bugzilla http: // cvs. opengroup. org/bugzilla/ Open. Pegasus Build Status http: // nbat. openpegasus. org Open. Pegasus Documentation http: //www. openpegasus. org/pp/index. tpl Open. Pegasus Email Lists http: //www. openpegasus. org Open. Pegasus Feature Status http: //www. openpegasus. org/page. tpl? ggid=799 11/18/2010 MDC 2010 Open. Pegasus 65
Part 1. 6 Issues 11/18/2010 MDC 2010 Open. Pegasus 66
Issues List we keep hearing • We react/move too slowly – Only through process can we control quality, schedules, etc. – Pegasus is a project that must meet user demands and schedules if it is to continue – It is the level of involvement that drives Pegasus, not the level of wishes • Releases are not frequent enough – Trying to balance of quality releases with reasonable development groups – Train release mechanism costs time but imposes quality control • Too much process – Without process we don’t know where we are or where we are going • Pegasus is too: – Slow, big, incomplete, small, etc. • • • Continuous a) refactoring, b) performance work, c) new functionality We can only implement what someone commits to do. Pegasus does not do what I want – Things only get done through people that do them (see below) • Pegasus not true open source – Work with us. You can contribute. You can vote. – Openness takes time also – Moving to Open Source PMC, meritocracy based model now • All of these are open for discussion Somewhere there is a magic set of developers – Effectively a volunteer organization. What you see is what you get • Documentation sucks – Again we only get done what someone will do. • There is a magic group somewhere (i. e. Open. Group) developing for Pegasus 11/18/2010 – MDC 2010 Open. Pegasus Whoops, Pegasus is Open Source and volunteer among interested parties 67
How we decide what gets done • Somebody needs it • Somebody is willing to do it – Document the requirement and function – Do the code – Integrate it – Provide test environment • It is consistent with the project goals – Architecture, risk, quality, . . . 11/18/2010 MDC 2010 Open. Pegasus 68
Open. Pegasus in one page • All major WBEM components – (server, client/listener infrastructure, compilers, some providers, test suite, CQL, WQL, Indication Support, security • Project – Community project under auspices of The Open Group – Major contributors, HP, IBM, Symantec, EMC, Novell, Sun, Microsoft – Project Lead– The Open Group • Regular Releases – ~ 9 month cycle • Availability – Source (cvs, rpms, tar balls) – Binaries for Linux (Red. Hat and SUSE distributions) • Major users – HP, IBM, Symantec, EMC – Multiple other SNIA SMIs server implementers. • – Linux, Unix, Mac, Windows, VMS, ZOS, Vx. Works (planned) • License – MIT License • Provider Types – Pegasus C++ – CMPI – Java (SNIA Provider Interface today) • Development Language – C++ • Client API Language – C++ – Java Platform Target – Initially broad set of OS/Platforms – Now adding embedded system support 11/18/2010 • Platforms Supported • Client Protocols – CIM/; XML – WS-Management in process MDC 2010 Open. Pegasus 69
Part 2 Advanced Topics 1. 2. 3. 4. 5. 6. 7. 11/18/2010 MDC 2010 Open. Pegasus Pull Operations CIMResponse. Data Registering Providers CIM_Error Debugging Pegasus Performance Pegasus Resource Utilization 1. Memory 70 2. Disk
Part 2. 2 Pull Operations 11/18/2010 MDC 2010 Open. Pegasus 71
Goals Of the New Operations • Parallel existing CIM Enumeration Operations • Remove deprecated functionality for new operations • Minimize gratuitous differences – Ex. CIMObject vs. CIMInstance (returns instances) • Create Pull operations for the Enumerates that cause scalability problems – Ignore Class and qualifier operations • Grow error status definitions from existing error status codes • Keep single error per response philosophy – A pull can return data OR an error status code • Make new things optional 11/18/2010 MDC 2010 Open. Pegasus 72
Concept Extensions • Client can set max size of any pull (max. Count) • Server can return that or fewer objects in response • Client can terminate response before enumeration exhausted (close operation) • Filters allow server to filter out things not interesting to client – Smarter processing, smaller responses • Client can ask how big is this response – Return is an estimate not exact count • Client makes decision on whether error terminates enumeration. (Continue. On. Error) 11/18/2010 MDC 2010 Open. Pegasus 73
The New Operations • Open Enumeration Operations – – – – Open. Enumerate. Instances ( Enumerate. Instances) Open. Enumerate. Instance. Paths ( Enumerate. Instance. Names) Open. Reference. Instances (References) Open. Reference. Instance. Paths (Reference. Names) Open. Associator. Instances (Associators) Open. Associator. Instance. Paths (Associator. Names) Open. Query. Instances • Pull Operations – Pull. Instances. With. Paths – Pull. Instances • Other Operations – Close. Enumeration – Enumeration. Count 11/18/2010 MDC 2010 Open. Pegasus 74
Example: Open. Enumerate. Instances Operation • Open new Enumeration. Response is the enumeration. Context if the server accepts the open. • Properties parallel existing operations. • New properties to allow filtering of objects by server • Timeout defines time server MUST keep operation open between pulls • Continue. On. Error tells server whether to continue if any pull gets error Open. Enumerate. Instances <instance. With. Path>> Open. Enumerate. Instances ( [OUT] <enumeration. Context> Enumeration. Context [OUT] Boolean End. Of. Sequence [IN] <class. Name> Class. Name, [IN, OPTIONAL] boolean Deep. Inheritance = true, [IN, OPTIONAL] boolean Include. Class. Origin = false, [IN, OPTIONAL, NULL] string Property. List [] = NULL, [IN, OPTIONAL, NULL] string Filter. Query. Language = NULL, [IN, OPTIONAL, NULL] string Filter. Query = NULL, [IN, OPTIONAL] uint 32 Operation. Timeout, [IN, OPTIONAL] Boolean Continue. On. Error = false, [IN, OPTIONAL] uint 32 Max. Object. Count = 0 ) 11/18/2010 MDC 2010 Open. Pegasus 75
Common Parameters for Opens • IN Parameters • Out Parameters – Filter. Query. Language – End. Of. Sequence • Future – Not yet defined • Signals that server has completed operations – Filter. Query • Future – Enumeration. Context – Operation. Timeout • Intra. Operation Timeout. Set by client and modifiable by server. Sets min time server must keep context open between operations • Returned by server. Must be supplied with pull and close operations – Continue. On. Error • Client requests server to continue returning objects despite errors. – Max. Object. Count • Max count of objects server is to return on this operation. Server may modify this downward. NOTE: 0 is legal. 11/18/2010 MDC 2010 Open. Pegasus 76
Pull Example • Pull a defined number of instances for the defined enumeration. Context. • Server may return up to the defined number of objects • Server indicates enumeration exhausted with End. Of. Sequence parameter • Server returns 0 or more response objects or error status with: • Enumeration. Context and End. Of. Sequence indicator Pull. Instances. With. Path <instance. With. Path>* Pull. Instances. With. Path ( [IN, OUT] <enumeration. Context> Enumeration. Context, [IN] uint 32 Max. Object. Count, [OUT] Boolean End. Of. Sequence ) 11/18/2010 MDC 2010 Open. Pegasus 77
Close Operation Requests server to close an existing enumeration before the enumeration is exhausted Close. Enumeration void Close. Enumeration ( [IN] <enumeration. Context> Enumeration. Context ) 11/18/2010 MDC 2010 Open. Pegasus 78
Example: Instance Pull sequence • • Client opens with Open. Enumerate. Indstances Server responds – – – • • Enumeration context from open Max. Objects Server Responds – – – • • End. Of. Sequence = false Zero or more objects up to count defined by max. Objects in request Enumeration. Context Client requests more instances (CIMPull. Enumerate) – – End. Of. Sequence = false More objects Enumeration. Context Client Pull request Server Responds – – 11/18/2010 Open. Enumerate. Instances, max. Objects EOS=True (indicates no more objects after this response Zero or more objects Open Response, zero or more objects EOS=false, Enumcontext Pull. Instances , context. Id, max. Objects C L I E N T Pull Response, zero or more objects EOS=false, context. Id . . S E R V E R . Pull. Instances , Enum. Context, max. Objects Pull Response, zero or more objects EOS=True, context. Id MDC 2010 Open. Pegasus 79
Whats New In Pegasus • Client API level – Extend client for new pull operations • New APIs correspond to CIM operations • Extend Core server to handle new operations • NOTE: This will work with existing Providers • Iterator class for response processing 11/18/2010 MDC 2010 Open. Pegasus 80
New Client Operations • Open – Array<CIMInstance> open. Enumerate. Instances – Array<CIMObject. Path> open. Enumerate. Instance. Paths – Array<CIMInstance> open. Reference. Instances – Array<CIMObject. Path> open. Reference. Instance. Paths – Array<CIMInstance> open. Associator. Instances – Array<CIMObject. Path> open. Associator. Instance. Paths • Pull – Array<CIMInstance> pull. Instances. With. Path – Array<CIMObject. Path> pull. Instance. Paths • Close – void close. Enumeration • Misc – Uint 64 Arg enumeration. Count 11/18/2010 MDC 2010 Open. Pegasus 81
Inter Operation. Timeouts • Specified by client as part of open • May be adjusted downward by server • Represents minimum time server will keep context open between client calls. Time from end of previous operation to start of next operation. • Each client call for a context restarts this timer. • Client may update this without getting objects by requesting 0 entities in request. • const Uint 32 Arg& max. Object. Count = Uint 32 Arg(0) 11/18/2010 MDC 2010 Open. Pegasus 82
max. Object. Count Number of Objects Requested • Client defines maximum number of objects client wants • Set on each operation (open and pull) • NULL value not defined. • Optional – If not provided, server set size. • Server responses with the max. Object. Count or fewer objects • Client may request 0. Server returns no objects but restarts the inter. Operation timer. 11/18/2010 MDC 2010 Open. Pegasus 83
Differences • Incorporate new parameters – – max. Object. Count Filter properties Operation Timeout Operation. Context • New Client types – Uint 32 Arg – Allows handling Uint 32 with NULL. – Operation. Context – new Class that provide opaque handling of Client receive and send of the Operation. Context parameter 11/18/2010 MDC 2010 Open. Pegasus 84
Overview of Pegasus CIM Operation Responses • Provider interfaces multithreaded – Each CIM operation request gets its own thread • Operation responses are incremental – Provider can deliver one or more objects with each call to deliver response objects. • Responses are queued through system and aggregated for needs of delivery • Provider delivery thread blocked to support delivery. Conclusion: Pegasus was largely ready to handle pull operations without MDC 2010 Open. Pegasus 11/18/2010 provider changes. 85
Pegasus Provider Response Interface • Each CIM Operation request type defines specific handlers for responses • Each CIM Operation call provides handler ref • Each call gets Response Handler object – Response calls are: • hnd. processing() – start response • hnd. deliver(…) – deliver one or more response entities (CIMInstances, CIMObjectpaths) – deliver() interfaces have both single object and array definition. • hnd. complete() – provider finished delivering 11/18/2010 MDC 2010 Open. Pegasus 86
Enumerate Instances Example void Association. Test. Provider: : enumerate. Instances( const Operation. Context& context, const CIMObject. Path& class. Reference, const Boolean include. Qualifiers, const Boolean include. Class. Origin, const CIMProperty. List& property. List, Instance. Response. Handler& handler) { // Find the class corresponding to this instance CIMName req. Class. Name = class. Reference. get. Class. Name(); handler. processing(); for (Uint 32 i = 0; i < _class. Table. size() ; i++) { if (req. Class. Name == _class. Table[i]. class. Name) { CDEBUG("Class found " << req. Class. Name); for (Uint 32 j = 0; j < _class. Table[i]. instances. size(); j++) { handler. deliver(_class. Table[i]. instances[j]); } handler. complete(); return; } } throw CIMException(CIM_ERR_NOT_FOUND); } 11/18/2010 MDC 2010 Open. Pegasus 87
Original Response Flow through Pegasus Forward each Provider Array To XML for Encoding as CIMResponse message with array of objects XML Encoder (chunked) XML Encoder (non chunked) Binary Encoder Chunk Aggregator Full Message Aggregator Aggregate Responses from Multiple provider Response arrays into complete message 11/18/2010 Operation Dispatcher Aggregator CIMResponse Message Containing Array MDC 2010 Open. Pegasus Deliver(. . ) Blocked while any Chunked delivery Occurs. Queue Of Response Objects for provider hnd. processing() hnd. deliver(object) hnd. deliver(Array(obj)) Provider hnd. complete() Queues to limit set By system. Then sends array to next step 88
Pull Operations provider interface changes • Current version – No changes to provider interface • Future update – Extend provider interface for request filter parameters. – Add mechanism to cleanly close delivery if pull operation closed. 11/18/2010 MDC 2010 Open. Pegasus 89
Pull Response Flow through Pegasus Operation Dispatcher Deliver operation Response based on request and what is in queue XML Encoder Binary Encoder Pull open request Operation Dispatcher 11/18/2010 Pull request or close request Add to array of Objects for delivery waiting Next pull request for enum context. Block provider if exceeds waiting limit Pull Aggregator Full Message Aggregator Send request to all providers involved, set up open response and set up context Operation Dispatcher Aggregator CIMResponse Message Containing Array Aggregate Responses from Multiple provider Response arrays into complete message MDC 2010 Open. Pegasus Deliver(. . ) Blocked while any Chunked delivery Occurs. Queue Of Response Objects for provider hnd. processing() hnd. deliver(object) hnd. deliver(Array(obj)) Provider hnd. complete() Queues to limit set By system. Then sends array to next step 90
Issues with delivery • Encourage providers to deliver small quantities with each call. This is good coding but not enforced. – Delivering large quantities in single call destroys our memory management model. • Possible issues – Long blocking times on provider if client very slow. Designed only to control flow, not let client play between pull calls. 11/18/2010 MDC 2010 Open. Pegasus 91
Similarities • Follow same pattern of parameters but with new parameters attached. • All possibly optional parameters are at end. • All errors handled by exception as with existing model 11/18/2010 MDC 2010 Open. Pegasus 92
The Pegasus Pull Client API - 1 Array<CIMInstance> open. Enumerate. Instances( CIMEnumeration. Context& enumeration. Context, Boolean& end. Of. Sequence, const CIMNamespace. Name& name. Space, const CIMName& class. Name, const Boolean deep. Inheritance, const Boolean include. Class. Origin, const CIMProperty. List& property. List = CIMProperty. List(), const String& filter. Query. Language = String: : EMPTY, const String& filter. Query = String: : EMPTY, const Uint 32 Arg& operation. Timeout = Uint 32 Arg(), const Boolean continue. On. Error = false, const Uint 32 Arg& max. Object. Count = Uint 32 Arg(0) ); NEW Other Open… APIs parallel the Enumerate 11/18/2010 MDC 2010 Open. Pegasus 93
Pegasus Pull Apis // Pull Instances with Paths Array<CIMInstance> pull. Instances. With. Path ( CIMEnumeration. Context& enumeration. Context, Boolean& end. Of. Sequence, const Uint 32 Arg& max. Object. Count = Uint 32 Arg(0) ); // Pull Instance Paths Array<CIMObject. Path> pull. Instance. Paths ( CIMEnumeration. Context& enumeration. Context, Boolean& end. Of. Sequence, const Uint 32 Arg& max. Object. Count = Uint 32 Arg(0) ); 11/18/2010 MDC 2010 Open. Pegasus 94
Close API void close. Enumeration ( CIMEnumeration. Context& enumeration. Context ); 11/18/2010 MDC 2010 Open. Pegasus 95
Simple Enum example try { CIMNamespace. Name name. Space = "root/Sample. Provider"; String Class. Name = "Sample_Instance. Provider. Class"; Boolean deep. Inheritance = false; Boolean include. Class. Origin = false; Uint 32 Arg max. Object. Count = 100; Boolean end. Of. Sequence = false; Uint 32 Arg operation. Timeout(0); Boolean continue. On. Error = false; String filter. Query. Language = String: : EMPTY; String filter. Query = String: : EMPTY; Array<CIMInstance> cim. Instances; CIMEnumeration. Context ec; cim. Instances = client. open. Enumerate. Instances( enumeration. Context, end. Of. Sequence, name. Space, Class. Name, deep. Inheritance, include. Class. Origin, CIMProperty. List(), filter. Query. Language, filter. Query, operation. Timeout, continue. On. Error, max. Object. Count ); 11/18/2010 while (! end. Of. Sequence) { Array<CIMInstance> cim. Instances. Temp = client. pull. Instances. With. Path( enumeration. Context, end. Of. Sequence, max. Object. Count); cim. Instances. append. Array(cim. Instances. Temp); } } catch (CIMException& e) { cerr << "CIMException Error: in test. Enumeration. With. Pull " << e. get. Message() << endl; PEGASUS_TEST_ASSERT(false); } catch (Exception& e) { cerr << "Exception Error: in test. Enumeration. With. Pull " << e. get. Message() << endl; PEGASUS_TEST_ASSERT(false); } MDC 2010 Open. Pegasus 96
Limitations for 2. 11 • Block concurrent close – Spec allows concurrency. We will not initially • Server does not handle count operation • May not include invoke. Method – Internal Pegasus support does not include invoke method • No support for continue on error – Concerns about the effects, not the implementation • May not include iterating client interface • No support for Filters 11/18/2010 MDC 2010 Open. Pegasus 97
Future Directions • Pegasus – Extend so internal (cimom handle operations) use Pull – Possibly add count operation – Add Invoke. Method – Add Filters • DMTF Specification and Pegasus – Deprecate non-pull Instanceoperations – Add specification for filters to the pull enumerations 11/18/2010 MDC 2010 Open. Pegasus 98
Part 2. 2 CIMResponse. Data 11/18/2010 MDC 2010 Open. Pegasus 99
CIMResponse. Data • KS_TODO 11/18/2010 MDC 2010 Open. Pegasus 100
Part 2. 3 Provider Registration 11/18/2010 MDC 2010 Open. Pegasus 101
Provider Registration • Not standardized in CIM today – Original concept was the “provider” qualifier • Used by some other CIM Servers today – Goal • Standard provider registration based on a provider registration profile • Pegasus uses a set of classes to register providers – Create instances of provider registration classes (providermodule, provider capabilities – Registration can be static or dynamic 11/18/2010 MDC 2010 Open. Pegasus 102
Pegasus Provider Management • Provider Installation – Put provider library into Pegasus provider directory – Register provider • Provider Registration – Create instances of provider registration classes – Register by passing instances to Pegasus • Dynamic (cimmof) • Static (cimmofl) • Dynamic provider state control – Enable / disable (cimprovider utility) 11/18/2010 MDC 2010 Open. Pegasus 103
Provider Registration Service Instance Repository Message Dispatch er Start/Stop Provider Manager 11/18/2010 MDC 2010 Open. Pegasus Provider Registration Manager Control Service Provider Registrati on Provider Instance Operation s Repository Provider Lookup Instance Persistenc e Instance Operation s CIM Operation Processor Update Provider Status 104
Provider Registration Classes See Schemas/Pegasus/Interop/VER 20 PG_Provider. Module 20. mof • PG_Provider – Defines Provider module name (shared library) – Defines user context for module – Associates with Module & capabilities • PG_Provider. Module – Defines module name for provider – Names provider • PG_Provider. Capabilities – Points to provider and provider module – Defines provider type, Classname, etc. 11/18/2010 MDC 2010 Open. Pegasus 105
Example, Instance Provider instance of PG_Provider. Module { Description = “Implements Sample_Instance. Provider. Class "; Caption = "Sample Pegasus Instance Provider Module"; Name = "Sample. Instance. Provider. Module "; Vendor = "Open. Pegasus"; Version = "2. 0. 0"; Interface. Type = "C++Default"; Interface. Version = "2. 1. 0"; Location = "Sample. Instance. Provider"; }; Foreign keys link module, provider, capabilities. Provider classname. One per capability instance of PG_Provider { Provider. Module. Name = "Sample. Instance. Provider. Module "; Name = "Sample. Instance. Provider"; }; instance of PG_Provider. Capabilities { Provider. Module. Name = "Sample. Instance. Provider. Module "; Provider. Name = "Sample. Instance. Provider"; Capability. ID = "Sample. Instance. Provider"; Class. Name = "Sample_Instance. Provider. Class "; Namespaces = { "root/ Sample. Provider" }; Provider. Type = { 2 }; Supported. Properties = NULL; Limit properties Supported. Methods = NULL; And methods }; supported MDC 2010 Open. Pegasus 11/18/2010 Limit to namespaces on this list. Define types: 2 = Instance 3 = Assocation 4 = Indication 5 = method 6 = consumer 7 = instance. Query 106
Example Registration with Makefile 1. 2. 3. 4. Create namespace and install any base classes required. Compile the Schema for the provider to be registered Register the provider by compiling the registration mof NOTE: Normally the registration MOF is same name as Schema with “R” • Sample. mof Sample. R. mof cimmofl "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)“ "-n$(INTEROPNS)" Sample. Provider. Schema. R. mof OR cimmof "-n$(INTEROPNS)" Sample. Provider. Schema. R. mof • • See Examples in the sample and Test. Provider Load directories Confirm registration with cimprovider utility. 11/18/2010 MDC 2010 Open. Pegasus 107
Part 2. 4 Handling CIM_Error And Standard Messages 11/18/2010 MDC 2010 Open. Pegasus 108
Pegasus Status today • CIM Error is supported – Pegasus Client – Pegasus Server (passing CIM_Errors as part of responses – Generating CIM_Error objects – Provider Interfaces – Generating CIM Errors • Usage minimal • Testing – End-end probably minimal because CIM_Error Class was experimental for a long time – Internal components part of standard test suite • No work to date on standard messages 11/18/2010 MDC 2010 Open. Pegasus 109
Pegasus interface Extension • Extended CIMException – Allows an array of CIM_Error objects to be attached to an exception – Server/Provider add CIM_Errors to an exception – Client takes them out if operation CIMException executed. – Client Driven Support • get. Error. Count() – Return count of CIM_Error objects attached to exception • get. Error(index) » Get the error at the defined index – Server and Provider driven support • Add. Error() – Adds a CIM_Error Object to an exception 11/18/2010 MDC 2010 Open. Pegasus 110
Client Example • Getting CIM_Error objects from a response Try { … Execute CIM Operation } Catch (CIMException& e) { for (Uint 32 I = 0 ; I < e. get. Error. Count() ; i++ CIMError err = e. get. Error(i); //. . . Process err } 11/18/2010 MDC 2010 Open. Pegasus 111
Conclusions • CMPI extended for CIM_Error today • C++ Providers can use CIMException extensions • We can process multiple CIM_Errors through system (provider, server, client) • No support internally std msg based specific errors 11/18/2010 MDC 2010 Open. Pegasus 112
Core Objects • Added new object as first class representation of CIM_Error – Src/Pegasus/General/CIMError. h /. cpp – Creates CIM_Error object – Provides getters and setters for all defined properties – Convert between CIMError C++ object and CIM_Error instance 11/18/2010 MDC 2010 Open. Pegasus 113
Part 2. 4 Pegasus Performance 11/18/2010 MDC 2010 Open. Pegasus 114
Performance • KS_TODO 11/18/2010 MDC 2010 Open. Pegasus 115
Part 2. 5 Pegasus Resource Utilization 11/18/2010 MDC 2010 Open. Pegasus 116
Resource Utilization • KS_TODO 11/18/2010 MDC 2010 Open. Pegasus 117
Part 2. 6 Debugging your Providers and Clients in The Pegasus Environment 11/18/2010 MDC 2010 Open. Pegasus 118
Testing And Pegasus • Pegasus is fairly well tested before release – Unit tests, system tests, multiple system tests, cho (long run duration tests). – Head of all releasable CVS branches gets tested every night (ex. 2. 8 -branch, …, head) • Don’t immediately assume it is a problem in Pegasus itself. • Retest Pegasus itself through the pegasus/Makefile dirven tests – Make world or Make; make tests, etc. 11/18/2010 MDC 2010 Open. Pegasus 119
Tools for Debugging • wbemexec (line test) – wbmexec –d 2 test. xml – (examples of. xml files are in tests/wetest) • Cimcli • Debuggers – Gdb – Visual Studio • Memory ? ? Tools – valgrind – Execute cim operations • Pegasus Logs • Pegasus Traces • Pegasus Client trace 11/18/2010 MDC 2010 Open. Pegasus 120
Wbemexec • Issue requests to pegasus as xml • Display xml responses • Ex – wbmexec –d 2 test. xml • Many examples in source code – (see tests/wetest) 11/18/2010 MDC 2010 Open. Pegasus 121
XML request sample <? xml version="1. 0" ? > <CIM CIMVERSION="2. 0" DTDVERSION="2. 0"> <MESSAGE ID="50000" PROTOCOLVERSION="1. 0"> <SIMPLEREQ> <IMETHODCALL NAME="Enumerate. Instance. Names"> <LOCALNAMESPACEPATH> <NAMESPACE NAME=“root"/> <NAMESPACE NAME=“cimv 2"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="Class. Name"> <CLASSNAME=“PG_Operating. System"/> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM> 11/18/2010 MDC 2010 Open. Pegasus 122
cimcli – execute operations • Interactive CLI client that executes CIM Operations • Through 2. 9 – Implements all of the read operations and simplistic invoke method • 2. 10 – Implements Create, Modify, instance, correct invoke. Method, testing responses, etc. • Examples – cimcli ni Person –enumerateinstance names – cimcli ci Person ssn=1 first=karl last=schopmeyer 11/18/2010 MDC 2010 Open. Pegasus 123
CIM Listeners • Example code exists not a complete display listener today • Note: Simple. Wbem has a command line cimlistener that can be used. 11/18/2010 MDC 2010 Open. Pegasus 124
Other test clients • • CIMNavigator CIMSurfer WSI client browser SNIA client browser 11/18/2010 MDC 2010 Open. Pegasus 125
Logs • Pegasus generates production log output • Set logs to max level to get the most info • Log destination is system dependent – Windows – log files – Linux – syslog • Primarily production level issues • BUT: In many cases the logs will tell you what the problem is. Look at them 11/18/2010 MDC 2010 Open. Pegasus 126
Pegasus Trace • This is the core debugging tool in Pegasus • The CIM Server is throughly instrumented for trace output. • Tracing is command line controllable • There is now a memory based circular trace – Lowers impact on server – Avoids the enormous files that can occur with disk trace. • See PEP 315 & 316 For details 11/18/2010 MDC 2010 Open. Pegasus 127
Setting Up for Trace • Run Pegasus in the forground, not as a service or daemon – Windows – cimserver –help – Linux – cimserver daemon=false • Run with providers in-process – Easier to debug than separate processes – Typical good settings • export PEGASUS_DEFAULT_ENABLE_OOP=false • export PEGASUS_DISABLE_PRIVILEGED_TESTS=true • export PEGASUS_DISABLE_PROV_USERCTXT=true • Set the trace level and components – Either permanent or on startup • Isolate the action that is a problem and execute this action by itself with trace 11/18/2010 MDC 2010 Open. Pegasus 128
How to Generate Trace • Set the trace component: – bin/cimconfig –s trace. Components=Thread, Prov. Manager • Logs the data in cimserver. trc (default) file – Or file defined by config variable trace. File. Path • Set the trace level: – bin/cimconfig –s trace. Level=4 • Or set trace for current server start – Cimserver trace. Components=All trace. Level=4 • See also mak/Buildmakefile for typical trace configurations. 11/18/2010 MDC 2010 Open. Pegasus 129
Trace Levels • Each trace call has an associated level • Different levels per trace (pre Pegasus 2. 8) – – – 0 – Tracing off (default) 1 - Function Entry/Exit 2 - Basic flow trace messages, low data detail 3 - Inter-function logic flow, medium data detail 4 - High data detail • Levels Post 2. 8 – Separated Entry/exit – – – 11/18/2010 0 – Tracing off (default) 1 – Severe and log messages 2 - Basic flow trace messages, low data detail 3 - Inter-function logic flow, medium data detail 4 - High data detail 5 – High data detail + Function Entry/Exit MDC 2010 Open. Pegasus 130
List of Trace Components (2. 10) • racing is done per server component (not per source file). – – – – – Xml. IO Http Repository Dispatcher Os. Abstraction Config Indication. Handler Authentication Authorization User. Manager Shutdown Server Indication. Service Message. Queue. Service Provider. Manager Object. Resolution WQL • CQL – – – – – See MDC 2010 Open. Pegasus 11/18/2010 src/Pegasus/Common/Tracer. cpp Thread CIMExport. Request. Dispatcher SSL CIMOMHandle L 10 N Export. Client Listener Discarded. Data Provider. Agent Indication. Formatter Statistical. Data CMPIProvider Indication. Generation Indication. Receipt CMPIProvider. Interface Wsm. Server Log. Messages WMIMapper. Consumer Control. Provider 131
Memory based trace • Started 2. 8 or 2. 9 (See PEP 316) – Circular cache in core – Configuration variables • trace. Memory. Buffer. Kbytes=<size of in-memory buffer in k. B> • trace. Facility= (file, memory , log ) • If this memory is part of a dump the trace messages can be found by the eye-catcher "PEGASUSMEMTRACE" at the top of the memory buffer. The trace is in clear text and the last written message has the suffix "EOTRACE". • I think it also dumps the buffer on pegasus exit 11/18/2010 MDC 2010 Open. Pegasus 132
Notes on reviewing trace • Always trace the io (Xml. IO) and discarded. Data – This frames the rest of the trace – You can see what is coming and going – disdcarded. Data tells you when we throw things away • Don’t trace function calls at first. – Look at the data, not the flow • If there are problems, look at the trace in the area where the problem is occurring – Look for keywords that could represent the issue • Exception, error, etc. 11/18/2010 MDC 2010 Open. Pegasus 133
Limitations • We don’t really support selective provider tracing. • You can add traces to your provider but it all goes into one big category • It helps to understand the overall architecture since this is the basis for the component definition. 11/18/2010 MDC 2010 Open. Pegasus 134
How to Understand Traces • The major goals of tracing are: – Confirm what is actually entering and leaving the server – See what providers are actually called – Determine the data (operation, etc)flow through the CIM Server – Try to isolate what component made the decision that impacts your issue 11/18/2010 MDC 2010 Open. Pegasus 135
Trace Limitations • High volume. – Multi gb trace files are common • Traces all functions. – The function trace has only a single level • Developer oriented – Without the source following much of the trace is difficult 11/18/2010 MDC 2010 Open. Pegasus 136
And after the trace, What? ? • Here is where the fun begins – Debuggers – Core dumps – Adding Trace points yourself – Finally the dreaded printf(…) – Specialized debug support • Special malloc testers • GNU exception backtrace • …. 11/18/2010 MDC 2010 Open. Pegasus 137
Pegasus Client trace • Conditional compile in CIMClient. cpp – export PEGASUS_CLIENT_TRACE_ENABLE=true – Compile pegasus/src/Pegasus/Client • When you run a client (ex. cimcli) – source export PEGASUS_CLIENT_TRACE=both: both – Then execute your client request: ex. cimcli ni myclass • Will generate requests and responses directly to console. 11/18/2010 MDC 2010 Open. Pegasus 138
Finding Server Crashes • Yes we sometimes get server crashes • Dumps – – Turn on dump if possible Set debugging mode if possible Use the dumps and get stack trace info Communicate your issue with other pegasus users • Memory based trace – This can catch the last few server actions – There is an extra load cost but not major • Try to isolate your problem to a single operation 11/18/2010 MDC 2010 Open. Pegasus 139
Questions & Discussion ? We would like to get your feedback on issues, priorities, users/usage, requests for Open. Pegasus. 11/18/2010 MDC 2010 Open. Pegasus 140
48ca86c193c8cb0bc3931a95fcffa699.ppt