Browse Source

Merge "Do not create logs symlinks for nodes in discover"

changes/65/397465/1
Jenkins 2 years ago
parent
commit
de0a2c1903
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      octane/handlers/backup_restore/logs.py

+ 10
- 2
octane/handlers/backup_restore/logs.py View File

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

Loading…
Cancel
Save