Skip to content

Commit

Permalink
Use OS Util to get agent conf path
Browse files Browse the repository at this point in the history
  • Loading branch information
maddieford committed Aug 14, 2023
1 parent 25255af commit f7d9a30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azurelinuxagent/ga/exthandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

from azurelinuxagent.common import conf
from azurelinuxagent.common import logger
from azurelinuxagent.common.osutil import get_osutil
from azurelinuxagent.common.utils import fileutil
from azurelinuxagent.common import version
from azurelinuxagent.common.agent_supported_feature import get_agent_supported_features_list_for_extensions, \
Expand Down Expand Up @@ -485,8 +486,9 @@ def handle_ext_handlers(self, goal_state_id):
# back for the skipped extensions. In order to propagate the status back to CRP, we will report status back
# here with an error message.
if not extensions_enabled:
agent_conf_file_path = get_osutil().agent_conf_file_path
msg = "Extension will not be processed since extension processing is disabled. To enable extension " \
"processing, set Extensions.Enabled=y in '/etc/waagent.conf'"
"processing, set Extensions.Enabled=y in '{0}'".format(agent_conf_file_path)
handler_i.set_handler_status(status=ExtHandlerStatusValue.not_ready, message=msg, code=-1)
handler_i.create_status_file_if_not_exist(extension,
status=ExtensionStatusValue.error,
Expand Down

0 comments on commit f7d9a30

Please sign in to comment.