[Nix-dev] nixops: argument list too long

Eike eike at eknet.org
Sun Jul 24 16:24:54 CEST 2016


It turns out, that it is my tex package. If I remove it, it deploys
successfully. 

Here is a nix file that I tested with:

{
  network.description = "Test";

  trivial =
    { config, pkgs, ... }:
    {

      imports =
      [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];

      boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" ];
      boot.kernelModules = [ "kvm-intel" ];
      boot.extraModulePackages = [ ];
      boot.loader.grub.devices = [ "/dev/sda" ];

      fileSystems."/" =
        { device = "/dev/disk/by-uuid/3bafeea6-2e45-4048-b192-436b5a8f4e3b";
          fsType = "ext4";
        };

      fileSystems."/boot" =
        { device = "/dev/disk/by-uuid/f57eea7e-69d2-4629-af51-0fbff1e1a807";
          fsType = "ext2";
        };

      swapDevices =
        [ { device = "/dev/disk/by-uuid/6488f5b6-9412-4c35-9f1d-ae7bc442410e"; } ];

      nix.maxJobs = pkgs.lib.mkDefault 2;

      services.openssh.enable = true;

      environment.systemPackages = with pkgs;
        let
          # see https://nixos.org/wiki/TexLive_HOWTO
          tex = texlive.combine {
            inherit (texlive) scheme-medium collection-latexextra beamer moderncv moderntimeline cm-super inconsolata libertine;
          };
        in [ tex ]; # I disable this packages, deploy to physical machine works

#      deployment.targetEnv = "container"; #works in both cases
       deployment.targetEnv = "none";
       deployment.targetHost = "192.168.1.72";
    };

}


If I remove the tex package, deployment to a physical machine
works. Otherwise the “Argument list too long” error appears. Deployment
to a nixos container works in both cases.

What is going on?

Regards
Eike



Eike <eike at eknet.org> writes:

> Unfortunately, the configuration.nix is little complex. You can find it
> here [0]. As a test I removed all system packages listed in [1] (that
> are included in [0]) and the error disappeared.
>
> I'll try to make a smaller example that fails.
>
> Eike
>
> [0] https://github.com/eikek/confnix/blob/unstable/systems/lenni/configuration.nix
> [1] https://github.com/eikek/confnix/blob/unstable/common-desktop.nix 
>
> nickbh <nick.b.h.alt at gmail.com> writes:
>
>> That’s odd, I can’t think why that would happen, though I’m sure I
>> don’t know all the workings of nixops. Perhaps someone else on the
>> list might have a clue.
>>
>> If you share the system packages of your config we can see if the
>> error can be replicated.
>>
>>> On 24 Jul 2016, at 13:47, Eike <eike at eknet.org> wrote:
>>> 
>>> 
>>> nixops --version says "1.3.1". I'm running NixOS 16.09pre85931.125ffff
>>> (unstable channel) and installed nixops using `nix-env -i nixops'. I
>>> noticed that when I remove all system packages from configuration.nix,
>>> it doesn't error anymore. So I guess it's because the closure is too
>>> large? This would be too bad for me, because I hoped to manage some
>>> (physical) desktop machines with nixops that have many system packages.
>>> 
>>> Here is the output of nixops info -d lenni. For me it doesn't provide
>>> any hints regarding this problem:
>>> 
>>>    Network name: lenni
>>>    Network UUID: 745c1905-5050-11e6-b200-90e6baf47cb4
>>>    Network description: Lenni
>>>    Nix expressions: /home/eike/workspace/projects/confnix/systems/lenni/deploy.nix
>>> 
>>>    +-------+---------------+------+---------------------------------------------------+------------+
>>>    | Name  |     Status    | Type | Resource Id                                       | IP address |
>>>    +-------+---------------+------+---------------------------------------------------+------------+
>>>    | lenni | Up / Outdated | none | nixops-745c1905-5050-11e6-b200-90e6baf47cb4-lenni |            |
>>>    +-------+---------------+------+---------------------------------------------------+------------+
>>> 
>>> Thanks a lot and kind regards
>>> Eike
>>> 
>>> 
>>> nickbh <nick.b.h.alt at gmail.com> writes:
>>> 
>>>> Apparently that’s a OS error resulting from a size limit on command
>>>> line args[0]. Were you able to find the cause? If not, what’s your
>>>> 'nixops —version'? Does 'nixops info -d lenni’ show any clues?
>>>> 
>>>> Nick
>>>> 
>>>> [0] http://stackoverflow.com/a/28965439/4386011
>>>>> On 22 Jul 2016, at 22:53, Eike <eike at eknet.org> wrote:
>>>>> 
>>>>> 
>>>>> Hello,
>>>>> 
>>>>> I start using nixops and want to deploy from one machine to
>>>>> another. Both have NixOS running. This is the nix file I feed to nixops
>>>>> create:
>>>>> 
>>>>>   {
>>>>>     network.description = "Lenni";
>>>>>     lenni =
>>>>>       { config, pkgs, ... }:
>>>>>       {
>>>>>         imports = [ ./configuration.nix ];
>>>>> 
>>>>>         deployment.targetEnv = "none";
>>>>>         deployment.targetHost = "192.168.1.72";
>>>>>       };
>>>>>   }
>>>>> 
>>>>> The configuration.nix is the same file I used with `nixos-rebuild`
>>>>> directly on the target machine.
>>>>> 
>>>>> When I run nixops deploy it builds the configuration and then quits with
>>>>> “[Errno 7] Argument list too long” error:
>>>>> 
>>>>>   $ nixops deploy -d lenni
>>>>>   building all machine configurations...
>>>>>   lenni> copying closure...
>>>>>   error: [Errno 7] Argument list too long
>>>>> 
>>>>> I'm not sure what I did wrong and could not find anything useful when
>>>>> searching the internet. Can someone help me out here?
>>>>> 
>>>>> Thanks and regards
>>>>> Eike
>>>>> 
>>>>> 
>>>>> -- 
>>>>> gpg: AD7AC35E
>>>>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>>>>> _______________________________________________
>>>>> nix-dev mailing list
>>>>> nix-dev at lists.science.uu.nl
>>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>> 
>>> 
>>> -- 
>>> gpg: AD7AC35E
>>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E


More information about the nix-dev mailing list