-
Notifications
You must be signed in to change notification settings - Fork 697
staging's test_grsecurity_paxtest fails because unattended-upgrades is running #7410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tagging as noble related because we're planning to use a similar mechanism to stop unattended-upgrades from running during the noble migration. I wonder if this is intentional because unattended-upgrades.service contains |
I think we could just try this a few times in a loop while checking if the error message says u-u is holding the lock. |
Description
In test_grsecurity_paxtest we install paxtest if it isn't already. Sometimes it fails if unattended-upgrades is still running and holding the dpkg lock. In 6214f53 I added a stop of unattended-upgrades first, but that doesn't seem to have worked given it failed since then.
E + where 100 = CommandResult(command=b"sudo /bin/sh -c 'apt-get update && apt-get install -y paxtest'", exit_status=100, stdout=b"Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease\nHit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease\nHit:3 http://security.ubuntu.com/ubuntu focal-security InRelease\nHit:4 https://apt-test.freedom.press/ focal InRelease\nErr:4 https://apt-test.freedom.press/ focal InRelease\n The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 545E94503FAB65AB\nReading package lists...\n", stderr=b"W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://apt-test.freedom.press/ focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 545E94503FAB65AB\nW: Failed to fetch https://apt-test.freedom.press/dists/focal/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 545E94503FAB65AB\nW: Some index files failed to download. They have been ignored, or old ones used instead.\nE: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 6231 (unattended-upgr)\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?\n").rc
We could check stdout to see this failure and then retry after waiting? Or more aggressively wait for the dpkg lock to be open before running.
https://serverfault.com/questions/221871/how-do-i-check-to-see-if-an-apt-lock-file-is-locked may have ideas.
The text was updated successfully, but these errors were encountered: