diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-07-27 00:08:10 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-07-27 00:08:10 +0000 |
commit | 62639987cf059227f292c09f552936e776262275 (patch) | |
tree | 40eb282cda5f380ccce34e94fef96ab420215562 /src/lib | |
parent | c56ea4ee3fa882b74fcffc2680d79f3e442382e8 (diff) | |
download | bcfg2-62639987cf059227f292c09f552936e776262275.tar.gz bcfg2-62639987cf059227f292c09f552936e776262275.tar.bz2 bcfg2-62639987cf059227f292c09f552936e776262275.zip |
SSHbase: defer ssh_known_hosts file building until metadata is working
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5387 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/SSHbase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py index 542c06f5f..388cc53fc 100644 --- a/src/lib/Server/Plugins/SSHbase.py +++ b/src/lib/Server/Plugins/SSHbase.py @@ -71,7 +71,10 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin, self.entries.iteritems() if \ key.endswith('.static')]) names = dict() - # this next part is terrible + # if no metadata is registered yet, defer + if len(self.core.metadata.query.all()) == 0: + self.__skn = False + return self.__skn for cmeta in self.core.metadata.query.all(): names[cmeta.hostname] = set([cmeta.hostname]) names[cmeta.hostname].update(cmeta.aliases) |