After Openstack migration to the container environment, I cannot get console logs.
- When I run
openstack console log show SERVER_NAME, it returns nothing. - When I visit console tab in the instance detail of Horizon UI, it returns nothing.
I checked the instance log file in the nova-compute container and realized that the console.log file is existing.
Containerization of openstack services can be the problem?
I found the reason and it seems valuable to share the solution.
Reason
When the VM is created by libvirt/qemu, a pty device is created under /dev/pts. When get console log, Nova checks if the device exists in that path. But now Nova compute is containerized and /dev/pts is not mounted on it.
Solution
Mount /dev/pts to the container using
volumeMountin the container manifest.