Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 848439dc2 -> ad2feb7fe


defaults ats_ver to 5.  This eliminates warnings during integration test and 
warns user of missing parameter


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c76c5b32
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c76c5b32
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c76c5b32

Branch: refs/heads/master
Commit: c76c5b323e102f8c57253c7ec9b85c34aaa63bbb
Parents: 848439d
Author: Dan Kirkwood <dang...@gmail.com>
Authored: Fri Aug 4 14:05:24 2017 -0600
Committer: Jeremy Mitchell <mitchell...@gmail.com>
Committed: Fri Aug 4 14:30:47 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/ConfigFiles.pm | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c76c5b32/traffic_ops/app/lib/UI/ConfigFiles.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/ConfigFiles.pm 
b/traffic_ops/app/lib/UI/ConfigFiles.pm
index 03edb77..ac59d95 100644
--- a/traffic_ops/app/lib/UI/ConfigFiles.pm
+++ b/traffic_ops/app/lib/UI/ConfigFiles.pm
@@ -1096,6 +1096,10 @@ sub parent_dot_config {
                $self->db->resultset('ProfileParameter')
                ->search( { 'parameter.name' => 'trafficserver', 
'parameter.config_file' => 'package', 'profile.id' => $server->profile->id },
                { prefetch => [ 'profile', 'parameter' ] } 
)->get_column('parameter.value')->single();
+       if (!defined $ats_ver) {
+               $ats_ver = "5";
+                $self->app->log->error("Parameter package.trafficserver 
missing for profile ".$server->profile->name . ". Assuming version $ats_ver");
+        }
        my $ats_major_version = substr( $ats_ver, 0, 1 );
 
        my $pinfo;

Reply via email to