Skip to content

Commit f9edc65

Browse files
committed
AzureLinux Strict SDP support: Resolving merge conflicts
2 parents f27c3e3 + 651c97b commit f9edc65

7 files changed

Lines changed: 9 additions & 10 deletions

File tree

src/core/src/bootstrap/Constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __iter__(self):
3131
UNKNOWN = "Unknown"
3232

3333
# Extension version (todo: move to a different file)
34-
EXT_VERSION = "1.6.60"
34+
EXT_VERSION = "1.6.62"
3535

3636
# Runtime environments
3737
TEST = 'Test'

src/core/src/bootstrap/EnvLayer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ def get_env_var(self, var_name, raise_if_not_success=False):
135135
print("Error occurred while getting environment variable [Variable={0}][Exception={1}]".format(str(var_name), repr(error)))
136136
if raise_if_not_success:
137137
raise
138+
return None
138139

139-
def run_command_output(self, cmd, no_output, chk_err=True):
140+
def run_command_output(self, cmd, no_output=False, chk_err=True):
140141
# type: (str, bool, bool) -> (int, any)
141142
""" Wrapper for subprocess.check_output. Execute 'cmd'. Returns return code and STDOUT, trapping expected exceptions. Reports exceptions to Error if chk_err parameter is True """
142143

@@ -185,7 +186,7 @@ def __str__(self):
185186
output = subprocess.check_output(no_output, cmd, stderr=subprocess.STDOUT, shell=True)
186187
except subprocess.CalledProcessError as e:
187188
if chk_err:
188-
print("Error: CalledProcessError. [Code={0}][Command={1}][Result={2}]".format(str(e.returncode), e.cmd, self.__convert_process_output_to_ascii(e.output[:-1])), file=sys.stdout)
189+
print("Error: CalledProcessError. [Code={0}][Command={1}][Result={2}]".format(str(e.return_code), e.cmd, self.__convert_process_output_to_ascii(e.output[:-1])), file=sys.stdout)
189190
if no_output:
190191
return e.return_code, None
191192
else:

src/core/src/core_logic/RebootManager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def __start_reboot(self, message="Azure VM Guest Patching initiated a reboot as
142142

143143
# Keep logging to indicate machine hasn't rebooted yet. If successful, this will be the last log we see from this process.
144144
if elapsed_time_in_minutes < max_allowable_time_to_reboot_in_minutes:
145-
self.__reboot_wait_pulse(int(elapsed_time_in_minutes), int(max_allowable_time_to_reboot_in_minutes),
146-
maintenance_window_allowable_limit_remaining_in_minutes = int(maintenance_window_available_time_in_minutes - elapsed_time_in_minutes))
145+
self.__reboot_wait_pulse(elapsed_time_in_minutes = int(elapsed_time_in_minutes), max_allowable_time_to_reboot_in_minutes = int(max_allowable_time_to_reboot_in_minutes),
146+
maintenance_window_allowable_limit_remaining = int(maintenance_window_available_time_in_minutes - elapsed_time_in_minutes))
147147
continue
148148

149149
# If we get here, the machine has not rebooted in the time we expected. We need to fail the operation.

src/core/tests/Test_Bootstrapper.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929

3030
class TestBootstrapper(unittest.TestCase):
31-
# def __init__(self, methodName: str = "runTest"):
32-
# super().__init__(methodName)
3331

3432
def setUp(self):
3533
self.sudo_check_status_attempts = 0

src/extension/src/Constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __iter__(self):
2828
yield item
2929

3030
# Extension version (todo: move to a different file)
31-
EXT_VERSION = "1.6.60"
31+
EXT_VERSION = "1.6.62"
3232

3333
# Runtime environments
3434
TEST = 'Test'

src/extension/src/EnvLayer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __str__(self):
9797
no_output, cmd, stderr=subprocess.STDOUT, shell=True)
9898
except subprocess.CalledProcessError as e:
9999
if chk_err:
100-
print("Error: CalledProcessError. Error Code is: " + str(e.returncode), file=sys.stdout)
100+
print("Error: CalledProcessError. Error Code is: " + str(e.return_code), file=sys.stdout)
101101
print("Error: CalledProcessError. Command string was: " + e.cmd, file=sys.stdout)
102102
print("Error: CalledProcessError. Command result was: " + self.__convert_process_output_to_ascii(e.output[:-1]), file=sys.stdout)
103103
if no_output:

src/extension/src/manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ExtensionImage xmlns="http://schemas.microsoft.com/windowsazure">
33
<ProviderNameSpace>Microsoft.CPlat.Core</ProviderNameSpace>
44
<Type>LinuxPatchExtension</Type>
5-
<Version>1.6.60</Version>
5+
<Version>1.6.62</Version>
66
<Label>Microsoft Azure VM InGuest Patch Extension for Linux Virtual Machines</Label>
77
<HostingResources>VmRole</HostingResources>
88
<MediaLink></MediaLink>

0 commit comments

Comments
 (0)