-
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
Add query for vmSettings #2293
Add query for vmSettings #2293
Conversation
@jscalev FYI |
@@ -788,29 +788,13 @@ def update_goal_state(self, forced=False): | |||
except Exception as exception: | |||
raise ProtocolError("Error processing goal state: {0}".format(ustr(exception))) | |||
|
|||
def try_update_goal_state(self): |
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.
This was moved to UpdateHandler
@@ -160,8 +159,6 @@ def daemon(self, child_args=None): | |||
# incarnation number. A forced update ensures the most | |||
# current values. | |||
protocol = self.protocol_util.get_protocol() | |||
if type(protocol) is not WireProtocol: |
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.
There used to be 2 protocols: WireProtocol for Azure and MetadataProtocol for Azure Stack. The Metadata protocol was removed some time ago, so this check is no longer needed,
Codecov Report
@@ Coverage Diff @@
## fast-track #2293 +/- ##
==============================================
+ Coverage 70.59% 70.62% +0.03%
==============================================
Files 96 96
Lines 13904 13917 +13
Branches 1986 1986
==============================================
+ Hits 9815 9829 +14
+ Misses 3655 3653 -2
- Partials 434 435 +1
Continue to review full report at Codecov.
|
@@ -352,8 +353,33 @@ def _check_threads_running(self, all_thread_handlers): | |||
logger.warn("{0} thread died, restarting".format(thread_handler.get_thread_name())) | |||
thread_handler.start() | |||
|
|||
def _try_update_goal_state(self, protocol): |
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.
Move from WireClient, but adds a call to protocol.update_extension_goal_state()
@@ -1892,6 +1895,123 @@ def time(self): | |||
return current_time | |||
|
|||
|
|||
class TryUpdateGoalStateTestCase(HttpRequestPredicates, AgentTestCase): |
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.
Moved from test_wire.py, but adds test_it_should_update_the_goal_state
@@ -1205,123 +1204,6 @@ def test_update_goal_state_should_not_persist_the_protected_settings(self): | |||
"Could not find the expected number of redacted settings. Expected {0}.\n{1}".format(len(protected_settings), extensions_config)) | |||
|
|||
|
|||
class TryUpdateGoalStateTestCase(HttpRequestPredicates, AgentTestCase): |
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.
Moved to test_update.py
_HEADER_VERSION: API_VERSION, | ||
_HEADER_CONTAINER_ID: self.container_id, | ||
_HEADER_HOST_CONFIG_NAME: self.role_config_name, | ||
_HEADER_CORRELATION_ID: str(uuid.uuid4()) # TODO: persist correlation ID |
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.
Should trace the correlationId to help with debugging.
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.
yup, that's the "TODO" part
Adds a query to the Host GA Plugin for vmSettings. Moves _try_update_goal_state from WireClient to UpdateHandler.