git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/beegfs: remove module

packages are marked as broken for quite some time.

commitc3e17efaab0b53b4f45454aaaea7690506a8fcde authorFlorian Klink <flokli@flokli.de> dateSun 24 Nov 2019, 17:33 (7 years ago) parent2b9773f
4 files changed+9−358
nixos/doc/manual/release-notes/rl-2003.xml+5 nixos/modules/module-list.nix−1 nixos/modules/rename.nix+4 nixos/modules/services/network-filesystems/beegfs.nix−357
nixos/doc/manual/release-notes/rl-2003.xml+5
@@ -176,6 +176,11 @@
176176 KDE’s old multimedia framework Phonon no longer supports Qt 4. For that reason, Plasma desktop also does not have <option>enableQt4Support</option> option any more.
177177 </para>
178178 </listitem>
179+ <listitem>
180+ <para>
181+ The BeeGFS module has been removed.
182+ </para>
183+ </listitem>
179184 </itemizedlist>
180185 </section>
181186
nixos/modules/module-list.nix−1
@@ -538,7 +538,6 @@
538538 ./services/monitoring/zabbix-agent.nix
539539 ./services/monitoring/zabbix-proxy.nix
540540 ./services/monitoring/zabbix-server.nix
541− ./services/network-filesystems/beegfs.nix
542541 ./services/network-filesystems/cachefilesd.nix
543542 ./services/network-filesystems/davfs2.nix
544543 ./services/network-filesystems/drbd.nix
nixos/modules/rename.nix+4
@@ -280,6 +280,10 @@ with lib;
280280 # BLCR
281281 (mkRemovedOptionModule [ "environment.blcr.enable" ] "The BLCR module has been removed")
282282
283+ # beegfs
284+ (mkRemovedOptionModule [ "services.beegfsEnable" ] "The BeeGFS module has been removed")
285+ (mkRemovedOptionModule [ "services.beegfs" ] "The BeeGFS module has been removed")
286+
283287 # Redis
284288 (mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.")
285289 (mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.")
nixos/modules/services/network-filesystems/beegfs.nixdeleted−357
@@ -1,357 +0,0 @@
1−{ config, lib, pkgs, ...} :
2−
3−with lib;
4−
5−let
6− cfg = config.services.beegfs;
7−
8− # functions for the generations of config files
9−
10− configMgmtd = name: cfg: pkgs.writeText "mgmt-${name}.conf" ''
11− storeMgmtdDirectory = ${cfg.mgmtd.storeDir}
12− storeAllowFirstRunInit = false
13− connAuthFile = ${cfg.connAuthFile}
14− connPortShift = ${toString cfg.connPortShift}
15−
16− ${cfg.mgmtd.extraConfig}
17− '';
18−
19− configAdmon = name: cfg: pkgs.writeText "admon-${name}.conf" ''
20− sysMgmtdHost = ${cfg.mgmtdHost}
21− connAuthFile = ${cfg.connAuthFile}
22− connPortShift = ${toString cfg.connPortShift}
23−
24− ${cfg.admon.extraConfig}
25− '';
26−
27− configMeta = name: cfg: pkgs.writeText "meta-${name}.conf" ''
28− storeMetaDirectory = ${cfg.meta.storeDir}
29− sysMgmtdHost = ${cfg.mgmtdHost}
30− connAuthFile = ${cfg.connAuthFile}
31− connPortShift = ${toString cfg.connPortShift}
32− storeAllowFirstRunInit = false
33−
34− ${cfg.meta.extraConfig}
35− '';
36−
37− configStorage = name: cfg: pkgs.writeText "storage-${name}.conf" ''
38− storeStorageDirectory = ${cfg.storage.storeDir}
39− sysMgmtdHost = ${cfg.mgmtdHost}
40− connAuthFile = ${cfg.connAuthFile}
41− connPortShift = ${toString cfg.connPortShift}
42− storeAllowFirstRunInit = false
43−
44− ${cfg.storage.extraConfig}
45− '';
46−
47− configHelperd = name: cfg: pkgs.writeText "helperd-${name}.conf" ''
48− connAuthFile = ${cfg.connAuthFile}
49− ${cfg.helperd.extraConfig}
50− '';
51−
52− configClientFilename = name : "/etc/beegfs/client-${name}.conf";
53−
54− configClient = name: cfg: ''
55− sysMgmtdHost = ${cfg.mgmtdHost}
56− connAuthFile = ${cfg.connAuthFile}
57− connPortShift = ${toString cfg.connPortShift}
58−
59− ${cfg.client.extraConfig}
60− '';
61−
62− serviceList = [
63− { service = "admon"; cfgFile = configAdmon; }
64− { service = "meta"; cfgFile = configMeta; }
65− { service = "mgmtd"; cfgFile = configMgmtd; }
66− { service = "storage"; cfgFile = configStorage; }
67− ];
68−
69− # functions to generate systemd.service entries
70−
71− systemdEntry = service: cfgFile: (mapAttrs' ( name: cfg:
72− (nameValuePair "beegfs-${service}-${name}" (mkIf cfg.${service}.enable {
73− wantedBy = [ "multi-user.target" ];
74− requires = [ "network-online.target" ];
75− after = [ "network-online.target" ];
76− serviceConfig = rec {
77− ExecStart = ''
78− ${pkgs.beegfs}/bin/beegfs-${service} \
79− cfgFile=${cfgFile name cfg} \
80− pidFile=${PIDFile}
81− '';
82− PIDFile = "/run/beegfs-${service}-${name}.pid";
83− TimeoutStopSec = "300";
84− };
85− }))) cfg);
86−
87− systemdHelperd = mapAttrs' ( name: cfg:
88− (nameValuePair "beegfs-helperd-${name}" (mkIf cfg.client.enable {
89− wantedBy = [ "multi-user.target" ];
90− requires = [ "network-online.target" ];
91− after = [ "network-online.target" ];
92− serviceConfig = rec {
93− ExecStart = ''
94− ${pkgs.beegfs}/bin/beegfs-helperd \
95− cfgFile=${configHelperd name cfg} \
96− pidFile=${PIDFile}
97− '';
98− PIDFile = "/run/beegfs-helperd-${name}.pid";
99− TimeoutStopSec = "300";
100− };
101− }))) cfg;
102−
103− # wrappers to beegfs tools. Avoid typing path of config files
104− utilWrappers = mapAttrsToList ( name: cfg:
105− ( pkgs.runCommand "beegfs-utils-${name}" {
106− nativeBuildInputs = [ pkgs.makeWrapper ];
107− preferLocalBuild = true;
108− } ''
109− mkdir -p $out/bin
110−
111− makeWrapper ${pkgs.beegfs}/bin/beegfs-check-servers \
112− $out/bin/beegfs-check-servers-${name} \
113− --add-flags "-c ${configClientFilename name}" \
114− --prefix PATH : ${lib.makeBinPath [ pkgs.beegfs ]}
115−
116− makeWrapper ${pkgs.beegfs}/bin/beegfs-ctl \
117− $out/bin/beegfs-ctl-${name} \
118− --add-flags "--cfgFile=${configClientFilename name}"
119−
120− makeWrapper ${pkgs.beegfs}/bin/beegfs-ctl \
121− $out/bin/beegfs-df-${name} \
122− --add-flags "--cfgFile=${configClientFilename name}" \
123− --add-flags --listtargets \
124− --add-flags --hidenodeid \
125− --add-flags --pools \
126− --add-flags --spaceinfo
127−
128− makeWrapper ${pkgs.beegfs}/bin/beegfs-fsck \
129− $out/bin/beegfs-fsck-${name} \
130− --add-flags "--cfgFile=${configClientFilename name}"
131− ''
132− )) cfg;
133−in
134−{
135− ###### interface
136−
137− options = {
138− services.beegfsEnable = mkEnableOption "BeeGFS";
139−
140− services.beegfs = mkOption {
141− default = {};
142− description = ''
143− BeeGFS configurations. Every mount point requires a separate configuration.
144− '';
145− type = with types; attrsOf (submodule ({ ... } : {
146− options = {
147− mgmtdHost = mkOption {
148− type = types.str;
149− default = null;
150− example = "master";
151− description = ''Hostname of managament host.'';
152− };
153−
154− connAuthFile = mkOption {
155− type = types.str;
156− default = "";
157− example = "/etc/my.key";
158− description = "File containing shared secret authentication.";
159− };
160−
161− connPortShift = mkOption {
162− type = types.int;
163− default = 0;
164− example = 5;
165− description = ''
166− For each additional beegfs configuration shift all
167− service TCP/UDP ports by at least 5.
168− '';
169− };
170−
171− client = {
172− enable = mkEnableOption "BeeGFS client";
173−
174− mount = mkOption {
175− type = types.bool;
176− default = true;
177− description = "Create fstab entry automatically";
178− };
179−
180− mountPoint = mkOption {
181− type = types.str;
182− default = "/run/beegfs";
183− description = ''
184− Mount point under which the beegfs filesytem should be mounted.
185− If mounted manually the mount option specifing the config file is needed:
186− cfgFile=/etc/beegfs/beegfs-client-&lt;name&gt;.conf
187− '';
188− };
189−
190− extraConfig = mkOption {
191− type = types.lines;
192− default = "";
193− description = ''
194− Additional lines for beegfs-client.conf.
195− See documentation for further details.
196− '';
197− };
198− };
199−
200− helperd = {
201− enable = mkOption {
202− type = types.bool;
203− default = true;
204− description = ''
205− Enable the BeeGFS helperd.
206− The helpered is need for logging purposes on the client.
207− Disabling <literal>helperd</literal> allows for runing the client
208− with <literal>allowUnfree = false</literal>.
209− '';
210− };
211−
212− extraConfig = mkOption {
213− type = types.lines;
214− default = "";
215− description = ''
216− Additional lines for beegfs-helperd.conf. See documentation
217− for further details.
218− '';
219− };
220− };
221−
222− mgmtd = {
223− enable = mkEnableOption "BeeGFS mgmtd daemon";
224−
225− storeDir = mkOption {
226− type = types.path;
227− default = null;
228− example = "/data/beegfs-mgmtd";
229− description = ''
230− Data directory for mgmtd.
231− Must not be shared with other beegfs daemons.
232− This directory must exist and it must be initialized
233− with beegfs-setup-mgmtd, e.g. "beegfs-setup-mgmtd -C -p &lt;storeDir&gt;"
234− '';
235− };
236−
237− extraConfig = mkOption {
238− type = types.lines;
239− default = "";
240− description = ''
241− Additional lines for beegfs-mgmtd.conf. See documentation
242− for further details.
243− '';
244− };
245− };
246−
247− admon = {
248− enable = mkEnableOption "BeeGFS admon daemon";
249−
250− extraConfig = mkOption {
251− type = types.lines;
252− default = "";
253− description = ''
254− Additional lines for beegfs-admon.conf. See documentation
255− for further details.
256− '';
257− };
258− };
259−
260− meta = {
261− enable = mkEnableOption "BeeGFS meta data daemon";
262−
263− storeDir = mkOption {
264− type = types.path;
265− default = null;
266− example = "/data/beegfs-meta";
267− description = ''
268− Data directory for meta data service.
269− Must not be shared with other beegfs daemons.
270− The underlying filesystem must be mounted with xattr turned on.
271− This directory must exist and it must be initialized
272− with beegfs-setup-meta, e.g.
273− "beegfs-setup-meta -C -s &lt;serviceID&gt; -p &lt;storeDir&gt;"
274− '';
275− };
276−
277− extraConfig = mkOption {
278− type = types.str;
279− default = "";
280− description = ''
281− Additional lines for beegfs-meta.conf. See documentation
282− for further details.
283− '';
284− };
285− };
286−
287− storage = {
288− enable = mkEnableOption "BeeGFS storage daemon";
289−
290− storeDir = mkOption {
291− type = types.path;
292− default = null;
293− example = "/data/beegfs-storage";
294− description = ''
295− Data directories for storage service.
296− Must not be shared with other beegfs daemons.
297− The underlying filesystem must be mounted with xattr turned on.
298− This directory must exist and it must be initialized
299− with beegfs-setup-storage, e.g.
300− "beegfs-setup-storage -C -s &lt;serviceID&gt; -i &lt;storageTargetID&gt; -p &lt;storeDir&gt;"
301− '';
302− };
303−
304− extraConfig = mkOption {
305− type = types.str;
306− default = "";
307− description = ''
308− Addional lines for beegfs-storage.conf. See documentation
309− for further details.
310− '';
311− };
312− };
313− };
314− }));
315− };
316− };
317−
318− ###### implementation
319−
320− config =
321− mkIf config.services.beegfsEnable {
322−
323− environment.systemPackages = utilWrappers;
324−
325− # Put the client.conf files in /etc since they are needed
326− # by the commandline tools
327− environment.etc = mapAttrs' ( name: cfg:
328− (nameValuePair "beegfs/client-${name}.conf" (mkIf (cfg.client.enable)
329− {
330− enable = true;
331− text = configClient name cfg;
332− }))) cfg;
333−
334− # Kernel module, we need it only once per host.
335− boot = mkIf (
336− foldr (a: b: a || b) false
337− (map (x: x.client.enable) (collect (x: x ? client) cfg)))
338− {
339− kernelModules = [ "beegfs" ];
340− extraModulePackages = [ pkgs.linuxPackages.beegfs-module ];
341− };
342−
343− # generate fstab entries
344− fileSystems = mapAttrs' (name: cfg:
345− (nameValuePair cfg.client.mountPoint (optionalAttrs cfg.client.mount (mkIf cfg.client.enable {
346− device = "beegfs_nodev";
347− fsType = "beegfs";
348− mountPoint = cfg.client.mountPoint;
349− options = [ "cfgFile=${configClientFilename name}" "_netdev" ];
350− })))) cfg;
351−
352− # generate systemd services
353− systemd.services = systemdHelperd //
354− foldr (a: b: a // b) {}
355− (map (x: systemdEntry x.service x.cfgFile) serviceList);
356− };
357−}