pcp
[Top] [All Lists]

pcp updates - PMDA_INTERFACE_5 and per-context state into PMDAs

To: pcp@xxxxxxxxxxx
Subject: pcp updates - PMDA_INTERFACE_5 and per-context state into PMDAs
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sat, 30 Oct 2010 15:32:05 +1100
Reply-to: kenj@xxxxxxxxxxxxxxxx
A bunch of stuff here

- per context state being pushed to PMDAs (one part of the event log
changes), PMDA_INTERFACE_5, internal library API changes, etc. the
implementation pretty much follows the design document I posted earlier

- some Ubuntu 10.10 noise

- cisco PMDA changes

All of this passes QA (with some QA modifications that I'll commit in
the next day or so).

Comments welcome.

Changes committed to git://oss.sgi.com/kenj/pcp.git dev


 Makepkgs                          |    7 
 debian/control                    |    2 
 man/man1/pmdacisco.1              |   37 +++-
 src/dbpmda/src/dbpmda.c           |   77 ++++-----
 src/dbpmda/src/dbpmda.h           |    7 
 src/dbpmda/src/dso.c              |   32 ++-
 src/dbpmda/src/gram.y             |   16 -
 src/dbpmda/src/lex.l              |   13 -
 src/dbpmda/src/pmda.c             |  118 +++++++------
 src/dbpmda/src/util.c             |    6 
 src/include/impl.h                |   55 ++++--
 src/include/pmda.h                |   39 +++-
 src/libpcp/src/connect.c          |    6 
 src/libpcp/src/connectlocal.c     |   35 ++++
 src/libpcp/src/context.c          |    8 
 src/libpcp/src/desc.c             |   15 +
 src/libpcp/src/err.c              |    2 
 src/libpcp/src/fetch.c            |   12 -
 src/libpcp/src/fetchlocal.c       |    8 
 src/libpcp/src/help.c             |   15 +
 src/libpcp/src/instance.c         |   41 ++--
 src/libpcp/src/logconnect.c       |    6 
 src/libpcp/src/logcontrol.c       |    6 
 src/libpcp/src/logutil.c          |    2 
 src/libpcp/src/p_creds.c          |   10 -
 src/libpcp/src/p_desc.c           |   18 --
 src/libpcp/src/p_error.c          |   18 --
 src/libpcp/src/p_fetch.c          |   13 -
 src/libpcp/src/p_instance.c       |   20 --
 src/libpcp/src/p_lcontrol.c       |    1 
 src/libpcp/src/p_lrequest.c       |    1 
 src/libpcp/src/p_lstatus.c        |    1 
 src/libpcp/src/p_pmns.c           |   53 ++----
 src/libpcp/src/p_profile.c        |   15 -
 src/libpcp/src/p_result.c         |   12 -
 src/libpcp/src/p_text.c           |   21 --
 src/libpcp/src/pdu.c              |  321 +++++++++++++++++++-------------------
 src/libpcp/src/pmns.c             |   68 ++++----
 src/libpcp/src/store.c            |   11 -
 src/libpcp_pmda/src/GNUmakefile   |    2 
 src/libpcp_pmda/src/callback.c    |   19 +-
 src/libpcp_pmda/src/context.c     |   35 ++++
 src/libpcp_pmda/src/libdefs.h     |    3 
 src/libpcp_pmda/src/mainloop.c    |  127 ++++++++++-----
 src/libpcp_pmda/src/open.c        |    7 
 src/pmcd/src/client.c             |   98 ++++++++---
 src/pmcd/src/config.c             |   76 +++-----
 src/pmcd/src/dofetch.c            |   26 +--
 src/pmcd/src/dopdus.c             |  128 ++++++++-------
 src/pmcd/src/dostore.c            |   14 -
 src/pmcd/src/pmcd.c               |   10 -
 src/pmcd/src/pmcd.h               |    1 
 src/pmdas/cisco/GNUmakefile       |    2 
 src/pmdas/cisco/Install           |   12 +
 src/pmdas/cisco/cisco.c           |    9 -
 src/pmdas/cisco/cisco.h           |   17 +-
 src/pmdas/cisco/pmda.c            |   85 ++++++++--
 src/pmdas/cisco/probe.c           |  114 ++++++++-----
 src/pmdas/cisco/telnet.c          |  181 ++++++++++++++-------
 src/pmdas/sample/help             |   36 ++++
 src/pmdas/sample/pmns             |   15 +
 src/pmdas/sample/src/GNUmakefile  |    5 
 src/pmdas/sample/src/percontext.c |  255 ++++++++++++++++++++++++++++++
 src/pmdas/sample/src/percontext.h |   27 +++
 src/pmdas/sample/src/pmda.c       |    5 
 src/pmdas/sample/src/sample.c     |  100 +++++++----
 src/pmdas/summary/mainloop.c      |   40 ++--
 src/pmdas/summary/summary.c       |   10 -
 src/pmie/src/eval.c               |    2 
 src/pmie/src/pragmatics.c         |    2 
 src/pmlc/actions.c                |   16 -
 src/pmlogconf/pmlogconf-setup.sh  |   12 -
 src/pmlogger/callback.c           |    2 
 src/pmlogger/dopdu.c              |   18 +-
 src/pmlogger/fetch.c              |   10 -
 src/pmlogger/pmlogger.c           |    2 
 src/pmlogger/ports.c              |   14 +
 src/pmproxy/pmproxy.c             |    4 
 78 files changed, 1756 insertions(+), 933 deletions(-)


commit bcfd49afb2ec8915ad77ff508605e795a26088e7
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Sat Oct 30 12:37:21 2010 +1100

    Change end-of-context protocol for daemon PMDAs
    
    The previous implementation required the PMDA to send an ERROR PDU as an
    ack after receiving the end-of-context notification from PMCD or dbpmda.
    This was (a) unnecessary, and (b) meant PMCD was seeing a lot of pduread()
    timeouts waiting for a response from a daemon PMDA that may not even
    have been using PMDA_INTERFACE_5 or later (PMCD cannot tell the version
    of libpcp_pmda, if any, the PMDA is using in this case).
    
    Drop the ack PDU.

commit 1d15abbb9fb85c40db70c4ef12311084aee68430
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Fri Oct 29 20:37:53 2010 +1100

    libpcp, pmcd, dbpmda, pmlogger, et al - retire PDU_ASCII and PDU_BINARY
    
    PDU_ASCII was effectively retired some time ago.  Vestiges of this
    and the only supported PDU format (PDU_BINARY) remained in the source.
    This commit cleans this up.
    
    Since we only have binary PDUs, the "mode" argument to all of the
    __pmDecode* routines is not needed ... remove it!
    
    PM_ERR_NOASCII is not used, pmErrStr() message changed to reflect
    the fact that this error code is no longer used.
    
    In several places PDU_* was overloaded, fixed by introducing new
    macros relevant to the specific use.  Changes as follows ...
    
    __pmGetPDU
        Second arg is now ANY_SIZE (was PDU_BINARY) or LIMIT_SIZE
        (was PDU_CLIENT) ... the latter is used in pmcd and pmproxy
        to avoid DOS attacks with malcrafted PDUs.
    
    dbpmda
        Use new macros NO_CONN (was PDU_NOT), CONN_DAEMON  (was
        PDU_BINARY) and CONN_DSO (was PDU_DSO) to indicate type and
        state of PMDA connection.
    
    pmcd
        Don't need pduProtocol in AgentInfo structure.
    
    pmlogger
        Left over from last round of changes, used FROM_ANON instead
        of PDU_BINARY for __pmSend* calls.

commit e9a96b7639cbcefa97f953fc4fe05555ea88f6a3
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Fri Oct 29 06:36:12 2010 +1100

    Makepkgs - Ubuntu toolchain still causing problems
    
    With Ubuntu 10.10 I'm still seeing band binaries built with -O2
    across multiple i386 build machines.  With 10.10, they have moved
    the place where the default build flags are hidden for
    dpkg-buildpackage, but it is now easier to over-ride the shipped
    defaults.

commit 7df43f826eba08a1b168232863dc2d30d19fdbbc
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Fri Oct 29 06:34:40 2010 +1100

    debian/control - readline dependency
    
    Changed the Build-Depends line for pcp from readline5-dev to
    readline-dev ... our usage works with either readline5 or the
    newer default readline6.

commit d9b640e16803c960154e82602692cb1f1431074c
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Fri Oct 29 06:32:00 2010 +1100

    misc - add per context state in PMDAs
    
    Some non-PMDA changes that are required as a result of the changes
    to the semantics of mode/from for the _pmSend* routines.

commit 05ad9752457d210f6525ad0fc902b8db48cf0c22
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 28 21:25:48 2010 +1100

    sample PMDA - add per context state
    
    Roll to PMDA_INTERFACE_5.
    
    Add sample*.percontext.* metrics that count PDUs on a per client
    context basis.

commit ba31a3700eb20c530f890dfdb452a4d618acfa91
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 28 21:24:12 2010 +1100

    dbpmda - add per context state in PMDAs
    
    Add support for PMDA_INTERFACE_5 directly for DSO PMDAs and
    indirectly via modified PDU headers for daemon PMDAs.
    
    Additional interactions needed when a PMDA connection is closed
    to allow PMDAs to clean up any persistent changes, e.g. event
    tracing registrations.

commit 059ed39d2fac77bc62fb940c7d6f9ba0e9e564b3
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 28 21:19:05 2010 +1100

    pmcd - add per context state in PMDAs
    
    Add support for PMDA_INTERFACE_5 directly for DSO PMDAs and
    indirectly via modified PDU headers for daemon PMDAs.
    
    Additional interactions needed when a client context is closed
    to allow PMDAs to clean up any per context state, cached data
    and/or event tracing registrations.

commit 30b976f3a540484c80baffc8567e95b1915332d1
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 28 21:16:03 2010 +1100

    libpcp - add per context state in PMDAs
    
    Define FROM_ANON as anonymous context, mostly for PDUs from a PMDA
    to PMCD, where the context does not matter.
    
    Add __pmPtrToHandle() to return context id.
    
    __pmSend*() routines changed so "mode" parameter (was always PDU_BINARY
    after PDU_ASCII was retired), becomes "from" which is a context identifier.
    Some old disfunctional references to PDU_ASCII removed.
    
    Add support for PMDA_INTERFACE_5 with PM_CONTEXT_LOCAL.
    
    PDU header changes to encoded context, not sender pid in the
    "from" field ... for some PDUs (especially credentials) need
    sender pid, so "context" here is a rubbery notion at best.

commit 5cba7f983db420ce4ca4e3450951dc8298d32521
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 28 20:40:56 2010 +1100

    libpcp_pmda - add per context state in PMDAs
    
    Added PMDA_INTERFACE_5.
    New routines pmdaSetEndContextCallBack(), pmdaGetContext() and
    __pmdaSetContext().
    Extensions to pmdaExt.
    
    New context.c source file for libpcp_pmda.

commit 313b7b045073f4aace6a47acbc37aa10e55386a2
Merge: 83cc5b5 747c4b8
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 21 10:41:43 2010 +1100

    Merge branch 'cisco' into context4pmda

commit 83cc5b5bcff5ba92389ec8a52531d8c1088482da
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 21 09:08:33 2010 +1100

    pmlogconf-setup - fix shell escaping
    
    Problem exposed during Ubuntu 10.10 upgrade, rework escape and eval
    usage in the setup script for pmlogconf.

commit 747c4b8c5608b3218ae245e49d1b6132c5d4ed43
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 14 15:06:30 2010 +1100

    pmdacisco - assorted updates
    
    Parser fixes.
    Better login/password handling.
    Added support for user-defined prompt at the IOS command line.


<Prev in Thread] Current Thread [Next in Thread>
  • pcp updates - PMDA_INTERFACE_5 and per-context state into PMDAs, Ken McDonell <=