Bug 986279
Summary: | No /dev/hvc0 device in guest after do hot-unplug and hotplug virtconsole device | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Sibiao Luo <sluo> |
Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.5 | CC: | acathrow, amit.shah, bsarathy, chayang, flang, juzhang, mdeng, michen, mkenneth, qzhang, sluo, virt-maint, xfu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-22 06:27:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Sibiao Luo
2013-07-19 10:27:11 UTC
It should appear as /dev/hvc1. (In reply to Amit Shah from comment #1) > It should appear as /dev/hvc1. yes, after first hotunplug and hotplug again, it appear as /dev/hvc1, not /dev/hvc0. I also tried second hotunplug and hotplug, it appear as /dev/hvc2. Amit, should it return back to the origin port ? You can close it if not. Best Regards, sluo Yes, that is the intended behaviour. (In reply to Amit Shah from comment #3) > Yes, that is the intended behaviour. Amit, but i still curious about it, iirc, the virtio-blk device after hotunplug and hotplug which can return back to the same device id /dev/vd*. And if that is the intended behaviour, how about i do hotunplug and hotplug repeatly(more than 7 times), it should return back to /dev/hvc0 or just the max number is 7 for hotunplug and hotplug ? It can't work well after i do 8 times hotunplug and hotplug any more according my testing. (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) device_del port1 (qemu) device_add virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0,id=port1,nr=1 (qemu) guest ]# cat /dev/hvc0 ^C guest ]# cat /dev/hvc1 ^C guest ]# guest ]# cat /dev/hvc2 ^C guest ]# cat /dev/hvc3 ^C guest ]# cat /dev/hvc4 ^C guest ]# cat /dev/hvc5 ^C guest ]# cat /dev/hvc6 ^C guest ]# cat /dev/hvc7 ^C guest ]# cat /dev/hvc0 cat: /dev/hvc0: No such device guest ]# cat /dev/hvc8 cat: /dev/hvc8: No such file or directory guest ]# ls -lh /dev/hvc* crw-rw----. 1 root dialout 229, 0 Jul 22 22:36 /dev/hvc0 crw-rw----. 1 root dialout 229, 1 Jul 22 22:36 /dev/hvc1 crw-rw----. 1 root dialout 229, 2 Jul 22 22:36 /dev/hvc2 crw-rw----. 1 root dialout 229, 3 Jul 22 22:36 /dev/hvc3 crw-rw----. 1 root dialout 229, 4 Jul 22 22:36 /dev/hvc4 crw-rw----. 1 root dialout 229, 5 Jul 22 22:36 /dev/hvc5 crw-rw----. 1 root dialout 229, 6 Jul 22 22:36 /dev/hvc6 crw-rw----. 1 root dialout 229, 7 Jul 22 22:36 /dev/hvc7 Best Regards, sluo Hi Amit. (In reply to Sibiao Luo from comment #4) > (In reply to Amit Shah from comment #3) > > Yes, that is the intended behaviour. > > Amit, but i still curious about it, iirc, the virtio-blk device after > hotunplug and hotplug which can return back to the same device id /dev/vd*. > And if that is the intended behaviour, how about i do hotunplug and hotplug > repeatly(more than 7 times), it should return back to /dev/hvc0 or just the > max number is 7 for hotunplug and hotplug ? It can't work well after i do 8 > times hotunplug and hotplug any more according my testing. > > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) > > guest ]# cat /dev/hvc0 > ^C > guest ]# cat /dev/hvc1 > ^C > guest ]# > guest ]# cat /dev/hvc2 > ^C > guest ]# cat /dev/hvc3 > ^C > guest ]# cat /dev/hvc4 > ^C > guest ]# cat /dev/hvc5 > ^C > guest ]# cat /dev/hvc6 > ^C > guest ]# cat /dev/hvc7 > ^C > guest ]# cat /dev/hvc0 > cat: /dev/hvc0: No such device > guest ]# cat /dev/hvc8 > cat: /dev/hvc8: No such file or directory > guest ]# ls -lh /dev/hvc* > crw-rw----. 1 root dialout 229, 0 Jul 22 22:36 /dev/hvc0 > crw-rw----. 1 root dialout 229, 1 Jul 22 22:36 /dev/hvc1 > crw-rw----. 1 root dialout 229, 2 Jul 22 22:36 /dev/hvc2 > crw-rw----. 1 root dialout 229, 3 Jul 22 22:36 /dev/hvc3 > crw-rw----. 1 root dialout 229, 4 Jul 22 22:36 /dev/hvc4 > crw-rw----. 1 root dialout 229, 5 Jul 22 22:36 /dev/hvc5 > crw-rw----. 1 root dialout 229, 6 Jul 22 22:36 /dev/hvc6 > crw-rw----. 1 root dialout 229, 7 Jul 22 22:36 /dev/hvc7 > > Best Regards, > sluo Hi Amit, Thanks for you time,could you have a look on the above comments,it seems that there isn't enough device in guest to support multiple hotplug&hotunplug (max number is 7),Could you double check it ? Thanks in advance.Any issues please let me know. Best Regards, Min (In reply to Sibiao Luo from comment #4) > (In reply to Amit Shah from comment #3) > > Yes, that is the intended behaviour. > > Amit, but i still curious about it, iirc, the virtio-blk device after > hotunplug and hotplug which can return back to the same device id /dev/vd*. > And if that is the intended behaviour, how about i do hotunplug and hotplug > repeatly(more than 7 times), it should return back to /dev/hvc0 or just the > max number is 7 for hotunplug and hotplug ? It can't work well after i do 8 > times hotunplug and hotplug any more according my testing. > > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) device_del port1 > (qemu) device_add > virtconsole,chardev=foo,name=com.redhat.rhevm.vdsm.1,bus=virtio-serial0.0, > id=port1,nr=1 > (qemu) > > guest ]# cat /dev/hvc0 > ^C > guest ]# cat /dev/hvc1 > ^C > guest ]# > guest ]# cat /dev/hvc2 > ^C > guest ]# cat /dev/hvc3 > ^C > guest ]# cat /dev/hvc4 > ^C > guest ]# cat /dev/hvc5 > ^C > guest ]# cat /dev/hvc6 > ^C > guest ]# cat /dev/hvc7 > ^C > guest ]# cat /dev/hvc0 > cat: /dev/hvc0: No such device > guest ]# cat /dev/hvc8 > cat: /dev/hvc8: No such file or directory guest ]# cat /dev/hvc0 cat: /dev/hvc0: No such device guest ]# cat /dev/hvc1 cat: /dev/hvc1: No such device guest ]# cat /dev/hvc2 cat: /dev/hvc2: No such device guest ]# cat /dev/hvc3 cat: /dev/hvc3: No such device guest ]# cat /dev/hvc4 cat: /dev/hvc4: No such device guest ]# cat /dev/hvc5 cat: /dev/hvc5: No such device guest ]# cat /dev/hvc6 cat: /dev/hvc6: No such device guest ]# cat /dev/hvc7 cat: /dev/hvc7: No such device guest ]# cat /dev/hvc8 cat: /dev/hvc8: No such file or directory > guest ]# ls -lh /dev/hvc* > crw-rw----. 1 root dialout 229, 0 Jul 22 22:36 /dev/hvc0 > crw-rw----. 1 root dialout 229, 1 Jul 22 22:36 /dev/hvc1 > crw-rw----. 1 root dialout 229, 2 Jul 22 22:36 /dev/hvc2 > crw-rw----. 1 root dialout 229, 3 Jul 22 22:36 /dev/hvc3 > crw-rw----. 1 root dialout 229, 4 Jul 22 22:36 /dev/hvc4 > crw-rw----. 1 root dialout 229, 5 Jul 22 22:36 /dev/hvc5 > crw-rw----. 1 root dialout 229, 6 Jul 22 22:36 /dev/hvc6 > crw-rw----. 1 root dialout 229, 7 Jul 22 22:36 /dev/hvc7 > > Best Regards, > sluo (In reply to Sibiao Luo from comment #4) > (In reply to Amit Shah from comment #3) > > Yes, that is the intended behaviour. > > Amit, but i still curious about it, iirc, the virtio-blk device after > hotunplug and hotplug which can return back to the same device id /dev/vd*. Yes, even virtio-serial will work that way. However, console is different. It's unfortunate that the same virtio_console.o module handles two completely different types of devices and functionality: console is handled via hvc, and serial (which is not really a serial port) is handled via virtio_console itself. hvc is the module which allocates tty ports for virtio_console types of devices. > And if that is the intended behaviour, how about i do hotunplug and hotplug > repeatly(more than 7 times), it should return back to /dev/hvc0 or just the > max number is 7 for hotunplug and hotplug ? It can't work well after i do 8 > times hotunplug and hotplug any more according my testing. The limit is hard-coded in the kernel, and it is only 8. Apparently, no one needs more serial consoles. Also, no one does so many hot-plug/unplugs on them as well. This is just a theoretical test that you're doing; thankfully, no one is going to do this in production :) > guest ]# cat /dev/hvc0 > cat: /dev/hvc0: No such device > guest ]# cat /dev/hvc8 Yes, once 8 ports have been used, it is supposed to re-use older ones, but there might be some bug. However, this is unlikely to be fixed as (1) this is not something people will hit in regular use, and (2) console use-case is not the primary usage of the virtio_console module. (In reply to Amit Shah from comment #7) > (In reply to Sibiao Luo from comment #4) > > (In reply to Amit Shah from comment #3) > > > Yes, that is the intended behaviour. > > > > Amit, but i still curious about it, iirc, the virtio-blk device after > > hotunplug and hotplug which can return back to the same device id /dev/vd*. > > Yes, even virtio-serial will work that way. However, console is different. > > It's unfortunate that the same virtio_console.o module handles two > completely different types of devices and functionality: console is handled > via hvc, and serial (which is not really a serial port) is handled via > virtio_console itself. hvc is the module which allocates tty ports for > virtio_console types of devices. > > > And if that is the intended behaviour, how about i do hotunplug and hotplug > > repeatly(more than 7 times), it should return back to /dev/hvc0 or just the > > max number is 7 for hotunplug and hotplug ? It can't work well after i do 8 > > times hotunplug and hotplug any more according my testing. > > The limit is hard-coded in the kernel, and it is only 8. Apparently, no one > needs more serial consoles. Also, no one does so many hot-plug/unplugs on > them as well. This is just a theoretical test that you're doing; > thankfully, no one is going to do this in production :) > > > guest ]# cat /dev/hvc0 > > cat: /dev/hvc0: No such device > > guest ]# cat /dev/hvc8 > > Yes, once 8 ports have been used, it is supposed to re-use older ones, but > there might be some bug. However, this is unlikely to be fixed as (1) this > is not something people will hit in regular use, and (2) console use-case is > not the primary usage of the virtio_console module. ok, thanks for your detail explains. This is buggy in theory due to the limitation, but as you said in the bug, few people will do such operation and virtconsole is in low priority. So, I suggest to close it as a wontfix bug, and I'd better make a notice into our TCMS or wiki page. Thanks & Best Regards, sluo (In reply to Sibiao Luo from comment #8) > ok, thanks for your detail explains. This is buggy in theory due to the > limitation, but as you said in the bug, few people will do such operation > and virtconsole is in low priority. So, I suggest to close it as a wontfix > bug, and I'd better make a notice into our TCMS or wiki page. At least the bug summary mentions the bug was due to /dev/hvc0 not found -- and that is not a bug, since it goes on to be active on /dev/hvc1. |