virtualbmc binds only to localhost even though each ipmi devices were configured with different ip addresses

Bug #1644956 reported by David Hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VirtualBMC
Invalid
High
Lucas Alvares Gomes
pyghmi
Fix Released
Undecided
Lucas Alvares Gomes

Bug Description

virtualbmc binds only to one IP address even though each ipmi devices were configured with different ip addresses

[root@zappa /]# vbmc list
+------------------+---------+----------------+------+
| Domain name | Status | Address | Port |
+------------------+---------+----------------+------+
| ceph-0-rhosp8 | down | 192.168.122.14 | 623 |
| ceph-1-rhosp8 | down | 192.168.122.15 | 623 |
| ceph-2-rhosp8 | down | 192.168.122.16 | 623 |
| compute-0-rhosp8 | down | 192.168.122.13 | 623 |
| control-0-rhosp8 | running | 192.168.122.10 | 623 |
| control-1-rhosp8 | down | 192.168.122.11 | 623 |
| control-2-rhosp8 | down | 192.168.122.12 | 623 |
+------------------+---------+----------------+------+

This new feature lacks documentation and pxe_ssh is being deprecated too early imho.

Revision history for this message
David Hill (david-hill-ubisoft) wrote :

[root@zappa virtualbmc]# 2016-11-26 00:48:04,140.140 19910 ERROR VirtualBMC [-] Error starting a Virtual BMC for domain ceph-0-rhosp8. Error: [Errno 98] Address already in use
Error starting a Virtual BMC for domain ceph-0-rhosp8. Error: [Errno 98] Address already in use

summary: - virtualbmc reports only one port as running eventhough it's false
+ virtualbmc binds only to one IP address even though each ipmi devices
+ were configured with different ip addresses
description: updated
Revision history for this message
David Hill (david-hill-ubisoft) wrote : Re: virtualbmc binds only to one IP address even though each ipmi devices were configured with different ip addresses

The problem here is that pyghmi is using hardcoded values on localhost and port 623.

From vbmc.py:
[...]
import pyghmi.ipmi.bmc as bmc
[...]
    def __init__(self, username, password, port, address, domain_name, libvirt_uri, libvirt_sasl_username=None, libvirt_sasl_password=None):
        super(VirtualBMC, self).__init__({username: password}, port=port, address=address)

From pyghmi.ipmi.bmc:
[...]
class Bmc(serversession.IpmiServer):
[...]

From serversession/IpmiServer:
class IpmiServer(object)
    def __init__(self, authdata, port=623, bmcuuid=None, address='::'):

Revision history for this message
David Hill (david-hill-ubisoft) wrote :

[root@zappa pyghmi]# netstat -nap | grep python
udp6 0 0 :::623 :::* 22980/python

Revision history for this message
David Hill (david-hill-ubisoft) wrote :

If add server=None in this pyghmi function, I can then successfully create many virtualbmc instances.

    def _assignsocket(cls, server=None):
        global iothread
        global iothreadready
        global iosockets
        global ipv6support
        global myself
        server=None <===

root 28860 0.0 0.0 454308 18248 ? Sl 20:31 0:00 /usr/bin/python /usr/bin/vbmc start ceph-0-rhosp8
root 29333 0.0 0.0 454440 18432 ? Sl 20:36 0:00 /usr/bin/python /usr/bin/vbmc start ceph-0-rhosp8
root 29342 0.0 0.0 454308 18428 ? Sl 20:36 0:00 /usr/bin/python /usr/bin/vbmc start ceph-1-rhosp8
root 29393 0.0 0.0 454440 18364 ? Sl 20:36 0:00 /usr/bin/python /usr/bin/vbmc start ceph-2-rhosp8

The problem I now face is that I can successfully start many virtualbmc instances per IP address which is not really wanted.

Revision history for this message
David Hill (david-hill-ubisoft) wrote :

But with this patch, the process is still not binding on the specified IP... So my guess here is I don't understand python.

Changed in virtualbmc:
importance: Undecided → High
status: New → Confirmed
summary: - virtualbmc binds only to one IP address even though each ipmi devices
- were configured with different ip addresses
+ virtualbmc binds only to localhost even though each ipmi devices were
+ configured with different ip addresses
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Here's my first attempt to fix it in pyghmi: https://review.openstack.org/404837

Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Confirmed with David that https://review.openstack.org/404837 has fixed it.

Changed in virtualbmc:
status: Confirmed → Invalid
Changed in pyghmi:
status: New → Fix Released
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in virtualbmc:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.