ibm-cloud-architecture / terraform-icp-vmware

Terraform recipe to deploy IBM Cloud Private on VMware
10 stars 15 forks source link

Docker install on RHEL fails #21

Open jesusmah opened 5 years ago

jesusmah commented 5 years ago

The terraform requires docker to be installed in direct-lvm mode. If the template has not already installed docker then the terraform uses the install-docker.sh script to install docker, add the docker disk, and bring docker up in direct-lvm mode so it can use the disk as a native block device. Using RHEL this fails for the nodes that are not master nodes. The sequence on the nodes is that docker installs (in loopback mode), the script manipulates the disk at /dev/sdb, updates the daemon.json, stops docker, then starts docker. In the actual node the docker start actually fails due to devicemapper errors. However, docker restarts on a time delay after the systemd failure and comes up clean in direct-lvm mode with the docker disk configured. But technically the script has failed in that the last command, docker start, failed. This is not a problem on the master node since the next step creates the cfc disk so that script exits cleanly. But on the other nodes the last step is the docker install script and the terraform sees the script as a failure and kills the deployment. I added a sleep 2 and sudo systemctl restart docker after the sudo systemctl start docker command to force the final command to complete cleanly and the terraform got past this problem

jesusmah commented 5 years ago

What do we do with this? Seems to be a problem with RHEL 7.4 (devicemapper)...

Issen007 commented 5 years ago

I also have problem with RHEL 7.6. I found out that the install-docker.sh is one issue.

Issen007 commented 5 years ago

I can do a fork of this and solve the issue for you and then marge it.

jesusmah commented 5 years ago

Hi @Issen007, Im glad to hear you know how to fix it. Can you please check out our contribution guideline https://github.com/ibm-cloud-architecture/terraform-icp-vmware/blob/master/CONTRIBUTING.md for doing so? More precisely look at the code contribution section and the github flow in particular. Anyway, thanks in advance. Looking forward to seeing your contribution.

Issen007 commented 5 years ago

After some investigation the main problem is in the code that comes from

https://github.com/ibm-cloud-architecture/terraform-module-icp-deploy

So I'm working on this to make it working with RHEL and CentOS

Issen007 commented 5 years ago

As soon I have solve that part, we can update the icp-deploy.tf file so you download the correct package.