!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

227 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture53 Servers

Load older messages


SenderMessageTime
19 Jun 2023
@raitobezarius:matrix.orgraitobezarius
In reply to @ronnypfannschmidt:matrix.org
right now there is no safe tooling for it, so its easy to mess up
The stopgap solution for now is to have a global nixos module knob to disable automated migrations
21:22:59
@raitobezarius:matrix.orgraitobezariusOr to enforce a RFC saying that all nixos modules should have an automatic migration flag21:23:22
@raitobezarius:matrix.orgraitobezariusDuring all my reviews, contributors usually don't want to bother and complain when I say this is a serious problem21:23:42
20 Jun 2023
@ronnypfannschmidt:matrix.org@ronnypfannschmidt:matrix.orgall modules either get safe migrations or need a unsafe flag per module in peoples config08:11:22
@ronnypfannschmidt:matrix.org@ronnypfannschmidt:matrix.orgthen users can understand the quality levels by the unsafe migration flags they have to set08:11:59
@piegames:matrix.org@piegames:matrix.org What is a "safe" migration? How many upstreams even allow implementing this in the first place? 08:12:48
@raitobezarius:matrix.orgraitobezariussafe migrations does not exist10:23:45
@raitobezarius:matrix.orgraitobezariusbut unsafe migrations can always be made safe10:23:54
@raitobezarius:matrix.orgraitobezariusdepend on how much resources you are ready to commit for it10:24:01
@piegames:matrix.org@piegames:matrix.org But how 10:27:24
@raitobezarius:matrix.orgraitobezariustrivial safe migration algorithm:10:33:42
@raitobezarius:matrix.orgraitobezarius * trivial safe migration algorithm based on unsafe procedure M10:33:50
@raitobezarius:matrix.orgraitobezariustake a snapshot of the service you are migrating S10:34:10
@raitobezarius:matrix.orgraitobezariusdo M10:34:12
@raitobezarius:matrix.orgraitobezariusit's safe because you don't lose data, you only availability10:34:31
@raitobezarius:matrix.orgraitobezarius * it's safe because you don't lose data, you only lose availability10:34:36
@raitobezarius:matrix.orgraitobezariusyou can go back to version N - 1 by restoring S as long as you don't create new data of course which should be fine if you have a broken service resulting of an unsafe migration10:35:01
@raitobezarius:matrix.orgraitobezarius * take a data snapshot of the service you are migrating S10:35:08
@raitobezarius:matrix.orgraitobezariusyou could automate restoring S based on criteria: "the systemd unit really doesn't want to restart", "all requests are 500", etc.10:35:30
@raitobezarius:matrix.orgraitobezariusavailability then can be restored via this mechanism10:35:51
@piegames:matrix.org@piegames:matrix.orgYeah but how do you want to take a snapshot of only a single service? And what about services that interact with others (e.g. a database)?10:36:05
@raitobezarius:matrix.orgraitobezariusideally, the nixos module should provide the facts about your servicesd10:36:27
@raitobezarius:matrix.orgraitobezarius * ideally, the nixos module should provide the facts about your services10:36:28
@raitobezarius:matrix.orgraitobezariusStateDirectory10:36:31
@raitobezarius:matrix.orgraitobezariuspostgresql database10:36:36
@raitobezarius:matrix.orgraitobezariusredis database10:36:40
@raitobezarius:matrix.orgraitobezariusetc.10:36:42
@raitobezarius:matrix.orgraitobezariusthen "taking a snapshot" for the service is taking a snapshot of all its constitutents10:36:52
@raitobezarius:matrix.orgraitobezariusand this is an implem detail on how you take such snapshots10:36:59
@piegames:matrix.org@piegames:matrix.orgSo you have three services connecting to postgres, and one of them fails during upgrade. That's not an implementation detail, that's a fundamental problem IMO10:37:15

Show newer messages


Back to Room ListRoom Version: 9