Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC2_backend: Fix mispelled function #1079

Merged
merged 1 commit into from Jan 15, 2019

Conversation

PsyanticY
Copy link
Contributor

The device_name_save_to_real do not exist anywhere in nixops.

[nix-shell:~/src/nixos-hardening/nix/nixops]$ nixops show-physical -d test --backup 9999999999999999
Traceback (most recent call last):
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/scripts/nixops", line 989, in <module>
    args.op()
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/scripts/nixops", line 480, in op_show_physical
    print_physical_backup_spec(args.backupid)
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/scripts/nixops", line 464, in print_physical_backup_spec
    config[m.name] = m.get_physical_backup_spec(backupid)
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/nixops/backends/ec2.py", line 225, in get_physical_backup_spec
    device_real = device_name_save_to_real(dev)
NameError: global name 'device_name_save_to_real' is not defined

[nix-shell:~/src/nixos-hardening/nix/nixops]$ vi nixops/backends/ec2.py 

[nix-shell:~/src/nixos-hardening/nix/nixops]$ nixops show-physical -d test --backup 99999999999999999
Traceback (most recent call last):
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/scripts/nixops", line 989, in <module>
    args.op()
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/scripts/nixops", line 480, in op_show_physical
    print_physical_backup_spec(args.backupid)
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/scripts/nixops", line 464, in print_physical_backup_spec
    config[m.name] = m.get_physical_backup_spec(backupid)
  File "/home/deploy-ops/src/nixos-hardening/nix/nixops/nixops/backends/ec2.py", line 225, in get_physical_backup_spec
    device_real = device_name_stored_to_real(dev)
NameError: global name 'dev' is not defined

[nix-shell:~/src/nixos-hardening/nix/nixops]$ vi nixops/backends/ec2.py 

After adding the change it works

[nix-shell:~/src/nixos-hardening/nix/nixops]$ nixops show-physical -d test --backup 99999999999999
{
  test = { config, pkgs, ... }: {
    deployment.ec2.blockDeviceMapping."/dev/xvdg".disk = (
      pkgs.lib.mkOverride 10
      "snap-xxxxxxxxxxxxxxxx"
    );
  };
}

@AmineChikhaoui AmineChikhaoui merged commit 6044ae1 into NixOS:master Jan 15, 2019
@PsyanticY PsyanticY deleted the fix_show_physical branch January 17, 2019 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants