-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix logging for HostGA plugin retry logic #1655
Conversation
Codecov Report
@@ Coverage Diff @@
## release-2.2.43 #1655 +/- ##
=================================================
Coverage ? 66.58%
=================================================
Files ? 80
Lines ? 11198
Branches ? 1571
=================================================
Hits ? 7456
Misses ? 3412
Partials ? 330
Continue to review full report at Codecov.
|
@@ -1080,7 +1080,6 @@ def send_request_using_appropriate_channel(self, direct_func, host_func): | |||
log_event=False) | |||
raise | |||
|
|||
logger.info("Request succeeded using the host plugin channel.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this verbose maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but seeing that our approach for everything else is to log only in case of failures, it didn't make sense to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The restutil
class actually already reports HTTP response codes to the verbose log:
2019/10/03 14:19:03.577846 INFO ExtHandler Using host plugin as default channel
2019/10/03 14:19:03.577928 VERBOSE ExtHandler Fetch [http://168.63.129.16:32526/extensionArtifact] with headers [{'x-ms-containerid': u'7046131f-09e6-49a7-94d0-046fecde7b31', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'2168188a-b556-4cbe-bd34-0c2ee61b05c9.0.2168188a-b556-4cbe-bd34-0c2ee61b05c9.0._Publisher-8.1.0.195.1.xml', 'x-ms-artifact-location': u'https://md-rbpdn51z1wb2.blob.core.windows.net/$system/Publisher-8.1.0.195.4c6f8a03-61a5-49b8-ad66-b2aeb63ad93f.vmSettings?sv=2017-04-17&sr=b&sk=system-1&sig=K%2bbjPdHEKIq8oZ6U6tzbW2S4UxSgnD3g0s6uunZ865Q%3d&se=9999-01-01T00%3a00%3a00Z&sp=r'}]
2019/10/03 14:19:03.578215 VERBOSE ExtHandler HTTP connection [GET] [/extensionArtifact] [None] [{'x-ms-containerid': u'7046131f-09e6-49a7-94d0-046fecde7b31', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'2168188a-b556-4cbe-bd34-0c2ee61b05c9.0.2168188a-b556-4cbe-bd34-0c2ee61b05c9.0._Publisher-8.1.0.195.1.xml', 'x-ms-artifact-location': u'https://md-rbpdn51z1wb2.blob.core.windows.net/$system/Publisher-8.1.0.195.4c6f8a03-61a5-49b8-ad66-b2aeb63ad93f.vmSettings?sv=2017-04-17&sr=b&sk=system-1&sig=K%2bbjPdHEKIq8oZ6U6tzbW2S4UxSgnD3g0s6uunZ865Q%3d&se=9999-01-01T00%3a00%3a00Z&sp=r', 'User-Agent': 'WALinuxAgent/2.2.43', 'Connection': 'close'}]
2019/10/03 14:19:03.589926 VERBOSE ExtHandler [HTTP Response] Status Code 200
2019/10/03 14:19:03.590171 INFO ExtHandler Request succeeded using the host plugin channel.
Since we already have [HTTP Response] Status Code 200
the next message is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment else LGTM
Description
Change info to periodic, otherwise it will show up every 3 seconds.
Remove successful log message since it's too frequent and we don't usually log successes, only failures.
Issue #1653
PR information
Quality of Code and Contribution Guidelines
This change is