** Description changed:

+ ----- Begin SRU Template -----
+ [Impact]
+ The mechanism for adding PPAs during was prone to failure when installing
+ 16.10 (yakkety) or newer systems.
+ 
+ A curtin install of yakkety with the following configuration would
+ fail:
+   apt:
+   sources:
+     ignored1:
+       source: "ppa:paelzer/yourppa"
+ 
+ [Test Case]
+ Install a yakkety or zesty system with the above configuration.
+ 
+ [Regression Potential]
+ 
+ [Other Info]
+ This failure came as a result of change in behavior of gpg.  Curtin
+ (indirectly through add-apt-repository) uses GPG to add PPAs into a
+ chroot.  GPG2 began daemonizing itself, which meant that unmounts of the
+ filesystem would fail due to open filehandles of the daemonized gpg
+ process.
+ 
+ There is further discussion both on the bug and in the upstream
+ merge proposal [1] on other ways to do this.  The solution taken was
+ a killall of processes named 'dirmgr' or 'gpg-agent' that were spawned
+ after the chroot.
+ 
+ [1] 
https://code.launchpad.net/~paelzer/curtin/curtin-bug-1645680-gpgagent/+merge/312143
+ ----- End   SRU Template -----
+ 
+ 
  Hi,
  while testing I found that when running apt feature related to 
add-apt-repository like:
  
  apt:
-   sources:
-     ignored1:
-       source: "ppa:paelzer/yourppa"
+   sources:
+     ignored1:
+       source: "ppa:paelzer/yourppa"
  
  Or in fact any sort of add-apt-repository (also unrelated to the apt feature 
itself) like:
  late_commands:
-  01_install_ppa: ['curtin', 'in-target --', 'add-apt-repository --yes 
ppa:paelzer/bug-1645274-multipath-merge']
+  01_install_ppa: ['curtin', 'in-target --', 'add-apt-repository --yes 
ppa:paelzer/bug-1645274-multipath-merge']
  
  Then the installation fails.
  
  Both use the chroot to execute in target, but recent add-apt-repository
  seems so cause daemons to spawn which then let the umount fail.
  
  Failure is usually around something like:
  "umount: /tmp/tmptmucmfm0/target/dev: target is busy"
- 
  
  Here an excerpt from a lsof +fg afterwards.
  dirmngr   6771             root    1r   CHR            LG,0x80000    1,9      
0t0   11 /tmp/tmptmucmfm0/target/dev/urandom
  dirmngr   6771             root    2w   CHR                  W,LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  gpg-agent 6776             root    0r   CHR                    LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  gpg-agent 6776             root    1w   CHR                  W,LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  gpg-agent 6776             root    2w   CHR                  W,LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  
  One of them could be shut down by:
  gpg-connect-agent --verbose KILLAGENT
  But not dirmngr, that has to be killed.
  Actually killing them seems ok (does not seem to create and later fallout).

** Description changed:

  ----- Begin SRU Template -----
  [Impact]
  The mechanism for adding PPAs during was prone to failure when installing
  16.10 (yakkety) or newer systems.
  
  A curtin install of yakkety with the following configuration would
  fail:
    apt:
    sources:
      ignored1:
        source: "ppa:paelzer/yourppa"
  
  [Test Case]
  Install a yakkety or zesty system with the above configuration.
+ This can be accomplished by running the vmtest YakketyTestAptConfigCMDCMD
+ with the installed version of curtin.
+ 
+ It has configuration of
+     apt:
+       sources:
+         ignored:
+            source: "ppa:curtin-dev/test-archive"
+         curtin-test1.list:
+            source: "deb $MIRROR $RELEASE-proposed main"
+ 
  
  [Regression Potential]
  
  [Other Info]
  This failure came as a result of change in behavior of gpg.  Curtin
  (indirectly through add-apt-repository) uses GPG to add PPAs into a
  chroot.  GPG2 began daemonizing itself, which meant that unmounts of the
  filesystem would fail due to open filehandles of the daemonized gpg
  process.
  
  There is further discussion both on the bug and in the upstream
  merge proposal [1] on other ways to do this.  The solution taken was
  a killall of processes named 'dirmgr' or 'gpg-agent' that were spawned
  after the chroot.
  
  [1] 
https://code.launchpad.net/~paelzer/curtin/curtin-bug-1645680-gpgagent/+merge/312143
  ----- End   SRU Template -----
- 
  
  Hi,
  while testing I found that when running apt feature related to 
add-apt-repository like:
  
  apt:
    sources:
      ignored1:
        source: "ppa:paelzer/yourppa"
  
  Or in fact any sort of add-apt-repository (also unrelated to the apt feature 
itself) like:
  late_commands:
   01_install_ppa: ['curtin', 'in-target --', 'add-apt-repository --yes 
ppa:paelzer/bug-1645274-multipath-merge']
  
  Then the installation fails.
  
  Both use the chroot to execute in target, but recent add-apt-repository
  seems so cause daemons to spawn which then let the umount fail.
  
  Failure is usually around something like:
  "umount: /tmp/tmptmucmfm0/target/dev: target is busy"
  
  Here an excerpt from a lsof +fg afterwards.
  dirmngr   6771             root    1r   CHR            LG,0x80000    1,9      
0t0   11 /tmp/tmptmucmfm0/target/dev/urandom
  dirmngr   6771             root    2w   CHR                  W,LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  gpg-agent 6776             root    0r   CHR                    LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  gpg-agent 6776             root    1w   CHR                  W,LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  gpg-agent 6776             root    2w   CHR                  W,LG    1,3      
0t0    6 /tmp/tmptmucmfm0/target/dev/null
  
  One of them could be shut down by:
  gpg-connect-agent --verbose KILLAGENT
  But not dirmngr, that has to be killed.
  Actually killing them seems ok (does not seem to create and later fallout).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1645680

Title:
  apt feature broken on >=Yakkety due to new gpg agent

To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/1645680/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to