Apt lock race on Oracle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
James Falcon |
Bug Description
When trying to do any kind of apt operation via cloud-init on Oracle, the operation often fails because snap seeding is holding the apt lock:
cloud-init.log:
2021-06-15 21:32:31,809 - util.py[WARNING]: Running module ubuntu-drivers (<module 'cloudinit.
2021-06-15 21:32:31,809 - util.py[DEBUG]: Running module ubuntu-drivers (<module 'cloudinit.
Traceback (most recent call last):
File "/usr/lib/
freq=freq)
File "/usr/lib/
return self._runners.
File "/usr/lib/
results = functor(*args)
File "/usr/lib/
install_
File "/usr/lib/
pkg_
File "/usr/lib/
self.
File "/usr/lib/
["update"], freq=PER_INSTANCE)
File "/usr/lib/
results = functor(*args)
File "/usr/lib/
args=(cmd,), kwargs={'env': e, 'capture': False})
File "/usr/lib/
ret = func(*args, **kwargs)
File "/usr/lib/
cmd=args)
cloudinit.
Command: ['eatmydata', 'apt-get', '--option=
cloud-init-
Reading package lists...
E: Could not get lock /var/lib/
E: Unable to lock directory /var/lib/apt/lists/
Cloud-init v. 21.1-19-
2021-06-15 21:32:31,809 - util.py[WARNING]: Running module ubuntu-drivers (<module 'cloudinit.
apt/history.log:
Start-Date: 2021-06-15 21:32:39
Commandline: apt install -o Dpkg::Options:
Requested-By: snap_daemon (584788)
Install: libconfig-
End-Date: 2021-06-15 21:32:40
I've also seen another snap entry in a separate log:
Start-Date: 2021-09-21 21:35:53
Commandline: apt --allow-downgrades install -o Dpkg::Options:
Requested-By: snap_daemon (584788)
Install: unified-
End-Date: 2021-09-21 21:36:12
This is most easily observed when launching an instance with the following cloud-config:
#cloud-config
drivers:
nvidia:
license-
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
upstream PR in progress on this bug https:/ /github. com/canonical/ cloud-init/ pull/1034