Commit 9b158c4f authored by Bastian Blank's avatar Bastian Blank

Make tests running with current bash

parent 565d75b1
cloud-init (18.3-5) UNRELEASED; urgency=medium
* Make tests running with current bash.
-- Bastian Blank <waldi@debian.org> Fri, 08 Feb 2019 14:46:29 +0100
cloud-init (18.3-4) unstable; urgency=medium
* Remove debconf setup of data source.
......
From: Chad Smith <chad.smith@canonical.com>
Date: Mon, 28 Jan 2019 20:07:03 +0000
Subject: opennebula: also exclude epochseconds from changed environment vars
In addition to EPOCHREALTIME there is also an EPOCHSECONDS environment
variable that OpenNebula needs to exclude as it is expected to change.
This commit supplements the other exclusion in commit
d1a2fe7307e9cf2251d1f9a666c12d71d3f522d6.
Without this fix, unittests will intermittently fail if
parse_shell_config is run across a timing boundary where the
EPOCHSECONDS changes mid-test.
LP: #1813641
---
cloudinit/sources/DataSourceOpenNebula.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py
index 16c1078..1e56a78 100644
--- a/cloudinit/sources/DataSourceOpenNebula.py
+++ b/cloudinit/sources/DataSourceOpenNebula.py
@@ -329,7 +329,9 @@ def parse_shell_config(content, keylist=None, bash=None, asuser=None,
(output, _error) = util.subp(cmd, data=bcmd)
# exclude vars in bash that change on their own or that we used
- excluded = ("RANDOM", "LINENO", "SECONDS", "_", "__v")
+ excluded = (
+ "EPOCHREALTIME", "EPOCHSECONDS", "RANDOM", "LINENO", "SECONDS", "_",
+ "__v")
preset = {}
ret = {}
target = None
......@@ -5,3 +5,4 @@
0012-Fix-message-when-a-local-is-missing.patch
fix-sysvinit-dependencies.patch
cloud-init-before-chronyd.patch
0008-opennebula-also-exclude-epochseconds-from-changed-en.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment