Skip to content
Browse files

CA-74932: Network reset: ensure networkd is not running before cleari…

…ng its state file

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
  • Loading branch information...
1 parent 731a057 commit ec52a298e988922424a18c085da90948097d4e61 @robhoes robhoes committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 scripts/xe-reset-networking
View
4 scripts/xe-reset-networking
@@ -168,7 +168,9 @@ Type 'no' to cancel.
if_args += ' --gateway=' + options.gateway
os.system(interface_reconfigure + if_args + ' >/dev/null 2>/dev/null')
else:
- os.remove('@VARDIR@/networkd.db')
+ os.system('service xcp-network stop >/dev/null 2>/dev/null')
+ try: os.remove('@VARDIR@/networkd.db')
+ except: pass
# Update interfaces in inventory file
print 'Updating inventory file...'

0 comments on commit ec52a29

Please sign in to comment.
Something went wrong with that request. Please try again.