-
Notifications
You must be signed in to change notification settings - Fork 195
Conversation
9859b3c
to
a2a3c04
Compare
integration/swarm/swarm.bats
Outdated
if [ "$replicas_running" -ge "$number_of_replicas" ]; then | ||
break; | ||
fi | ||
sleep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing operand
integration/swarm/swarm.bats
Outdated
if [ "$replicas_running" -ge "$number_of_replicas" ]; then | ||
break; | ||
fi | ||
sleep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing value on sleep?
integration/swarm/swarm.bats
Outdated
teardown() { | ||
docker service remove "${SERVICE_NAME}" | ||
docker swarm leave --force | ||
check_processes ${SHIM_PATH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also check for qemu and proxy processes?
--name "${SERVICE_NAME}" --replicas $number_of_replicas \ | ||
--publish 8080:80 "${nginx_image}" sh -c "$nginx_command" | ||
running_regex='Running\s+\d+\s(seconds|minutes)\s+ago' | ||
for i in $(seq "$timeout") ; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should check the $i
value inside the loop to see if we have reached the timeout and if so, return 1?
integration/swarm/swarm.bats
Outdated
running_regex='Running\s+\d+\s(seconds|minutes)\s+ago' | ||
for i in $(seq "$timeout") ; do | ||
docker service ls --filter name="$SERVICE_NAME" | ||
replicas_running=$(docker service ps "$SERVICE_NAME" | grep -P "${running_regex}" | wc -l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use grep -c -P "${running_regex}"
and remove wc -l
76c82d4
to
2ba737e
Compare
@chavafg the ci is failing with the following error .ci/teardown.sh "$WORKSPACE" Any idea? |
@jodh-intel thanks :) |
I think that is not the root cause, above you can see:
|
maybe because of: kata-containers/osbuilder#63 ? |
Yes - that does look like an issue. @erick0z - could you take a look? |
testing locally, the old
So I can change the name of the directory, but as we will test more distros in the future I am not sure what will be the best option here. |
@chavafg @jodh-intel Let me take a look! |
Good catch @chavafg! Now that the mega PR in osbuilder has landed, it looks like we can change the rootfs directory name by just setting |
@jodh-intel, seems like it will need to be an absolute path, and after I changed to
I am still getting the error. Seems like the |
@chavafg The latest changes introduced to the osbuilder repo changes the resulting rootfs directory name, so the Have you tried the following? Other option is, when building the rootfs: |
@jodh-intel thanks for the help and @chavafg thanks for solving the issue with the CI, the problem was solved |
@chavafg changes applied |
This will enable basic swarm tests. Fixes kata-containers#198 Signed-off-by: Gabriela Cervantes <[email protected]>
if [ "$replicas_running" -ge "$number_of_replicas" ]; then | ||
break | ||
fi | ||
sleep 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add below something like:
[ "$i" == "$timeout" ] && return 1
which would mean that we are reaching the timeout and no replicas were running, then we need to fail.
74fec7c
to
3cef92a
Compare
@chavafg changes applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This will enable basic swarm tests.
Fixes #198
Signed-off-by: Gabriela Cervantes [email protected]