summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* added --altsrc flag to bcfg2-info buildfileChris St. Pierre2011-08-181-3/+14
|
* APT: Add type='ignore' support (patch from tie on IRC)Sol Jerome2011-08-171-2/+11
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugin.py: Deal with more vim temporary filesSol Jerome2011-08-171-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Filter for ignored files earlier to eliminate traceback.Mike McCallister2011-08-171-5/+5
| | | | | | | | Ignored files (like Vim swap files) were being picked up by the File Monitor and were causing tracebacks because they are invalid XML. Now check for such ignored file patterns before doing any other processing. (cherry picked from commit c266631eb36e117bad0f297506dc301ee9cc0487)
* Action: Fix decision mode installation (resolves #1029)mkd2011-08-161-5/+21
| | | | | | | This fix is more complete than 8059a36 and also fixes issues relating to the use of wildcards in Decisions. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Merge branch 'reports-plusminus' of https://github.com/mkdfh/bcfg2Sol Jerome2011-08-123-10/+10
|\
| * Reports:unknown2011-08-123-10/+10
| | | | | | | | | | toggle "[+]" to "[-]" and back on expanding/collapsing lists make the whole header bar clickable
* | Metadata: Better handling of floating cert-authenticated clients (Ticket #1030)Sol Jerome2011-08-112-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | fix chmod in "bcfg2-admin init"Joe Digilio2011-08-101-1/+1
|/
* Action: Fix whitelist mode (Resolves #1029)Sol Jerome2011-08-101-1/+5
| | | | | | Don't run 'post' Action entries if they are unlisted in whitelist mode. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Be more patient for notifications about generated SSHkeys.Mike McCallister2011-08-091-8/+13
| | | | | | | Previously, we wanted one second for the FileMonitor to notify us about newly generated SSHkeys. Now, we wait up to ten seconds before logging a warning and giving up. (cherry picked from commit 204ddcddea55b1f8eed5f6dfe4dd2967bac5bad7)
* Be a little more conservative in handling "changed" events.Mike McCallister2011-08-091-17/+44
| | | | | | | | | Previously, if we got a "changed" event for a path we weren't monitoring, we would log a warning and ignore it. Now, we log the warning, but treat it like a "created" event so we know about the file/directory going forward. This situation shouldn't occur, but this new logic will handle it a little better. (cherry picked from commit 29701f299632ea343d7b58af4d3b7a143ced0078)
* Fix typo in "bcfg2-info buildbundle" usage outputHolger Weiß2011-08-091-1/+1
|
* fixed stupid typoChris St. Pierre2011-08-081-1/+1
|
* invoke dot in a way that works on all systemsChris St. Pierre2011-08-081-4/+14
|
* do not start/stop services with "-s disabled"Chris St. Pierre2011-08-081-3/+4
|
* got rid of blank line output when using bcfg2-admin viz with the -o optionChris St. Pierre2011-08-081-1/+2
|
* fixed backtrace if Packages downloads a bogus GPG keyChris St. Pierre2011-08-051-6/+13
|
* don't try to wrap bcfg2-lint output if it's not connected to a ttyChris St. Pierre2011-08-051-6/+15
|
* fixed typos in RequiredAttrs.check_packages()Chris St. Pierre2011-08-051-2/+2
|
* fixed more unescaped shell commandsChris St. Pierre2011-08-052-13/+24
|
* Merge branch 'work'Chris St. Pierre2011-08-051-4/+5
|\
| * fixed bcfg2-admin viz bug introduced by Popen fixesChris St. Pierre2011-08-051-4/+5
| |
| * made packages.conf optionalChris St. Pierre2011-08-051-1/+5
| |
* | made packages.conf optionalChris St. Pierre2011-08-051-1/+5
| |
* | Removed the explicit calls to AddEntry from SSHbase.py in favor ofMike McCallister2011-08-051-3/+7
|/ | | | | | | | | | | | | | | allowing the normal FileMonitor events to populate the data structures. We now call the File Monitor's handle_events_in_interval() method after generating new host keys, so that the normal code paths can populate the data structures used for binding to file data. We need the explicit call because we can't wait for the server's normal event queue processing to discover the changes; we need the newly-generated keys available immediately for binding during the current connection with the client. (cherry picked from commit 74a6e4707725710f6629b292902f2312710e4980)
* fixed security bugs with unescaped input to the shellChris St. Pierre2011-08-055-28/+21
|
* fixed regex in reports_client_history view; made all reports hostname ↵Chris St. Pierre2011-08-051-3/+3
| | | | regexes consistent
* fixed traceback from unknown-path-type errorsChris St. Pierre2011-08-031-0/+1
|
* added buildbundle command to bcfg2-info to render a bundle templateChris St. Pierre2011-08-031-0/+26
|
* fix broken assembling of yum repo urlJoe Digilio2011-08-031-1/+1
|
* fixed info.xml XMLSrc fixChris St. Pierre2011-08-031-1/+1
|
* Merge branch 'master' of https://github.com/mikemccllstr/bcfg2Sol Jerome2011-08-021-13/+16
|\
| * Fix error that occurs when deleting and re-creating the same directory.Mike McCallister2011-07-291-13/+16
| | | | | | | | | | | | | | FileMonitor never forgets about directories you've asked it to watch, so we should never remove them from self.handles. Otherwise, once deleted and readded, events will arrive with a requestID we don't have a handle for.
* | don't add gpg-pubkey package unless there are instances to installChris St. Pierre2011-08-021-35/+36
| |
* | split up XMLSrc parsers used for Rules and info.xmlChris St. Pierre2011-08-011-5/+18
| |
* | bcfg2-lint should read both bcfg2.conf and bcfg2-lint.confChris St. Pierre2011-08-011-15/+6
| |
* | fixed path to Packages config in Lint/Validate.pyChris St. Pierre2011-08-011-1/+1
| |
* | fixed error message to avoid tracebackChris St. Pierre2011-08-011-1/+1
| |
* | Lots of improvements to Packages plugin:Chris St. Pierre2011-08-013-247/+682
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | bcfg2-lint: Update schema with new vcs valuesSol Jerome2011-07-311-1/+2
|/ | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* bcfg2-lint RequiredAttrs plugin checks for text content of "file" PathsChris St. Pierre2011-07-281-0/+7
|
* added write() method to Properties to write back persistent changesChris St. Pierre2011-07-271-4/+43
|
* Fixed problem with recent DirectoryBacked changes that caused a traceback on ↵Mike McCallister2011-07-261-3/+12
| | | | Properties initialization.
* Rewrote DirectoryBacked so it handles files contained in an arbitrary ↵Mike McCallister2011-07-262-39/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added docstring to explain what 'datastore' argument contains.Mike McCallister2011-07-231-0/+5
|
* 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-223-41/+60
| | | | | | | | | | | | | | | | | | | | 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.