summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceRbxCloud.py
diff options
context:
space:
mode:
authorAdam Dobrawy <ad-m@users.noreply.github.com>2020-03-31 19:37:12 +0200
committerGitHub <noreply@github.com>2020-03-31 13:37:12 -0400
commited350acb7a941ef16b2f9e19b223b58901e6b431 (patch)
tree738f08e7c9881243d599a885ec26c26819258f8f /cloudinit/sources/DataSourceRbxCloud.py
parentd00126c167fc06d913d99cfc184bf3402cb8cf53 (diff)
downloadvyos-cloud-init-ed350acb7a941ef16b2f9e19b223b58901e6b431.tar.gz
vyos-cloud-init-ed350acb7a941ef16b2f9e19b223b58901e6b431.zip
rbxcloud: gracefully handle arping errors (#262)
Diffstat (limited to 'cloudinit/sources/DataSourceRbxCloud.py')
-rw-r--r--cloudinit/sources/DataSourceRbxCloud.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceRbxCloud.py b/cloudinit/sources/DataSourceRbxCloud.py
index c3cd5c79..084cb7d5 100644
--- a/cloudinit/sources/DataSourceRbxCloud.py
+++ b/cloudinit/sources/DataSourceRbxCloud.py
@@ -55,11 +55,18 @@ def gratuitous_arp(items, distro):
if distro.name in ['fedora', 'centos', 'rhel']:
source_param = '-s'
for item in items:
- _sub_arp([
- '-c', '2',
- source_param, item['source'],
- item['destination']
- ])
+ try:
+ _sub_arp([
+ '-c', '2',
+ source_param, item['source'],
+ item['destination']
+ ])
+ except util.ProcessExecutionError as error:
+ # warning, because the system is able to function properly
+ # despite no success - some ARP table may be waiting for
+ # expiration, but the system may continue
+ LOG.warning('Failed to arping from "%s" to "%s": %s',
+ item['source'], item['destination'], error)
def get_md():