Files api

Tycho Andersen <notifications@github.com> wrote:

>> +	if err != nil {
>> +		NotFound(w)
>> +		return
>> +	}
>> +
>> +	targetPath := r.FormValue("path")
>> +	if targetPath == "" {
>> +		BadRequest(w, fmt.Errorf("missing path argument"))
>> +		return
>> +	}
>> +
>> +	/*
>> +	 * TODO: We should ask LXC about whether or not this rootfs is a
>block
>> +	 * device, and if it is, whether or not it is actually mounted.
>> +	 */
>> +	rootfs := c.ConfigItem("lxc.rootfs")[0]
>
>I'd prefer to keep support for pulling/pushing to offline containers if
>possible, since I think that would be useful (e.g. to manually drop
>cloud-init userdata into the container before it boots).
>
>I can send a patch to implement better logic when the container is
>running, though.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/lxc/lxd/pull/117/files#r21483546

It seems worth it to me to have the lxc api provide what is needed to simply mount the container rootfs.  But it would have to be carefully thought out.  I.e we don't want a caller to be able to leave a mounted fs in place after exit.  May be possible with pdeath.  May be impossible.