Giter Site home page Giter Site logo

stackhpc / stackhpc-inspector-plugins Goto Github PK

View Code? Open in Web Editor NEW
2.0 7.0 1.0 34 KB

StackHPC plugins for OpenStack Hardware Discovery service, ironic inspector

License: Apache License 2.0

Python 100.00%
openstack ironic-inspector ironic hardware-discovery lldp

stackhpc-inspector-plugins's Introduction

StackHPC Ironic Inspector Plugins

This repository hosts plugins for use with the OpenStack Hardware Discovery service, ironic inspector.

Plugins

Infiniband Physical Network

The ib_physnet plugin populates the physical_network field of ironic ports determined to be Infiniband ports. Ports with a client-id field in their extra attribute are determined to be IB ports.

The plugin is configured via the option [port_physnet] ib_physnet, which is the name of the physical network to apply.

The system_name_llc plugin uses LLDP data gathered by the discovery ramdisk to populate the switch_info field of the local_link_connection attribute of ironic ports. The field is populated with the contents of the system name LLDP TLV if it was received by that port.

System Name Physical Network

The system_name_physnet plugin uses LLDP data gathered by the discovery ramdisk to populate the physical_network field of ironic ports.

The plugin is configured via the option [port_physnet] switch_sys_name_mapping, which is a comma-separated list of <switch system name>:<physical network> tuples. If the switch system name LLDP TLV received by a port matches an item in the mapping, the corresponding physical network will be applied to the port.

Usage

This project is hosted on PyPI, and may be installed via pip:

pip install stackhpc-inspector-plugins

stackhpc-inspector-plugins's People

Contributors

jovial avatar markgoddard avatar stackhpc-ci avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

cityofships

stackhpc-inspector-plugins's Issues

Inspector plugins are broken in Ussuri

https://review.opendev.org/#/c/672179/ replaced ironic client with the openstacksdk which has caused a breakage. Specifically:

2020-11-12 14:27:25.683 6 ERROR ironic_inspector.node_cache [-] [node: d043bfb2-8913-4f91-aef3-8c8b51383770 state processing] Processing the error event becau
se of an exception <class 'TypeError'>: get_client() got an unexpected keyword argument 'api_version' raised by ironic_inspector.process._process_node        
2020-11-12 14:27:25.683 6 INFO ironic_inspector.node_cache [-] [node: d043bfb2-8913-4f91-aef3-8c8b51383770 state processing] Updating node state: processing -
-> error                                                                                                                                                      
2020-11-12 14:27:25.705 6 ERROR ironic_inspector.process [-] Unexpected exception during processing: TypeError: get_client() got an unexpected keyword argumen
t 'api_version'                                                                                                                                               
  

ports with missing physical network cause inspection to fail

Given a port like:

+-----------------------+--------------------------------------+
| Field                 | Value                                |
+-----------------------+--------------------------------------+
| address               | 18:03:73:ff:96:8d                    |
| created_at            | 2018-07-30T09:27:26+00:00            |
| extra                 | {}                                   |
| internal_info         | {}                                   |
| local_link_connection | {}                                   |
| node_uuid             | b111570e-e560-400d-a0ce-a180f10d3b7a |
| physical_network      | None                                 |
| portgroup_uuid        | None                                 |
| pxe_enabled           | False                                |
| updated_at            | None                                 |
| uuid                  | 13e0cfb7-51df-4a0a-9aa0-816f793b850e |
+-----------------------+--------------------------------------+

you will see an error like:

2018-08-03 09:52:24.873 7 ERROR ironic_inspector.node_cache [req-c439f719-34cc-4a9a-baf1-10785a6cd2b4 - - - - -] [node: b31e62f9-0823-46c5-9575-746e285e6706 state processing] Processing the error event because of an exception <type 'exceptions.AttributeError'>: id raised by ironic_inspector.process._process_node
2018-08-03 09:52:24.874 7 INFO ironic_inspector.node_cache [req-c439f719-34cc-4a9a-baf1-10785a6cd2b4 - - - - -] [node: b31e62f9-0823-46c5-9575-746e285e6706 state processing] Updating node state: processing --> error
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process [req-c439f719-34cc-4a9a-baf1-10785a6cd2b4 - - - - -] Unexpected exception during processing: AttributeError: id
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process Traceback (most recent call last):
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironic_inspector/process.py", line 235, in process
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     result = _process_node(node_info, node, introspection_data)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py", line 579, in inner
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     return func(node_info, *args, **kwargs)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py", line 557, in inner
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     node_info.finished(istate.Events.error, error=str(exc))
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     self.force_reraise()
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     six.reraise(self.type_, self.value, self.tb)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironic_inspector/node_cache.py", line 541, in inner
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     ret = func(node_info, *args, **kwargs)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironic_inspector/process.py", line 268, in _process_node
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     _run_post_hooks(node_info, introspection_data)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironic_inspector/process.py", line 261, in _run_post_hooks
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     hook_ext.obj.before_update(introspection_data, node_info)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/stackhpc_inspector_plugins/plugins/base_physnet.py", line 104, in before_update
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     patch = self._get_physnet_patch(physnet, port)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/stackhpc_inspector_plugins/plugins/base_physnet.py", line 62, in _get_physnet_patch
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     port.physical_network == physnet):
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironicclient/common/apiclient/base.py", line 478, in __getattr__
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     self.get()
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironicclient/common/apiclient/base.py", line 496, in get
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     new = self.manager.get(self.id)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process   File "/usr/lib/python2.7/site-packages/ironicclient/common/apiclient/base.py", line 481, in __getattr__
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process     raise AttributeError(k)
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process AttributeError: id
2018-08-03 09:52:25.035 7 ERROR ironic_inspector.process 
2018-08-03 09:52:25.140 7 INFO ironic_inspector.process [req-c439f719-34cc-4a9a-baf1-10785a6cd2b4 - - - - -] [node: b31e62f9-0823-46c5-9575-746e285e6706 state error MAC 18:03:73:ff:6b:83 BMC 10.68.3.54] Ramdisk logs were stored in file b31e62f9-0823-46c5-9575-746e285e6706_20180803-085225.140195.tar.gz
2018-08-03 09:52:25.141 7 ERROR ironic_inspector.utils [req-c439f719-34cc-4a9a-baf1-10785a6cd2b4 - - - - -] [node: b31e62f9-0823-46c5-9575-746e285e6706 state error MAC 18:03:73:ff:6b:83 BMC 10.68.3.54] Unexpected exception AttributeError during processing: id

in inspector logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.