Merge lp:~benji/launchpad/add-sudoers-to-lxcsetup into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Gary Poster on 2012-03-01 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 14890 |
| Proposed branch: | lp:~benji/launchpad/add-sudoers-to-lxcsetup |
| Merge into: | lp:launchpad |
| Diff against target: |
199 lines (+64/-27) 1 file modified
utilities/setuplxc.py (+64/-27) |
| To merge this branch: | bzr merge lp:~benji/launchpad/add-sudoers-to-lxcsetup |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gary Poster (community) | 2012-03-01 | Approve on 2012-03-01 | |
|
Review via email:
|
|||
Commit Message
[r=gary][no-qa] add sudo wrapper scripts for building/testing uxing LXC
Description of the Change
This branch is primarily about adding two wrapper scripts
/usr/local/
/usr/local/
LXC container and a sudoers.d entry to let the buildbot user run those
scripts as root.
Other changes:
- small cleanup to some docstrings (made them raw strings so backslashes
wouldn't have to be escaped).
- added a couple of packages to the host, one that was missing
(testrepository) and one that is a new requirement (sshpass)
- fix a bug in the way bzr's whoami was invoked which resulted in
error-producing double-quoting of the value (we use formataddr now)
The /usr/local/bin test command does not yet work because of a bug in
overlayfs used by LXC. We'll address that in a subsequent branch.
Lint: the make lint report is clean
Tests: we have no way doing automated testing of this at the moment
| Benji York (benji) wrote : | # |
> - testrepository and sshpass are only necessary for the parallel testing
> stuff; this script can do more, and it would be nice if these dependencies
> were only added in the proper case; but we can maybe wait for lpsetup to do
> (or consider) that kind of division.
>
> - As we agreed on IRC, the test script you have here is not the newest one we
> tried. Neither this older one nor the newer one works perfectly, but the
> newer one has the advantage of not requiring/using sshpass. We agreed that
> you would switch to that newer version. Then you would remove sshpass as a
> dependency, of course.
Done.
> - Have you verified that this script can be run again, replacing the older
> root/sudo scripts with newer versions? That will be important for the use
> case of running this repeatedly in the data center, as we fix stuff. It looks
> like it does the right thing, but confidence would be nice.
I have not verified that it can be run again recently, but I did fix at
least one bug keeping it from being run again during the course of this
branch. I've created a card for the task.
> - "sleep 30 # aparently RUNNING isn't quite enough": you could steal the ssh
> reattempt logic that gmb did for lxc-start-ephemeral here. See lines 144ff of
> the script currently in Precise.
To keep from having to do time-intensive test runs, I've left this out
of this branch but I have a copied and tweaked version of the code in
question that may work that we can include in a subsequent branch.
> - sudoers_file = '/etc/sudoers.
Fixed.
> - Your change to install language-pack-en will conflict with a later branch of
> Francesco's that removes that entirely (Robert told us that LANG=C when
> installing postgres is sufficient). Consider removing the change here so it
> is easier later, but it will be an easy conflict resolution, so do what you
> think.
I didn't add any code to install language-pack-en, just edited a line
that also included it. I've removed language-pack-en from the list of
packages to be installed on the host in the hopes that a single-line
conflict will be slightly easier to understand and resolve.

- testrepository and sshpass are only necessary for the parallel testing stuff; this script can do more, and it would be nice if these dependencies were only added in the proper case; but we can maybe wait for lpsetup to do (or consider) that kind of division.
- As we agreed on IRC, the test script you have here is not the newest one we tried. Neither this older one nor the newer one works perfectly, but the newer one has the advantage of not requiring/using sshpass. We agreed that you would switch to that newer version. Then you would remove sshpass as a dependency, of course.
- Have you verified that this script can be run again, replacing the older root/sudo scripts with newer versions? That will be important for the use case of running this repeatedly in the data center, as we fix stuff. It looks like it does the right thing, but confidence would be nice.
- "sleep 30 # aparently RUNNING isn't quite enough": you could steal the ssh reattempt logic that gmb did for lxc-start-ephemeral here. See lines 144ff of the script currently in Precise.
- sudoers_file = '/etc/sudoers. d/lauchpad- buildbot' lauchpad -> launchpad
- Your change to install language-pack-en will conflict with a later branch of Francesco's that removes that entirely (Robert told us that LANG=C when installing postgres is sufficient). Consider removing the change here so it is easier later, but it will be an easy conflict resolution, so do what you think.