{"push_id":3470181021,"size":108,"distinct_size":106,"ref":"refs/heads/master","head":"a16857bb6ecdd718bead6b56943dafa3a261478a","before":"94750a1672e92466bcbbbfb1139511588a61cb61","commits":[{"sha":"6c2d06d1c1fe318686bd23671eca5d964020a361","author":{"name":"Zygmunt Krynicki","email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@zygoon.pl"},"message":"dirs,overlord/snapstate: add Soft and Hard refresh checks\n\nAs a part of \"refresh app awareness\" feature snapd should be able to\ncheck if a snap is busy just before starting the refresh process and\nthen re-check just before stopping services and performing link changes.\n\nThere are two checks defined as a part of this flow: a soft check\nthat filters out processes that belong to services and a hard check that\nsimply looks if there are any processes running (that associate with given\nsnap).\n\nThis patch introduces this logic without actually using it yet. The soft\nrefresh check takes a snap.Info to know about apps and hooks. It looks\nat the freezer cgroup which tracks all processes in a given snap\n(regardless of origin) and then looks at the per-service PIDs cgroup\nthat tracks per-service processes. If there are any non-service processes\naround then a snap is deemed busy.\n\nSupplemental logic inspects apps and hooks to provide a descriptive\nerror message. Even though the process is partially racy and can provide\nfalse positives or false negatives (e.g. a snap being busy just stopped\nbeing busy or a snap not being busy may have just started to be busy)\nthis is deliberate. There is no freezing or locking at this step.\n\nThe second check is a hard check. After stopping services we can run the\nhard check that simply looks if there are any processes left.\n\nThis time there is no synchronization internally but externally\n(in the update logic) snapd will stop services, grab a lock and only then\nperform the hard check and unlink a snap. This will ensure that the\nprocess is free of any races. The exact semantics of the second lock\nis not defined yet but it is explicitly orthogonal of this code.\n\nThe lock may be either the existing per-snap lock or a new lock that\nhas no timeout associated with it. This second lock would stall\nstartup of any new snap apps or hooks until the refresh process\ncan link the new revision.\n\nSigned-off-by: Zygmunt Krynicki <me@zygoon.pl>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/6c2d06d1c1fe318686bd23671eca5d964020a361"},{"sha":"f6bdff560d3ecd10eb945c615ce6c28a81ab4fbd","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"overlord/snapstate: move pid helpers down\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/f6bdff560d3ecd10eb945c615ce6c28a81ab4fbd"},{"sha":"a5f9d20fb57d4c110752a493c9295ffccd74dcd9","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"overlord/snapstate: make snapName the first field\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/a5f9d20fb57d4c110752a493c9295ffccd74dcd9"},{"sha":"b65202988744379bf45f874a32f3ef686d834213","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"overlord/snapstate: rename helper to SoftNothingRunningRefreshCheck\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/b65202988744379bf45f874a32f3ef686d834213"},{"sha":"6af5d442e050dee2bf900b23ba5087a27fc4e8c9","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"overlord/snapstate: rename helper to HardNothingRunningRefreshCheck\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/6af5d442e050dee2bf900b23ba5087a27fc4e8c9"},{"sha":"c9f88fac930419bec55b07d85e13f9a2112c23a6","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"osutil: add SaveMountProfileText for parity with LoadMountProfileText\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/c9f88fac930419bec55b07d85e13f9a2112c23a6"},{"sha":"0c6dfc0d04ea93bcff240d3c43e405a5e21d0206","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: add MountProfileUpdate interface\n\nThe interface aims to abstract the essential algorithm of performing\nmount namespace updates from the differences between system-wide and\nper-user mount namespaces. It also simplifies testing by decoupling\ncomplex components from each other.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/0c6dfc0d04ea93bcff240d3c43e405a5e21d0206"},{"sha":"be89338dfe9923320d13ccf82f954d1808301a9f","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: pass dummy MountProfileUpdate to applyProfile\n\nThe TransitionalProfileUpdate has the signature of MountProfileUpdate\nbut does nothing at all yet. Subsequent patches will introduce the behavior\nof subsequent methods and switch elements of applyProfile to use it.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/be89338dfe9923320d13ccf82f954d1808301a9f"},{"sha":"d63aff487514280875b9e8b82c888a5cd1dcfef6","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: implement TransitionalProfileUpdate.NeededChanges\n\nThis implements the lowest hanging fruit on the path to the refactoring.\nNeededChanges is a member of the interface to allow conjuring desired\nbehavior of this complex part separately of the rest of the update logic.\n\nIt is also possible that nvidia transition will require a hand-crafted\nimplementation of NeededChanges when running in the system-wide, per-snap\nmount namespace.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/d63aff487514280875b9e8b82c888a5cd1dcfef6"},{"sha":"cfd5a5db92541747f4128726cdacde8091842ab5","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: implement TransitionalProfileUpdate.PerformChange\n\nThis implements the next low hanging fruit on the path to the refactoring.\nPerformChange is a member of the interface for the same reasons as\nNeededChanges - to facilitate testing without heavy mocking paths.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/cfd5a5db92541747f4128726cdacde8091842ab5"},{"sha":"d5d277530c978360bd7b09b9cb176d323395f632","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: add {System,User}ProfileUpdate\n\nThe new types simply embed the transitional mount profile update\nwe already defined earlier. This will allow us to switch to them\ninside apply{User,System}Fstab next, which will in turn allow to\npopulate the rest of the MountProfileUpdate interface.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/d5d277530c978360bd7b09b9cb176d323395f632"},{"sha":"ca2186379f232deeb10919e883e93df6996dabc2","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: add testProfileUpdate\n\ntestProfileUpdate implements MountProfileUpdate and is useful for\ntesting as the default implementation of all the interface methods\ndoes nothing but can be easily overridden on a per-test-case basis.\n\nThis mostly removes the need of global function replacement (mocking)\nwith the exception of some cases that don't yet expose a mount profile\nupdate interface as argument.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/ca2186379f232deeb10919e883e93df6996dabc2"},{"sha":"a35b5b2d6a41984026cf6fab63258c9a7808fbb6","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: pass SystemProfileUpdate to computeAndSaveSystemChanges\n\napplySystemFstab now internally spawns SystemProfileUpdate, which,\nat this time, still only implements ChangesNeeded and PerformChange,\nand passes it to computetAndSaveSystemChanges.\n\nThis allows us to start using the interface in practice, moving the\ntest functions from mocking to passing a testing interface implementation\ninstead.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/a35b5b2d6a41984026cf6fab63258c9a7808fbb6"},{"sha":"84c5ab1249031a0741ff6af63b734ad21a6b796d","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: pass UserProfileUpdate to applyProfile\n\nThe applyUserFstab function used to internally spawn the transitional\nmount profile update to pass it to the updateProfile function. Now\nit can start to pass the specific UserProfileUpdate so that system\nand user profile updates can begin to differentiate and gain support\nfor additional methods of the MountProfileUpdate interface.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/84c5ab1249031a0741ff6af63b734ad21a6b796d"},{"sha":"feb693e0e16a2b9d2b5b8c34b787d29d0a18d86b","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: rename TransitionalMountProfileUpdate to CommonProfileUpdate\n\nThe profile will now start to implement the logic common between\nsystem and user mount profiles.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/feb693e0e16a2b9d2b5b8c34b787d29d0a18d86b"},{"sha":"198409d6b870f2fa4ebeced31f28cad915032217","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: reorder methods of CommonProfileUpdate\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/198409d6b870f2fa4ebeced31f28cad915032217"},{"sha":"482a40cfc680a4000d27dc6b8c816dfa2cdb04ca","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: add tests for NeededChanges and PerformChange\n\nAdd tests and docs for the two initial, trivial methods of\nCommonProfileUpdate.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/482a40cfc680a4000d27dc6b8c816dfa2cdb04ca"},{"sha":"7ea04c970d4c68ce20460613acfa4cd6601fe86f","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: add {current,desired}SystemProfilePath\n\nHaving those defined separately allows for easier testing but most\nimportantly, allows us to simply pass them as initializer data\nto CommonProfileUpdate so that it can take over the responsibilities\nof loading and saving the mount profiles.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/7ea04c970d4c68ce20460613acfa4cd6601fe86f"},{"sha":"28dd7070586372b4b4870cbc32b5d57d75c805f0","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: add desiredUserProfilePath\n\nHaving this defined separately allows for easier testing but most\nimportantly, allows us to simply pass them it initializer data\nto CommonProfileUpdate so that it can take over the responsibilities\nof loading and saving the mount profiles.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/28dd7070586372b4b4870cbc32b5d57d75c805f0"},{"sha":"f6d8ef437f3b85fbded56b71e91abaf81cb1d24d","author":{"name":"Zygmunt Krynicki","email":"06b40a82600060aa4dd63b8edab70ee2d86817cd@canonical.com"},"message":"cmd/snap-update-ns: teach CommonProfileUpdate to load/save profiles\n\nThis code is identical between the system and the user mount profile\nupdate logic and can be safely placed here. The routines are complete\nand tested but not yet used.\n\nSigned-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>","distinct":true,"url":"https://api.github.com/repos/sergiocazzolato/snapd/commits/f6d8ef437f3b85fbded56b71e91abaf81cb1d24d"}]}
{"actor":{"display_login":"sergiocazzolato"}}