Merge lp:~asac/lava-dispatcher/drop-redundant-sudo-lamc into lp:lava-dispatcher

Proposed by Alexander Sack
Status: Merged
Merged at revision: 370
Proposed branch: lp:~asac/lava-dispatcher/drop-redundant-sudo-lamc
Merge into: lp:lava-dispatcher
Diff against target: 15 lines (+2/-2)
1 file modified
lava_dispatcher/client/lmc_utils.py (+2/-2)
To merge this branch: bzr merge lp:~asac/lava-dispatcher/drop-redundant-sudo-lamc
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+119105@code.launchpad.net

Description of the change

see commit message. the sudo for lamc is redundant; caused some problems here when i ran lava-dispatcher bravely as normal user - with this patch i can use it nicely; at least lamc is fine.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

I think the thought was that it would be nice to eventually run the dispatcher as a non-root user. And granting sudoer access to l-a-m-c for a given user would allow that to work. However, there are several other places we require root access using a variety of commands.

So I think this is fine. I'd still like to here Michael's thoughts though.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Andy Doan <email address hidden> writes:

> I think the thought was that it would be nice to eventually run the dispatcher as a non-root user. And granting sudoer access to l-a-m-c for a given user would allow that to work. However, there are several other places we require root access using a variety of commands.
>
> So I think this is fine. I'd still like to here Michael's thoughts though.

Don't really care tbh -- getting to the point where we can run the
dispatcher without root is going to be so much work that one sudo here
or there isn't going to make much difference, so I'm happy for asac to
merge this.

Cheers,
mwh

Revision history for this message
Alexander Sack (asac) wrote :

well, as i said. its redundant as linaro-android-media-create already uses sudo where needed ...

the android fast model lava-dispatch works at least quite well here now...

Revision history for this message
Alexander Sack (asac) wrote :

please merge thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/client/lmc_utils.py'
2--- lava_dispatcher/client/lmc_utils.py 2012-07-22 00:43:26 +0000
3+++ lava_dispatcher/client/lmc_utils.py 2012-08-10 10:20:32 +0000
4@@ -106,10 +106,10 @@
5 _run_linaro_media_create(cmd)
6
7 def generate_android_image(device, boot, data, system, ofile, size="2000M"):
8- cmd = ("flock /var/lock/lava-lmc.lck sudo linaro-android-media-create "
9+ cmd = ("flock /var/lock/lava-lmc.lck linaro-android-media-create "
10 "--dev %s --image_file %s --image_size %s "
11 "--boot %s --userdata %s --system %s" %
12- (device, ofile, size, boot, data,system) )
13+ (device, ofile, size, boot, data, system) )
14 logging.info("Generating android image with: %s" % cmd)
15 _run_linaro_media_create(cmd)
16

Subscribers

People subscribed via source and target branches