fog / fog-libvirt

libvirt provider for fog
MIT License
16 stars 42 forks source link

Operation not supported: cannot change keymap setting on vnc graphics #42

Closed santachago closed 7 years ago

santachago commented 7 years ago

Looks like libvirt doesnt support to set keymap when using vnc.

 | Libvirt::Error: Call to virDomainUpdateDeviceFlags failed: Operation not supported: cannot change keymap setting on vnc graphics
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-libvirt-0.4.0/lib/fog/libvirt/requests/compute/update_display.rb:21:in `update_device'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-libvirt-0.4.0/lib/fog/libvirt/requests/compute/update_display.rb:21:in `update_display'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-libvirt-0.4.0/lib/fog/libvirt/models/compute/server.rb:218:in `update_display'
mmoll commented 7 years ago

@santachago could you check if reverting #30 fixes that issue?

mmoll commented 7 years ago

@tbrisker looking at #30 I don't get the whole current situation, as that was also about vnc

tbrisker commented 7 years ago

@mmoll IIRC #30 in my case was caused by having a non-auto setting for the keymap, which was failing because fog-libvirt wasn't passing a keymap and libvirt was defaulting to auto (which was different then the existing setting and thus failed to change it). That being said, I think there may be a better solution then this. Sadly I don't have the setup I had previously to try and fix it at the moment.

santachago commented 7 years ago

If i remove line number 16 -> display[:keymap] = options[:keymap] || xml_elements(domain.xml_desc, "graphics", "keymap")

vms with no keymap defined on the config work fine. If a vm has a value defined it fails with the same error.

mmoll commented 7 years ago

possible fix in #43

plribeiro3000 commented 7 years ago

@santachago @tbrisker @mmoll Could you guys please test if master fixed the issue please?

mmoll commented 7 years ago

I can only say it fixed it for me (which is expected as I wrote the patch ;)).

mmoll commented 7 years ago

@santachago any update here? ☝️

plribeiro3000 commented 7 years ago

@mmoll Thanks for the feeback. 👍

hesperaux commented 7 years ago

Hello all,

I just updated to foreman 1.15.3. Running debian 8.9 on my foreman host, and the same on my compute hosts. I ran into this issue after updating.

I've manually patched /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-libvirt-0.4.0/lib/fog/libvirt/requests/compute/update_display.rb according to https://github.com/fog/fog-libvirt/pull/43/files on my foreman install and this fixed the issue for me.

Thanks for the patch!

mmoll commented 7 years ago

I guess a 0.4.1 release would be nice then...

plribeiro3000 commented 7 years ago

Cuting a release now. =)

plribeiro3000 commented 7 years ago

Released as 0.4.1. =)