Disable Swap when platform has no swap enabled

when running pf9ctl cluster prep-node
on docker container

TASK [disable-swap : Disable swap] ********************************************************************************************************************************************
Tuesday 25 August 2020  18:45:07 +0000 (0:00:00.366)       0:00:16.142 ******** 
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["swapoff", "-a"], "delta": "0:00:00.466044", "end": "2020-08-25 18:45:08.384916", "msg": "non-zero return code", "rc": 1, "start": "2020-08-25 18:45:07.918872", "stderr": "swapoff: Not superuser.", "stderr_lines": ["swapoff: Not superuser."], "stdout": "", "stdout_lines": []}
when running ```pf9ctl cluster prep-node```
on docker container

Save Editcancel






TASK [disable-swap : Disable swap] ********************************************************************************************************************************************
Tuesday 25 August 2020  18:45:07 +0000 (0:00:00.366)       0:00:16.142 ******** 
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["swapoff", "-a"], "delta": "0:00:00.466044", "end": "2020-08-25 18:45:08.384916", "msg": "non-zero return code", "rc": 1, "start": "2020-08-25 18:45:07.918872", "stderr": "swapoff: Not superuser.", "stderr_lines": ["swapoff: Not superuser."], "stdout": "", "stdout_lines": []}
when running ```pf9ctl cluster prep-node```
on docker container

did prep-node complete, or did this cause a complete failure?

The log is from prep node. It failed bc of this. Could not disable swap.

interesting. Which OS ? have you attempted to run the command manually?

We use large docker containers for our k8s nodes.
It may work on bare metal, I haven’t tried it on one of the hosts though.

Ubuntu:xenial docker container
It did not run on the ubuntu:latest at all - said “unsupported platform”.

correct, we only support Ubuntu 18 and 16.
Are you trying this in a container or on a virtual machine ?

This is in a container.

that will not work. I would suggest that you build a VM or use a physical server. You can also us AWS or Azure and we will build a cluster in those clouds.

Thanks Chris. Will go VM route,
Regards,
Steph