Trove - guestagent/strategies/restore/base.py calls sudo

Bug #1350075 reported by N Dillon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Wishlist
Amrith Kumar

Bug Description

trove/trove/guestagent/strategies/restore/base.py runs things with "sudo" in exec_with_root_helper(*cmd)

Currently, I can only see them used twice in if statements in mysql_impl.py, both look like checks to see if mysqld is up, which should be done without running sudo

Changed in trove:
status: New → Triaged
importance: Undecided → Medium
milestone: none → ongoing
Amrith Kumar (amrith)
Changed in trove:
assignee: nobody → Amrith (amrith)
Amrith Kumar (amrith)
Changed in trove:
status: Triaged → Invalid
status: Invalid → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
status: Confirmed → In Progress
Revision history for this message
Amrith Kumar (amrith) wrote :

Updating importance to "Wishlist" (bugscrub, 2014-10-23)

Changed in trove:
importance: Medium → Wishlist
Changed in trove:
milestone: ongoing → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/128781
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=1f84823fb1baea9ece5fe3df52c2fa317cadbcc5
Submitter: Jenkins
Branch: master

commit 1f84823fb1baea9ece5fe3df52c2fa317cadbcc5
Author: Amrith Kumar <email address hidden>
Date: Wed Oct 15 18:35:19 2014 -0400

    Eliminate use of sudo for two things that don't need it

    The MySQL restore strategy used exec_with_root_helper() which was a
    skinny wrapper on execute with sudo to find out whether MySQL was up
    and running or not. This is unnecessary as any user can run mysqladmin
    (by default) and similarly, any user can run ps (not only root).

    Since these two code paths were the only ones that used
    exec_with_root_helper() I've eliminated that as well. It didn't do
    something so profound that its loss will be missed anyway.

    Change-Id: Ia0452417b88416b0289f894b99a8632ab0328539
    Closes-Bug: #1350075

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