On every Ubuntu host with unattended-upgrades, get_host_status() read the package manager as busy, so an interrupted dpkg was never reported there. Seen on netOrk's test server right after 4.3.0 went live: five Ubuntu hosts read None, while the Proxmox hosts read False and True.
The cause is that Ubuntu keeps unattended-upgrade-shutdown --wait-for-signal running all the time. Its process name is cut to 15 characters, unattended-upgr, the same as a real run's.
BUSY_CHECK now matches dpkg, apt, apt-get and aptitude by name, and unattended-upgrade by its command line ((^|[ /])unattended-upgrade( |$)). Version 4.3.1.
Tests
The fragment runs through sh with a stand-in ps. The cases are an idle Ubuntu host, a real unattended-upgrade run, and dpkg/apt/apt-get/aptitude.
The command must not match itself. Over an exec channel (Proxmox, BSD), it is the command line of the shell that runs it.
489 tests pass; napalm-linux and napalm-proxmox pass against this branch.
Closes #26. Follow-up to #25 (NetOrk/netork#738).
On every Ubuntu host with unattended-upgrades, `get_host_status()` read the package manager as busy, so an interrupted dpkg was never reported there. Seen on netOrk's test server right after 4.3.0 went live: five Ubuntu hosts read None, while the Proxmox hosts read False and True.
The cause is that Ubuntu keeps `unattended-upgrade-shutdown --wait-for-signal` running all the time. Its process name is cut to 15 characters, `unattended-upgr`, the same as a real run's.
`BUSY_CHECK` now matches dpkg, apt, apt-get and aptitude by name, and unattended-upgrade by its command line (`(^|[ /])unattended-upgrade( |$)`). Version 4.3.1.
## Tests
- The fragment runs through `sh` with a stand-in `ps`. The cases are an idle Ubuntu host, a real unattended-upgrade run, and dpkg/apt/apt-get/aptitude.
- The command must not match itself. Over an exec channel (Proxmox, BSD), it is the command line of the shell that runs it.
- 489 tests pass; napalm-linux and napalm-proxmox pass against this branch.
On every Ubuntu host with unattended-upgrades, get_host_status() read the
package manager as busy, so an interrupted dpkg was never reported there.
Ubuntu keeps unattended-upgrade-shutdown --wait-for-signal running all the
time; its process name is cut to 15 characters, unattended-upgr, the same
as a real run's.
BUSY_CHECK now matches dpkg, apt, apt-get and aptitude by name and
unattended-upgrade by its command line. The tests run it through sh with a
stand-in ps, and check that the command does not match itself: over an exec
channel it is the command line of the shell that runs it.
Closes#26
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.
Closes #26. Follow-up to #25 (NetOrk/netork#738).
On every Ubuntu host with unattended-upgrades,
get_host_status()read the package manager as busy, so an interrupted dpkg was never reported there. Seen on netOrk's test server right after 4.3.0 went live: five Ubuntu hosts read None, while the Proxmox hosts read False and True.The cause is that Ubuntu keeps
unattended-upgrade-shutdown --wait-for-signalrunning all the time. Its process name is cut to 15 characters,unattended-upgr, the same as a real run's.BUSY_CHECKnow matches dpkg, apt, apt-get and aptitude by name, and unattended-upgrade by its command line ((^|[ /])unattended-upgrade( |$)). Version 4.3.1.Tests
shwith a stand-inps. The cases are an idle Ubuntu host, a real unattended-upgrade run, and dpkg/apt/apt-get/aptitude.