cloud-init 23.3" when providing #cloud-config userdata containing apt: repo keys. add-apt-repository launches two background services in root's home directory as seen with systemctl status cloud-config.service
Although cloud-init debian/control has a Recommends: gnupg, Recommends packages are not installed in Ubuntu minimal images which lead to traceback like the following[1].
To avoid pulling in unnecessary package dependencies and bloating images, cloud-init should approach this daemon cleanup using common system utilities (kill) or python modules (os.kill).
This breaks daily Ubuntu minimal builds on Mantic builds and should be seen as an SRU blocker for cloud-init of 23.3.
16:53:35 AssertionError: ['(\'apt_configure\', ProcessExecutionError("Unexpected error while running command.\\nCommand: [\'16:53:35 FAILURE: __main__.CloudInitTests.test_cloud_init_has_no_captured_failures
16:53:35 Traceback (most recent call last):
16:53:35 File "/home/ubuntu/tests.py", line 45, in test_cloud_init_has_no_captured_failures
16:53:35 self.assertFalse(
16:53:35 AssertionError: ['(\'apt_configure\', ProcessExecutionError("Unexpected error while running command.\\nCommand: [\'gpgconf\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\'\\nStdout: -\\nStderr: -"))'] is not false : cloud-init has reported errors. Please investigate. ['(\'apt_configure\', ProcessExecutionError("Unexpected error while running command.\\nCommand: [\'gpgconf\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\'\\nStdout: -\\nStderr: -"))']
16:53:35\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\'\\nStdout: -\\nStderr: -"))'] is not false : cloud-init has reported errors. Please investigate. ['(\'apt_configure\', ProcessExecutionError("Unexpected error while running command.\\nCommand: [\'gpgconf\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\'\\nStdout: -\\nStderr: -"))']
16:53:35
cloud-init 23.3" when providing #cloud-config userdata containing apt: repo keys. add-apt-repository launches two background services in root's home directory as seen with systemctl status cloud-config. service
CGroup: /system. slice/cloud- config. service socket --daemon
├─1042 dirmngr --daemon --homedir /root/.gnupg
└─1082 gpg-agent --homedir /root/.gnupg --use-standard-
Upstream commit https:/ /github. com/canonical/ cloud-init/ commit/ 842d0452 introduced a strict dependency on gpgconfig utility to kill any gpg-agent/dirmngr daemons spawned.
Although cloud-init debian/control has a Recommends: gnupg, Recommends packages are not installed in Ubuntu minimal images which lead to traceback like the following[1].
To avoid pulling in unnecessary package dependencies and bloating images, cloud-init should approach this daemon cleanup using common system utilities (kill) or python modules (os.kill).
This breaks daily Ubuntu minimal builds on Mantic builds and should be seen as an SRU blocker for cloud-init of 23.3.
16:53:35 AssertionError: ['(\'apt_ configure\ ', ProcessExecutio nError( "Unexpected error while running command.\\nCommand: [\'16:53:35 FAILURE: __main_ _.CloudInitTest s.test_ cloud_init_ has_no_ captured_ failures ubuntu/ tests.py" , line 45, in test_cloud_ init_has_ no_captured_ failures configure\ ', ProcessExecutio nError( "Unexpected error while running command.\\nCommand: [\'gpgconf\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\ '\\nStdout: -\\nStderr: -"))'] is not false : cloud-init has reported errors. Please investigate. ['(\'apt_ configure\ ', ProcessExecutio nError( "Unexpected error while running command.\\nCommand: [\'gpgconf\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\ '\\nStdout: -\\nStderr: -"))'] '\\nStdout: -\\nStderr: -"))'] is not false : cloud-init has reported errors. Please investigate. ['(\'apt_ configure\ ', ProcessExecutio nError( "Unexpected error while running command.\\nCommand: [\'gpgconf\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\ '\\nStdout: -\\nStderr: -"))']
16:53:35 Traceback (most recent call last):
16:53:35 File "/home/
16:53:35 self.assertFalse(
16:53:35 AssertionError: ['(\'apt_
16:53:35\', \'--kill\', \'all\']\\nExit code: -\\nReason: [Errno 2] No such file or directory: b\'gpgconf\
16:53:35