Activity log for bug #1828357

Date Who What changed Old value New value Message
2019-05-09 07:55:55 Zygmunt Krynicki bug added bug
2019-05-09 07:57:34 Zygmunt Krynicki description When snap-update-ns processes a pair of mount profiles, current and desired, to determine what needs to be done to transform the current mount profile into the desired mount profile. The diff-like algorithm works on an array of structures that describe a fstab-like mount entry. Each entry has a destination, or mount location, a mount source and some mount options. The structures are sorted by mount destination, with some quirks, like always doing "over mount" type operations ahead of all other operations. I believe this algorithm is incorrect because of the following observations: - a layout creating a tmpfs in $SNAP/foo is sorted AFTER a content bind mount creating a file in $SNAP/foo/a - the algorithm does not understand bind mounts where both the mount destination and a mount source is a path. I believe the algorithm should be changed to topological sorting where bind mounts are represented by nodes with two outgoing edges and regular mounts are represented by nodes with only one edge. When snap-update-ns processes a pair of mount profiles, current and desired, to determine what needs to be done to transform the current mount profile into the desired mount profile. The diff-like algorithm works on an array of structures that describe a fstab-like mount entry. Each entry has a destination, or mount location, a mount source and some mount options. The structures are sorted by mount destination, with some quirks, like always doing "over mount" type operations ahead of all other operations. I believe this algorithm is incorrect because of the following observations: - a layout creating a tmpfs in $SNAP/foo is sorted AFTER a content bind mount creating a file in $SNAP/foo/a - the algorithm does not understand bind mounts, where both the mount destination and a mount source is a path, considering only the destination path. I believe the algorithm should be changed to topological sorting where bind mounts are represented by nodes with two outgoing edges and regular mounts are represented by nodes with only one edge.
2019-05-09 07:58:23 Zygmunt Krynicki snapd: assignee Zygmunt Krynicki (zyga)
2019-05-09 07:58:25 Zygmunt Krynicki snapd: importance Undecided High
2019-09-18 13:10:31 Zygmunt Krynicki snapd: status New Triaged
2021-02-15 10:09:12 Samuele Pedroni snapd: assignee Zygmunt Krynicki (zyga) Samuele Pedroni (pedronis)