stackhpc / sib-kayobe-config

Kayobe configuration for SIB OpenStack development
Apache License 2.0
1 stars 1 forks source link

Dell PowerConnect NGS driver does not support SSH password auth #7

Open jovial opened 5 years ago

jovial commented 5 years ago

It is currently not possible to boot a baremetal node as the NGS netmiko driver does not support password based authentication for the SSH connection. The error will show up in neutron_server.log:

...skipping...
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers     switch.plug_port_to_network(port_id, segmentation_id)
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/site-packages/networking_generic_switch/devices/netmiko_devices/__init__.py", line 194, in plug_port_to_network
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers     segmentation_id=segmentation_id))
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/site-packages/networking_generic_switch/devices/netmiko_devices/__init__.py", line 145, in send_commands_to_device
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers     with self._get_connection() as net_connect:
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers     return self.gen.next()
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/site-packages/networking_generic_switch/devices/netmiko_devices/__init__.py", line 132, in _get_connection
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers     config=device_utils.sanitise_config(self.config), error=e)
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers GenericSwitchNetmikoConnectError: Netmiko connection error: {'username': 'admin', 'ip': '10.12.2.253', 'password': '******', 'device_type': 'dell_powerconnect'}, error: Authentication failure: unable to connect dell_powerconnect 10.12.2.253:22
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers ('Bad authentication type', [u'publickey', u'password']) (allowed_types=[u'publickey', u'password'])
2018-09-18 18:58:46.448 26 ERROR neutron.plugins.ml2.managers 
2018-09-18 18:58:46.450 26 ERROR neutron.plugins.ml2.managers [req-deb74723-3c7a-4a91-9e24-50903344a64e c056ef2e408f41aa8560b5f2188704ed ae49756fa1424b2e90bcff5bbbb8b353 - default default] Failed to bind port f9c7074f-adab-4227-af45-38097b4bfdbe on host 21a43981-6d17-41f8-9635-7ff933fc8a45 for vnic_type baremetal using segments [{'network_id': 'cc0a6aa4-37cb-4669-bf7e-ad80af4f9610', 'segmentation_id': 78, 'physical_network': u'physnet1', 'id': '5ab785aa-ef3b-4597-b1ee-587017d4912f', 'network_type': u'vlan'}]
oneswig commented 5 years ago

As per discussion, are we able to install an ssh public key on the switch to circumvent this issue?

markgoddard commented 5 years ago

It should work from the netmiko perspective, but there is currently no automated way of putting the SSH key into the neutron-server container.

jovial commented 5 years ago

The current workaround... in neutron_server container:

--- dell_powerconnect.py.bak    2018-09-19 18:55:31.410864999 +0200
+++ dell_powerconnect.py    2018-09-19 18:56:01.440456097 +0200
@@ -51,7 +51,7 @@
     To make it work, we have to override the SSHClient _auth method.
     If we use login/password, the ssh server use the (none) auth mechanism.
     """
-    def _build_ssh_client(self):
+    def disabled_build_ssh_client(self):
         """Prepare for Paramiko SSH connection.

         See base_connection.py file for any updates.