You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/12/08 03:14:17 UTC

[GitHub] csantanapr closed pull request #3074: Don't fail if no Docker containers running

csantanapr closed pull request #3074: Don't fail if no Docker containers running
URL: https://github.com/apache/incubator-openwhisk/pull/3074
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ansible/roles/invoker/tasks/clean.yml b/ansible/roles/invoker/tasks/clean.yml
index 9d519f5e0c..c4e5024b81 100644
--- a/ansible/roles/invoker/tasks/clean.yml
+++ b/ansible/roles/invoker/tasks/clean.yml
@@ -44,8 +44,8 @@
 # Remove inactive files older than 60 minutes
 - name: "Clean orphaned ifstate.veth* files on Ubuntu 14.04"
   shell: |
-    ACTIVE_IFACES_REGEXP=$(ip -oneline link show | grep --only-matching --extended-regexp 'veth[0-9a-f]+' | tr '\n' '|' | sed -e 's/.$//' | xargs -I '{}' /bin/echo '/run/network/ifstate\.({})')
-    find /run/network -regextype posix-egrep \( -not -regex ${ACTIVE_IFACES_REGEXP} \) -and -name 'ifstate.veth*' -and -mmin +60 -delete
-  ignore_errors: True
+    ACTIVE_VETH_IFACES=$(ip -oneline link show | grep --only-matching --extended-regexp 'veth[0-9a-f]+' | tr '\n' '|' | sed -e 's/.$//')
+    EXCLUDE_REGEX=$(if [ -z ${ACTIVE_VETH_IFACES} ]; then echo 'No active veth interfaces found' >&2; else printf '( -not -regex  /run/network/ifstate\.(%s) ) -and ' ${ACTIVE_VETH_IFACES}; fi)
+    find /run/network -regextype posix-egrep ${EXCLUDE_REGEX} -name 'ifstate.veth*' -and -mmin +60 -delete
   become: True
   when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04'


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services