summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
Commit message (Collapse)AuthorAgeFilesLines
* Add loader/environment to Jinja2 templates so that files canGordon Messmer2014-11-061-3/+42
| | | | include or extend other files.
* Lint: fix default value for lint_pluginsAlexander Sulfrian2014-10-309-30/+49
| | | | | | | | | | | | | | This is a bit tricky because we need the enabled server plugins for the default value. To have these available before parsing lint_plugins the server plugins needs to be parsed during early parsing mode. Additional there are lint plugins that has no matching server plugin. To identify them, this adds a reference from the lint plutins to the name of the matching server plugins in the member variable __serverplugin__. If this variable is None the plugin is always used. If a lint plugin could not be imported (maybe because of a missing dependency) the plugin is ignored and not considered as a default value.
* Lint: handle KeyboardInterupt during fam eventsAlexander Sulfrian2014-10-301-2/+2
| | | | | | | If a KeyboardInterupt occurs during block_for_fam_events core.shutdown() has to be called. block_For_fam_events will start the fam thread and if shutdown is not called the main thread will stop on an exception and python will wait until the fam thread stops (never).
* Lint/Comments: add missing optionsAlexander Sulfrian2014-10-301-1/+9
|
* Lint/Comments: fix typo in optionsAlexander Sulfrian2014-10-301-2/+2
|
* Lint: remove executable bit from source filesAlexander Sulfrian2014-10-302-0/+0
|
* Lint/TemplateAbuse: we need the <Info> elementAlexander Sulfrian2014-10-301-1/+1
|
* Lint/TemplateAbuse: fix access to FileInfo xml dataAlexander Sulfrian2014-10-302-2/+2
|
* Lint/Validate: fix default schema pathAlexander Sulfrian2014-10-291-1/+1
|
* Fix missing import line for django.core.management.Matt Kemp2014-10-281-0/+1
|
* YUM.py: Fix tracebacks from 00a15600Sol Jerome2014-10-281-6/+6
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Merge pull request #225 from AlexanderS/fix-stats-only-importantChris St. Pierre2014-10-271-5/+11
|\ | | | | Client: fix statistics for only-important mode
| * Client: fix statistics for only-important modeAlexander Sulfrian2014-10-261-5/+11
| | | | | | | | Do not report non-important entries as bad entries in only-important mode.
* | Server/Plugins/ALC: do not require a name attributeAlexander Sulfrian2014-10-261-0/+1
|/
* Fixed py2.6-ism properlyChris St. Pierre2014-10-201-2/+6
|
* removed python 2.6-ismChris St. Pierre2014-10-201-2/+2
|
* Set option types on YUM/RPM list optionsChris St. Pierre2014-10-202-4/+6
|
* Merge pull request #216 from jsbillings/yum-plugin-masterChris St. Pierre2014-10-201-0/+20
|\ | | | | YUM: Add options to enable and disable Yum plugins
| * YUM: Add options to enable and disable Yum pluginsJonathan Billings2014-10-171-0/+20
| | | | | | | | | | | | | | | | | | | | | | Adds two options you can define: * disabled_plugins: A comma-separated list of plugins to disable * enabled_plugins: A comma-separated list of plugins to enable This allows you to run bcfg2 with certain plugins enabled or disabled when they're not set that way in the yum configuration. This is useful because the Bcfg2 YUM plugin is initialized before it can read in any files that might overwrite yum plugin configuration.
* | Client/Proxy: use keyword arguments to match the correct orderAlexander Sulfrian2014-10-201-6/+7
| | | | | | | | | | | | | | | | The XMLRPCTransport __init__ method defines several arguments with default values. The current call missed the use_datetime argument, so that the client_timeout will set the use_datetime paramenter and the protocol option was used as timeout (does not work, because a float is required and raises an exception).
* | Options: change default communication protocol to xmlrpc/tlsv1Alexander Sulfrian2014-10-153-9/+9
| |
* | Options: add missing communication:protocol optionsAlexander Sulfrian2014-10-154-4/+17
| | | | | | | | | | The option was there in bcfg2-1.3.x and is still documented (maybe it just got lost during the options rewrite).
* | InfoXML: <Path> filter should match on realpathAlexander Sulfrian2014-10-141-1/+1
| | | | | | | | | | | | | | When using altsrc the name of real file created on the client is now in the realname attribute of the entry. The <Path> filter in the info.xml should match theses if available to set different permissions for the different files created by one template with altsrc.
* | Merge pull request #209 from AlexanderS/fix-password-authChris St. Pierre2014-10-143-14/+16
|\ \ | | | | | | Options/Commmon: remove default values for ssl-key/ssl-cert
| * | Options/Common: remove defaults for ssl-key/ssl-cert on the ClientAlexander Sulfrian2014-10-143-14/+16
| | | | | | | | | | | | | | | | | | | | | With these default values it is impossible to remove the ssl key and ssl cert from the configuration and use password auth. Configuration options could not be condensed in Bcfg2.Options.Common, because Server and Client needs different default values.
* | | Merge pull request #205 from AlexanderS/fix-actionChris St. Pierre2014-10-141-1/+1
|\ \ \ | |/ / |/| | Tools/Action: fix typo
| * | Tools/Action: fix typoAlexander Sulfrian2014-10-141-1/+1
| | |
* | | Merge branch 'fix-pkgng' of https://github.com/AlexanderS/bcfg2Sol Jerome2014-10-142-4/+4
|\ \ \
| * | | Packages: enable Pkgng backend by defaultAlexander Sulfrian2014-10-141-1/+2
| | | |
| * | | Packages/Pkgng: fix arguments of __init__Alexander Sulfrian2014-10-131-3/+2
| | | | | | | | | | | | | | | | | | | | This plugin was developed for 1.3.x and during the transition to master the changed arguments of Collection.__init__ were missed.
* | | | Server/Plugins/Decisions: fix typoSol Jerome2014-10-131-1/+1
| |/ / |/| | | | | | | | | | | | | | Modified from github #204. Thanks to Alexander Sulfrain. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | | Fix docstringGordon Messmer2014-09-121-1/+1
| | |
* | | Another lint whitespace fix.Gordon Messmer2014-09-111-1/+1
| | |
* | | Fix lint warnings.Gordon Messmer2014-09-111-1/+2
| | |
* | | Update CfgJinja2Generator.py to more closely match git master code.Gordon Messmer2014-09-111-8/+22
| | | | | | | | | The first version matched Bcfg2-1.3.4.
* | | First pass at Jinja2 support for Cfg.Gordon Messmer2014-09-115-2/+120
| | |
* | | Clean up unicode diff handling a little more.Matt Kemp2014-08-201-1/+1
| | |
* | | Fixed lint test error.Matt Kemp2014-08-151-1/+1
| | |
* | | udiff doesn't mean unified diff, it means unicode diffMatt Kemp2014-08-151-4/+4
| | |
* | | Removed ndiff from POSIXFile, only attempt unified diff.Matt Kemp2014-08-151-35/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the ndiff, which is a bit extraneous and can cause up to 30 second timeouts on larger files with many changes. unified_diff is faster and generally more applicable, and is already what is shown to the admin on interactive mode. This can save up to 30 seconds per file, per run. A future commit can take the resulting unified diff and recreate the ndiff specifically for the reporting if that is desired.
* | | Merge pull request #185 from AlexanderS/only-importantChris St. Pierre2014-08-041-7/+22
|\ \ \ | | | | | | | | Add only important flag
| * | | Client: support dryrun mode and only-importantAlexander Sulfrian2014-08-011-1/+11
| | | | | | | | | | | | | | | | | | | | Add support for displaying the skipped entries in dryrun mode when using the --only-important command line flag.
| * | | Client: add --only-important command line optionAlexander Sulfrian2014-08-011-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add the new --only-important (-i) command line option. With this option bcfg2 will only configure the important entries and exits clean afterwards.
* | | | Reporting: do not duplicate isstale functionalityAlexander Sulfrian2014-08-012-15/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interaction entries have a isstale() method, we do not need a template tag, that tries to figure out this on its own. The isstale() method works even better: It knows, if the interaction is the current interaction and compares the timestamp to the current time or (if it is not the current one) it compares the timestamp to the timestamp of the next interaction. So using the method of the model, you can browse the interaction history and see, if the host was stale some time in the past. Previously all interactions more than 24h ago were marked stale.
* | | Client: Fix client cache for py3kSol Jerome2014-08-011-2/+2
| | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | | Client: fix handling of important entriesAlexander Sulfrian2014-08-011-2/+2
|/ / | | | | | | | | The condition of the if should match the case, if the entry should be skipped.
* | Options: Fix default "Log to syslog" valueSol Jerome2014-07-311-1/+1
| | | | | | | | | | | | | | This changes makes the default value match what is specified by the documentation. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Use setdefault instead of a conditionalMichael Fenn2014-07-151-3/+1
| |
* | Correctly handle config-file-only BooleanOptions which default to TrueMichael Fenn2014-07-141-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Bcfg2.Options.Parser._parse_config_options, if the "default" of the option (perhaps set by the config file) evaluates to True, then it runs the actions associated with the option. Otherwise, it just sets the option to the default directly with setattr. Since the default of a store_false action is True, the code will run argparse's _StoreFalseAction function. Well, _StoreFalseAction, is a subclass of _StoreConstAction where const=False. _StoreConstAction has a call method which looks like this: def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, self.const) So it completely ignores the value passed in and just sets the value of the option to const (i.e. False). Looking at fam_blocking {None: _StoreFalseAction(option_strings='fam_blocking', dest='fam_blocking', nargs=0, const=False, default=True, type=None, choices=None, help='FAM blocks on startup until all events are processed', metavar=None)} start phase 3 fam_blocking config val is True start phase 3 _parse_config_options: fam_blocking default is True _parse_config_options: calling argparse.<class 'argparse._StoreFalseAction'> with value True on fam_blocking _parse_config_options: after calling argparse.<class 'argparse._StoreFalseAction'> fam_blocking is False after _parse_config_options fam_blocking is False after phase 3 fam_blocking is False after phase 4 fam_blocking is False end of parser fam_blocking is False CLI init fam_blocking is False So how to fix it? Define a new Action? That seems like the most direct approach since the problem really is that _StoreFalseAction does what it says on the tin, it stores false no matter what. The new action BooleanOptionAction works like store_true and store_false, except that it stores the value that was passed in, or the default if there was no value passed in.
* | Add a --no-fam-blocking command-line argument to bcfg2-serverMichael Fenn2014-07-071-1/+2
| | | | | | | | | | | | | | There is a quirk in the configuration parser where a BooleanOption with default=True will always return false __unless_ a command-line option is provided. Not sure why that's the case, but this is a work- around