Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'test' into dev

  • Loading branch information...
commit 1ee13652ad1d4620a72752e1575c5618a7868eb8 2 parents 119a245 + 46b17dc
@Licenser Licenser authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 apps/chunter/src/chunter_vm_fsm.erl
View
14 apps/chunter/src/chunter_vm_fsm.erl
@@ -528,10 +528,18 @@ write_image(Port, UUID, [Idx|R]) ->
port_command(Port, B),
write_image(Port, UUID, R);
-write_image(Port, _UUID, []) ->
- lager:debug("<IMG> done going to wait 2m.", []),
+write_image(Port, UUID, []) ->
+ lager:debug("<IMG> done going to wait for imgamd.", []),
port_close(Port),
- timer:sleep(2*60*1000),
+ Cmd = "zfs list -Hp -t all -r zones/" ++ binary_to_list(UUID),
+ wait_image(0, Cmd).
+
+
+wait_image(N, Cmd) when N < 3 ->
+ timer:sleep(5000),
+ wait_image(length(re:split(os:cmd(Cmd), "\n")), Cmd);
+
+wait_image(_, _) ->
lager:debug("<IMG> done waiting.", []).
-spec zoneadm(ZUUID::fifo:uuid()) -> [{ID::binary(),
Please sign in to comment.
Something went wrong with that request. Please try again.