You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/05/23 21:55:09 UTC

[1/5] incubator-trafficcontrol git commit: Fixed the Use of uninitialized value in concatenation (.) or string at

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 5b8d15cf2 -> ef05b19bd


Fixed the Use of uninitialized value in concatenation (.) or string at


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

Branch: refs/heads/master
Commit: 610c6c22f44a221206e4e53b69e0c0c806c32793
Parents: bcad70f
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon May 22 07:34:38 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Mon May 22 07:34:38 2017 -0600

----------------------------------------------------------------------
 traffic_ops/install/bin/_postinstall | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/610c6c22/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index ac949de..d9d0f53 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -635,7 +635,7 @@ sub insert_parameters {
     # Enable multiple inserts into one commit
     $dbh->{pg_server_prepare} = 0;
 
-    my $insert_stmt = <<"INSERTS";
+    my $insert_stmt = <<'INSERTS';
 
     -- global parameters
     insert into parameter (name, config_file, value) 
@@ -673,7 +673,7 @@ sub insert_profiles {
     my $paramconf = shift;
 
     InstallUtils::logger( "\n=========== Setting up profiles", "info" );
-    my $insert_stmt = <<"INSERTS";
+    my $insert_stmt = <<'INSERTS';
 
     -- global parameters
     insert into profile (name, description, type) 


[5/5] incubator-trafficcontrol git commit: This closes #597

Posted by da...@apache.org.
This closes #597


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

Branch: refs/heads/master
Commit: ef05b19bd6470f80108f8f560fbc6ef214e2516d
Parents: 5b8d15c eef68f0
Author: Dan Kirkwood <da...@gmail.com>
Authored: Tue May 23 21:55:01 2017 +0000
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Tue May 23 21:55:01 2017 +0000

----------------------------------------------------------------------
 traffic_ops/app/db/seeds.sql         |  9 ++++-
 traffic_ops/build/traffic_ops.spec   |  2 +-
 traffic_ops/install/bin/_postinstall | 65 ++++++++++++++++++-------------
 3 files changed, 48 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ef05b19b/traffic_ops/build/traffic_ops.spec
----------------------------------------------------------------------
diff --cc traffic_ops/build/traffic_ops.spec
index 9519a72,9fd068f..589e32f
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@@ -34,8 -34,8 +34,8 @@@ Packager:         daniel_kirkwood at Ca
  AutoReqProv:      no
  Requires:         cpanminus, expat-devel, gcc-c++, libcurl, libpcap-devel, mkisofs, tar
  Requires:         openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, perl-Digest-SHA1
 -Requires:	      libidn-devel, libcurl-devel
 +Requires:         libidn-devel, libcurl-devel
- Requires:         postgresql, postgresql-devel
+ Requires:         postgresql96 >= 9.6.2 , postgresql96-devel >= 9.6.2
  Requires:         perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, perl-WWW-Curl, perl-TermReadKey
  Requires(pre):    /usr/sbin/useradd, /usr/bin/getent
  Requires(postun): /usr/sbin/userdel

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ef05b19b/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------


[4/5] incubator-trafficcontrol git commit: removed profile.d for now

Posted by da...@apache.org.
removed profile.d for now


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

Branch: refs/heads/master
Commit: eef68f02378e9f745644d02a430c59a82298e2c9
Parents: 0ba13b7
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon May 22 14:08:43 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Mon May 22 14:08:43 2017 -0600

----------------------------------------------------------------------
 traffic_ops/build/traffic_ops.spec | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/eef68f02/traffic_ops/build/traffic_ops.spec
----------------------------------------------------------------------
diff --git a/traffic_ops/build/traffic_ops.spec b/traffic_ops/build/traffic_ops.spec
index 738f2d4..9fd068f 100644
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@ -1,4 +1,4 @@
-
+#
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ Packager:         daniel_kirkwood at Cable dot Comcast dot com
 AutoReqProv:      no
 Requires:         cpanminus, expat-devel, gcc-c++, libcurl, libpcap-devel, mkisofs, tar
 Requires:         openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, perl-Digest-SHA1
-Requires:         libidn-devel, libcurl-devel
+Requires:	      libidn-devel, libcurl-devel
 Requires:         postgresql96 >= 9.6.2 , postgresql96-devel >= 9.6.2
 Requires:         perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, perl-WWW-Curl, perl-TermReadKey
 Requires(pre):    /usr/sbin/useradd, /usr/bin/getent
@@ -96,7 +96,6 @@ Built: %(date) by %{getenv: USER}
     %__cp %{PACKAGEDIR}/etc/cron.d/trafops_clean_isos /etc/cron.d/trafops_clean_isos
     %__cp %{PACKAGEDIR}/etc/logrotate.d/traffic_ops /etc/logrotate.d/traffic_ops
     %__cp %{PACKAGEDIR}/etc/logrotate.d/traffic_ops_access /etc/logrotate.d/traffic_ops_access
-    %__cp %{PACKAGEDIR}/etc/profile.d/traffic_ops.sh /etc/profile.d/traffic_ops.sh
     %__chown root:root /etc/init.d/traffic_ops
     %__chown root:root /etc/cron.d/trafops_dnssec_refresh
     %__chown root:root /etc/cron.d/trafops_clean_isos


[2/5] incubator-trafficcontrol git commit: moved the toolname and instance name back into seeds for postinstall simplicity

Posted by da...@apache.org.
moved the toolname and instance name back into seeds for postinstall simplicity


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

Branch: refs/heads/master
Commit: f868cae629d9513db66713ad3d89d443bd1c927a
Parents: 610c6c2
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon May 22 13:56:54 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Mon May 22 13:56:54 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/db/seeds.sql         |  9 ++++-
 traffic_ops/install/bin/_postinstall | 65 ++++++++++++++++++-------------
 2 files changed, 47 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f868cae6/traffic_ops/app/db/seeds.sql
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/seeds.sql b/traffic_ops/app/db/seeds.sql
index da696ba..8e725a1 100644
--- a/traffic_ops/app/db/seeds.sql
+++ b/traffic_ops/app/db/seeds.sql
@@ -26,14 +26,21 @@ insert into job_agent (name, description, active) values ('dummy', 'Description
 insert into job_status (name, description) values ('PENDING', 'Job is queued, but has not been picked up by any agents yet') ON CONFLICT (name) DO NOTHING;
 
 -- parameters
--- Move into postinstall global parameters
+-- Moved into postinstall global parameters
 insert into profile (name, description, type) values ('GLOBAL', 'Global Traffic Ops profile, DO NOT DELETE', 'UNK_PROFILE') ON CONFLICT (name) DO NOTHING;
+
 ---------------------------------
 
 -- profiles
 ---------------------------------
 insert into parameter (name, config_file, value) values ('tm.instance_name', 'global', 'Traffic Ops CDN') ON CONFLICT (name, config_file, value) DO NOTHING;
+insert into profile_parameter (profile, parameter) values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.instance_name' and config_file = 'global' and value = 'Traffic Ops CDN') ) ON CONFLICT (profile, parameter) DO NOTHING;
+
 insert into parameter (name, config_file, value) values ('tm.toolname', 'global', 'Traffic Ops') ON CONFLICT (name, config_file, value) DO NOTHING;
+insert into profile_parameter (profile, parameter) values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.toolname' and config_file = 'global' and value = 'Traffic Ops') ) ON CONFLICT (profile, parameter) DO NOTHING;
+
+
+
 
 -- profiles
 ---------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f868cae6/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index d9d0f53..d028c68 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -551,6 +551,7 @@ QUERY
 ADMIN
     $dbh->do($insert_admin);
 
+    insert_cdn($dbh, $paramconf);
     insert_parameters($dbh, $paramconf);
     insert_profiles($dbh, $paramconf);
 
@@ -626,41 +627,59 @@ sub setupCertificates {
 }
 
 #------------------------------------
-sub insert_parameters {
+sub insert_cdn {
+
     my $dbh = shift;
     my $paramconf = shift;
 
-    InstallUtils::logger( "=========== Setting up parameters", "info" );
+    InstallUtils::logger( "=========== Setting up cdn", "info" );
 
     # Enable multiple inserts into one commit
     $dbh->{pg_server_prepare} = 0;
 
-    my $insert_stmt = <<'INSERTS';
+	my $cdn_name = $paramconf->{"cdn_name"};
+	my $dns_subdomain = $paramconf->{"dns_subdomain"};
+
+    my $insert_stmt = <<INSERTS;
 
     -- global parameters
-    insert into parameter (name, config_file, value) 
-                values ('tm.url', 'global', '$paramconf->{"tm.url"}') 
-                ON CONFLICT (name, config_file, value) DO NOTHING;
+    insert into cdn (name, domain_name, dnssec_enabled)
+                values ('$cdn_name', '$dns_subdomain', false) 
+                ON CONFLICT (name) DO NOTHING;
 
-    insert into parameter (name, config_file, value) 
-                values ('tm.instance_name', 'global', '$paramconf->{"tm.instance_name"}') 
-                ON CONFLICT (name, config_file, value) DO NOTHING;
+INSERTS
+    doInsert($dbh, $insert_stmt);
+}
 
+#------------------------------------
+sub insert_parameters {
+    my $dbh = shift;
+    my $paramconf = shift;
+
+    InstallUtils::logger( "=========== Setting up parameters", "info" );
+
+    # Enable multiple inserts into one commit
+    $dbh->{pg_server_prepare} = 0;
+
+	my $tm_url = $paramconf->{"tm.url"};
+
+    my $insert_stmt = <<INSERTS;
+    -- global parameters
     insert into parameter (name, config_file, value) 
-                values ('tm.toolname', 'global', '$paramconf->{"tm.toolname"}') 
+                values ('tm.url', 'global', '$tm_url') 
                 ON CONFLICT (name, config_file, value) DO NOTHING;
 
     insert into parameter (name, config_file, value) 
-                values ('tm.infourl', 'global', '$paramconf->{"tm.url"}/doc') 
+                values ('tm.infourl', 'global', '$tm_url/doc') 
                 ON CONFLICT (name, config_file, value) DO NOTHING;
 
     -- CRConfig.json parameters
     insert into parameter (name, config_file, value) 
-                values ('geolocation.polling.url', 'CRConfig.json', '$paramconf->{"tm.url"}/routing/GeoLite2-City.mmdb.gz') 
+                values ('geolocation.polling.url', 'CRConfig.json', '$tm_url/routing/GeoLite2-City.mmdb.gz') 
                 ON CONFLICT (name, config_file, value) DO NOTHING;
 
     insert into parameter (name, config_file, value) 
-                values ('geolocation6.polling.url', 'CRConfig.json', '$paramconf->{"tm.url"}/routing/GeoLiteCityv6.dat.gz') 
+                values ('geolocation6.polling.url', 'CRConfig.json', '$tm_url/routing/GeoLiteCityv6.dat.gz') 
                 ON CONFLICT (name, config_file, value) DO NOTHING;
 
 INSERTS
@@ -673,7 +692,9 @@ sub insert_profiles {
     my $paramconf = shift;
 
     InstallUtils::logger( "\n=========== Setting up profiles", "info" );
-    my $insert_stmt = <<'INSERTS';
+	my $tm_url = $paramconf->{"tm.url"};
+
+    my $insert_stmt = <<INSERTS;
 
     -- global parameters
     insert into profile (name, description, type) 
@@ -681,27 +702,19 @@ sub insert_profiles {
                 ON CONFLICT (name) DO NOTHING;
 
     insert into profile_parameter (profile, parameter) 
-                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.url' and config_file = 'global' and value = '$paramconf->{"tm.url"}') ) 
-                ON CONFLICT (profile, parameter) DO NOTHING;
-
-    insert into profile_parameter (profile, parameter) 
-                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.instance_name' and config_file = 'global' and value = '$paramconf->{"tm.instance_name"}') ) 
-                ON CONFLICT (profile, parameter) DO NOTHING;
-
-    insert into profile_parameter (profile, parameter) 
-                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.toolname' and config_file = 'global' and value = '$paramconf->{"tm.toolname"}') ) 
+                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.url' and config_file = 'global' and value = '$tm_url') ) 
                 ON CONFLICT (profile, parameter) DO NOTHING;
 
     insert into profile_parameter (profile, parameter) 
-                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.infourl' and config_file = 'global' and value = '$paramconf->{"tm.url"}/doc') ) 
+                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.infourl' and config_file = 'global' and value = '$tm_url/doc') ) 
                 ON CONFLICT (profile, parameter) DO NOTHING;
 
     insert into profile_parameter (profile, parameter) 
-                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'geolocation.polling.url' and config_file = 'CRConfig.json' and value = 'https://$paramconf->{"dns_subdomain"}/routing/GeoLite2-City.mmdb.gz') ) 
+                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'geolocation.polling.url' and config_file = 'CRConfig.json' and value = '$tm_url/routing/GeoLite2-City.mmdb.gz') ) 
                 ON CONFLICT (profile, parameter) DO NOTHING;
 
     insert into profile_parameter (profile, parameter) 
-                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'geolocation6.polling.url' and config_file = 'CRConfig.json' and value = 'https://$paramconf->{"dns_subdomain"}/routing/GeoLiteCityv6.dat.gz') ) 
+                values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'geolocation6.polling.url' and config_file = 'CRConfig.json' and value = '$tm_url/routing/GeoLiteCityv6.dat.gz') ) 
                 ON CONFLICT (profile, parameter) DO NOTHING;
 
 INSERTS


[3/5] incubator-trafficcontrol git commit: added to make postgresql96 as a requirement

Posted by da...@apache.org.
added to make postgresql96 as a requirement


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

Branch: refs/heads/master
Commit: 0ba13b7e91e5991bc4663b31e388b19e5c49f389
Parents: f868cae
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon May 22 14:07:31 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Mon May 22 14:07:31 2017 -0600

----------------------------------------------------------------------
 traffic_ops/build/traffic_ops.spec | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0ba13b7e/traffic_ops/build/traffic_ops.spec
----------------------------------------------------------------------
diff --git a/traffic_ops/build/traffic_ops.spec b/traffic_ops/build/traffic_ops.spec
index 37a60c2..738f2d4 100644
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@ -1,4 +1,4 @@
-#
+
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,7 +34,8 @@ Packager:         daniel_kirkwood at Cable dot Comcast dot com
 AutoReqProv:      no
 Requires:         cpanminus, expat-devel, gcc-c++, libcurl, libpcap-devel, mkisofs, tar
 Requires:         openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, perl-Digest-SHA1
-Requires:	  libidn-devel, libcurl-devel
+Requires:         libidn-devel, libcurl-devel
+Requires:         postgresql96 >= 9.6.2 , postgresql96-devel >= 9.6.2
 Requires:         perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, perl-WWW-Curl, perl-TermReadKey
 Requires(pre):    /usr/sbin/useradd, /usr/bin/getent
 Requires(postun): /usr/sbin/userdel
@@ -95,6 +96,7 @@ Built: %(date) by %{getenv: USER}
     %__cp %{PACKAGEDIR}/etc/cron.d/trafops_clean_isos /etc/cron.d/trafops_clean_isos
     %__cp %{PACKAGEDIR}/etc/logrotate.d/traffic_ops /etc/logrotate.d/traffic_ops
     %__cp %{PACKAGEDIR}/etc/logrotate.d/traffic_ops_access /etc/logrotate.d/traffic_ops_access
+    %__cp %{PACKAGEDIR}/etc/profile.d/traffic_ops.sh /etc/profile.d/traffic_ops.sh
     %__chown root:root /etc/init.d/traffic_ops
     %__chown root:root /etc/cron.d/trafops_dnssec_refresh
     %__chown root:root /etc/cron.d/trafops_clean_isos