xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH] Executive: Abolish use of the `configdb'
@ 2015-09-14 10:59 Ian Jackson
  2015-09-14 11:09 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Jackson @ 2015-09-14 10:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OSSTEST PATCH] Executive: Abolish use of the `configdb'
  2015-09-14 10:59 [OSSTEST PATCH] Executive: Abolish use of the `configdb' Ian Jackson
@ 2015-09-14 11:09 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-09-14 11:09 UTC (permalink / raw)
  To: Ian Jackson, xen-devel

On Mon, 2015-09-14 at 11:59 +0100, Ian Jackson wrote:
> 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>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-14 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 10:59 [OSSTEST PATCH] Executive: Abolish use of the `configdb' Ian Jackson
2015-09-14 11:09 ` Ian Campbell

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).