You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ZFS module does not handle property values that contain spaces. Most of the time this isn't an issue, since the values are usually single words. However, it is possible to provide NFS options to sharenfs property, which must then contain spaces.
To reproduce:
Specify the following task in a playbook (adjust for pool names etc.):
The sharenfs result is set idempotently to the value specified.
Actual result:
The property value is not quoted and results in an error:
msg: cannot open '10.0.0.80': dataset does not exist
cannot open '-mask': dataset does not exist
cannot open '255.255.255.255': dataset does not exist
As a workaround, I can manually quote the property value (again), but this is very ugly. Also, the module does not then recognize that the value is unchanged, which leads to an unnecessary changed=1 at the end of the playbook.
In the pull request, I converted one string-args run_command into a list-args one. It seems that the module uses the string-based command exclusively, which does not seem to add any real value. Would it be okay to convert all of those cases into list-args format? Or would that be just pointless code churn?
Converting the argument list to a string with ' '.join causes
the shell interpreter to misparse spaces in property values.
Since the zfs command does not need shell anywhere, using
a list instead of a string works just as well with run_command.
Fixes#3545.
The ZFS module does not handle property values that contain spaces. Most of the time this isn't an issue, since the values are usually single words. However, it is possible to provide NFS options to sharenfs property, which must then contain spaces.
To reproduce:
Specify the following task in a playbook (adjust for pool names etc.):
Expected result:
The sharenfs result is set idempotently to the value specified.
Actual result:
The property value is not quoted and results in an error:
As a workaround, I can manually quote the property value (again), but this is very ugly. Also, the module does not then recognize that the value is unchanged, which leads to an unnecessary changed=1 at the end of the playbook.
For more details, see an example playbook and related output at https://gist.github.com/arsatiki/6006264
The text was updated successfully, but these errors were encountered: