hostfs bootparametres file

Bug #1805633 reported by quentin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
marionnet
New
Undecided
Unassigned

Bug Description

Hi all,

I would like to report a potential bug and a possible correction to the boot_parameters hostfs file corruption.

What's the bug, how can we reproduce it?
========================================
* Start marionnet (id will begin at 1)
* create a project and 2 machines (indeed i have tested with 3 machines, but 2 should be enough) m1 and m2 (m1 will have internal id 1 ) (m2 will have internal id 2)
* add interface information on m1 only through GUI, so that boot_parameters file will be big enough for m1, dont modify m2 configuration.
* start machines (this will create hostfs and subdir 1 and 2 )
* stop machines
* save project (this will save hostfs subdirectories: m2 as 2, m1 as 1)
* close marionnet, and start it again (so that id starts again at 1)
* load project
(this will restore hostfs and subdirectories 1 and 2)
* start project
(this will start m2 as internal id 1, and m1 as internal id 2)
Unfortunately it does not *erase* the file, just overwrite it (the beginning), the end remains which corrupt file... (name and other parameters...)

Proposal to Fix Issue:
======================
Go to simulation_level.ml line 1162 and change to the following:
Unix.openfile boot_parameters_pathname [Unix.O_WRONLY; Unix.O_CREAT ; Unix.O_TRUNC] 0o777

Best regards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.