summaryrefslogtreecommitdiff
path: root/azurelinuxagent/ga/update.py
diff options
context:
space:
mode:
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>2018-02-15 14:28:59 +0100
committerusd-importer <ubuntu-server@lists.ubuntu.com>2018-02-15 19:08:29 +0000
commit3afbcfff2f6e3faf50c0dffee55e7c48b50755b5 (patch)
tree44d4a5d80868fe6a8defe57f6cc9c21feae59a03 /azurelinuxagent/ga/update.py
parent6c9cd7e1ac55aae259d8e2f06569375e27a12f20 (diff)
parent7e7d885433a2bac56ce2361126bf7ec3d565fd66 (diff)
downloadvyos-walinuxagent-3afbcfff2f6e3faf50c0dffee55e7c48b50755b5.tar.gz
vyos-walinuxagent-3afbcfff2f6e3faf50c0dffee55e7c48b50755b5.zip
Import patches-applied version 2.2.21+really2.2.20-0ubuntu1~16.04.1 to applied/ubuntu/xenial-proposed
Imported using git-ubuntu import. Changelog parent: 6c9cd7e1ac55aae259d8e2f06569375e27a12f20 Unapplied parent: 7e7d885433a2bac56ce2361126bf7ec3d565fd66 New changelog entries: * Backport bionic version to xenial. * Revert to an older upstream release: 2.2.20 (LP: #1749589). - Rename upstream tarball to 2.2.21+really2.2.20 to end up with a temporarily higher version number than what's in the archive. * debian/patches/disable_import_test.patch: refreshed patch.
Diffstat (limited to 'azurelinuxagent/ga/update.py')
-rw-r--r--azurelinuxagent/ga/update.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py
index 2e43031..03d94c3 100644
--- a/azurelinuxagent/ga/update.py
+++ b/azurelinuxagent/ga/update.py
@@ -21,7 +21,6 @@ import glob
import json
import os
import platform
-import random
import re
import shutil
import signal
@@ -45,7 +44,6 @@ from azurelinuxagent.common.event import add_event, add_periodic, \
WALAEventOperation
from azurelinuxagent.common.exception import ProtocolError, \
ResourceGoneError, \
- RestartError, \
UpdateError
from azurelinuxagent.common.future import ustr
from azurelinuxagent.common.osutil import get_osutil
@@ -662,7 +660,7 @@ class UpdateHandler(object):
continue
msg = u"Exception retrieving agent manifests: {0}".format(
- ustr(traceback.format_exc()))
+ ustr(e))
logger.warn(msg)
add_event(
AGENT_NAME,
@@ -729,13 +727,6 @@ class GuestAgent(object):
if isinstance(e, ResourceGoneError):
raise
- # The agent was improperly blacklisting versions due to a timeout
- # encountered while downloading a later version. Errors of type
- # socket.error are IOError, so this should provide sufficient
- # protection against a large class of I/O operation failures.
- if isinstance(e, IOError):
- raise
-
# Note the failure, blacklist the agent if the package downloaded
# - An exception with a downloaded package indicates the package
# is corrupt (e.g., missing the HandlerManifest.json file)
@@ -826,9 +817,7 @@ class GuestAgent(object):
self._load_error()
def _download(self):
- uris_shuffled = self.pkg.uris
- random.shuffle(uris_shuffled)
- for uri in uris_shuffled:
+ for uri in self.pkg.uris:
if not HostPluginProtocol.is_default_channel() and self._fetch(uri.uri):
break