summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Metadata.py
Commit message (Collapse)AuthorAgeFilesLines
* Allow to run directly from a git checkout (#1037)Sol Jerome2012-03-241-866/+0
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* organized testsuite to mirror srcChris St. Pierre2012-03-201-314/+296
| | | | | | | updated TestOptions removed terrifically out-of-date TestFrame and TestPlugin wrote unit tests for Metadata plugin various tweaks and bugfixes for Metadata plugin
* Remove svn keywordsSol Jerome2012-02-191-3/+0
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* cherry-picked a2cc392 Switch to shallow rather than deep copies to improve ↵Chris St. Pierre2012-01-131-1/+1
| | | | performance
* Metadata: Add missing sys import (Resolves #1032)Sol Jerome2011-08-281-0/+2
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Metadata: Better handling of floating cert-authenticated clients (Ticket #1030)Sol Jerome2011-08-111-2/+18
| | | | | | | | | | | | | | | | | | | From the ticket: A floating, cert-authenticated client can be not recognized properly by hostname if it resolves to an arbitrary name in reverse DNS. Background: Metadata.resolve_client, called from @exposed Core's methods, falls back to reverse DNS lookup for client's name, because the name is not preserved thanks to bailing off early from Metadata.AuthenticateConnection. (This issue can be related to #936.) This patch enables caching of client names for cert-based floating clients. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Created a new method to return a sorted list of plugins by type.Mike McCallister2011-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | Replaced many list comprehensions in Core.py with a new method named plugins_by_type(), which does the same thing with an added twist: this new method also sorts the list of plugins by a new field named sort_order. It also uses the name of the plugin where the sort_order values are the same. This lets us control the processing sequence of plugins that need to build on the results of a plugin that runs prior to them. The immediate example is Deps, which should run after Packages has generated the full list of packages to be installed. Prior to this commit, it was impossible to control the order in which they ran. A future commit will (hopefully) take advantage of this capability. This commit also splits the Core.validate_data() method into two: one for validate_structures() and one for validate_goals(), instead of passing in a base class and using if logic. This approach seemed a little clearer to me.
* Enhanced bcfg2-admin viz to allow output to be limited to one client.Mike McCallister2011-07-051-12/+29
| | | | | | | | | | By default, bcfg2-admin viz creates a diagram that shows the complete contents of the repository: all Groups, Bundles, and (optionally) Hosts/Clients. In a complicated configuration, this can be an overwhelming amount of information. This change adds an --only-client option that can be used to limit the elements on the diagram to those that apply to the named host.
* PY3K: Finish server-side code fixesSol Jerome2011-06-141-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: Add full PY3K compatibilitySol Jerome2011-04-261-1/+2
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* fixed duplicate group detection in MetadataChris St. Pierre2011-04-201-2/+1
|
* Plugins: PY3K + PEP8 fixesSol Jerome2011-04-061-29/+44
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Metadata: Move group routines to new classTim Laszlo2011-02-101-6/+6
|
* Missing newline in helpTim Laszlo2011-02-101-55/+28
|
* Metadata: Move client routines to new classTim Laszlo2011-02-101-36/+18
|
* Metadata: Add xml source classTim Laszlo2011-02-101-138/+160
|
* Metadata: Handle writes to XInclude files in bootstrap modeTim Laszlo2011-01-281-3/+19
|
* Metadata: Handle writes to XInclude files within clients.xml (Resolves #841)Tim Laszlo2011-01-281-12/+28
|
* Metadata: Reload clients.xml before writing if the Pseudo file monitor is usedTim Laszlo2011-01-241-0/+17
|
* Metadata: Typo in XIncludeErrorTim Laszlo2011-01-241-1/+1
|
* Metadata: Stop stripping comments from clients.xml (Resolves #929)Tim Laszlo2011-01-241-10/+2
|
* Metadata: Raise MetadataConsistencyError when set_profile failsTim Laszlo2011-01-231-0/+1
|
* Metadata: Gracefully handle failed profile updates to clients.xml using ↵Tim Laszlo2011-01-231-1/+5
| | | | xinclude files
* Metadata: report multiple group definitions (Resolves Ticket #784)Narayan Desai2011-01-221-0/+5
|
* Metadata: fix bcfg2-admin query (Resolves Ticket #959)Narayan Desai2010-12-081-3/+2
|
* Extend client metadata to include group category informationTim Laszlo2010-10-221-2/+16
|
* Metadata: Add error message when file monitor failsSol Jerome2010-09-121-0/+1
| | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@6052 ce84e21b-d406-0410-9b95-82705330c041
* ThreadedStatistics: load/save data on startup/shutdownTim Laszlo2010-06-161-0/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5941 ce84e21b-d406-0410-9b95-82705330c041
* Updated files to match PEP 257 Fabian Affolter2010-06-091-24/+25
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5904 ce84e21b-d406-0410-9b95-82705330c041
* Viz: Include xincluded files from groups.xml (Resolves Ticket #867)Sol Jerome2010-03-251-0/+4
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5790 ce84e21b-d406-0410-9b95-82705330c041
* Fix traceback in bcfg2-admin init by using os.makedirs()Sol Jerome2010-02-051-1/+1
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5713 ce84e21b-d406-0410-9b95-82705330c041
* Fix call to os.rename()Sol Jerome2010-01-241-3/+2
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5702 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: Write out proper file when clients.xml is a symlinkSol Jerome2010-01-231-1/+7
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5701 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: build session cache properly for uuid clients [bugfix]Narayan Desai2010-01-121-2/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5671 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: use normalized hostnames for comparison (reported by gregcoit) ↵Narayan Desai2010-01-081-1/+1
| | | | | | [bugfix] git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5662 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: handle errors more robustly, and perform clients.xml wranging in ↵Narayan Desai2009-12-231-8/+24
| | | | | | new file git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5632 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: fix use of session cache for cert-recognized clientsNarayan Desai2009-12-091-3/+4
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5615 ce84e21b-d406-0410-9b95-82705330c041
* Fix accidental revert in [5604]Sol Jerome2009-12-021-1/+1
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5606 ce84e21b-d406-0410-9b95-82705330c041
* Revert "Metadata: cache session information for all clients that aren't ↵Sol Jerome2009-12-021-3/+2
| | | | | | | | | | | address resolved" This reverts commit [5592]. This broke Metadata resolution by causing tracebacks which resulted in communication failure. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5605 ce84e21b-d406-0410-9b95-82705330c041
* Revert "Metadata: fix address validation issue with hard-wired addresses"Sol Jerome2009-12-021-1/+1
| | | | | | | | | This reverts commit [5592]. This broke Metadata resolution by causing tracebacks which resulted in communication failure. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5604 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: cache session information for all clients that aren't address resolvedNarayan Desai2009-11-231-2/+3
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5592 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: fix address validation issue with hard-wired addressesNarayan Desai2009-11-211-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5588 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: implement full debugging for client metadata authenticationNarayan Desai2009-11-211-21/+29
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5586 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: fix lxml api use to work with older versionsNarayan Desai2009-11-051-3/+7
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5525 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: force pretty-printing of clients file (Resolves Ticket #644)Narayan Desai2009-10-241-1/+5
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5500 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: refuse to add dynamic group membership in explicitly private ↵Narayan Desai2009-10-241-1/+8
| | | | | | groups (Resolves Ticket #529) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5496 ce84e21b-d406-0410-9b95-82705330c041
* Pylint/PEP 8 Code cleanupsSol Jerome2009-10-071-10/+10
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5477 ce84e21b-d406-0410-9b95-82705330c041
* Metadata: fix query.all_groups to catch implicit groups in groups.xmlNarayan Desai2009-07-141-1/+3
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5325 ce84e21b-d406-0410-9b95-82705330c041
* bcfg2-admin init: fix traceback (reported by somekool on irc)Narayan Desai2009-07-131-2/+3
| | | | | | Apparently classmethods aren't callable from subclasses if overridden git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5322 ce84e21b-d406-0410-9b95-82705330c041
* Rework SSHbase alias/address supportNarayan Desai2009-07-111-22/+23
| | | | | | | | | | | | | | | | | | | Rework metadata so that each instance has addresses and aliases instance attributes containing manually specified addresses and alias names. Unify pub key resolution loop to process this data once per client. Change: only clients with active metadata will be included in ssh_known_hosts data now. Other keys can be stored in *.static, in final known_hosts file format. Also, a more exhaustive search for ip addresses is now performed. DNS resolution for the client hostname, as well as all aliases is performed. Manually specified addresses are added included as well. This should also fix some tracebacks reported by Cory and Teknix, as well as improve performance. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5319 ce84e21b-d406-0410-9b95-82705330c041