nixpart
nixpart copied to clipboard
Show list of known devices, when failing
I'm doing deploy with NixOps, but because of misconfigured partition script, I'm continuously seeing errors like this:
hetznerIron> checking if tmpfs in rescue system is large enough... yes: 32085 MB
hetznerIron> copying bootstrap files to rescue system... done.
hetznerIron> partitioning disks...
hetznerIron> Traceback (most recent call last):
hetznerIron> File "/nix/store/k1vjvdjqrg5f6mwpzfjv8biyaq89x6c5-python2.7-nixpart-0.4.1/bin/.nixpart-wrapped", line 166, in <module>
hetznerIron> main()
hetznerIron> File "/nix/store/k1vjvdjqrg5f6mwpzfjv8biyaq89x6c5-python2.7-nixpart-0.4.1/bin/.nixpart-wrapped", line 126, in main
hetznerIron> ks.initialize()
hetznerIron> File "/nix/store/k1vjvdjqrg5f6mwpzfjv8biyaq89x6c5-python2.7-nixpart-0.4.1/lib/python2.7/site-packages/nixkickstart.py", line 983, in initialize
hetznerIron> self.handler.partition.execute(self.storage, self.handler)
hetznerIron> File "/nix/store/k1vjvdjqrg5f6mwpzfjv8biyaq89x6c5-python2.7-nixpart-0.4.1/lib/python2.7/site-packages/nixkickstart.py", line 452, in execute
hetznerIron> p.execute(storage, ksdata)
hetznerIron> File "/nix/store/k1vjvdjqrg5f6mwpzfjv8biyaq89x6c5-python2.7-nixpart-0.4.1/lib/python2.7/site-packages/nixkickstart.py", line 595, in execute
hetznerIron> raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent disk %s in partition command" % n)
hetznerIron> pykickstart.errors.KickstartValueError: The following problem occurred on line 3 of the kickstart file:
hetznerIron>
hetznerIron> Specified nonexistent disk md2 in partition command
hetznerIron>
Maybe show list of available disks when exception occured?