Merge lp:~psivaa/ue-qa-kernel-tests-infrastructure/sudoers-fix-for-trusty into lp:ue-qa-kernel-tests-infrastructure

Proposed by Para Siva
Status: Merged
Merged at revision: 345
Proposed branch: lp:~psivaa/ue-qa-kernel-tests-infrastructure/sudoers-fix-for-trusty
Merge into: lp:ue-qa-kernel-tests-infrastructure
Diff against target: 15 lines (+2/-1)
1 file modified
kernel-sru/jenkins-script-bare-metal-kteam.sh (+2/-1)
To merge this branch: bzr merge lp:~psivaa/ue-qa-kernel-tests-infrastructure/sudoers-fix-for-trusty
Reviewer Review Type Date Requested Status
C de-Avillez (community) Approve
Paul Larson Approve
Review via email: mp+194502@code.launchpad.net

Description of the change

This is to fix the "sudo: no tty present and no askpass program specified" errors in trusty tests. It's not clear how the setup could be working for raring and saucy without NOPASSWD being allowed for sudo in sudoers, but somehow this is needed for trusty and fixes the issue..

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Strange... they must be getting it from somewhere, or coming in as root already. In fact, I thought that most of these were set up so that the script sshes in as root. In any case, maybe we should just go ahead and add raring and saucy to the list as well?
Approving, assuming you've tried this already.

review: Approve
Revision history for this message
Para Siva (psivaa) wrote :

Thanks. I've tried this with trusty and saucy. I'll add the the same change to include raring and saucy and then try one to confirm before merging.

344. By Para Siva

Adding NOPASSWD for sudo for raring and saucy

345. By Para Siva

Merging prev changes

Revision history for this message
C de-Avillez (hggdh2) wrote :

@pwlars: no, the code does not run as root. This is needed so that we will not need to use askpass or another hack to do root things.

And yes, if the sudo setup did not change, all releases from Precise onwards need this. Alternatively, you could assume that all releases nowadays need it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'kernel-sru/jenkins-script-bare-metal-kteam.sh'
2--- kernel-sru/jenkins-script-bare-metal-kteam.sh 2013-02-26 20:38:58 +0000
3+++ kernel-sru/jenkins-script-bare-metal-kteam.sh 2013-11-08 15:42:31 +0000
4@@ -114,9 +114,10 @@
5 [ $RC -ne 0 ] && sys_exit_KO "$SYS_HOST did not answer in time, bailing out"
6 #
7 # make sure we can get root (the tests will need it)
8+# Having to add NOPASSWD for sudo for raring, saucy and trusty tests
9 #
10 case $RELEASE in
11- oneiric|precise|quantal)
12+ oneiric|precise|quantal|raring|saucy|trusty)
13 sys_ssh ubuntu@$SYS_HOST "echo ubuntu | sudo -S sed -i 's/^%sudo.*$/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers"
14 RC=$?
15 ;;

Subscribers

People subscribed via source and target branches

to all changes: