Do not create logs symlinks for nodes in discover

Change-Id: Ie5a63e296d70483d29ab73992b8ab38a160baa2d
Closes-Bug: 1640760
This commit is contained in:
Sergey Abramov 2016-11-10 14:25:53 +03:00
parent 9e69e8d0d6
commit c4235e362f
1 changed files with 10 additions and 2 deletions

View File

@ -27,9 +27,17 @@ class LogsArchivator(base.Base):
def restore(self):
domain = helpers.get_astute_dict()["DNS_DOMAIN"]
dirname = "/var/log/remote/"
pairs = []
with fuel_client.set_auth_context(self.context):
pairs = [(n.data["meta"]["system"]["fqdn"], n.data["ip"])
for n in objects.Node.get_all()]
for node in objects.Node.get_all():
fqdn = node.data["meta"]["system"]["fqdn"]
# log creation not required for nodes in bootstrap
if fqdn.startswith('bootstrap'):
continue
pairs.append((fqdn, node.data["ip"]))
subprocess.call(["systemctl", "stop", "rsyslog"])
try:
for fqdn, ip_addr in pairs: