From 7b34ac6bef4fe4b208d16b110bab316d582a43fa Mon Sep 17 00:00:00 2001 From: Manuel Montecelo Date: Fri, 11 Jun 2021 17:47:36 +0200 Subject: [PATCH] TT#105151 Revert "TT#105151 Reverse to check that grub config does *not* contain net.ifnames=0" This reverts commit 930b1c89fc67d2c494868e3a6c23aece063baa1d. Extra things commited that shouldn't have been (experimental local tests). Change-Id: I43857d0e0f15f7d03d644491e0664dc5824984d3 --- helper/compare_dbs.pl | 32 +++---------------- sbin/ngcp-mysql-compare-dbs | 18 +---------- .../830_network-interfaces-legacy.yaml.tt2 | 2 +- 3 files changed, 7 insertions(+), 45 deletions(-) diff --git a/helper/compare_dbs.pl b/helper/compare_dbs.pl index 8a6c9b3..ad0b95f 100755 --- a/helper/compare_dbs.pl +++ b/helper/compare_dbs.pl @@ -21,31 +21,13 @@ use Carp; my @diff_exceptions = qw( views/ldap/ldap_entries/view_definition ); -my @missing_sp1_exceptions = qw( - tables/prosody/prosodyarchive - columns/prosody/prosodyarchive_host - columns/prosody/prosodyarchive_key - columns/prosody/prosodyarchive_sort_id - columns/prosody/prosodyarchive_store - columns/prosody/prosodyarchive_type - columns/prosody/prosodyarchive_user - columns/prosody/prosodyarchive_value - columns/prosody/prosodyarchive_when - columns/prosody/prosodyarchive_with - indexes/prosody/prosodyarchive_PRIMARY_1 - indexes/prosody/prosodyarchive_prosodyarchive_index_1 - indexes/prosody/prosodyarchive_prosodyarchive_index_2 - indexes/prosody/prosodyarchive_prosodyarchive_index_3 - indexes/prosody/prosodyarchive_prosodyarchive_index_4 -); +my @missing_sp1_exceptions = qw(); my @missing_sp2_exceptions = qw(); my $credentials_file = '/etc/mysql/sipwise_extra.cnf'; my $argv = { formatter => '', schemes => '', - host_db1 => 'sp1', - host_db2 => 'sp2', pass_db1 => '', pass_db2 => '', user_db1 => '', @@ -173,18 +155,18 @@ if ($argv->{schemes} eq '') { } my $dbh1 = DBI->connect( - "DBI:mysql:;host=$argv->{host_db1};mysql_read_default_file=$credentials_file", + "DBI:mysql:;host=sp1;mysql_read_default_file=$credentials_file", $argv->{user_db1}, $argv->{pass_db1}, { RaiseError => 1 } ) or - croak("Can't connect to db1: DBI:mysql:;host=$argv->{host_db1};mysql_read_default_file=$credentials_file, $argv->{user_db1}, $argv->{pass_db1} "); + croak("Can't connect to db1: DBI:mysql:;host=sp1;mysql_read_default_file=$credentials_file, $argv->{user_db1}, $argv->{pass_db1} "); my $dbh2 = DBI->connect( - "DBI:mysql:;host=$argv->{host_db2};mysql_read_default_file=$credentials_file", + "DBI:mysql:;host=sp2;mysql_read_default_file=$credentials_file", $argv->{user_db2}, $argv->{pass_db2}, { RaiseError => 1 } ) or - croak("Can't connect to db2: DBI:mysql:;host=$argv->{host_db2};mysql_read_default_file=$credentials_file, $argv->{user_db2}, $argv->{pass_db2} "); + croak("Can't connect to db2: DBI:mysql:;host=sp2;mysql_read_default_file=$credentials_file, $argv->{user_db2}, $argv->{pass_db2} "); my $res = []; my $exit = 0; @@ -218,10 +200,6 @@ sub get_options { GetOptions( 'formatter=s' => \$argv->{'formatter'}, 'schemes=s' => \$argv->{'schemes'}, - 'host_db1=s' => \$argv->{'host_db1'}, - 'host_db2=s' => \$argv->{'host_db2'}, - 'host1=s' => \$argv->{'host_db1'}, - 'host2=s' => \$argv->{'host_db2'}, 'user_db1=s' => \$argv->{'user_db1'}, 'pass_db1=s' => \$argv->{'pass_db1'}, 'user_db2=s' => \$argv->{'user_db2'}, diff --git a/sbin/ngcp-mysql-compare-dbs b/sbin/ngcp-mysql-compare-dbs index e55c5b5..04c3fc7 100755 --- a/sbin/ngcp-mysql-compare-dbs +++ b/sbin/ngcp-mysql-compare-dbs @@ -19,10 +19,8 @@ __USAGE__ } FORMATTER='' -HOST1='' -HOST2='' -args=$(getopt -n "$(basename "$0")" -o h -l help,formatter:,host1:,host2: -- "$@") +args=$(getopt -n "$(basename "$0")" -o h -l help,formatter: -- "$@") eval set -- "${args}" while true; do case "${1}" in @@ -30,14 +28,6 @@ while true; do FORMATTER="${2}" shift 2 ;; - --host1) - HOST1="${2}" - shift 2 - ;; - --host2) - HOST2="${2}" - shift 2 - ;; -h|--help) usage exit 0 @@ -70,12 +60,6 @@ declare -a opts if [[ -n "${FORMATTER}" ]]; then opts+=(--formatter="${FORMATTER}") fi -if [[ -n "${HOST1}" ]]; then - opts+=(--host_db1="${HOST1}") -fi -if [[ -n "${HOST2}" ]]; then - opts+=(--host_db2="${HOST2}") -fi /usr/share/ngcp-system-tests/compare_dbs.pl \ --schemes="${NGCP_DB_BACKUP_FINAL_LIST[*]}" \ "${opts[@]}" || true diff --git a/templates/830_network-interfaces-legacy.yaml.tt2 b/templates/830_network-interfaces-legacy.yaml.tt2 index 823d17f..d2730f6 100644 --- a/templates/830_network-interfaces-legacy.yaml.tt2 +++ b/templates/830_network-interfaces-legacy.yaml.tt2 @@ -6,7 +6,7 @@ file: owner: root group: root filetype: file - contains: ['!/^GRUB_CMDLINE_LINUX_DEFAULT=".*net.ifnames=0.*"/'] + contains: ['/^GRUB_CMDLINE_LINUX_DEFAULT=".*net.ifnames=0.*"/'] command: