provisioning, and VM interaction with the Azure Fabric Controller. OpenBSD is supported by upstream since version 2.2.13. OK sthen@
57 lines
2.5 KiB
Plaintext
57 lines
2.5 KiB
Plaintext
$OpenBSD: patch-azurelinuxagent_ga_update_py,v 1.1.1.1 2017/06/23 12:37:09 reyk Exp $
|
|
|
|
from https://github.com/reyk/WALinuxAgent/commit/b9afe9fb4e0e6b984856c56811c41f44625b410f.patch
|
|
|
|
Index: azurelinuxagent/ga/update.py
|
|
--- azurelinuxagent/ga/update.py.orig
|
|
+++ azurelinuxagent/ga/update.py
|
|
@@ -238,9 +238,10 @@ class UpdateHandler(object):
|
|
from azurelinuxagent.ga.env import get_env_handler
|
|
get_env_handler().run()
|
|
|
|
- from azurelinuxagent.ga.exthandlers import get_exthandlers_handler, migrate_handler_state
|
|
- exthandlers_handler = get_exthandlers_handler()
|
|
- migrate_handler_state()
|
|
+ if conf.get_ext_enabled():
|
|
+ from azurelinuxagent.ga.exthandlers import get_exthandlers_handler, migrate_handler_state
|
|
+ exthandlers_handler = get_exthandlers_handler()
|
|
+ migrate_handler_state()
|
|
|
|
try:
|
|
send_event_time = datetime.utcnow()
|
|
@@ -263,20 +264,20 @@ class UpdateHandler(object):
|
|
|
|
utc_start = datetime.utcnow()
|
|
|
|
- last_etag = exthandlers_handler.last_etag
|
|
- exthandlers_handler.run()
|
|
-
|
|
- log_event = last_etag != exthandlers_handler.last_etag or \
|
|
- (datetime.utcnow() >= send_event_time)
|
|
- add_event(
|
|
- AGENT_NAME,
|
|
- version=CURRENT_VERSION,
|
|
- op=WALAEventOperation.ProcessGoalState,
|
|
- is_success=True,
|
|
- duration=elapsed_milliseconds(utc_start),
|
|
- log_event=log_event)
|
|
- if log_event:
|
|
- send_event_time += timedelta(minutes=REPORT_STATUS_INTERVAL)
|
|
+ if conf.get_ext_enabled():
|
|
+ last_etag = exthandlers_handler.last_etag
|
|
+ exthandlers_handler.run()
|
|
+ log_event = last_etag != exthandlers_handler.last_etag or \
|
|
+ (datetime.utcnow() >= send_event_time)
|
|
+ add_event(
|
|
+ AGENT_NAME,
|
|
+ version=CURRENT_VERSION,
|
|
+ op=WALAEventOperation.ProcessGoalState,
|
|
+ is_success=True,
|
|
+ duration=elapsed_milliseconds(utc_start),
|
|
+ log_event=log_event)
|
|
+ if log_event:
|
|
+ send_event_time += timedelta(minutes=REPORT_STATUS_INTERVAL)
|
|
|
|
test_agent = self.get_test_agent()
|
|
if test_agent is not None and test_agent.in_slice:
|