Missing initial manifest returns into traceback #126
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: ungleich-public/cdist#126
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: telmich
Clearly, we should only output the error message, not a traceback
`[9:48] manager:~% cdist config -vvbj6 -p6 router1.place6.ungleich.ch router2.place6.ungleich.ch
VERBOSE: cdist: version 4.8.0-18-g44673131
WARNING: [26854]: router2.place6.ungleich.ch: Could not derive host_name for router2.place6.ungleich.ch, $host_name will be empty. Error is: [Errno 1] Unknown host
WARNING: [26853]: router1.place6.ungleich.ch: Could not derive host_name for router1.place6.ungleich.ch, $host_name will be empty. Error is: [Errno 1] Unknown host
INFO: [26853]: router1.place6.ungleich.ch: Starting configuration run
INFO: [26854]: router2.place6.ungleich.ch: Starting configuration run
VERBOSE: [26854]: router2.place6.ungleich.ch: Running global explorers
VERBOSE: [26853]: router1.place6.ungleich.ch: Running global explorers
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/nico/vcs/cdist/cdist/config.py", line 431, in run
self.manifest.run_initial_manifest(self.local.initial_manifest)
File "/home/nico/vcs/cdist/cdist/core/manifest.py", line 152, in run_initial_manifest
raise NoInitialManifestError(initial_manifest, user_supplied)
cdist.core.manifest.NoInitialManifestError: 'Initial manifest missing: /tmp/tmp00grz_78/f9e7b5d8cf331963f92e3dc240158fb4/data/conf/manifest/init'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nico/vcs/cdist/cdist/config.py", line 391, in onehost
c.run()
File "/home/nico/vcs/cdist/cdist/config.py", line 436, in run
stderr_path, e)
cdist.InitialManifestError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/nico/vcs/cdist/cdist/config.py", line 395, in onehost
log.error(e)
File "/usr/lib/python3.6/logging/init.py", line 1335, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python3.6/logging/init.py", line 1442, in _log
self.handle(record)
File "/usr/lib/python3.6/logging/init.py", line 1451, in handle
if (not self.disabled) and self.filter(record):
File "/home/nico/vcs/cdist/cdist/log.py", line 87, in filter
record.msg = self.name + ": " + str(record.msg)
File "/home/nico/vcs/cdist/cdist/init.py", line 118, in str
output.append(self.stderr + '\n')
File "/home/nico/vcs/cdist/cdist/init.py", line 100, in stderr
if os.path.getsize(stderr_path) > 0:
File "/usr/lib/python3.6/genericpath.py", line 50, in getsize
return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp00grz_78/f9e7b5d8cf331963f92e3dc240158fb4/data/stderr/init'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/nico/vcs/cdist/bin/../scripts/cdist", line 79, in
commandline()
File "/home/nico/vcs/cdist/bin/../scripts/cdist", line 56, in commandline
args.func(args)
File "/home/nico/vcs/cdist/cdist/config.py", line 273, in commandline
jobs=args.parallel)
File "/home/nico/vcs/cdist/cdist/mputil.py", line 61, in mp_pool_run
retval.append(f.result())
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp00grz_78/f9e7b5d8cf331963f92e3dc240158fb4/data/stderr/init'
`
Created by: telmich
Solved:
Created by: darko-poljak
@telmich Can you try with latest master version?
This should have ben fixed in https://github.com/ungleich/cdist/issues/639.
The latest version is cdist 4.8.0-35-gbc94c01c.
Created by: darko-poljak
And I thought we are ready for new bugfix release.