kimchi-project / ginger

WoK plugin for host management
Other
66 stars 41 forks source link

vgdisplay api failed on ubuntu #325

Closed harche closed 8 years ago

harche commented 8 years ago
curl -k -u root -H "Content-Type: application/json" -H "Accept: application/json" 'https://localhot:8001/plugins/ginger/vgs'

Above API fails with error code on ubuntu. As it turns out some columns fields used to extract VG related information using 'vgs' command don't exist on ubuntu.

danielhb commented 8 years ago

Which Ubuntu and vgs version you've used? I can't reproduce this error in an Ubuntu15.10:

danielhb@ubuntu1510vm:~$ curl -k -u danielhb -H "Content-Type: application/json" -H "Accept: application/json" 'https://localhost:8001/plugins/ginger/vgs' Enter host password for user 'danielhb': []danielhb@ubuntu1510vm:~$ danielhb@ubuntu1510vm:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily danielhb@ubuntu1510vm:~$ sudo vgs --version LVM version: 2.02.122(2) (2015-06-20) Library version: 1.02.99 (2015-06-20) Driver version: 4.33.0 danielhb@ubuntu1510vm:~$

harche commented 8 years ago

It failes on ubuntu 14.04.    ----- Original message -----From: Daniel Henrique Barboza notifications@github.comTo: kimchi-project/ginger ginger@noreply.github.comCc: Harshal Patil/India/IBM@IBMIN, Author author@noreply.github.comSubject: Re: [kimchi-project/ginger] vgdisplay api failed on ubuntu (#325)Date: Wed, Apr 20, 2016 9:20 PM  Which Ubuntu and vgs version you've used? I can't reproduce this error in an Ubuntu15.10: danielhb@ubuntu1510vm:~$ curl -k -u danielhb -H "Content-Type: application/json" -H "Accept: application/json" 'https://localhost:8001/plugins/ginger/vgs'Enter host password for user 'danielhb':[]danielhb@ubuntu1510vm:~$danielhb@ubuntu1510vm:~$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 15.10Release: 15.10Codename: wilydanielhb@ubuntu1510vm:~$ sudo vgs --versionLVM version: 2.02.122(2) (2015-06-20)Library version: 1.02.99 (2015-06-20)Driver version: 4.33.0danielhb@ubuntu1510vm:~$ —You are receiving this because you authored the thread.Reply to this email directly or view it on GitHub

 

danielhb commented 8 years ago

We can't change a feature for all OSses because it fails in Ubuntu 14.04.

You can add a verification at the init of the model to see if the running vgs version supports all the fields and, if not, set the model to use the modified version. That we can do.