From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH] Executive: Abolish use of the `configdb'
Date: Mon, 14 Sep 2015 11:59:51 +0100 [thread overview]
Message-ID: <1442228391-26825-1-git-send-email-ian.jackson@eu.citrix.com> (raw)
This was a database used by networking infrastructure on the
now-obsolete XenClient network in the Citrix Cambridge office (which
used some management tools developed by Mythic Beasts).
The production database in Cambridge no longer has the configdb, and
both instances have `HostDB_Executive_NoConfigDB 1' in the
configuration. We think it very unlikely that anyone has as similar
arrangement.
Remove all the code for accessing this database. We leave the config
settings `NoConfigDB' for now, for the benefit of ad-hoc trees which
are not immediately updated but which use their site's official
production-config. They can be deleted later.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/HostDB/Executive.pm | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/Osstest/HostDB/Executive.pm b/Osstest/HostDB/Executive.pm
index 3fa9982..3e5eca2 100644
--- a/Osstest/HostDB/Executive.pm
+++ b/Osstest/HostDB/Executive.pm
@@ -98,34 +98,8 @@ END
sub default_methods ($$) {
my ($hd, $ho) = @_;
- return if $ho->{Flags}{'no-reinstall'};
- return if $ho->{Ether} && $ho->{Power};
-
- return if $c{HostDB_Executive_NoConfigDB};
-
- my $dbh_config= opendb('configdb');
- my $selname= $ho->{Fqdn};
- my $sth= $dbh_config->prepare(<<END);
- SELECT * FROM ips WHERE reverse_dns = ?
-END
- $sth->execute($selname);
- my $row= $sth->fetchrow_hashref();
- my $name= $ho->{Name};
- die "$ho->{Ident} $name $selname ?" unless $row;
- die if $sth->fetchrow_hashref();
- $sth->finish();
- my $get= sub {
- my ($k,$nowarn) = @_;
- my $v= $row->{$k};
- defined $v or $nowarn or
- warn "host $name: undefined $k in configdb::ips\n";
- return $v;
- };
- $ho->{Asset}= $get->('asset',1);
- $ho->{Ether} ||= $get->('hardware');
- $ho->{Power} ||= "statedb $ho->{Asset}";
- push @{ $ho->{Info} }, "(asset=$ho->{Asset})" if defined $ho->{Asset};
- $dbh_config->disconnect();
+ # We used to look things up in the Mythic Beasts style configdb
+ # here. But that is gone now.
}
1;
--
1.7.10.4
next reply other threads:[~2015-09-14 11:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 10:59 Ian Jackson [this message]
2015-09-14 11:09 ` [OSSTEST PATCH] Executive: Abolish use of the `configdb' Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442228391-26825-1-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).