summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Metadata.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'maint'Alexander Sulfrian2015-06-121-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: debian/changelog doc/conf.py misc/bcfg2-selinux.spec misc/bcfg2.spec osx/Makefile osx/macports/Portfile solaris-ips/MANIFEST.bcfg2-server.header solaris-ips/MANIFEST.bcfg2.header solaris-ips/Makefile solaris-ips/pkginfo.bcfg2 solaris-ips/pkginfo.bcfg2-server solaris/Makefile solaris/pkginfo.bcfg2 solaris/pkginfo.bcfg2-server src/lib/Bcfg2/Client/Tools/APT.py src/lib/Bcfg2/Client/Tools/FreeBSDInit.py src/lib/Bcfg2/Client/Tools/__init__.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Reporting/templates/base.html src/lib/Bcfg2/Server/CherrypyCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/__init__.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Lint/__init__.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/__init__.py src/lib/Bcfg2/Server/Plugins/GroupPatterns.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/Packages/Source.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/SSHbase.py src/lib/Bcfg2/Server/Plugins/SSLCA.py src/lib/Bcfg2/version.py src/sbin/bcfg2-info src/sbin/bcfg2-test testsuite/requirements.txt
| * Server/Plugins/Metadata: Reject passwd clients, if auth_type is certAlexander Sulfrian2015-02-241-2/+7
| | | | | | | | | | If the auth type (either globally or specific for the client) is set to cert auth, we have to reject clients that does not provide a cert.
* | Remove blanket excepts from plugins and lintChris St. Pierre2015-02-181-20/+5
| | | | | | | | | | | | | | | | | | | | This removes most blanket except: clauses from all plugins, including the base plugin libraries, and bcfg2-lint. The few that remain should all be necessary. Most of the changes were quite minor, but this did require some restructuring of the CfgPrivateKeyCreator; as a result, the tests for that module were rewritten.
* | Server/Plugins/Metadata: add remove_client to rmi methodsAlexander Sulfrian2014-12-081-1/+2
| |
* | Server/Plugins/Metadata: add list_clients to rmi methodsAlexander Sulfrian2014-11-301-0/+1
| |
* | Metadata: Fix merge from 70d618bSol Jerome2014-06-151-2/+2
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'maint'Sol Jerome2014-06-101-8/+21
|\| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: doc/server/plugins/structures/bundler/index.txt src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Plugins/GroupLogic.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/Server/Plugins/Reporting.py
| * Metadata: Reread clients.xml/groups.xml more carefullyChris St. Pierre2014-05-151-8/+21
| | | | | | | | | | Avoid building client metadata while rereading those files, and expire the metadata cache afterwards.
* | Merge branch 'maint'Chris St. Pierre2014-04-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: misc/bcfg2.spec src/lib/Bcfg2/Client/Client.py src/lib/Bcfg2/Client/Tools/APK.py src/lib/Bcfg2/Client/Tools/MacPorts.py src/lib/Bcfg2/Client/Tools/Pacman.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Server/Admin/Minestruct.py src/lib/Bcfg2/Server/Admin/Pull.py src/lib/Bcfg2/Server/Admin/Viz.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProperties.py
* | Merge branch 'maint' into masterSol Jerome2014-04-161-5/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: doc/appendix/guides/import-existing-ssh-keys.txt misc/bcfg2.spec src/lib/Bcfg2/Client/Tools/VCS.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Reporting/Storage/DjangoORM.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/__init__.py src/lib/Bcfg2/Server/Lint/RequiredAttrs.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-reports src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestAugeas.py
| * Metadata: reread client list from databaseChris St. Pierre2014-02-231-5/+36
| | | | | | | | | | | | | | | | This fixes two related bugs: One causes Metadata to use an out-of-date cached list of clients when a client is deleted or added with bcfg2-admin; the other causes child worker processes to use an out-of-date cached list of clients when a client is added with a Bcfg2 run when the multiprocessing core is in use.
| * Metadata: fix check for Groups with options in duplicate groups testChris St. Pierre2014-02-071-3/+4
| |
* | Merge branch 'maint'Chris St. Pierre2013-12-091-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/appendix/guides/fedora.txt misc/bcfg2.spec schemas/types.xsd src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Client.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Bundler.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Probes.py src/sbin/bcfg2-crypt testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py testsuite/common.py testsuite/install.sh
| * bcfg2-admin: Restored missing "bcfg2-admin client add ... attrib=val" ↵Chris St. Pierre2013-11-251-0/+5
| | | | | | | | functionality
* | Plugins: refactored out unnecessary datastore constructor argumentChris St. Pierre2013-10-291-4/+3
| |
* | Merge branch 'maint'Chris St. Pierre2013-10-281-6/+10
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: doc/development/lint.txt misc/bcfg2.spec src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/models.py testsuite/install.sh
| * Metadata: read in clients.xml on every writeChris St. Pierre2013-10-041-0/+1
| | | | | | | | | | | | | | | | | | This ensures consistency between the in-memory representation of clients.xml and the representation on disk. If we don't read our writes immediately, there's a race condition when creating a new client: If it asserts its profile or version before the FAM event from the clients.xml edit is processed, then the clients doesn't appear to exist yet, and Bcfg2 complains.
| * Metadata: import any() from CompatChris St. Pierre2013-10-031-1/+3
| |
| * Metadata: better logging when updating XML data failsChris St. Pierre2013-09-261-5/+6
| |
| * bcfg2-lint: Fixed Metadata check for duplicate groupsChris St. Pierre2013-09-171-9/+29
| | | | | | | | | | | | | | | | | | The duplicate group check parsed groups differently from the actual groups.xml parsing routines; the latter followed the documentation, while the duplicate group check did now. This fixes the duplicate group check to parse groups.xml correctly when looking for duplicates. Fixes #140
* | Pylint/PEP8 fixesSol Jerome2013-09-061-7/+7
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'maint'Sol Jerome2013-09-011-99/+149
|\| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: src/lib/Bcfg2/Client/Tools/__init__.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/NagiosGen.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/SSLServer.py tools/README
| * Metadata: get_client_names_by_* fixesChris St. Pierre2013-08-291-5/+13
| | | | | | | | | | | | Fixed long lines. Improved efficiency by avoiding multiple loops over the same data.
| * Metadata: Fix client list calls use list_clients() which is DB-aware instead ↵Jason Kincl2013-08-271-5/+5
| | | | | | | | of just self.clients
| * Metadata: removed stray blank lineChris St. Pierre2013-08-151-1/+0
| |
| * Metadata: search groups breadth-first when building metadataChris St. Pierre2013-08-151-25/+37
| | | | | | | | | | This makes category negation consistent, and also makes it work like it did in Bcfg2 1.2
| * Metadata: metadata generation improvementsChris St. Pierre2013-08-141-70/+97
| | | | | | | | | | | | | | | | | | Primarily, this fixes a few potential bugs in initial metadata, which may result in inconsistent ordering of groups, which can be a problem when relying on category suppression. This also deduplicates some category suppression code, and moves some nested functions to top-level methods, which are surprisingly faster.
| * Metadata: log now client creation with profileChris St. Pierre2013-08-121-0/+4
| |
* | Metadata: Clean up FAM monitoring cruftChris St. Pierre2013-08-301-21/+13
| | | | | | | | | | | | | | Removed code that supported an unused watch_clients option that permitted locally disabling FAM monitoring for Metadata; and ensured that XIncludes from clients.xml/groups.xml were always monitored (fixed in 5b66845).
* | Revert "Metadata: group_in_category fixes"Chris St. Pierre2013-08-161-18/+5
| | | | | | | | | | | | | | | | This reverts commit 35498c8b849c15632d720656d5736c4c85f76b53. group_in_category() access data that's held on the ClientMetadata object, and getting that data via the MetadataQuery object would be more expensive.
* | Rewrote arbitrary data cache systemChris St. Pierre2013-08-161-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | The caching facilities in Bcfg2.Server.Cache provided basically no features. This rewrites that to allow for much more powerful cache expiration, with a particular focus on interoperation between different components and plugins to let caches be expired as necessary. (E.g., the Probes plugin can expire the Metadata cache.) This does not affect any of the file data cached by Bcfg2, only the caches that are populated with arbitrary data (Metadata, Packages, Probes, etc.).
* | Metadata: group_in_category fixesChris St. Pierre2013-08-151-5/+18
| | | | | | | | | | | | | | Moved ClientMetadata.group_in_category to MetadataQuery.group_in_category, with a deprecation warning for the old place. Also changed the null answer (i.e., this client isn't in a group in that category) to None from ''.
* | testsuite: fixed unit testsChris St. Pierre2013-08-121-1/+1
| |
* | Merge branch 'maint'Chris St. Pierre2013-08-121-6/+7
|\| | | | | | | | | | | Conflicts: src/lib/Bcfg2/Server/Admin/Viz.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
| * Viz: include clients that should be included, not vice-versaChris St. Pierre2013-08-091-1/+1
| |
| * Viz: exclude duplicate bundles for a given hostChris St. Pierre2013-08-091-3/+4
| |
| * Viz: distinguish categories from hostsChris St. Pierre2013-08-091-1/+1
| |
| * Metadata: Fix bundle visualizationSol Jerome2013-08-091-1/+1
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Metadata: catch dns lookup errors betterChris St. Pierre2013-08-081-1/+1
| |
* | testsuite: fixed more unit testsChris St. Pierre2013-08-121-3/+4
| |
* | testsuite: fixed most pylint complaintsChris St. Pierre2013-08-091-0/+8
| |
* | Plugins: Fixed/made consistent Django model loadChris St. Pierre2013-08-091-4/+1
| |
* | Merge branch 'options-rewrite'Chris St. Pierre2013-08-081-161/+39
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/lib/Bcfg2/Client/Frame.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Admin/Xcmd.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/base.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/Server/SSLServer.py src/lib/Bcfg2/Utils.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-test src/sbin/bcfg2-yum-helper tools/bcfg2-profile-templates.py
| * | Options: migrated plugins to new options parserChris St. Pierre2013-06-271-164/+42
| | |
* | | Merge branch 'maint'Chris St. Pierre2013-08-081-13/+22
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/appendix/files/mysql.txt doc/getting_started/index.txt doc/server/plugins/structures/bundler/kernel.txt src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/interfaces.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/Plugins/SSHbase.py
| * | Plugin: added new Caching interfaceChris St. Pierre2013-08-071-1/+6
| | | | | | | | | | | | | | | | | | | | | This gives a single unified interface for expiring caches, no matter the plugin. This will be particularly useful with the MultiprocessingCore, as certain calls must be dispatched to child processes to expire their caches.
| * | Get profile by building metadata instead of guessingMichael Fenn2013-08-061-6/+9
| | | | | | | | | | | | | | | | | | Rather than doing some ad-hoc lookups of internal data structures stpierre suggested that it'd be better to use the normal metadata build procedures. This implements that and adjusts the tests.
| * | Make updating the structures conditional on profile changingMichael Fenn2013-08-051-6/+6
| | | | | | | | | | | | | | | | | | Based on the expectations of the tests, I am reasonably confident that updating the in memory structures is logically part of changing the client's profile so I put it in the if block
| * | Found a stray write that should be part of the new client caseMichael Fenn2013-08-051-2/+2
| | |
| * | Make pylint happyMichael Fenn2013-08-051-1/+1
| | |