Git Product home page Git Product logo

python-vnfm-sdk's Issues

Not able to run as non-root. /var/log/openbaton Permission Denied!

The error

When running a VNFM implemented with the SDK, the following error occurs if you run as a regular user:

Traceback (most recent call last):
File "/vagrant/openiotfog-vnfm/oif_vnfm/main.py", line 41, in
main()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/vagrant/openiotfog-vnfm/oif_vnfm/main.py", line 37, in main
start_vnfm_instances(OIFVNFManager, config_file, 5)
File "/usr/local/lib/python3.5/dist-packages/openbaton/vnfm.py", line 673, in start_vnfm_instances
l = VnfmListener(vnfm_klass, config_file_path, kwargs)
File "/usr/local/lib/python3.5/dist-packages/openbaton/vnfm.py", line 83, in init
os.makedirs(logging_dir)
File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/log/openbaton/'

Process finished with exit code 1

Workaraound

If we create the following directory and give the user permissions to write, the error is gone.

Expected behaviour

If the user have no permission to setup the log in /var/log, the log should be created locally, in the users Home and a warning log message shown to let him know that the log is not in the default location.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.