[elbe-devel] [elbe-users] removing file in finetuning will upset archive validation

Olivier Dion dion at linutronix.de
Tue Mar 24 19:14:38 CET 2020


On Tue, 24 Mar 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> On Mon, Mar 23, 2020 at 12:14:53PM -0400, Olivier Dion wrote:
>> On Mon, 23 Mar 2020, ew.foe at nassur.net wrote:
>> > Dear developers,
>> >
>> > being banned to the home office I have had time to play with elbe
>> > (v12.3).
>> >
>> > So one of the things I'm doing in practically all my builds at work,
>> > is this: via a build script
>> >
>> > - I collect the content of a given directory (./local-changes/) into
>> >    an archive added to a temporary .xml file
>> >    : cp mybuild.xml tmp.mybuild.xml
>> >    : elbe chg_archive tmp.mybuild.xml ./local-changes
>> >
>> > - then I start elbe initvm and submit this build
>> >
>> > - during the finetuning stage one of the files in the archive is
>> >    called and deleted afterwards:
>> >    : cat mybuild.xml
>> >    :     <finetuning>
>> >    :         <!-- run the separate script from archive -->
>> >    :         <command>chmod 0750 /root/f.finetuning.sh</command>
>> >    :         <command>/root/f.finetuning.sh</command>
>> >    :         <!-- remove the script afterwards -->
>> >    :         <rm>/root/f.finetuning.sh</rm>
>> >    :     </finetuning>
>> >
>> > - this fails
>> >
>> >    : [INFO] Archive validation
>> >    : [INFO] ------------------
>> >    : [INFO]
>> >    : [ERROR] Archive file /root/f.finetuning.sh deleted in finetuning
>> >    : [CMD] mkdir -p  
>> > /var/cache/elbe/edeaff54-cd39-4457-b429-b9e1d5c652e9/filesystems
>> >
>> > - this and has been reported before:
>> >    http://lists.linutronix.de/pipermail/elbe-users/2019-November/000095.html
>> >    http://lists.linutronix.de/pipermail/elbe-users/2020-February/000108.html
>> >
>> >
>> >  From the log files I understand that the commands are executed fine.
>> > However, the archive validation step does not know, that the file was
>> > removed intentionally.
>> >
>> > So what is the correct way to do this?
>> 
>> For your current situation, a sub-tag could be added to the tag archive.
>> 
>> Something along the lines:
>> ----------------------------------------------------------------------
>> <archive>
>> ...
>> <expect-deleted>/root/f.finetuning.sh</expect-deleted>
>> <expect-modified>/root/f.finetuning.sh</expect-modified>
>> ...
>> </archive
>> ----------------------------------------------------------------------
>> 
>> However I see another possibility.  You could 'curl/wget/scp' your
>> script, execute it then delete it.  Since the script is not part of the
>> archive, it should not raise an error.
>> 
>> Or write the entire script in a <raw_cmd> tag ..
>
>
> Or put the script into a <file> tag.
>
>
> We could also just make it a WARNING.
> Whats your opinion on this ?
> I dont have strong feelings about it. And if nobody complains, we could
> make it a warning.

I guess that we could make it a warning by default.  Since it's logged
in the archive validation file, one could detect it very easily.

>
>> 
>> >
>> > One can argue that this should not be available, because rebuilding
>> > the image will be impossible later, if the script is not available.
>> 
>> -- 
>> Olivier Dion
>> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
>> 
>> _______________________________________________
>> elbe-users mailing list
>> elbe-users at linutronix.de
>> https://lists.linutronix.de/mailman/listinfo/elbe-users
>
> -- 
> Torben Hohn
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
>
> Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
> can be found here): https://linutronix.de/kontakt/Datenschutz.php
>
> Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
> Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
> 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
-- 
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen



More information about the elbe-devel mailing list