Prio: P1 (critical): it makes the main case of NetOrk/netork#738 undetectable.
What happens
On every Ubuntu host with unattended-upgrades installed, get_host_status() reports package_manager_interrupted: None ("a package manager is running") on every poll. Seen on 172.22.8.50 right after deploying 4.3.0: ansible-01, bw-01, db-01, db-02 and netork all read None, while pve-01 (no unattended-upgrades) reads False and pve-dual reads True.
Why
The busy check in HOST_STATUS_COMMAND (4.3.0) matched the process names dpkg|apt|apt-get|aptitude|unattended-upgr. Ubuntu keeps /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal running all the time. Its name is cut to 15 characters, unattended-upgr, the same as a real unattended-upgrade run's. So the host always looks busy, and an interrupted dpkg is never reported, on the very kind of host #738 was about (aris).
Fix
Match dpkg/apt/apt-get/aptitude by name and unattended-upgrade by its command line ((^|[ /])unattended-upgrade( |$)), as BUSY_CHECK. Tests run the fragment through sh with a stand-in ps (idle Ubuntu, a real run, dpkg/apt), and check that the command does not match itself: over an exec channel it is the command line of the shell that runs it.
Prio: P1 (critical): it makes the main case of NetOrk/netork#738 undetectable.
## What happens
On every Ubuntu host with unattended-upgrades installed, `get_host_status()` reports `package_manager_interrupted: None` ("a package manager is running") on every poll. Seen on 172.22.8.50 right after deploying 4.3.0: ansible-01, bw-01, db-01, db-02 and netork all read None, while pve-01 (no unattended-upgrades) reads False and pve-dual reads True.
## Why
The busy check in `HOST_STATUS_COMMAND` (4.3.0) matched the process names `dpkg|apt|apt-get|aptitude|unattended-upgr`. Ubuntu keeps `/usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal` running all the time. Its name is cut to 15 characters, `unattended-upgr`, the same as a real unattended-upgrade run's. So the host always looks busy, and an interrupted dpkg is never reported, on the very kind of host #738 was about (aris).
## Fix
Match dpkg/apt/apt-get/aptitude by name and unattended-upgrade by its command line (`(^|[ /])unattended-upgrade( |$)`), as `BUSY_CHECK`. Tests run the fragment through `sh` with a stand-in `ps` (idle Ubuntu, a real run, dpkg/apt), and check that the command does not match itself: over an exec channel it is the command line of the shell that runs it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Prio: P1 (critical): it makes the main case of NetOrk/netork#738 undetectable.
What happens
On every Ubuntu host with unattended-upgrades installed,
get_host_status()reportspackage_manager_interrupted: None("a package manager is running") on every poll. Seen on 172.22.8.50 right after deploying 4.3.0: ansible-01, bw-01, db-01, db-02 and netork all read None, while pve-01 (no unattended-upgrades) reads False and pve-dual reads True.Why
The busy check in
HOST_STATUS_COMMAND(4.3.0) matched the process namesdpkg|apt|apt-get|aptitude|unattended-upgr. Ubuntu keeps/usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signalrunning all the time. Its name is cut to 15 characters,unattended-upgr, the same as a real unattended-upgrade run's. So the host always looks busy, and an interrupted dpkg is never reported, on the very kind of host #738 was about (aris).Fix
Match dpkg/apt/apt-get/aptitude by name and unattended-upgrade by its command line (
(^|[ /])unattended-upgrade( |$)), asBUSY_CHECK. Tests run the fragment throughshwith a stand-inps(idle Ubuntu, a real run, dpkg/apt), and check that the command does not match itself: over an exec channel it is the command line of the shell that runs it.