Your message dated Tue, 1 Apr 2014 15:43:17 +0100
with message-id <[email protected]>
and subject line Re: Bug#742969: adt-virt-schroot: add option to specify 
schroot session id
has caused the Debian Bug report #742969,
regarding adt-virt-schroot: add option to specify schroot session id
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
742969: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742969
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: autopkgtest
Version: 2.11
Severity: normal
Tags: patch

When debugging test suites that go crazy on ci.debian.net, while we
still use schroot, it would be useful to identify which schroot sessions
are left open. The attached patch adds an option that one can use to
specify a name to the schroot session created by adt-virt-schroot.


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages autopkgtest depends on:
ii  apt-utils      0.9.16.1
ii  debhelper      9.20140228
ii  pbuilder       0.215
ii  python         2.7.5-5
ii  python-debian  0.1.21+nmu2

autopkgtest recommends no packages.

Versions of packages autopkgtest suggests:
pn  autopkgtest-xenlvm  <none>
ii  lxc                 1.0.0-2
pn  qemu-system         <none>
ii  qemu-utils          1.7.0+dfsg-5
ii  schroot             1.6.8-1

-- no debconf information

-- 
Antonio Terceiro <[email protected]>
From 7e352853243b98668dcd73df31d6998b7de269d8 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <[email protected]>
Date: Sat, 29 Mar 2014 11:58:22 -0300
Subject: [PATCH] Add new option -s/--session-id to adt-virt-schroot

---
 debian/changelog              | 8 ++++++++
 virt-subproc/adt-virt-schroot | 7 +++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c58df01..2566411 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 autopkgtest (2.12) UNRELEASED; urgency=medium
 
+  [ Martin Pitt ]
   New features:
   * Add new options -s/--shell-fail for running a shell in the testbed after
     every failed test, and --shell for running a shell in the testbed after
@@ -16,6 +17,13 @@ autopkgtest (2.12) UNRELEASED; urgency=medium
     backports to old releases, and running them before releasing a new package
     is sufficient.
 
+  [ Antonio Terceiro ]
+  New features:
+  * Add new option -s/--session-id to adt-virt-schroot, allowing the user to
+    specifiy a custom schroot session id. This is useful for debugging test
+    suites that go crazy on ci.debian.net, so you can `schroot --list
+    --all-sessions` and see which sessions are still open.
+
  -- Martin Pitt <[email protected]>  Mon, 24 Mar 2014 08:20:28 +0100
 
 autopkgtest (2.11) unstable; urgency=medium
diff --git a/virt-subproc/adt-virt-schroot b/virt-subproc/adt-virt-schroot
index 62c6ac3..918f4d6 100755
--- a/virt-subproc/adt-virt-schroot
+++ b/virt-subproc/adt-virt-schroot
@@ -66,17 +66,19 @@ def match(exp_names, ids, extract_id):
 
 
 def parse_args():
-    global schroot
+    global schroot, sessid
 
     usage = "%prog [<options>] <schroot>"
     parser = OptionParser(usage=usage)
 
     parser.add_option('-d', '--debug', action='store_true')
+    parser.add_option('-s', '--session-id')
 
     (opts, args) = parser.parse_args()
     if len(args) != 1:
         parser.error("need exactly one arg, schroot name")
 
+    sessid = opts.session_id
     schroot = args[0]
 
     info = VirtSubproc.execute('schroot --config -c', [schroot],
@@ -111,7 +113,8 @@ def parse_args():
 def hook_open():
     global schroot, sessid
     sessid = VirtSubproc.execute(
-        'schroot -b -c', [schroot], downp=False, outp=True)
+        'schroot -b -c', [schroot] + (sessid and ['-n', sessid] or []),
+        downp=False, outp=True)
     VirtSubproc.down = ['schroot', '-r', '-d', '/', '-c', sessid]
     if 'root-on-testbed' in capabilities:
         VirtSubproc.down += ['-u', 'root']
-- 
1.9.1

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Version: 2.12

Martin Pitt [2014-03-31  9:34 +0200]:
> Thanks! I applied it with a help string and added it to the manpage,
> too:
> 
>   
> http://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;a=commitdiff;h=e243d8

That landed in 2.12, unfortunately I forgot to add the bug reference
to the changelog. I'll retroactively do it, but closing this bug
manually.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to