Closed coolbrg closed 6 years ago
which might be the reason as RHEL might behave differently due to systemd.
We had always had systemd , so I do not think systemd has changed its behavior. The handle-user-data was copied from boot2docker to make CentOS ISO behave like boot2docker.
The issues become more frequent after we merged https://github.com/minishift/minishift-centos-iso/commit/3e2f61a42a8cb1b86501c4f69b88b805704970e6 and https://github.com/minishift/minishift-centos-iso/commit/00ef1a47df1e9c35f8b4a5d5f9d8fb8d8a9a8abd
With the current code the behavior is different between CentOS and RHEL. In RHEL the /tmp is symlinked to /mnt/sda1/tmp. But in centos it is not .
- # Make sure /tmp is on the disk too
- rm -rf /mnt/$PARTNAME/tmp || true
- mv /tmp /mnt/$PARTNAME/tmp
- ln -fs /mnt/$PARTNAME/tmp /tmp
more frequent
Well, noticable. We moved from rc.local to systemd, and certificate generation happens in /tmp. handle user data now happens before docker is first started, and in that case a possible /tmp relocation causes a cyclic reference as systemd on RHEL does not keep a filehandle on /tmp.
This causes the mktemp to fail, as there is no real /tmp in that case. For sake of consistency, it is best to keep the /tmp setup similar between CentOS and RHEL. And investigate in future which actual unit keeps this filehandle in /tmp/ on CentOS.
Currently, the RHEL ISO image is having issue in getting the temporary directory in below step during
minishift start
https://github.com/minishift/minishift-centos-iso/blob/3e2f61a42a8cb1b86501c4f69b88b805704970e6/scripts/cert-gen#L26
The
/tmp
directory is removed and created here https://github.com/minishift/minishift-centos-iso/blob/3e2f61a42a8cb1b86501c4f69b88b805704970e6/scripts/handle-user-data#L57-L60which might be the reason as RHEL might behave differently due to systemd.