summaryrefslogtreecommitdiffstats
path: root/server/parser/pgsql.c
Commit message (Collapse)AuthorAgeFilesLines
* rteval-parserd: Fix issue when IPv4 address has not been setDavid Sommerseth2012-11-191-1/+1
| | | | | | The SQL append errornous '%s' to the hostname. Signed-off-by: David Sommerseth <davids@redhat.com>
* server/parser: Make the parsing of measurement data more flexibleDavid Sommerseth2012-11-081-19/+20
| | | | | | | | | | | | | | | | | | | The parsing of measurement data was hard coded to be very cyclictest centric. With this patch, the code paths used by cyclictest parsing is made more generic and which measurement data to parse is now declared in the configuration file. The default measurement data tables are set to be cyclic_statistics, cyclic_histogram and cyclic_rawdata. These tables can be overridden by setting the measurement_tables config variable in the xmlrpc_parser section. With this change, it is now possible to extend the rteval summary.xml measurement parsing without modifying the C code at all. Only the database schema and the xmlparser.xsl files needs to be updated, and then add this new table to configuration file. Signed-off-by: David Sommerseth <davids@redhat.com>
* Moved PostgreSQL related array function into pgsql.cDavid Sommerseth2011-10-071-1/+64
| | | | | | | | This is to put all PostgreSQL related functions in one place. Using the init_xmlparser() the function needed to format arrays are provided to the xmlparser code paths. Signed-off-by: David Sommerseth <davids@redhat.com>
* Changed snprintf() to append_str() when adding 'AND ipaddr' SQL stringDavid Sommerseth2010-03-261-2/+4
|
* Make sure we search for IP address == NULL when the input is NULLDavid Sommerseth2010-03-251-0/+2
|
* Don't consider IP address if the value is NULL when looking up registered ↵David Sommerseth2010-03-251-2/+7
| | | | systems
* Implemented SQL schema version handling on the database layerDavid Sommerseth2009-12-081-1/+37
| | | | | | | | | | | | When a database connection is established, the rteval_info table is queried for a key/value pair named 'sql_schema_ver' and parsed. This attribute defines which version the rteval database schema is in use. When processing XML documents with <sqldata/>, a checks is done to make sure there are no attempts on inserting data to an incompatible rteval database schema. If the rteval_info table or the sql_schema_ver value is not found, it will default to version 1.0 (the parsed int value will be 100)
* Added new config parameter: max_report_sizeDavid Sommerseth2009-11-101-1/+2
| | | | | | | | | | | | To avoid potential DoS attacks by sending big XML files, the max_report_size rejects reports which is bigger than this value. The default value is 2MB if this value is not configured. A new status code was introduced, STAT_FTOOBIG (12). The submissionqueue record will be updated with this value on records which fails this check. In addition minor SIGSEGV failure was fixed when rteval_parserd shutsdown before worker threads have really started.
* Fixed potential thread collision with oid return valuesDavid Sommerseth2009-11-101-3/+4
|
* Added db_ping() function and made db_wait_notification() more solidDavid Sommerseth2009-10-231-0/+48
|
* Fixed doxygen errorsDavid Sommerseth2009-10-221-0/+2
|
* Fixed memory leak in db_connect()David Sommerseth2009-10-221-0/+1
| | | | | The memory region needed for the dbconn structure was not released in db_disconnect(). This leak was introduced in commit 9526e7d8844a47fa
* Improved overall logging informationDavid Sommerseth2009-10-221-54/+74
|
* First cut at implementing a generic loggerDavid Sommerseth2009-10-211-105/+131
|
* Moved status codes into its own header fileDavid Sommerseth2009-10-211-0/+1
|
* Corrected missing or misleading doxygen commentsDavid Sommerseth2009-10-211-5/+12
|
* Fixed a couple of memory leaks in db_wait_notification()David Sommerseth2009-10-211-0/+3
|
* Implemented database LISTEN via db_wait_notification()David Sommerseth2009-10-211-0/+80
| | | | | | | | | | | | This introduces async waiting for report parsing. Commit 2584a3c36c97c757dc80108b898eede52b91dc44 introduced sending a NOTIFY whenever an INSERT is done into the submissionqueue table. With the db_wait_notification() the process_submission_queue() function will sleep until a a notification is received. The LISTEN, UNLISTEN and NOTIFY SQL commands are PostgreSQL dependent. Other database implementations may use what that database supports, or just simply do a sleep() to change the behaviour to a polling model.
* Extended rtevalruns table to contain a submid fieldDavid Sommerseth2009-10-211-1/+2
| | | | | This new field references submissionqueue.submid, to keep a link between parsed rtevalruns and the original submission.
* Simplified and made the get_destination_path() function more robustDavid Sommerseth2009-10-211-2/+3
| | | | Also added missing error check of the result of the function call
* Added logic to move parsed files into a specified report directory.David Sommerseth2009-10-201-20/+44
| | | | | This directory is set in the 'xmlrpc_parser' section, with 'reportdir'. If this is not set, it defaults to /var/lib/rteval/reports.
* Fixed a memory leakDavid Sommerseth2009-10-201-1/+3
|
* Added support for histogram data for cyclictestDavid Sommerseth2009-10-201-43/+27
|
* Big rewrite, but now a working rteval_parserd process is readyDavid Sommerseth2009-10-191-0/+125
| | | | | Need to add daemonizing mode, add proper logging and fix all FIXME's in the code
* Added db_begin(), db_rollback() and db_commit() functionsDavid Sommerseth2009-10-141-1/+67
|
* Added needed pgsql.h file and cleaned up the DB API a little bitDavid Sommerseth2009-10-131-20/+17
|
* Added doxygen comments for xmlparser.[ch] and pgsql.cDavid Sommerseth2009-10-121-0/+105
|
* Added db_register_cyclictest()David Sommerseth2009-10-121-0/+65
|
* Added db_register_rtevalrun()David Sommerseth2009-10-121-0/+80
| | | | | Registers report XML data into the rtevalruns and rtevalruns_details tables in the database.
* Added db_register_system()David Sommerseth2009-10-121-3/+111
| | | | | This functions registers a report XML's system and hostname information in the database. It will return the numeric syskey ID.
* Made some basic DB API stuff more genericDavid Sommerseth2009-10-091-1/+6
| | | | | Renamed connectdb() to db_connect() and introduced db_disconnect(). This is to make it easier to introduce a new database backend.
* Make pgsql_INSERT() make use of the new neat functions in xmlparserDavid Sommerseth2009-10-091-46/+11
|
* Added needed pieces to make the C based summary.xml parser workDavid Sommerseth2009-10-071-0/+273