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

OSError('out of pty devices') while ./batou secrets reencrypt #489

Open
frlan opened this issue Dec 27, 2024 · 0 comments
Open

OSError('out of pty devices') while ./batou secrets reencrypt #489

frlan opened this issue Dec 27, 2024 · 0 comments

Comments

@frlan
Copy link
Member

frlan commented Dec 27, 2024

I can reproduce it with using batou secrets reencrypt over a bigger amount iof secrets.

Traceback (most recent call last):
  File "/Users/myproject/path/./.appenv/f05492d8/bin/batou", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/myproject/path/.appenv/f05492d8/lib/python3.11/site-packages/batou/main.py", line 221, in main
    return args.func(**func_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/myproject/path/.appenv/f05492d8/lib/python3.11/site-packages/batou/secrets/manage.py", line 81, in reencrypt
    environment.secret_provider.write_config(
  File "/Users/myproject/path/.appenv/f05492d8/lib/python3.11/site-packages/batou/secrets/__init__.py", line 608, in write_config
    self.write_secret_files(self.read_secret_files())
                            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/myproject/path/.appenv/f05492d8/lib/python3.11/site-packages/batou/secrets/__init__.py", line 328, in read_secret_files
    secret_files[filename] = file.decrypted
                             ^^^^^^^^^^^^^^
  File "/Users/myproject/path/.appenv/f05492d8/lib/python3.11/site-packages/batou/secrets/encryption.py", line 32, in decrypted
    self._decrypted = self.decrypt()
                      ^^^^^^^^^^^^^^
  File "/Users/myproject/path/.appenv/f05492d8/lib/python3.11/site-packages/batou/secrets/encryption.py", line 309, in decrypt
    child_pid, fd = pty.fork()
                    ^^^^^^^^^^
  File "/Users/frlan/.nix-profile/lib/python3.11/pty.py", line 101, in fork
    master_fd, slave_fd = openpty()
                          ^^^^^^^^^
  File "/Users/frlan/.nix-profile/lib/python3.11/pty.py", line 34, in openpty
    master_fd, slave_name = _open_terminal()
                            ^^^^^^^^^^^^^^^^
  File "/Users/frlan/.nix-profile/lib/python3.11/pty.py", line 64, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices

This happend with batou 2.4.1 - but I can also reproduce it with 2.5.2, too.

I've got a few extra files inside my deployment:

➜  environments git:(master) ✗ find . -name '*.age' | wc -l 
      62
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