Skip to content
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

codedeploy-agent randomly fails to install on AL2023 (can't create transaction lock on /var/lib/rpm/.rpm.lock) #398

Open
jocel1 opened this issue Jul 24, 2024 · 0 comments

Comments

@jocel1
Copy link

jocel1 commented Jul 24, 2024

Hi!

I'm installing codedeploy-agent at the very end of my user_data content:

wget https://aws-codedeploy-eu-west-1.s3.eu-west-1.amazonaws.com/latest/install; chmod +x ./install; ./install auto

However this fails from time to time on my amazon linux 2023 instance:

2024-07-24T21:55:33+0200 DEBUG --> Starting dependency resolution
2024-07-24T21:55:33+0200 DEBUG ---> Package codedeploy-agent.noarch 1.7.0-92 will be installed
2024-07-24T21:55:33+0200 DEBUG --> Finished dependency resolution
2024-07-24T21:55:33+0200 DDEBUG timer: depsolve: 118 ms
2024-07-24T21:55:33+0200 INFO Dependencies resolved.
2024-07-24T21:55:33+0200 INFO ================================================================================
 Package                Architecture Version           Repository          Size
================================================================================
Installing:
 codedeploy-agent       noarch       1.7.0-92          @commandline       2.8 M

Transaction Summary
================================================================================
Install  1 Package

2024-07-24T21:55:33+0200 INFO Total size: 2.8 M
2024-07-24T21:55:33+0200 INFO Installed size: 13 M
2024-07-24T21:55:33+0200 INFO Downloading Packages:
2024-07-24T21:55:33+0200 INFO Running transaction check
2024-07-24T21:55:33+0200 INFO Transaction check succeeded.
2024-07-24T21:55:33+0200 INFO Running transaction test
2024-07-24T21:55:34+0200 INFO Transaction test succeeded.
2024-07-24T21:55:34+0200 DDEBUG timer: transaction test: 788 ms
2024-07-24T21:55:34+0200 INFO Running transaction
2024-07-24T21:55:34+0200 DEBUG RPMDB altered outside of YUM.
2024-07-24T21:55:34+0200 DDEBUG RPM transaction start.
2024-07-24T21:55:34+0200 DDEBUG RPM transaction over.
2024-07-24T21:55:34+0200 CRITICAL RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
2024-07-24T21:55:34+0200 DDEBUG Cleaning up.
2024-07-24T21:55:34+0200 SUBDEBUG 
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 176, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 246, in do_transaction
    tid = super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 1034, in do_transaction
    tid = self._run_transaction(cb=cb)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 1153, in _run_transaction
    raise dnf.exceptions.Error(msg)
dnf.exceptions.Error: Could not run transaction.
2024-07-24T21:55:34+0200 CRITICAL Error: Could not run transaction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant