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

Missing Storage Adaptor (FiberChannel) from vcenter sync #343

Open
clementTal opened this issue Aug 31, 2023 · 7 comments
Open

Missing Storage Adaptor (FiberChannel) from vcenter sync #343

clementTal opened this issue Aug 31, 2023 · 7 comments
Labels
awaiting reply Awaiting reply from issue owner

Comments

@clementTal
Copy link

If ESX uses FiberChannel storage adator to use NAS storage, fiberchannel interfaces are not synced.

@bb-Ricardo
Copy link
Owner

Hi,

That's possible. The issue here is I don't have an environment with this configuration to implement a solution.

would you be able to provide me a dump from the API with -l DEBUG3 which includes the host with the unsynced interfaces?

@bb-Ricardo bb-Ricardo added the awaiting reply Awaiting reply from issue owner label Sep 14, 2023
@sulik76
Copy link

sulik76 commented Sep 25, 2023

Hi,

That's possible. The issue here is I don't have an environment with this configuration to implement a solution.

would you be able to provide me a dump from the API with -l DEBUG3 which includes the host with the unsynced interfaces?

Hi,

Did you receive the log file from clemenTal? I am also interested in your program detecting FC HBA cards with their WWN addresses installed in hosts and adding them to NetBox. I can send you a dump from the API with -l DEBUG3 from my environment.

@bb-Ricardo
Copy link
Owner

Hi,

I did not receive any logs. Would be happy if you could send them if you have some. Then I could look into implementing it.

Thank you.

@sulik76
Copy link

sulik76 commented Sep 25, 2023

The log file after compression is more than 40MB so I sent you an invitation to a directory on my Google Drive. I also put there CSV files with lists of HBA adapters from several of my hosts visible in VCenter. There is also a text file with the names and uuid of these hosts. I anonymized the log file by removing the domains and parts of the IP addresses from the file.
I hope this data will help you add new feature to your program.

@bb-Ricardo
Copy link
Owner

Hi,

Thank you for the log output, this is very helpful. I looked through the output and found that the FibreChannel Adapters are listed as StorageAdapters, not Network Interfaces. That's one reason why they don't show up.

also the amount of data is very limited:

(vim.host.FibreChannelHba) {
            dynamicType = <unset>,
            dynamicProperty = (vmodl.DynamicProperty) [],
            key = 'key-vim.host.FibreChannelHba-vmhba1',
            device = 'vmhba1',
            bus = 9,
            status = 'online',
            model = '2600 Series 16Gb Fibre Channel to PCI Express HBA',
            driver = 'qlnativefc',
            pci = '0000:09:00.0',
            storageProtocol = 'scsi',
            portWorldWideName = 111111,
            nodeWorldWideName = 222222,
            portType = 'unknown',
            speed = 8
         },

we would need a regex to guesstimate the interface type which is a mandatory field in NetBox.
Would add an interface with following infos to NetBox:

  • device
  • interface name
  • guesstimated interface type
  • WWN

What do you think? How would you determine the interface type?

@sulik76
Copy link

sulik76 commented Oct 3, 2023

Hi,

It seems to me that the interface name, interface type and WWN assigned to the device are sufficient for HBA adapters.

I was wondering how you can guess the type of interface and I think there aren't too many options. The first one that comes to my mind is parsing the model field and looking there for the speed at which the interface can work. In the data dump you sent from my infrastructure: 2600 Series 16Gb Fibre Channel to PCI Express HBA = 16gfc-sfpp If we don't find the speed there then we should use the speed field. However, from the VCenter API description, it appears that this field contains the current operational speed of the interface. It's not the best choice but there probably isn't another one to add this type of interface to Netbox. Perhaps it would be a good idea that when a new interface is added to NetBox, the script does not change its type if it is changed in the NetBox GUI to the correct one.

For WWN, in my opinion we should assign a portWorldWideName to the interface in NetBox. We also need to keep in mind that the VCenter API returns the WWN as a decimal notation and it needs to be converted to hexadecimal notation which is acceptable to NetBox.

@bb-Ricardo
Copy link
Owner

Hi,

Good point about the speed. I could try to use some regex to grab the speed and set it on new interfaces.

Thanks for the hint on the format conversation for the WWN.

Will look into adding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply Awaiting reply from issue owner
Projects
None yet
Development

No branches or pull requests

3 participants