You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/09/11 12:01:37 UTC
[incubator-dlab] branch DLAB-1864 updated: [DLAB-1864]: changed
when instance is rebooted after partprobe in prepare_disk function
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1864
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1864 by this push:
new d87160b [DLAB-1864]: changed when instance is rebooted after partprobe in prepare_disk function
d87160b is described below
commit d87160bf3f51441bf7bae5e84c523aeb4fd46aa1
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Sep 11 15:01:21 2020 +0300
[DLAB-1864]: changed when instance is rebooted after partprobe in prepare_disk function
---
infrastructure-provisioning/src/general/lib/azure/actions_lib.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
index ebb0112..ea7b262 100644
--- a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
@@ -1238,9 +1238,9 @@ def prepare_disk(os_user):
if 'Syncing disks' in out:
allow = True
elif 'The kernel still uses the old table.' in out:
- sudo('partprobe')
- #with settings(warn_only=True):
- reboot(wait=180)
+ if sudo('partprobe'):
+ with settings(warn_only=True):
+ reboot(wait=180)
allow = True
else:
counter += 1
@@ -1252,6 +1252,7 @@ def prepare_disk(os_user):
disk_name))
sudo('touch /home/' + os_user + '/.ensure_dir/disk_ensured')
except Exception as err:
+ traceback.print_exc()
print('Error:', str(err))
sys.exit(1)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org