skip to Main Content

I am testing how an application (influxDB) handles a power failure as I have a problem in production with it. Currently, I have an embedded linux device that has the problematic software and to recreate the issue I must connect to the embedded device, make it write to influx DB and unplug it while it is writing. All of that is really tedious because I must get up to another room and unplug the device guessing the time. Than again connect to it, after it boots… This is slow and may harm my only device I have with me (home office).

Instead of using the physical embedded linux device where I need to unplug the device manually I want to simplify the process with docker. With docker I can simulate the process locally on my ARM PC up until the power failure (virtual unplugging, I do not want to unplug my PC). Is there a way to do it in docker?

I tried shutting down the docker, but I am not sure it recreates the sudden lost of power to the device.

2

Answers


  1. Is there a way to do it in docker?

    No, you can’t simulate a "power failure" in docker, as the kernel is shared. You might be interested in real virtualization.

    Login or Signup to reply.
  2. docker container kill [OPTIONS] CONTAINER [CONTAINER...]
    https://docs.docker.com/engine/reference/commandline/kill/

    • Instead of using Docker, you may use VirtualBox and select the option to force power off the virtual machine. This should be equivalent to unplugging the power cord from a physical machine.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search