neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
153 stars 21 forks source link

pg16-disk-test: add mkfifo #944

Closed Omrigan closed 4 months ago

Omrigan commented 4 months ago

The virtio-serial interface can be opened only once. Consider the following scenario:

  1. Process A starts writing to the serial device.
  2. Process A spawns a fork, Process B. It inherits the open file descriptor.
  3. Process A dies; Process B survives and preserves the file descriptor.
  4. Process A is restarted but cannot open the serial device again, causing it to crash-loop.

To fix it, we are creating FIFO special file, which supports multiple writers, and spawning cat to redirect it to the virtio-serial.

Part of the #939.