Make lxc-wait check more resilient
This commit is contained in:
parent
d29cb7739e
commit
8c22df2e71
@ -85,7 +85,10 @@ class Container:
|
||||
try:
|
||||
subprocess.run(['lxc-wait', '-P', config.CONTAINERS_DIR, '-s', awaited_state.value, '-t', '30', self.name], check=True)
|
||||
except subprocess.CalledProcessError:
|
||||
raise InvalidContainerStateError(self.name, self.get_state())
|
||||
# Sometimes LXC decides to return rc 1 even on successful state change
|
||||
actual_state = self.get_state()
|
||||
if actual_state != awaited_state:
|
||||
raise InvalidContainerStateError(self.name, actual_state)
|
||||
|
||||
def mount_rootfs(self):
|
||||
# Prepares container rootfs
|
||||
|
Loading…
Reference in New Issue
Block a user