run_as_root bug in HDFS native Driver

Bug #1481567 reported by weiting-chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Low
weiting-chen

Bug Description

run_as_root must set to False by default if there is no run_as_root in the kwargs.
The reason is you cannot raise every command to run as root.
It must be false by default, for some special commands that already be defined in manila rootwrap filter file, it can run as root.

Changed in manila:
assignee: nobody → weiting-chen (weiting-chen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/209825

Changed in manila:
status: New → In Progress
Revision history for this message
weiting-chen (weiting-chen) wrote :

The original error message is "Stderr: u'/usr/local/bin/manila-rootwrap: Unauthorized command: locate /bin/hdfs (no filter matched)\n'."
It looks like locate command wasn't included in share.filters file.
I also don't think it is a good way to find a command, so I register another bug to fix: "https://bugs.launchpad.net/manila/+bug/1481568"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/211130

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by weiting-chen (<email address hidden>) on branch: master
Review: https://review.openstack.org/209825
Reason: Have already split it to two different patch for individual bugs.
So I will abandon it.
Please follow the other two patches.
https://review.openstack.org/#/c/211130/
https://review.openstack.org/#/c/211147/

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

Reviewed: https://review.openstack.org/211130
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=bed9b9f3f2a8db6d843492f7c4910593bebc4467
Submitter: Jenkins
Branch: master

commit bed9b9f3f2a8db6d843492f7c4910593bebc4467
Author: weiting-chen <email address hidden>
Date: Mon Aug 10 20:55:54 2015 +0800

    Fix bug to run command as root in HDFS driver

    A complete proposal is like below steps:
    1. Assume the HDFS user in manila.conf has the authority to launch hdfs command.
    2. Set run_as_root to False if there is no argument by default, all the cases in
    Manila HDFS Driver don't need be a root to run hdfs command.
    3. If root is required, please deliver run_as_root parameter and set it as True

    Change-Id: I310713c3c1b74ff9990832f61e777cf4c12696fe
    Closes-Bug: #1481567

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in manila:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-3 → 1.0.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers