RBD: running as non-root complains about missing root_helper

Bug #1885291 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinderlib
Fix Released
Undecided
Gorka Eguileor

Bug Description

When using the RBD driver and running the cinderlib process as a non-root user within a container we'll the following exception:

2020-06-26 12:05:54.727 305960 CRITICAL cinder [req-f08b1c99-9dbb-44e1-90c8-8f5c6d5196ff cinderlib cinderlib - - -] Unhandled error: os_brick.exception.BrickException: Error connecting volume: Command requested root, but did not specify a root helper.
2020-06-26 12:05:54.727 305960 ERROR cinder Traceback (most recent call last):
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/cinderlib/nos_brick.py", line 97, in connect_volume
2020-06-26 12:05:54.727 305960 ERROR cinder self._ensure_link(real_path, link_name)
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/cinderlib/nos_brick.py", line 117, in _ensure_link
2020-06-26 12:05:54.727 305960 ERROR cinder self._ensure_dir(os.path.dirname(link_name))
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/cinderlib/nos_brick.py", line 184, in _ensure_dir
2020-06-26 12:05:54.727 305960 ERROR cinder self._execute('mkdir', '-p', '-m0755', path, run_as_root=True)
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/os_brick/executor.py", line 52, in _execute
2020-06-26 12:05:54.727 305960 ERROR cinder result = self.__execute(*args, **kwargs)
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/cinderlib/nos_brick.py", line 249, in _execute
2020-06-26 12:05:54.727 305960 ERROR cinder return rootwrap.custom_execute(*cmd, **kwargs)
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/os_brick/privileged/rootwrap.py", line 143, in custom_execute
2020-06-26 12:05:54.727 305960 ERROR cinder on_completion=on_completion, *cmd, **kwargs)
2020-06-26 12:05:54.727 305960 ERROR cinder File "/usr/local/lib/python3.7/site-packages/oslo_concurrency/processutils.py", line 340, in execute
2020-06-26 12:05:54.727 305960 ERROR cinder message=_('Command requested root, but did not '
2020-06-26 12:05:54.727 305960 ERROR cinder oslo_concurrency.processutils.NoRootWrapSpecified: Command requested root, but did not specify a root helper.

This error happens because the library is not passing the "root_helper" parameter in a couple of "_execute" calls.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinderlib (master)

Fix proposed to branch: master
Review: https://review.opendev.org/738213

Changed in cinderlib:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinderlib (master)

Reviewed: https://review.opendev.org/738213
Committed: https://git.openstack.org/cgit/openstack/cinderlib/commit/?id=9e17143194c2e62be9e0aa720b215e4b0b8082ce
Submitter: Zuul
Branch: master

commit 9e17143194c2e62be9e0aa720b215e4b0b8082ce
Author: Gorka Eguileor <email address hidden>
Date: Fri Jun 26 15:56:57 2020 +0200

    RBD: Fix missing root_helper

    When using the RBD driver and running the cinderlib process as a
    non-root user within a container we'll get a "Command requested root,
    but did not specify a root helper." error.

    This error happens because the library is not passing the "root_helper"
    parameter in a couple of "_execute" calls.

    Trivial-Fix
    Closes-Bug: #1885291
    Change-Id: Idf664fdab3daf21b99215edfe3e2c053c3a9e85c

Changed in cinderlib:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.