This patch is to replace Linux-specific code with conditional checks in
the Cinder Brick code to support Cinder backup on Solaris. Patch has
not yet been submitted upstream.
--- cinder-8.0.0/cinder/utils.py.~1~ 2016-04-07 00:30:55.000000000 -0700
+++ cinder-8.0.0/cinder/utils.py 2016-06-10 14:39:00.866171230 -0700
@@ -143,8 +143,12 @@ def check_exclusive_options(**kwargs):
def execute(*cmd, **kwargs):
"""Convenience wrapper around oslo's execute() method."""
- if 'run_as_root' in kwargs and 'root_helper' not in kwargs:
- kwargs['root_helper'] = get_root_helper()
+ if sys.platform == 'sunos5':
+ if 'run_as_root' in kwargs:
+ kwargs['run_as_root'] = False
+ else:
+ if 'run_as_root' in kwargs and 'root_helper' not in kwargs:
+ kwargs['root_helper'] = get_root_helper()
return processutils.execute(*cmd, **kwargs)