Skip to content
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

lisa uses current directory and does not honor the working path #2901

Open
maddieford opened this issue Aug 15, 2023 · 0 comments
Open

lisa uses current directory and does not honor the working path #2901

maddieford opened this issue Aug 15, 2023 · 0 comments

Comments

@maddieford
Copy link

maddieford commented Aug 15, 2023

Working with @narrieta on waagent test automation.

We hit a bug where Lisa ignores the provided working_path & uses the current directory instead:

/usr/bin/python3 -m lisa
--runbook
--log_path <log_path>
--working_path /home/maddieford/tmp/lisa

...
2023-08-14T23:37:48Z.587 [ERROR] [MainThread] case failed
Traceback (most recent call last):
  File "/home/maddieford/source/repos/lisa/lisa/runners/lisa_runner.py", line 423, in _prepare_environment
    self.platform.prepare_environment(environment)
  File "/home/maddieford/source/repos/lisa/lisa/platform_.py", line 164, in prepare_environment
    is_success = self._prepare_environment(environment, log)
  File "/home/maddieford/source/repos/lisa/lisa/sut_orchestrator/azure/platform_.py", line 503, in _prepare_environment
    caps, error = self._get_matched_capabilities(
  File "/home/maddieford/source/repos/lisa/lisa/sut_orchestrator/azure/platform_.py", line 2296, in _get_matched_capabilities
    candidate_caps, sub_error = self._get_allowed_capabilities(
  File "/home/maddieford/source/repos/lisa/lisa/sut_orchestrator/azure/platform_.py", line 2357, in _get_allowed_capabilities
    location_info = self.get_location_info(location, log)
  File "/home/maddieford/source/repos/lisa/lisa/sut_orchestrator/azure/platform_.py", line 1058, in get_location_info
    with open(cached_file_name, "w") as f:
---->PermissionError: [Errno 13] Permission denied: '/opt/pycharm-2022.1.4/bin/runtime/cache/azure_locations_westus.json'
2023-08-14T23:37:48Z.588 [INFO] [MainThread] 'generated_0' attached to test case 'AgentTestSuite.main(lisa_0_0)': [Errno 13] Permission denied: '**/opt/pycharm-2022.1.4/bin/runtime/cache/azure_locations_westus.json**'
...
Process finished with exit code 1

Updating my pycharm configuration's working directory solved the issue, but this caused some confusion. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant