Skip to content

Commit a6cf994

Browse files
saketu-awsHelen1987
authored andcommitted
[OPS] Ignore unzip warnings
Prior to this change, we had an agent release where customers were getting unzip errors. This change ignores that warning to mitigate that issue. * Unit Tests : [N] * Integration Tests : [N] * Was waiting on customer to test this fix, but have not got a response and since we're disabling auto update, we are plannning to use this fix. * Have manually tested this agent on an ubuntu and amazon linux box. Tracking SIM: https://sim.amazon.com/issues/ca7829c6-ec2e-48fd-8473-b23cfa9d09e5 cr https://code.amazon.com/reviews/CR-11628838
1 parent ec39004 commit a6cf994

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lib/instance_agent/platform/linux_util.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,22 @@ def self.execute_zip_command(cmd)
133133
log(:debug, "Command status: #{$?}")
134134
log(:debug, "Command output: #{output}")
135135

136-
if exit_status != 0
136+
if !validZipExitStatus(exit_status)
137137
msg = "Error extracting zip archive: #{exit_status}"
138138
log(:error, msg)
139139
raise msg
140140
end
141-
end
141+
end
142+
143+
private
144+
def self.validZipExitStatus(exit_status)
145+
exit_status == 0 || isWarningStatus(exit_status)
146+
end
147+
148+
private
149+
def self.isWarningStatus(exit_status)
150+
exit_status == 1
151+
end
142152

143153
private
144154
def self.log(severity, message)

0 commit comments

Comments
 (0)