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

Attempt to unlink parameter from DS profile incorrectly shows 0 servers affected #1642

Closed
guzzijason opened this issue Dec 11, 2017 · 7 comments · Fixed by #1649
Closed

Attempt to unlink parameter from DS profile incorrectly shows 0 servers affected #1642

guzzijason opened this issue Dec 11, 2017 · 7 comments · Fixed by #1649
Assignees
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one
Milestone

Comments

@guzzijason
Copy link
Contributor

Attempting to unlink an MSO parameter from a profile gives misleading warning message that the parameter is used by 0 servers, which is not true. Servers in this case would be mid tier, which may be a factor in why TO is not corelating.

image

@mitchell852 mitchell852 added Traffic Portal v1 related to Traffic Portal version 1 bug something isn't working as intended labels Dec 11, 2017
@mitchell852 mitchell852 self-assigned this Dec 11, 2017
@mitchell852
Copy link
Member

mitchell852 commented Dec 11, 2017

@guzzijason - I think what this message is supposed to say is something like "The DS_col-jitp2 profile is used by X delivery service(s). Are you sure you want to remove the mso.algo parameter from this profile"

All profiles with the exception of "DS profiles" are intended to be attached to servers so I"m guessing I just did a query to see which servers were explicitly assigned to the DS_col-jitp2 and there are none (because this is a DS profile and not a server profile).

So, does that make sense if i just fix the message?

@guzzijason guzzijason changed the title Attempt to unlinke parameter from DS profile incorrectly shows 0 servers affected Attempt to unlink parameter from DS profile incorrectly shows 0 servers affected Dec 11, 2017
@guzzijason
Copy link
Contributor Author

Yes, that seems like totally reasonable solution.

@mitchell852
Copy link
Member

Ok, I'm a bit confused. I just tried removing the mso.algorithm parameter from the DS_col-jitp2 profile and got this message instead:

image

The only explanation I can think of is that at one time, the type of the DS_col-jitp2 profile was not correctly set to "DS_PROFILE" hence you saw the "is used by 0 server(s)" message instead of the "is used by X delivery service(s) message...

Let me know if you still see this problem.

@guzzijason
Copy link
Contributor Author

Hmm.... I still seem to get the used by 0 server(s) message for that one.

@guzzijason
Copy link
Contributor Author

It seems the difference is how you access the parameter.
If I go Profiles -> DS_col-jitp2 -> Parameters, I see the same message you get.
If I go Parameters -> mso.algorithm then View Profiles and try to unlink there, the message changes.

@mitchell852
Copy link
Member

ok, i reproduced the error. thanks!

@mitchell852
Copy link
Member

the problem has to do with GET api/1.3/parameters/:id/profiles is not returning the profile type for each profile therefore this conditional always returns false:

https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js#L40

I'll make sure GET api/1.3/parameters/:id/profiles returns the profile type so that conditional will work properly

@mitchell852 mitchell852 added Traffic Ops API and removed Traffic Portal v1 related to Traffic Portal version 1 labels Dec 12, 2017
@mitchell852 mitchell852 added the low impact affects only a small portion of a CDN, and cannot itself break one label Dec 19, 2017
@mitchell852 mitchell852 added this to the 2.2.0 milestone Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one
Projects
None yet
2 participants