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

dellemc_unity_host Adding new host with new initiators fails #8

Open
nurseandthenerd opened this issue Oct 5, 2021 · 8 comments
Open
Labels
enhancement New feature or request

Comments

@nurseandthenerd
Copy link

I'm trying to create a new host with initiators that have not been logged into the array yet. I keep getting error - Invalid initiator passed. I am able to create the host manually through the GUI using the same initiators.

It looks like line 629 of dellemc_unity_host.py gets a list of initiators from the array and if the initiator supplied to the module is not in the list it errors out. I know for a fact the the initiators haven't been logged into the array yet because the hosts are boot from san. i'm trying to add the hosts to the array first so i can get the boot luns ready to go at first boot of the host. I tried changing log.error on that lookup to log.warn and comment out the failure. after that the module continued.

I then got an error that the "Initiator 'id' mapped to another host". This looks to be coming from the get_list_unmapped_initiators() function. i did verify on the array that the initiators i'm using do not exists anywhere on the array.

Any help would be greatly appreciated.

Thanks,
Patrick

@nurseandthenerd
Copy link
Author

I also fully zoned the host to the array and the initiators showed up in the initator path list in the gui. they were listed as not being connected to a host. i still got the initiator mapped to another host error.

@nurseandthenerd
Copy link
Author

Upon further review it looks like the array needs to see the initiators before it will let you add them to a host. Our hosts have 4 hbas. two for boot, and two for data. when all 4 hbas are zoned to the unity array and powered on only the boot hbas log into the array. i was able to add the host with only the boot initiators after the host was powered on.

I still need to be able to add initiators regardless if the array has them logged in or not.

@rajendraindukuri
Copy link
Contributor

Hi @nurseandthenerd ,

Thanks for writing to us.
As you mentioned, we use the api in line no 629 to fetch the list of initiators (which is a SDK method) and that returns only the initiators which are logged in which is a prerequisite as per our design.

Also as per our design , when a customer passes a list of components and some of them are invalid, we fail the operation and give a error message. Customer needs to identify and remove the invalid entries and retry the operation. Basically we do not process partially valid inputs.

Let us know if you need more details.

Thanks
Rajendra

@nurseandthenerd
Copy link
Author

nurseandthenerd commented Nov 9, 2021

Ok. I just knew that both the web UI, and the API would allow you to create an initiator regardless of if the initiator has been logged into the array. I was hoping the module would support that as well. Right now i'm using the ansible URI module and the the API directly. There is just a lot of logic involved with that way of doing things that i was hoping this module would handle. I only create the initiator if it doesn't exist and associate it to the host/update it if it does.

If that isn't in the design of this module we can go ahead and close out this issue, and i will keep using the API directly.

Thanks,
Patrick

@okostadinov-hs
Copy link

Hi,

I am having the same issue. My automation workflow requires the Host to be set up on the Unisphere side, along with the Initiator before the actual host can connect to the target, which does not work with this module. Please fix this.

@smitty-dell
Copy link

I ran into this problem, and would love for the feature to not check against known initiators. For now, I use the shell command and run the uemcli command to add the initiator instead. Not the best solution for sure.

@anupamaloke
Copy link
Collaborator

@nurseandthenerd, @smitty-dell, this issue has been fixed in the latest 1.3.0 release. Could you please try it out with the new collection version and let us know whether you are still running into this issue?

Version 1.3.0 - released on 25/03/22
Enhanced host module to support listing of network addresses, FC initiators, ISCSI initiators and allocated volumes of a host
Enhance host module to support add/remove network address to/from a host.
Enhanced host module to support both mapping and un-mapping of non-logged-in initiators to host.

@anupamaloke anupamaloke added the enhancement New feature or request label Mar 23, 2022
@nurseandthenerd
Copy link
Author

just tested everything out and only found one bug. I had a host that had previously been created, but with out a description. I used the module on the existing host but with a description this time. I did update the description on the host, but the module returned back green with a status of OK to the console instead of Yellow and changed when it did make a change to the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants