fix vm console log cannot be collected
When the vm is created by libvirt/qemu, a pty device is created also under /dev/pts. And nova will check this device exist or not when get console log. After openstack containerization, libvirt and nova compute are run in container. Libvirt mounts /dev space to container directly, so the pty device could be seen in host also. But nova compute doesn't mount /dev space, and lead to the issue. Solution: mount /dev/pts space in host to nova compute container. Test: vm console log could be seen both in horizon and by openstack cmd. Closes-Bug: 1817618 Change-Id: I39bdd8c50a3bbea3b7896bac258721d7e1d2ee44 Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
parent
319b5602df
commit
4a88506bfd
|
@ -67,7 +67,7 @@ class NovaHelm(openstack.OpenstackBaseHelm):
|
|||
'pod': {
|
||||
'mounts': {
|
||||
'nova_compute': {
|
||||
'nova_compute': self._get_mount_uefi_overrides()
|
||||
'nova_compute': self._get_mount_overrides()
|
||||
}
|
||||
},
|
||||
'replicas': {
|
||||
|
@ -119,6 +119,19 @@ class NovaHelm(openstack.OpenstackBaseHelm):
|
|||
else:
|
||||
return overrides
|
||||
|
||||
def _get_mount_overrides(self):
|
||||
overrides = self._get_mount_uefi_overrides()
|
||||
# mount /dev/pts in order to get console log
|
||||
overrides['volumes'].append({
|
||||
'name': 'dev-pts',
|
||||
'hostPath': {'path': '/dev/pts'}
|
||||
})
|
||||
overrides['volumeMounts'].append({
|
||||
'name': 'dev-pts',
|
||||
'mountPath': '/dev/pts'
|
||||
})
|
||||
return overrides
|
||||
|
||||
def _get_endpoints_overrides(self):
|
||||
overrides = {
|
||||
'identity': {
|
||||
|
|
Loading…
Reference in New Issue