-
Notifications
You must be signed in to change notification settings - Fork 25
swapon: use a loopback device #156
swapon: use a loopback device #156
Conversation
tools/test-setup.sh
Outdated
sudo mkswap /swap.img | ||
sudo swapon /swap.img | ||
sudo losetup -f /swap.img | ||
sudo mkswap $(sudo losetup --associated swap.img|sed 's,:.*,,') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm. I guess you're missing a '/' here, leading to the error:
mkswap: error: Nowhere to set up swap on?
(btw, thanks for looking at this, I failed to find time to work on this swap thing so far)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to work even if we run on systems w/o btrfs? I really want to keep test-setup.sh as "portable" as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not tested it but I guess that it should work on local filesystems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need this step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tests are creating one or several VMs and it's asking some memory. iirc, the test suite got issues in the past due to this, so adding a swap file helps.
bed72df
to
335bfef
Compare
btrfs does not support swapfile. With a loopback device, we bypass the limitation. Also, ensure we've got the right Python 3.9 package installed.
335bfef
to
91a8114
Compare
recheck |
looks like zuul is having some issues likely unrelated to this swap thing. At least the change is working on ubuntu and the fedora logs seems to show it's working there too. In previous runs, some fedora/ubuntu were related to no kvm, possibly will be solved by #158 (still waiting a little bit that dust settles before removing the draft status). @ssbarnea what do you think about merging this PR ? |
recheck |
Zuul fails with error below, I think we need to address this first:
|
As said previously, this particular issue is supposed to be fixed by #158 but it needs this PR otherwise zuul will likely fail badly at least on fedora due to memory issues. |
OK, lets YOLO it. ;) |
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
btrfs does not support swapfile. With a loopback device, we bypass the
limitation.