diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-09-12 18:44:19 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-09-12 18:44:19 +0000 |
commit | c75c582ed1824dc3ff39cefdbddccfc2924b868c (patch) | |
tree | 18c6243665e28d029fde5b143cf28010cf6db92e /cloudinit/sources/helpers/openstack.py | |
parent | c7555762f3a30190ce7726b4d013bc3e83c7e4b6 (diff) | |
download | vyos-cloud-init-c75c582ed1824dc3ff39cefdbddccfc2924b868c.tar.gz vyos-cloud-init-c75c582ed1824dc3ff39cefdbddccfc2924b868c.zip |
OpenStack: fix bug causing 'latest' version to be used from network.
Cloud-init was reading a list of versions from the OpenStack metadata
service (http://169.254.169.254/openstack/) and attempt to select the
newest known supported version. The problem was that the list
of versions was not being decoded, so we were comparing a list of
bytes (found versions) to a list of strings (known versions).
LP: #1792157
Diffstat (limited to 'cloudinit/sources/helpers/openstack.py')
-rw-r--r-- | cloudinit/sources/helpers/openstack.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py index 8f9c1441..e3d372b6 100644 --- a/cloudinit/sources/helpers/openstack.py +++ b/cloudinit/sources/helpers/openstack.py @@ -439,7 +439,7 @@ class MetadataReader(BaseReader): return self._versions found = [] version_path = self._path_join(self.base_path, "openstack") - content = self._path_read(version_path) + content = self._path_read(version_path, decode=True) for line in content.splitlines(): line = line.strip() if not line: |