Bug 1389676

Summary: Set German keyboard layout doesn't work and Keyboard layout changes to U.S. English automately after waiting for 2 mins
Product: Red Hat Enterprise Virtualization Manager Reporter: Huijuan Zhao <huzhao>
Component: ovirt-nodeAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED NEXTRELEASE QA Contact: Huijuan Zhao <huzhao>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.9CC: cshao, dguo, dougsland, gklein, jiawu, leiwang, lnykryn, lsurette, mgoldboi, qiyuan, rbarry, sbonazzo, weiwang, yaniwang, ycui, ykaul, yzhao
Target Milestone: ovirt-3.6.11   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: zstream
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-26 08:43:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
All logs and sosreport
none
Screenshot after set keyboard layout as German none

Description Huijuan Zhao 2016-10-28 08:19:00 UTC
Created attachment 1214862 [details]
All logs and sosreport

Description of problem:
Set German keyboard layout doesn't work via TUI, the keyboard layout same as US.
And wait for more than 2 minutes, keyboard layout changes to U.S. English automately.


Version-Release number of selected component (if applicable):
rhev-hypervisor7-7.3-20161021.0.iso
ovirt-node-3.6.1-34.0.el7ev.noarch


How reproducible:
60%

Steps to Reproduce:
1. Install rhev-hypervisor7-7.3-20161021.0.iso
2. Enter Keyboard menu
3. Set keyboard layout to "German"
4. Wait for more than 2 minutes, focus on Keyboard menu


Actual Result:
1. After step3, keyboard layout shows German, but German doesn't work, the keyboard acts same as US.
# cat /etc/default/ovirt | grep KEYBOARD
OVIRT_KEYBOARD_LAYOUT="de"

# localectl status
   System Locale: LANG=en_US.utf8
       VC Keymap: de
      X11 Layout: n/a

# cat /etc/vconsole.conf
KEYMAP="us"
FONT="latarcyrheb-sun16"

2. After step4, keyboard layout shows U.S. English, the keyboard acts same as US
# cat /etc/default/ovirt | grep KEYBOARD
OVIRT_KEYBOARD_LAYOUT="de"

# localectl status
   System Locale: LANG=en_US.utf8
       VC Keymap: us
      X11 Layout: n/a

# cat /etc/vconsole.conf
KEYMAP="us"
FONT="latarcyrheb-sun16"


Expect Result:
1. After step3, keyboard layout shows German, the keyboard acts as German.
2. After step4, keyboard layout shows German, the keyboard acts as German.

Additional Info:
Set German keyboard during installation works well.

Comment 1 Huijuan Zhao 2016-10-28 08:20:52 UTC
Created attachment 1214863 [details]
Screenshot after set keyboard layout as German

Comment 2 Fabian Deutsch 2016-10-28 10:17:37 UTC
Could be a Private* or selinux issue again

Comment 3 Douglas Schilling Landgraf 2017-01-25 21:04:16 UTC
Ok, investigating a little bit on this one, I agree with Fabian it seems related to systemd in our particular environment as we had in the past with bz#1381666 and bz#1378304.

From journal logs I see:
Jan 25 20:03:37 localhost systemd[1]: Started Locale Service.
Jan 25 20:03:37 localhost systemd[1]: Starting Locale Service...
Jan 25 20:03:37 localhost polkitd[1294]: Unregistered Authentication Agent for unix-process:18244:31902 (system bus name :1.46, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
Jan 25 20:05:26 localhost systemd-localed[18290]: Failed to set virtual console keymap: Device or resource busy

As our TUI calls: localectl set-keymap ar-digits

I have tried:
    # systemctl restart systemd-localed.service  
    # localectl set-keymap ar-digits
    Failed to set keymap: Failed to set virtual console keymap: Device or 
    resource busy

Looks to strace I see:

19165 recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\6\1s\0\6\0\0\0:1.138\0\0\4\1s\0\22\0\0\0System.Error.EBUSY\0\0\0\0\0\0\10\1g\0\1s\0\0\7\1s\0\6\0\0\0:1.136\0\0=\0\0\0Failed to set virtual console keymap: Device or resource busy\0", 138}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 138
19165 writev(2, [{"Failed to set keymap: Failed to set virtual console keymap: Device or resource busy", 83}, {"\n", 1}], 2) = 84

The file /etc/locale.conf is not persisted as read-only and /etc/vconsole.conf was unpersisted in this test. The service systemd-localed.service simply cannot be activated.

My systemd systemd-localed.service:

[Unit]
Description=Locale Service
Documentation=man:systemd-localed.service(8) man:locale.conf(5) man:vconsole.conf(5)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/localed

[Service]
ExecStart=/usr/lib/systemd/systemd-localed
BusName=org.freedesktop.locale1
CapabilityBoundingSet=
WatchdogSec=3min
#PrivateTmp=yes
#PrivateDevices=yes
#PrivateNetwork=yes
#ProtectSystem=yes
#ProtectHome=yes

dbus-org.freedesktop.locale1.service
[Unit]
Description=Locale Service
Documentation=man:systemd-localed.service(8) man:locale.conf(5) man:vconsole.conf(5)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/localed

[Service]
ExecStart=/usr/lib/systemd/systemd-localed
BusName=org.freedesktop.locale1
CapabilityBoundingSet=
WatchdogSec=3min
#PrivateTmp=yes
#PrivateDevices=yes
#PrivateNetwork=yes
#ProtectSystem=yes
#ProtectHome=yes


# rpm -qa | grep -i systemd
systemd-libs-219-27.el7.x86_64
systemd-219-27.el7.x86_64
systemd-sysv-219-27.el7.x86_64
systemd-python-219-27.el7.x86_64

Lukas, any idea where I could dig into?

Comment 4 Douglas Schilling Landgraf 2017-01-25 21:33:38 UTC
No such issue in RHVH 4.0 and 4.1:

# localectl set-keymap de
# systemct status systemd-localed.service 

Everything working like a charm.

Comment 5 Ryan Barry 2017-01-26 00:05:09 UTC
I'd expect this got resolved when we started using platform Anaconda...

Comment 6 Sandro Bonazzola 2017-01-26 08:43:01 UTC
Thanks, I'm closing this as NEXT RELEASE.
If you're affected by this bug please update to 4.0 or later.