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

SSMT WorkItem should not allow to have COMPS_log.log and idmtools.log in transient_assets #1561

Open
shchen-idmod opened this issue May 16, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@shchen-idmod
Copy link
Collaborator

repro steps:
in this example:
https://github.com/InstituteforDiseaseModeling/idmtools/tree/master/examples/ssmt/more_mutiple_analyzers

  1. first go to dir "analyzers" to run analyzer locally(this is common step to test if analyzer works locally). this step will generate 2 logs-- COMPS_log,log and idmtools.log
  2. go to upper dir, and go to dir: https://github.com/InstituteforDiseaseModeling/idmtools/blob/master/examples/ssmt/more_mutiple_analyzers/multiple_analyzers_with_SSMTWorkItem.py, then change this line:
    wi = SSMTWorkItem(name=os.path.split(sys.argv[0])[1], command=command, assets=AssetCollection.from_directory("analyzers"))

    from assets to transient_assets.
  3. run the script.
    got error at bottem lines:
    https://comps.idmod.org/#explore/WorkItems?filters=Id=63ea8319-82b6-eb11-a2e3-c4346bcb7275&offset=0&count=80&related=true&selectedId=63ea8319-82b6-eb11-a2e3-c4346bcb7275&layout=502C50
  4. if remove 2 logs under 'analyzers' dir, every works.

This error is hard to debug from comps stderr.txt. but user could easily get into this situation by running analyzer locally first(it will generate these 2 logs), then load everything from local dir which may include these 2 log files to ssmt with transitent_assets
and SSMTWorkItem

Traceback (most recent call last):
  File "analyzer_file.py", line 47, in <module>
    platform = Platform('BELEGOST')
  File "/usr/local/lib/python3.6/dist-packages/idmtools/core/platform_factory.py", line 64, in __new__
    cls._platforms = PlatformPlugins().get_plugin_map()
  File "/usr/local/lib/python3.6/dist-packages/idmtools/registry/platform_specification.py", line 86, in __init__
    load_plugin_map('idmtools_platform', PlatformSpecification, strip_all))
  File "/usr/local/lib/python3.6/dist-packages/idmtools/registry/utils.py", line 49, in load_plugin_map
    plugins = plugins_loader(entrypoint, spec_type)
  File "/usr/local/lib/python3.6/dist-packages/idmtools/registry/utils.py", line 77, in plugins_loader
    manager.load_setuptools_entrypoints(entry_points_name)
  File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/local/lib/python3.6/dist-packages/importlib_metadata/__init__.py", line 100, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.6/dist-packages/idmtools_platform_comps/__init__.py", line 2, in <module>
    from idmtools_platform_comps.plugin_info import COMPSPlatformSpecification
  File "/usr/local/lib/python3.6/dist-packages/idmtools_platform_comps/plugin_info.py", line 6, in <module>
    from idmtools_platform_comps.comps_platform import COMPSPlatform
  File "/usr/local/lib/python3.6/dist-packages/idmtools_platform_comps/comps_platform.py", line 10, in <module>
    from COMPS import Client
  File "/usr/local/lib/python3.6/dist-packages/COMPS/__init__.py", line 9, in <module>
    logging.config.fileConfig(os.path.join(current_dir,'logging.ini'), disable_existing_loggers=False)
  File "/usr/lib/python3.6/logging/config.py", line 84, in fileConfig
    handlers = _install_handlers(cp, formatters)
  File "/usr/lib/python3.6/logging/config.py", line 148, in _install_handlers
    h = klass(*args)
  File "/usr/lib/python3.6/logging/__init__.py", line 1032, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.6/logging/__init__.py", line 1061, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
OSError: [Errno 95] Operation not supported: '/data/Home/shchen/workitems/63e/a83/198/63ea8319-82b6-eb11-a2e3-c4346bcb7275/COMPS_log.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant