Merge "Open L3 agent ini file as root"

This commit is contained in:
Zuul 2022-07-04 11:26:43 +00:00 committed by Gerrit Code Review
commit b495486272
1 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,8 @@ def get_l3_agent_mode(
LOG.debug(f"Read L3 agent mode from file '{l3_agent_conf_path}' on host "
f" '{connection.hostname}'...")
with sh.open_file(l3_agent_conf_path, 'rt',
connection=connection) as fd:
connection=connection,
sudo=True) as fd:
LOG.debug(f"Parse ini file '{l3_agent_conf_path}'...")
content = tobiko.parse_ini_file(fd)
try: