Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supermicro - divice mis-identification #149

Closed
wolfman2g1 opened this issue Jul 6, 2020 · 18 comments
Closed

Supermicro - divice mis-identification #149

wolfman2g1 opened this issue Jul 6, 2020 · 18 comments
Labels
type:hardware Mostly new hardware

Comments

@wolfman2g1
Copy link
Contributor

wolfman2g1 commented Jul 6, 2020

the agent is recognizing Supermicro SYS-1029U-E1CRTP-2-LL09G as a chassis. This should be a 1U service not a chassis. Is there a specific override that I can set in the config file? I don't have any chassis in my infra.

Also identifying any servers with motherboard X11SPW-TF as a blade.

@Solvik
Copy link
Owner

Solvik commented Jul 7, 2020

It's because of this code line:
https://github.com/Solvik/netbox-agent/blob/master/netbox_agent/vendors/supermicro.py#L27

We should be more specific in the detection of blade or not based on the product number. Do you have more information for that ?

Forcing server or blade with the command line could be a nice addition I'll open an issue for that

@wolfman2g1
Copy link
Contributor Author

wolfman2g1 commented Jul 7, 2020

Sure what kind of information do you need? Also do you need help with the project?
This is the product page.
https://www.supermicro.com/products/system/1U/1029/SYS-1029U-E1CRTP.cfm

@Solvik
Copy link
Owner

Solvik commented Jul 7, 2020

The blade detection system is based per manufacturer.
With manufacturers like Dell, it's pretty easy, blade's product number always begins with MXXX (M610, M640 etc)

It's also true with HP, but I have a feeling that it's less easy with Supermicro... they tend to have false dmidecode infos and their product number doesn't reflect the "am I a blade or a pizza box" part

If you have a better understanding of their products and know a generic way to check that, I'd be very happy to implement it !

Regarding help with the project, it's more than welcome ! It was a personal project that I thought could be interesting for other netbox user, so I'm always happy to implement or merge additional features!

@wolfman2g1
Copy link
Contributor Author

All the supermicro servers i've used in the past few years start with SYS including their microcloud( these considered blades?).

@Solvik
Copy link
Owner

Solvik commented Jul 7, 2020

Microcloud are considered blade from my point of view, especially if dmidecode mentions a Slot

@wolfman2g1
Copy link
Contributor Author

From what I've noticed their product numbers aren't something that's predictable. I think to handle that programmatically would be difficult( at least for me). I have someone working with me to look at solutions. But I think being able to pass an option like is_blade: True|False when the detected vendor is supermicro may be an easy way to do it.

@Solvik
Copy link
Owner

Solvik commented Jul 7, 2020

I understand

The agent will need to know the S/N of the chassis to do the lookup, and its blade slot to correctly assign the server to the blade.

I will see if I can work on this additional feature this week

@Solvik
Copy link
Owner

Solvik commented Jul 11, 2020

It adds more complexity to the agent, so I preferred to rework the supermicro blade/pizza detection, would you be able to try the branch supermicro?

@Solvik Solvik changed the title divice mis-identification Supermicro - divice mis-identification Jul 11, 2020
@Solvik Solvik added the type:hardware Mostly new hardware label Jul 11, 2020
@wolfman2g1
Copy link
Contributor Author

wolfman2g1 commented Jul 11, 2020 via email

@wolfman2g1
Copy link
Contributor Author

I'm free to test the branch today. which branch should I test ?

@Solvik
Copy link
Owner

Solvik commented Jul 13, 2020 via email

@wolfman2g1
Copy link
Contributor Author

I assume i need to pass an option

if self.is_blade():
File "/tmp/netbox/netbox_agent/vendors/supermicro.py", line 26, in is_blade
  product_name = self.get_product_name()
File "/tmp/netbox/netbox_agent/vendors/supermicro.py", line 52, in get_product_name
  if self.is_blade():
File "/tmp/netbox/netbox_agent/vendors/supermicro.py", line 26, in is_blade
  product_name = self.get_product_name()
File "/tmp/netbox/netbox_agent/vendors/supermicro.py", line 52, in get_product_name
  if self.is_blade():
File "/tmp/netbox/netbox_agent/vendors/supermicro.py", line 26, in is_blade
  product_name = self.get_product_name()
RecursionError: maximum recursion depth exceeded

@Solvik
Copy link
Owner

Solvik commented Jul 13, 2020

No, I just forgot I didn't implement supermicro server compatibilty
I've checked the code and fixed some stuff and added more tests

I got a dmidecode of a some kind of blade system to test it

Could you retry?

@wolfman2g1
Copy link
Contributor Author

seems better. still getting an error.

File "/tmp/netbox/netbox_agent/cli.py", line 39, in run
   server.netbox_create_or_update(config)
 File "/tmp/netbox/netbox_agent/server.py", line 306, in netbox_create_or_update
   if server.name != self.get_hostname():
AttributeError: 'NoneType' object has no attribute 'name'

will use the new branch to test other systems. but the box I just tested on is a model that I was having the issue with previously

@wolfman2g1
Copy link
Contributor Author

deployed on another 6 boxes. All throw the error above however everything else seems to be working fine.

@Solvik
Copy link
Owner

Solvik commented Jul 15, 2020

You're not the first one to raise this error to me, what netbox version are you using ?

@wolfman2g1
Copy link
Contributor Author

wolfman2g1 commented Jul 15, 2020 via email

@Solvik
Copy link
Owner

Solvik commented Jul 28, 2020

I'm closing this issue since I've merge the supermicro modifications
I'll open another to fix the server.name problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:hardware Mostly new hardware
Projects
None yet
Development

No branches or pull requests

2 participants