Fresh run of syntribos after install throws error

Bug #1640850 reported by Rahul U Nair
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
syntribos
Fix Released
Medium
Rahul U Nair

Bug Description

When syntribos is installed in a environment, fresh for the first time and there is no config file, no `.syntribos` directory and no virtual environment, if a user runs `syntribos` , the tool throws an error:

ERROR:syntribos.config:[Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/syntribos/runner.py", line 130, in setup_config
    default_config_files=[ENV.get_default_conf_file()])
  File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 89, in get_default_conf_file
    return get_syntribos_path(FILE)
  File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 84, in get_syntribos_path
    return os.path.abspath(os.path.join(get_syntribos_root(), *args))
  File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 70, in get_syntribos_root
    home_root = get_user_home_root()
  File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 45, in get_user_home_root
    user = os.getlogin() or os.environ.get("USER")
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/syntribos", line 10, in <module>
    sys.exit(entry_point())
  File "/usr/local/lib/python2.7/dist-packages/syntribos/runner.py", line 404, in entry_point
    Runner.run()
  File "/usr/local/lib/python2.7/dist-packages/syntribos/runner.py", line 172, in run
    if CONF.sub_command.name == "init":
  File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 3163, in __getattr__
    return getattr(self._conf._namespace, name)
AttributeError: 'NoneType' object has no attribute 'sub_command'

Changed in syntribos:
assignee: nobody → Rahul U Nair (rahulunair)
importance: Undecided → Medium
Khanak Nangia (knangia)
Changed in syntribos:
status: New → Incomplete
status: Incomplete → Confirmed
Khanak Nangia (knangia)
Changed in syntribos:
status: Confirmed → New
Khanak Nangia (knangia)
Changed in syntribos:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to syntribos (master)

Fix proposed to branch: master
Review: https://review.openstack.org/396367

Changed in syntribos:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to syntribos (master)

Reviewed: https://review.openstack.org/396367
Committed: https://git.openstack.org/cgit/openstack/syntribos/commit/?id=a2f1d7c222ca42dc1043b41a255782101c84557c
Submitter: Jenkins
Branch: master

commit a2f1d7c222ca42dc1043b41a255782101c84557c
Author: Rahul Nair <email address hidden>
Date: Thu Nov 10 13:07:27 2016 -0600

    Fixing a bug due to getlogin() in syntribos

    The bug is due to the fact that sometimes when using os.getlogin(),
    Python is calling the system getlogin() function and returns a strerror
    "No such file or dir", thus failing to get the login name.

    Change-Id: I4156325d7435c69943b2bb736bd1ec7b4d060db4
    Closes-Bug: #1640850

Changed in syntribos:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/syntribos 0.3.0

This issue was fixed in the openstack/syntribos 0.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.