summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* fixed security bugs with unescaped input to the shellChris St. Pierre2011-08-054-24/+18
|
* fix broken assembling of yum repo urlJoe Digilio2011-08-031-1/+1
|
* don't add gpg-pubkey package unless there are instances to installChris St. Pierre2011-08-021-35/+36
|
* fixed error message to avoid tracebackChris St. Pierre2011-08-011-1/+1
|
* Lots of improvements to Packages plugin:Chris St. Pierre2011-08-011-247/+652
| | | | | | | | | | | | | | | | | | | | | | | * Better config handling: Split into packages.conf (which contains one-time configuration directives) and sources.xml (which contains the actual package sources.) The config file looks like a StructFile, and supports <Client> tags and negated Client and Group tags. Packages.Reload (_not_ Refresh) is run on changes to the sources config. tools/packages-convert.py is provided to convert to the new format. * Automagic handling of GPG keys. The new config format handles association of GPG keys go with repos; Packages then Does The Right Thing and gets them to the clients, gets them installed properly, and handles them in the specification. At the moment this only works for yum repos, not APT (see below). * Automatic generation of yum configs using the sources and GPG keys supplied. APT configs are not done yet (see below). * The early vestiges of integration with Pulp (pulpproject.org). Yet to do: * Better support for Pulp; documentation on Pulp integration. * APT support for key handling and config generation.
* added write() method to Properties to write back persistent changesChris St. Pierre2011-07-271-4/+43
|
* Rewrote DirectoryBacked so it handles files contained in an arbitrary ↵Mike McCallister2011-07-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory layout. Previously, DirectoryBacked (and as a result Bundler, Deps, Rules, Base, Pkgmgr, and others) only recognized XML files contained in the top-level plugin directory, for example: Deps/foo.xml Deps/subdir/foo.xml # <--- Ignored Bundler/bar.xml Bundler/subdir/baz.xml # <--- Ignored Now it can support the following as well: Deps/debian-lenny/foo.xml Deps/debian-squeeze/foo.xml Bundler/group-a/bar.xml Bundler/group-b/baz.xml Note that the directories and filenames do not factor into the semantic meaning of the configuration specification. The contents of foo.xml must stand alone, as if they were in the same single-level directory as before. In the case of Deps, Rules, Pkgmgr, and Svcmgr, you must use Groups and priorities within the XML files as needed to ensure that Bcfg2 can correctly resolve the configuration for your hosts. For example, prior to this change you would use a single file like the following: Deps/foo.xml: <Dependencies priority="0"> <Group name="debian-lenny"> <Package name="foo"> <Path name="/etc/foo.conf"/> </Package> </Group> <Group name="debian-squeeze"> <Package name="foo"> <Path name="/etc/foo.conf"/> <Path name="/etc/bar.conf"/> </Package> </Group> </Dependencies> Now you can use a pair of files in separate directories like the following. Note how the groups within each file prevent there from being two sources for a single package: Deps/debian-lenny/foo.xml: <Dependencies priority="0"> <Group name="debian-lenny"> <Package name="foo"> <Path name="/etc/foo.conf"/> </Package> </Group> </Dependencies> Deps/debian-squeeze/foo.xml: <Dependencies priority="0"> <Group name="debian-squeeze"> <Package name="foo"> <Path name="/etc/foo.conf"/> <Path name="/etc/bar.conf"/> </Package> </Group> </Dependencies> In the case of Bundler, individual filenames must remain unique throughout the directory hierarchy, and they must match the bundle name.
* Update to Deps to eliminate "Failed to add dep entry for <built-in function ↵Mike McCallister2011-07-251-1/+6
| | | | | | | | Comment>:None" warning. Comments in the Deps file (inside a Package element) will cause the above error. In generating the prerequisites, we can eliminate this by looking for callable() items and excluding them.
* Treat Bound entries like unbound entries for calculating prerequisites in Deps.Mike McCallister2011-07-231-5/+7
|
* Refactor the validate_structure() method into two.Mike McCallister2011-07-231-25/+45
| | | | | | | | | | | | | New method named calculate_prereqs() handles pre-req calculation. Existing validate_structure() method now only handles memoization of the prereqs and use of the prereqs to update the configuration. Also added a sort_order value to cause this plugin to run after Packages, so we can use Deps to add dependencies to implicitly added Packages. NOTE: This doesn't work yet, as Packages adds BoundPackage entries, and Deps doesn't yet realize they are equivalent to the Package entries it knows about. This will be fixed in a future commit.
* 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.
* Fixed to accommodate changes made to Plugin.py in changeset ↵Mike McCallister2011-07-221-3/+4
| | | | | | | | | | | 3291a875339a7e5569d4. The changes to the INode.Match() function in changeset 3291a875339a7e5569d4 caused breakage in the Deps plugin, as it inherits from INode. This commit adjusts the definition of the predicate function in Deps.py to mirror the changes made to INode in Plugin.py, eliminating the error about the wrong number of parameters being passed to the lambda function.
* fixed output from ohai plugin when ohai not installedChris St. Pierre2011-07-151-1/+0
|
* made ohai plugin fail gracefully on machines without ohai installedChris St. Pierre2011-07-111-2/+12
|
* 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.
* Statistics: Abort if "sensitive" files are pulledHolger Weiß2011-06-301-1/+3
| | | | | | Let the Statistics plugin raise a PluginExecutionError if a "sensitive" entry is requested by "bcfg2-admin pull". This is how the DBStats plugin behaves already.
* New database field: "is_sensitive"Holger Weiß2011-06-291-2/+3
| | | | | | The new "entry.reason.is_sensitive" flag indicates whether the file contents/diffs were omitted from the database due to the "sensitive" <Path> attribute.
* New Info attribute: "sensitive"Holger Weiß2011-06-291-2/+4
| | | | | | The contents/diffs of <Path>s which are marked as "sensitive" are now omitted from the reports transmitted to the server, so that they won't end up in the statistics database.
* Merge branch 'master' of git.mcs.anl.gov:bcfg2Narayan Desai2011-06-228-62/+147
|\
| * Cfg: Add support for perms='inherit' (Ticket #642)Sol Jerome2011-06-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | This feature allows you to use the on-disk permissions of the file in the Cfg repository rather than specifying them using the traditional means in info.xml. Note that this only works for the octal permissions of the file on disk since the owner/group may not exist on the destination machine. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Improved handling of JSON data from probesChris St. Pierre2011-06-171-7/+10
| |
| * Merge branch 'py3k'Sol Jerome2011-06-152-0/+2
| |\
| | * PY3K: Add compatibility commentsSol Jerome2011-06-152-0/+2
| | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * | cleaned up some ProbeData stuff, make null probe storage more consistentChris St. Pierre2011-06-151-3/+5
| | |
| * | bug fixesChris St. Pierre2011-06-151-11/+1
| | |
| * | made StructFile.Match() work with Group/Client tags inside other tagsChris St. Pierre2011-06-151-36/+9
| | |
| * | make Bcfg2 automatically handle JSON, XML, and YAML output from probesChris St. Pierre2011-06-151-4/+89
| |/
| * PY3K: Finish server-side code fixesSol Jerome2011-06-144-13/+20
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Accept non-ASCII diffsHolger Weiß2011-06-142-1/+7
| | | | | | | | | | | | | | Currently, client reports don't include diffs of files which aren't US-ASCII encoded. The client transmits such files as Base64 blobs. As we'd like to change that, this commit teaches the server to properly handle non-ASCII diffs.
| * Base: Deprecate Base in favor of BundlerSol Jerome2011-06-141-0/+1
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Cfg: Fix traceback for non-ascii filesSol Jerome2011-06-141-0/+7
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Cfg: Fix bcfg2-admin pull behavior for genshi templates (#1010)Sol Jerome2011-06-141-1/+2
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Cfg: Fix PluginExecutionErrorTim Laszlo2011-06-141-1/+1
| | | | | | | | Replaces PluginExecutionError with Bcfg2.Server.Plugin.PluginExecutionError. Reported by emias.
| * Added FileProbes plugin.Chris St. Pierre2011-06-141-0/+177
| |
| * Improved Svn2 error handling -- ClientError may not have a message attribute.Chris St. Pierre2011-06-141-4/+4
| |
| * add yet another missing sys importTorsten Rehn2011-06-141-0/+1
| |
| * add another missing sys importTorsten Rehn2011-06-141-0/+1
| |
| * log more useful error message if python-ldap is not installedTorsten Rehn2011-06-141-1/+9
| |
| * add missing sys importTorsten Rehn2011-06-141-0/+1
| |
| * Add missing import sys.Raul Cuza2011-06-141-0/+1
| |
| * TCheetah: Fix local variable bug reported by trehn on IRCSol Jerome2011-06-141-3/+3
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * Cfg: Fix the output encoding of Genshi templatesHolger Weiß2011-06-141-2/+3
| | | | | | | | | | | | Encode the configuration files generated from Genshi templates according to the encoding setting from Options.py instead of unconditionally using UTF-8.
| * TGenshi: Fix local variable bug reported by trehn on IRCSol Jerome2011-05-061-3/+4
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
| * SSHbase: PY3K string join method fixSol Jerome2011-05-061-1/+1
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'master' of git.mcs.anl.gov:bcfg2Narayan Desai2011-05-113-5/+182
|\ \
| * | Cfg: Fix PluginExecutionErrorTim Laszlo2011-05-111-1/+1
| | | | | | | | | | | | Replaces PluginExecutionError with Bcfg2.Server.Plugin.PluginExecutionError. Reported by emias.
| * | Added FileProbes plugin.Chris St. Pierre2011-05-111-0/+177
| | |
| * | Improved Svn2 error handling -- ClientError may not have a message attribute.Chris St. Pierre2011-05-111-4/+4
| | |
* | | Merge branch 'master' of git.mcs.anl.gov:bcfg2Narayan Desai2011-05-1026-381/+634
|\| |
| * | SSHbase: Fix PY3K tracebacks for known_hosts fileSol Jerome2011-05-101-1/+1
| | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>