-
Notifications
You must be signed in to change notification settings - Fork 371
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
Implementation of new conf flag AutoUpdate.UpdateToLatestVersion support #3027
Changes from 1 commit
adb897c
d214aa5
8982384
fd34c0c
68ac618
4b94769
5c0f4d2
5261a63
6d6ccd5
41fbdc3
b526bda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -128,6 +128,7 @@ def load_conf_from_file(conf_file_path, conf=__conf__): | |||||
"ResourceDisk.EnableSwap": False, | ||||||
"ResourceDisk.EnableSwapEncryption": False, | ||||||
"AutoUpdate.Enabled": True, | ||||||
"AutoUpdate.UpdateToLatestVersion": True, | ||||||
"EnableOverProvisioning": True, | ||||||
# | ||||||
# "Debug" options are experimental and may be removed in later | ||||||
|
@@ -136,7 +137,6 @@ def load_conf_from_file(conf_file_path, conf=__conf__): | |||||
"Debug.CgroupLogMetrics": False, | ||||||
"Debug.CgroupDisableOnProcessCheckFailure": True, | ||||||
"Debug.CgroupDisableOnQuotaCheckFailure": True, | ||||||
"Debug.DownloadNewAgents": True, | ||||||
"Debug.EnableAgentMemoryUsageCheck": False, | ||||||
"Debug.EnableFastTrack": True, | ||||||
"Debug.EnableGAVersioning": True | ||||||
|
@@ -503,15 +503,14 @@ def get_monitor_network_configuration_changes(conf=__conf__): | |||||
return conf.get_switch("Monitor.NetworkConfigurationChanges", False) | ||||||
|
||||||
|
||||||
def get_download_new_agents(conf=__conf__): | ||||||
def get_agent_update_to_latest_version(conf=__conf__): | ||||||
""" | ||||||
If True, the agent go through update logic to look for new agents to download otherwise it will stop agent updates. | ||||||
NOTE: AutoUpdate.Enabled controls whether the Agent downloads new update and also whether any downloaded updates are started or not, while DownloadNewAgents controls only the former. | ||||||
AutoUpdate.Enabled == false -> Agent preinstalled on the image will process extensions and will not update (regardless of DownloadNewAgents flag) | ||||||
AutoUpdate.Enabled == true and DownloadNewAgents == true, any update already downloaded will be started, and agent look for future updates | ||||||
AutoUpdate.Enabled == true and DownloadNewAgents == false, any update already downloaded will be started, but the agent will not look for future updates | ||||||
If set to True, agent will update to the latest version | ||||||
NOTE: | ||||||
when turned on, both AutoEnabled.Enabled and UpdateToLatestVersion same meaning: update to latest version | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
when turned off, AutoEnabled.Enabled: reverts to pre-installed agent, UpdateToLatestVersion: uses latest version installed on the vm | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
""" | ||||||
return conf.get_switch("Debug.DownloadNewAgents", True) | ||||||
return conf.get_switch("AutoUpdate.UpdateToLatestVersion", True) | ||||||
|
||||||
|
||||||
def get_cgroup_check_period(conf=__conf__): | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,8 +75,15 @@ OS.OpensslPath=None | |
OS.SshDir=/etc/ssh | ||
|
||
# Enable or disable goal state processing auto-update, default is enabled | ||
# When turned off, it reverts to the pre-installed agent that comes with image | ||
# Added new option AutoUpdate.UpdateToLatestVersion, and encourage users to transition to this new option | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once we know release #, i think it may be helpful to add which release added support for AutoUpdate.UpdateToLatestVersion. Also maybe we can mention why we encourage users to transition to this new option (for example, if you revert to pre-installed agent you lose many bug fixes, etc.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup, adding wiki link. That has all other details. |
||
# However, this flag is retained for legacy reasons | ||
# AutoUpdate.Enabled=y | ||
|
||
# Enable or disable goal state processing auto-update, default is enabled | ||
# When turned off, it remains on latest version installed on the vm | ||
# AutoUpdate.UpdateToLatestVersion=y | ||
|
||
# Determine the update family, this should not be changed | ||
# AutoUpdate.GAFamily=Prod | ||
|
||
|
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.
we should add unit tests that codify these rules: use all combinations of y/n/absent for both flags and check the return value of UpdateToLatestVersion
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.
addressed