Commit bab1f2fa authored by Xavier Thompson's avatar Xavier Thompson

slapformat: WIP: Add more logs

parent d1632bcd
...@@ -258,6 +258,7 @@ class Computer(object): ...@@ -258,6 +258,7 @@ class Computer(object):
conf = self.conf conf = self.conf
interface = self.interface interface = self.interface
partitions = self.partitions partitions = self.partitions
conf.info("Checking configuration")
# Big enough IPv6 network # Big enough IPv6 network
if any(p.ipv6_range for p in partitions): if any(p.ipv6_range for p in partitions):
interface.checkPartitionIPv6Ranges() interface.checkPartitionIPv6Ranges()
...@@ -307,9 +308,9 @@ class Computer(object): ...@@ -307,9 +308,9 @@ class Computer(object):
r1, reason1 = r2, reason2 r1, reason1 = r2, reason2
def format(self): def format(self):
# Software root path self.conf.info("Formatting (%d partitions)", len(self.partitions))
# Software root path & user
ensureDir(self.conf.software_root, 0o755) ensureDir(self.conf.software_root, 0o755)
# Software user
self.user.ensureUser() self.user.ensureUser()
uid, gid = self.user.getIds() uid, gid = self.user.getIds()
os.chown(self.conf.software_root, uid, gid) os.chown(self.conf.software_root, uid, gid)
...@@ -325,6 +326,7 @@ class Computer(object): ...@@ -325,6 +326,7 @@ class Computer(object):
p.format(self.interface) p.format(self.interface)
def checkFormat(self): def checkFormat(self):
self.conf.info("Checking formatting")
time.sleep(2) time.sleep(2)
for p in self.partitions: for p in self.partitions:
p.checkFormat(self.interface) p.checkFormat(self.interface)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment