Skip to content

nixops broken in master #50419

Closed
Closed

Description

@Mic92

Issue description

#47684 added a pkgs argument which is not passed in nixops: https://github.com/NixOS/nixops/blob/master/nix/eval-machine-info.nix#L9

This results in the following failure:

error: anonymous function at /home/joerg/git/nixpkgs/nixos/lib/testing.nix:1:1 called without required argument 'pkgs', at /home/joerg/git/nixops/nix/eval-machine-info.nix:9:6
error: evaluation of the deployment specification failed

Steps to reproduce

$ nixops deploy -d <any-deployment>

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.80, NixOS, 19.03.git.b43a02a (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.3
  • channels(root): "nur"
  • channels(joerg): "home-manager"
  • nixpkgs: /home/joerg/git/nixpkgs

Activity

  1. Mic92 commented on Nov 15, 2018

    @Mic92
    MemberAuthor

    actually it is this commit introducing pkgs: 6c68fbd

  2. Mic92 commented on Nov 15, 2018

    @Mic92
    MemberAuthor
  3. Ekleog commented on Nov 16, 2018

    @Ekleog
    Member

    @Mic92 Nixops relies on nixos/lib/build-vms.nix? I assumed it was internal to Nixpkgs, given it's not, afaik, documented anywhere.

    I guess a fix would be to replace pkgs by pkgs ? import ../.. { inherit system config; }, if we indeed want build-vms.nix to be a public interface of Nixpkgs, along with adding a comment warning that this file is public interface and used by nixops :)

  4. Mic92 commented on Nov 16, 2018

    @Mic92
    MemberAuthor

    I have no idea why it is actually using this file.
    It dates back to very early versions of nixops: NixOS/nixops@bac59ad#diff-6f15e27c3e048b98302b636c2b8f983bR7

    I was able to replace with with import <nixpkgs> {} any problems for my setup.

  5. Ekleog commented on Nov 16, 2018

    @Ekleog
    Member

    Hmm, so I guess it's maybe a nixops bug then?

  6. Mic92 commented on Nov 16, 2018

    @Mic92
    MemberAuthor

    My fix was merged, I hope it did not break something else. Nevertheless it is still an improvement over the current state.

  7. Izorkin commented on Nov 17, 2018

    @Izorkin
    Contributor

    @Mic92 nixops not worked in latest commit

    nix-info -m
     - system: `"x86_64-linux"`
     - host os: `Linux 4.18.19, NixOS, 19.03.git.41391e9 (Koi)`
     - multi-user?: `yes`
     - sandbox: `yes`
     - version: `nix-env (Nix) 2.2pre6526_9f99d624`
     - channels(root): `"nixos-19.03pre159478.44f24a1b8c4"`
     - channels(home): `"nixos-18.09pre150245.ecd9d74d973"`
     - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`
    

    error:

    error: anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/lib/testing.nix:1:1 called without required argument 'pkgs', at /nix/store/gqnkwh6m77l4g6gwjma60nlwszwzk571-nixops-1.6.1pre2622_f10999a/share/nix/nixops/eval-machine-info.nix:9:6
    error: evaluation of the deployment specification failed
    
    
  8. Mic92 commented on Nov 17, 2018

    @Mic92
    MemberAuthor

    This is not the latest commit, you need: d5ad09cd3db5ed096d1bd17fbe5a0790b434f2c7

  9. Mic92 commented on Nov 17, 2018

    @Mic92
    MemberAuthor

    I already asked to prepare a release: NixOS/nixops#1050

  10. Mic92 commented on Nov 17, 2018

    @Mic92
    MemberAuthor

    I update nixopsUnstable in this pr: #50525

  11. weskerfoot commented on Nov 18, 2018

    @weskerfoot

    I'm still getting the same error. I'm relatively new to nix/nixops. I cloned the repo, installed it, and I still get this when I run nixops deploy -d trivial (following the tutorial)

    error: anonymous function at /home/wes/.nix-defexpr/channels/nixpkgs/nixos/lib/testing.nix:1:1 called without required argument 'pkgs', at /nix/store/prki8c8z7zih01q3nzsp3d6wprv8ymai-nixops-1.6/share/nix/nixops/eval-machine-info.nix:9:6
    error: evaluation of the deployment specification failed
    

    What branch do I need to be on for the fix? How do I verify that I have the latest release?

  12. weskerfoot commented on Nov 18, 2018

    @weskerfoot

    Nevermind, I didn't realize the nix-build command doesn't actually install it to /nix. It seems to work now

  13. Izorkin commented on Nov 18, 2018

    @Izorkin
    Contributor

    Thanks, worked.

  14. juskrey commented on Nov 18, 2018

    @juskrey

    nixpkgs channel for macos is still broken. Do we just have to wait for the build finish?

  15. Mic92 commented on Nov 19, 2018

    @Mic92
    MemberAuthor

    @juskrey I guess so. You can also checkout the nixops repository and run the ./dev-shell script to get a runnable nixops command or you override src in the nixops package.

  16. Mic92 commented on Nov 19, 2018

    @Mic92
    MemberAuthor

    @juskrey If you are on stable, I should probably backport nixopsUnstable to that branch.

  17. dmjio commented on Nov 29, 2018

    @dmjio
    Member

    This is broken for me as well,

    called without required argument 'pkgs', at /nix/store/nm5agxh5aaclwm8gpyxbamawq4lpb62s-python2.7-nixops-1.6.1pre0_abcdef/share/nix/nixops/eval-machine-info.nix
    
  18. Mic92 commented on Nov 29, 2018

    @Mic92
    MemberAuthor

    This is not the right version! Should be nixops-1.6.1pre2706_d5ad09c

  19. smalltalker55 commented on Nov 30, 2018

    @smalltalker55

    When I tested nixops-1.6.1pre2706_d5ad09c on my Mac, it hung when I tried to deploy/destroy a small deployment to VisualBox. I decided to delete the vm from VisualBox and try again. Then it gave me an error from VBoxManage: could not find a virtual machine. Duh! I thought it would just create it. That is what the old version of nixops would do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions