Rootstock should work without requiring root privileges

Bug #553963 reported by Nicolas Dechesne
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
RootStock
Fix Released
Medium
Ricardo Salveti

Bug Description

In its current form, rootstock requires sudo privileges. There are restrictions inside our company that prevent us from getting such privileges.

Related branches

Changed in project-rootstock:
assignee: nobody → Ricardo Salveti (rsalveti)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

I just pushed the first draft at my personal non-root branch: lp:~rsalveti/project-rootstock/no-root

The implementation is not that stable yet, and I'm also facing an annoying qemu segmentation fault problem (bug 604872) when running the second stage, but when everything goes well I can successfully use the generated rootfs at my beagleboard :-)

How to test the no-root feature (will remove the bashism later, bug 575854):
bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --no-root

Also note that you need to install fuseext2, genext2fs and fakeroot before testing it :-)

Changed in project-rootstock:
status: Confirmed → In Progress
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Just pushed the second version this patch to my branch: lp:~rsalveti/project-rootstock/no-root

The main difference is that now when you run as root it'll follow the same path as before, that's creating the ext3 image with qemu, mounting it as loop and running debootstrap. It turns out that using genext2fs takes much longer when creating the image, and also consumes a lot of memory.

This is the small benchmark I did comparing running with root and as user:

Remember that with root the debootstrap's second phase runs as user mode emulation, and with user we have to qemu in full emulation mode.

Root:
time sudo bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --restore-package-cache
real 5m37.361s
user 4m42.340s
sys 0m23.620s

User:
time bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --no-root --restore-package-cache
real 15m4.278s
user 13m34.490s
sys 0m7.340s

If everything goes well tomorrow will push it to the tree and close this bug.

Changed in project-rootstock:
status: In Progress → Fix Released
milestone: none → 0.1.99.4
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.