lxc-start-ephemeral script does not support in-line programmatic commands to ephemeral containers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
William and Robert developed the lxc-start-ephemeral script to support a use case that the version in the package no longer supports, to the best of our knowledge.
Specifically, we need to be able to programmatically start ephemeral instances, send them a command and get the results, and then shut down the instance. The packaged version instead starts an instance, directs users to use lxc-console, and then starts lxc-monitor to wait for the instance to close.
We may have missed a way to use the existing approach for what we need, and are happy to talk about it.
If not, we believe that a nice solution would be to allow an option to lxc-start-ephemeral for a command that, if provided, is run instead of lxc-monitor. This command would be able to have a placeholder string; before the command is run, the placeholder would be replaced by the name of the ephemeral container. The command would inherit lxc-start-
Thank you
Related branches
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: paralleltest |
no longer affects: | launchpad |
The original script created the ephemeral container, started it with lxc-start, then ssh'd to it.
I wonder if it would suffice to create the ephemeral container, then run the specified command in it with lxc-execute, rather than using lxc-start. That would mean the upstart jobs would not start however.
Would that suffice for your use case?