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

Add-DbaAgListener parameter for Listener Name #5000

Closed
timrhomberg opened this issue Jan 23, 2019 · 7 comments · Fixed by #5280
Closed

Add-DbaAgListener parameter for Listener Name #5000

timrhomberg opened this issue Jan 23, 2019 · 7 comments · Fixed by #5280
Assignees
Projects

Comments

@timrhomberg
Copy link


name: Feature request
about: A extra Parameter for the Listener Name in Add-DbaAgListener


Summary of new feature

For the Function Add-DbaAgListener is at moment not possible to define a Listener Name. It takes every time the Name from the availability Group, but i have different names for the availability Group and the listener. So i want a extra Field to define a Listener Name.

@wsmelton
Copy link
Member

https://github.com/sqlcollaborative/dbatools/blob/b912f7e04738377f59bfdb314dbdfc1dff5a437a/functions/Add-DbaAgListener.ps1#L94-L100

We actually have code to handle passing in a name it was just missed adding as a parameter itself. SO quick fix for this will be to just add in [string]$Name to the parameter block and help. Then the test file will also need to have this parameter added.

@timrhomberg
Copy link
Author

Thank You for your quick Response. Can you tell me by when this will be implemented?

@wsmelton
Copy link
Member

No sure can't....it will likely be this week but can't promise anything.

@wsmelton wsmelton self-assigned this Jan 23, 2019
@potatoqualitee potatoqualitee self-assigned this Jan 26, 2019
@wsmelton
Copy link
Member

So @potatoqualitee we will have to consider how we add the name as the actual parameter. This has the same issue with piping AGs in on how to handle each AG with a name.

For piping support we would have to have the name mapped to the AG, so accept a hashtable input for something like -ListenerToAg or something. Otherwise the listener name can only be provided when you are working with one AG (which verifies if more than one AG is provided, we will have to make it fail).

@potatoqualitee
Copy link
Member

i think the way we'd handle it is to check to see if the ag name exists then cancel out if so? tho that's exactly what SMO does so we could just let it be?

@potatoqualitee potatoqualitee removed their assignment Jan 26, 2019
@potatoqualitee
Copy link
Member

removing my name from assignees ;)

@wsmelton
Copy link
Member

The problem is the command accepts multiple AGs. We need to update the command to only accept one AG at a time. You would not want to create a listener with the same name and IP on all the AGs of a given instance; though I don't think that is even allowed.

@wsmelton wsmelton changed the title Add-DbaAgListener a extra field for Listener Name Add-DbaAgListener parameter for Listener Name Mar 15, 2019
@potatoqualitee potatoqualitee added this to To do in 1.0 via automation Mar 21, 2019
@potatoqualitee potatoqualitee moved this from To do to In progress in 1.0 Mar 22, 2019
potatoqualitee added a commit that referenced this issue Mar 22, 2019
1.0 automation moved this from In progress to Done Mar 22, 2019
potatoqualitee added a commit that referenced this issue Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.0
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants