ganesha: execute calls made with argument whose identifier is 'run_as_root=' is invalid if calls are made to remote machine

Bug #1422255 reported by Ramana Raja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Ramana Raja

Bug Description

In the ganesha manager module, some execute calls are made with argument whose identifier is 'run_as_root='. See here,
https://github.com/openstack/manila/commit/559b478e8578ab0bf591d29fcb662a9d7a1158da#diff-ccc750d6512ac97d2a7c2744b0991f1bR213
https://github.com/openstack/manila/commit/559b478e8578ab0bf591d29fcb662a9d7a1158da#diff-ccc750d6512ac97d2a7c2744b0991f1bR247
https://github.com/openstack/manila/commit/559b478e8578ab0bf591d29fcb662a9d7a1158da#diff-ccc750d6512ac97d2a7c2744b0991f1bR327

If these execute calls are made to a remote ganesha server they would all error out since for remote execution, processutils's ssh_execute() method is used, and this method does not accept 'run_as_root=False' kwarg.
See here,
https://github.com/openstack/oslo.concurrency/commit/be982c56eeb5eb900bfda3375a236bfe425ac200#diff-ef5a9bcb5e6c774f4e9b635c72a4aadcR217

Ramana Raja (rraja)
summary: - ganesha: execute calls made with kwarg 'run_as_root=False' that is
+ ganesha: execute calls made with argument identifier 'run_as_root' is
invalid if calls are made to remote machine
Ramana Raja (rraja)
summary: - ganesha: execute calls made with argument identifier 'run_as_root' is
- invalid if calls are made to remote machine
+ ganesha: execute calls made with argument whose identifier is
+ 'run_as_root=' is invalid if calls are made to remote machine
description: updated
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/156540

Changed in manila:
assignee: nobody → Ramana Raja (rraja)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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

commit 026483e3744fe4182bf4ba7753ebb4818e1edbeb
Author: Ramana Raja <email address hidden>
Date: Sun Feb 15 14:58:02 2015 +0000

    ganesha utils: allow remote execution as root

    Remote execute calls in the ganesha helpers are made using ganesha
    utils's SSHExecutor object that uses processutils's ssh_execute()
    method. But processutils's ssh_execute() method unlike processutils's
    execute() method does not accept an argument whose identifier is
    'run_as_root=', necessary to execute commands with super user
    privilege. So allow 'run as root' behavior in remote execution by
    prepending 'sudo' to the command passed to processutils's ssh_execute()
    method, in the SSHExecutor's __call__() method.

    Change-Id: I3c9f9837b692b06bad15341d09ce5b7c4dfa7268
    Closes-Bug: #1422255

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-3 → 2015.1.0
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.