Repository navigation
confd: upload a software bundle in pieces over NETCONF and RESTCONF - #1853
mattiaswal wants to merge 3 commits into
Conversation
A bundle as one binary leaf is held in full by every layer between the client and confd, about ten times its size in RAM. Sent in pieces of at most 512 KiB, each call costs a few MB and the bundle only exists as the file RAUC installs from. The file lives in /tmp, /run is capped at a tenth of RAM. An upload nobody finishes is dropped after five minutes, unless RAUC is installing from it, and it is limited to 1 GiB like a download. Signed-off-by: Mattias Walström <lazzer@gmail.com>
It was pinned to NETCONF for a suspected RESTCONF bug. The software state was read without the module name of the augment, which RESTCONF rejects. Signed-off-by: Mattias Walström <lazzer@gmail.com>
The upgrade test takes the bundle from a URL or from an upload, picked per run the way the transport is. The uploaded source is an empty leaf, which libyang does not take in its JSON form, [null], from call_dict() over NETCONF. Signed-off-by: Mattias Walström <lazzer@gmail.com>
d9f93ae to
49ed2be
Compare
troglobit
left a comment
There was a problem hiding this comment.
I'm not sure this is a good idea, I suggest we use /var/lib/misc or something instead of a RAM disk. Although most of our supported devices have >= 1 GiB of RAM, I don't think we should disqualify lesser systems during this ramageddon period ...
"The upload is kept in /tmp, is limited to 1 GiB like a download, and is dropped after five minutes without activity unless RAUC is installing from it."
1GiB is just a boundary, it is the same as rauc. If getting out of memory earlier it gets stopped and the file removed. If you just assemble an image that is only 128Mb, thats all that will be used. |
Still, I don't like downloading an image as big as ours to RAM. The double buffering alone (with the browser) is enough to bring lesser devices over the cliff. |
Doublebuffer? this only adds ~1mb per packet, then it gets assembled into the real image. Have not converted the WebUI the new API yet. |
Description
A management station can now send a software bundle to the device over
NETCONF or RESTCONF, for when the device cannot reach a file server.
infix-system:upload-bundleRPC. The bundle is sent in pieces ofat most 512 KiB, each with its offset, and the reply has the size of
the upload so far. A piece at the wrong offset is rejected with the
offset the device expects.
install-bundletakes a newuploadedsource, as an alternative tourl.A bundle as one binary leaf is held in full by every layer between the
client and confd, about ten times its size in RAM. In pieces, each call
costs a few MB and the bundle only exists as the file RAUC installs
from.
The upload is kept in
/tmp, is limited to 1 GiB like a download, andis dropped after five minutes without activity unless RAUC is installing
from it.
The upgrade test now takes the bundle from a URL or from an upload,
picked per run the way the transport is. It also runs over RESTCONF;
it was pinned to NETCONF because the software state was read without
the module name of the augment, which RESTCONF rejects.
Checklist
Tick relevant boxes, this PR is-a or has-a: