cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem building OneAgent plugin

Hello,

I'm trying to write a oneagent plugin. What I've done :


  • installed python 3.5
  • pip 9.0.3
  • unzip /usr/local/data/agents/1.151.314.20180920-141612/agent/plugin-sdk/plugin-sdk-1.151.314.20180920-141612.zip
  • installed sdk : pip install oneagent_sdk-1.151.314.20180920.141612-py3-none-any.whl
  • tried to build the plugin (as root)

    • cd examples/demo_oneagent_plugin
    • /opt/rh/rh-python35/root/usr/bin/oneagent_build_plugin --no_upload

The result :

/opt/rh/rh-python35/root/usr/bin/oneagent_build_plugin --no_upload
Arguments=Namespace(no_cert_ver=False, no_restart=False, no_upload=True, source_dir='/tmp/plugin-sdk/examples/demo_oneagent_plugin', target_dir=None, verbose=False)
Starting oneagent_build_plugin
Checking plugin metadata: /tmp/plugin-sdk/examples/demo_oneagent_plugin/plugin.json
Validating plugin.json against schema
Plugin data: Plugin name=custom.python.demo_plugin, version=1.2
Cleaning up previous build information
running bdist_wheel
running build
running build_py
creating build
creating build/lib
copying /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.py -> build/lib
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
copying build/lib/demo_plugin.py -> build/bdist.linux-x86_64/wheel
running install_egg_info
running egg_info
creating /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info
writing /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/PKG-INFO
writing top-level names to /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/top_level.txt
writing dependency_links to /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/dependency_links.txt
writing requirements to /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/requires.txt
writing manifest file '/tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/SOURCES.txt'
reading manifest file '/tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/SOURCES.txt'
writing manifest file '/tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/SOURCES.txt'
Copying /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info to build/bdist.linux-x86_64/wheel/demo_plugin-1.2-py3.5.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/demo_plugin-1.2.dist-info/WHEEL
creating 'dist/demo_plugin-1.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'demo_plugin.py'
adding 'demo_plugin-1.2.dist-info/METADATA'
adding 'demo_plugin-1.2.dist-info/WHEEL'
adding 'demo_plugin-1.2.dist-info/top_level.txt'
adding 'demo_plugin-1.2.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Leaving directory /tmp/tmpereehe53
Created distribution of the plugin: [('bdist_wheel', '3.5', 'dist/demo_plugin-1.2-py3-none-any.whl')]
Installing plugin to temporary location
Requirement 'dist/demo_plugin-1.2-py3-none-any.whl' looks like a filename, but the file does not exist
Processing ./dist/demo_plugin-1.2-py3-none-any.whl
Exception:
Traceback (most recent call last):
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/utils/__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/utils/__init__.py", line 482, in unzip_file
zipfp = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/plugin-sdk/examples/demo_oneagent_plugin/dist/demo_plugin-1.2-py3-none-any.whl'
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Error occured: Failed to install the plugin into temporary location



Have I done sth wrong ?

JP


6 REPLIES 6

Radoslaw_Juchno
Dynatrace Helper
Dynatrace Helper

The issue is known and has already beeen adressed since 155. Additional question - did you use build_plugin command on this particular machine before? Did it work as expected?


This is the first time I use the build_plugin command on this machine.

I'll let you know the results of my tests when I'll get the 155 (is it already out ?).

Regards,

JP


Radoslaw_Juchno
Dynatrace Helper
Dynatrace Helper

Not at the moment. It's should be available at the beginning of the November.


rene_abdon1
Inactive

Hi @Radoslaw J., is there yet a date in November to this 155 version?


Radoslaw_Juchno
Dynatrace Helper
Dynatrace Helper

about 6th of November


Hi, @Radoslaw S. I hope you are fine. Was the 155 released? I facing the same FileNotFoundIssue after pip downgrade to 9.0.3

Regards,

Pablo Silva