Mentions légales du service

Skip to content

Fix plugin path configuration for Ohai >= 6.18.0

MICHON Nicolas requested to merge ChameleonCloud:fix_ohai_plugin_path into master

Created by: priteau

In recent versions of Ohai 6 which include the fix [1] for OHAI-126 [2], Ohai compares an expanded plugin directory path to a non-expanded plugin file path. If the original plugin directory path given to Ohai contains "/../", this is modified by expand_path and the regexp matching fails. This results in the plugin being silently skipped.

By calling expand_path on plugin_path before configuring Ohai, we ensure that the regexp will match correctly.

[1] https://github.com/chef/ohai/commit/7f15dbd2f3c9cddfed69c84f4f156e27fe32e9a9 [2] https://tickets.opscode.com/browse/OHAI-126

Merge request reports