Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

TO: Server ip6 fields gets updated with "" instead of null #1303

Closed
smalenfant opened this issue Apr 14, 2016 · 3 comments · Fixed by #1323
Closed

TO: Server ip6 fields gets updated with "" instead of null #1303

smalenfant opened this issue Apr 14, 2016 · 3 comments · Fixed by #1323
Assignees
Milestone

Comments

@smalenfant
Copy link
Contributor

smalenfant commented Apr 14, 2016

Affected version: 1.5 (confirmed)

If you update parameters of a server and there is no ip6 or ip6_gateway fields (null), it gets updated with a value of "" (nothing) instead of staying null. Next time you update a server, a duplicate entry is found (blank ip6). This happened on type ORG at least.

Message will look like this

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '' for key 'ip6_address' [for Statement "UPDATE server SET ip6_address = ?, ip6_gateway = ?, profile = ? WHERE ( ( cachegroup = ? AND id = ? AND profile = ? AND status = ? AND type = ? ) )" with ParamValues: 0="", 1="", 2="83", 3="60", 4='641', 5='82', 6="7", 7="41"] at /opt/traffic_ops/app/lib/UI/Server.pm line 451
@smalenfant
Copy link
Contributor Author

@elsloo You might want to look into this one as it might be quite a bit problematic for your Ops team.

@dneuman64
Copy link
Member

seems that ip6_address is the only one causing a problem.

@smalenfant
Copy link
Contributor Author

Verified. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants