I’m trying to use
mender-artifact to modify files inside a mender artifact built with mender-convert
without success (see update below).
I downloaded precompiled binary and placed it inside
Checking version and obtaining help works fine:
$ ./mender-artifact -v mender-artifact version 3.0.1
But as soon as I invoke any command on a mender artifact (I tried
validate), it just hangs forever, loading one CPU core to 100%.
./mender-artifact cat raspberry_hub_raspbian04.2019_Scanner5.1.0_mender.mender:/etc/hosts
As I said, .mender artifact is the output of the latest mender-convert. I can open it as a tarball, contents seem to be correct.
I downloaded the demo artifact and tried to use
mender-artifact with it and it worked, but
cat command took couple of seconds. So considering that my artifact is ~10x bigger than the demo one, I waited a bit more and bingo it actually worked. But it took ~3 minutes.
cp command took twice as long:
~/mender-convert/output $ date +%R && ./mender-artifact cp mender.conf raspberry_hub_raspbian04.2019_Scanner5.1.0m_mender.mender:/etc/mender/mender.conf && date +%R 19:26 19:33
I understand that limitation probably comes from the fact that the artifact should be uncompressed and compressed back every time.
But considering that I have a dozen of files (config, identity, inventory and some state-scripts) to copy into the artifact generated by mender-convert, is there a more efficient workflow to do so?
Maybe mounting .ext4 and use mender-artifact to generate the artifact is a viable idea? If yes, can I somehow ask mender-convert to not generate the .mender file?
In any case, I think a note about performance limitations of
mender-artifact should be placed in the docs. Or the program itself should output the info to console that it may take a while.