0739cf2348
The render code path in `template_file` was doing unsynchronized access to a shared mapping of functions in `config.Func`. This caused a race condition that was most often triggered when a `template_file` had a `count` of more than one, and expressed itself as a panic in the plugin followed by a cascade of "unexpected EOF" errors through the plugin system. Here, we simply turn the FuncMap from shared state into a generated value, which avoids the race. We do more re-initialization of the data structure, but the performance implications are minimal, and we can always revisit with a perf pass later now that the race is fixed. |
||
---|---|---|
.. | ||
provider.go | ||
provider_test.go | ||
resource_cloudinit_config.go | ||
resource_cloudinit_config_test.go | ||
resource_template_file.go | ||
resource_template_file_test.go |