elitak / nixos-infect

[GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

osuosl openstack - failing swapon

cherusk opened this issue · comments

Relevant parts of nixos-infect run on osuosl research lab openstack cluster:

++ mktemp /tmp/nixos-infect.XXXXX.swp

  • swapFile=/tmp/nixos-infect.qAMel.swp
  • dd if=/dev/zero of=/tmp/nixos-infect.qAMel.swp bs=1M count=1024
    1024+0 records in
    1024+0 records out
    1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.38329 s, 776 MB/s
  • chmod 0600 /tmp/nixos-infect.qAMel.swp
  • mkswap /tmp/nixos-infect.qAMel.swp
    Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
    no label, UUID=4a61f628-c714-43ed-8baf-046844d4e328
  • swapon -v /tmp/nixos-infect.qAMel.swp
    swapon: /tmp/nixos-infect.qAMel.swp: found signature [pagesize=4096, signature=swap]
    swapon: /tmp/nixos-infect.qAMel.swp: pagesize=4096, swapsize=1073741824, devsize=1073741824
    swapon /tmp/nixos-infect.qAMel.swp
    swapon: /tmp/nixos-infect.qAMel.swp: swapon failed: Invalid argument

Underlying tested distro:

root@ci-runner ~]# cat /etc/os-release
NAME=Fedora
VERSION="30 (Thirty)"
ID=fedora
VERSION_ID=30
VERSION_CODENAME=""
PLATFORM_ID="platform:f30"
PRETTY_NAME="Fedora 30 (Thirty)"

The script completes and succeeds when I comment out the makeSwap and removeSwap, hence it's not mandatory for the infection to succeed.

Should we make those optional or at least failing gracefully in?
Thanks.

Patch merged