Skip to content
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

NSG improvements #638

Merged
merged 2 commits into from
Mar 31, 2017
Merged

NSG improvements #638

merged 2 commits into from
Mar 31, 2017

Conversation

hglkrijger
Copy link
Member

/cc @brendandixon @jinhyunr

return HostPluginProtocol._is_default_channel

@staticmethod
def set_default_channel(is_default):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to set this to True all the time(other than UT cases), do we need the argument?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at the moment, but we do need it for UTs, and we may want to switch this flag off in the future.

body = remove_bom(response.read())
if body is None:
return ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change loses the status / reason when the body is absent. Do we want that? It seems they may be useful for other errors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will update

@@ -649,6 +657,9 @@ def fetch_manifest(self, version_uris):
else:
host.manifest_uri = version.uri
logger.verbose("Manifest downloaded successfully from host plugin")
if not HostPluginProtocol.is_default_channel():
logger.info("Setting host plugin as default channel")
HostPluginProtocol.set_default_channel(True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to push this into the HostPluginProtocol: It should become the default channel any time it is used and succeeds. Once default, it stays default, even if subsequent errors occur.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok for get_versions and put_vm_log (which we are not using yet) but the complication is that we use a common _fetch or _download outside of host plugin and simply update the url with the get_artifact_request call. At the moment that is the primary scenario too, so we cannot reliably detect host plugin usage from within HostPluginProtocol.

@hglkrijger hglkrijger merged commit 94f3ad3 into Azure:master Mar 31, 2017
@hglkrijger hglkrijger deleted the nsg-improvements branch March 31, 2017 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants