[libvirt] [PATCH] Power Hypervisor now with libssh2

Hello friends, This is the new version of phyp driver now using libssh2. I also did some other changes: * Added some debug information. Sometimes its worth to know which command is being executed and where. So I added the PHYP_CMD_DEBUG macro. * All the connection startup is now "hard coded" in libssh2. For example, I need to open the socket and start the connection all by myself. Not a big deal, but in a near future I am planning to send a patch to libssh2 to encapsulate all these procedures into functions, hence, less code, probably less bugs :) * There is a lot of "out of scope" functions in the bottom of the file. In the next patch I may put all those together in a phyp_config.[ch] in order to get things clearer. What's up next: * The problem of handling the UUID in a centralized way still remains. I started to handle this by opening a sftp connection to the HMC system and transfer my UUID database. But there is an odd behavior that makes the driver connect OR NOT to some HMC systems. * CPU management: this feature planned to be released in this version is not ready yet due to the issue above. * Storage management. Vacations: I'll be on vacations from 26th/august to 14th/september. I'll check my emails in the meanwhile, but no so often. Anyway, any comments on this patch are always welcome :) []'s -- Eduardo Otubo Software Engineer Linux Technology Center IBM Systems & Technology Group Mobile: +55 19 8135 0885 otubo@linux.vnet.ibm.com

On Wed, Aug 26, 2009 at 03:53:01AM -0300, Eduardo Otubo wrote:
Hello friends,
This is the new version of phyp driver now using libssh2. I also did some other changes:
* Added some debug information. Sometimes its worth to know which command is being executed and where. So I added the PHYP_CMD_DEBUG macro.
actually the macro should use the normal logging facilities, so I intend to clean this up.
* All the connection startup is now "hard coded" in libssh2. For example, I need to open the socket and start the connection all by myself. Not a big deal, but in a near future I am planning to send a patch to libssh2 to encapsulate all these procedures into functions, hence, less code, probably less bugs :)
Well for example the code was using gethostbyname which is deprecated not reentrant and the code was leaking the socket if the call failed I cleaned this up and switched to getaddrinfo() as other parts of libvirt code. Please make sure to run "make syntax-check" before sending a patch in the future, thank in advance ! Anyway the modified patch is now commited. Please try the code as I modified the socket connection handling, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Fri, Sep 04, 2009 at 12:14:20PM +0200, Daniel Veillard wrote:
On Wed, Aug 26, 2009 at 03:53:01AM -0300, Eduardo Otubo wrote:
Hello friends,
This is the new version of phyp driver now using libssh2. I also did some other changes:
* Added some debug information. Sometimes its worth to know which command is being executed and where. So I added the PHYP_CMD_DEBUG macro.
actually the macro should use the normal logging facilities, so I intend to clean this up.
Done, I ommited this and the fix to the spec file to build phyp and have libssh2-devel as a build dependancy. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Daniel Veillard wrote:
On Wed, Aug 26, 2009 at 03:53:01AM -0300, Eduardo Otubo wrote:
Hello friends,
This is the new version of phyp driver now using libssh2. I also did some other changes:
* Added some debug information. Sometimes its worth to know which command is being executed and where. So I added the PHYP_CMD_DEBUG macro.
actually the macro should use the normal logging facilities, so I intend to clean this up.
I Agree, this was an internal debug information only, forgot to remove this out.
* All the connection startup is now "hard coded" in libssh2. For example, I need to open the socket and start the connection all by myself. Not a big deal, but in a near future I am planning to send a patch to libssh2 to encapsulate all these procedures into functions, hence, less code, probably less bugs :)
Well for example the code was using gethostbyname which is deprecated not reentrant and the code was leaking the socket if the call failed I cleaned this up and switched to getaddrinfo() as other parts of libvirt code. Please make sure to run "make syntax-check" before sending a patch in the future, thank in advance !
I won't forgot to do the syntax-check next time. My bad.
Anyway the modified patch is now commited. Please try the code as I modified the socket connection handling,
The new socket connection handling is working fine, thanks :) -- Eduardo Otubo Software Engineer Linux Technology Center IBM Systems & Technology Group Mobile: +55 19 8135 0885 eotubo@linux.vnet.ibm.com
participants (2)
-
Daniel Veillard
-
Eduardo Otubo