charm build crashes when run with LDAP user

Bug #1752331 reported by Nikolay Nikolaev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Unable to run charm build under LDAP user:

$ charm build -o build src
Traceback (most recent call last):
  File "/snap/charm/114/bin/charm-build", line 11, in <module>
    load_entry_point('charm-tools==2.2.3', 'console_scripts', 'charm-build')()
  File "/snap/charm/114/lib/python2.7/site-packages/charmtools/build/builder.py", line 746, in main
    build.check_paths()
  File "/snap/charm/114/lib/python2.7/site-packages/charmtools/build/builder.py", line 592, in check_paths
    if path_to_check and not self._check_path(path_to_check):
  File "/snap/charm/114/lib/python2.7/site-packages/charmtools/build/builder.py", line 578, in _check_path
    home_dir = utils.get_home()
  File "/snap/charm/114/lib/python2.7/site-packages/charmtools/utils.py", line 606, in get_home
    username = pwd.getpwuid(os.getuid()).pw_name
KeyError: 'getpwuid(): uid not found: 4864'

Indeed this user is not present in /etc/pwd:
$ sudo grep 4864 /etc/passwd || echo "Not found"
Not found

$ getent passwd | grep -o 4864
4864

Revision history for this message
Nikolay Nikolaev (n.nikolaev) wrote :

Fixed as noted in the existing gihub bug:
https://github.com/juju/charm-tools/issues/383

Please close.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Fixed per former comment.

Changed in charm-tools (Ubuntu):
status: New → Fix Released
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.