google / turbinia

Automation and Scaling of Digital Forensics Tools
Apache License 2.0
731 stars 160 forks source link

Updated the "Using Docker for Job execution" documentation #1415

Closed ghost closed 7 months ago

ghost commented 7 months ago

The documentation article "Using Docker for Job execution" was updated so it reflects the code in line 124 turbinia/turbinia/lib /docker_manager.py.

Description of the change

The changes update the documentation article Using Docker for Job execution so that it reflects the code in docker_manager.py#L111.

The following errors occur when using the IMAGE ID instead of the REPOSITORY value:

2024-01-11 12:26:30 [WARNING] DOCKER_ENABLED=True is set in the config, but there is an error checking for the docker daemon: {0:s}
Traceback (most recent call last):
  File "/home/turbinia/turbinia/worker.py", line 198, in __init__
    check_docker_dependencies(dependencies)
  File "/home/turbinia/turbinia/worker.py", line 91, in check_docker_dependencies
    raise TurbiniaException(
turbinia.TurbiniaException: Docker image 399a772c8145 does not exist for the job psortjob. Please update the config with the correct image name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/turbinia/turbinia/turbiniactl.py", line 1015, in main
    process_args(sys.argv[1:])
  File "/home/turbinia/turbinia/turbiniactl.py", line 694, in process_args
    worker = TurbiniaCeleryWorker(
  File "/home/turbinia/turbinia/worker.py", line 242, in __init__
    super(TurbiniaCeleryWorker, self).__init__(*args, **kwargs)
  File "/home/turbinia/turbinia/worker.py", line 202, in __init__
    ).format(str(exception))
AttributeError: 'NoneType' object has no attribute 'format'

Since the function image_exists(self, image_id) docker_manager.py#L111 doesn't use the image id but rather the image name, the documentation needed to be updated.

Changed the "Using Docker for Job execution" article in the documentation. The documentation know explains that the image name is required. Also the name of the configuration file was changed to turbinia.conf.

Applicable issues

Additional information

Checklist

google-cla[bot] commented 7 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

aarontp commented 7 months ago

Thanks for the PR @HelferDCSO ! Could you please check the info on the CLA above and sign that if you haven't already?: https://github.com/google/turbinia/pull/1415#issuecomment-1887197697

@hacktobeer and/or @wajihyassine These changes LGTM, but could you double check since I wasn't sure why we had the image ID instead of the image name.

Thanks all!

hacktobeer commented 7 months ago

Thanks Aaron, let me take a look at this tomorrow.

hacktobeer commented 7 months ago

@HelferDCSO Small feedback. Where do you see/find that the configuration filename has been changed to turbina.conf? It should be (and afaik always has been) turbinia.conf

ghost commented 7 months ago

@hacktobeer Your absolutely right, the file is called turbinia.conf. The documentation article currently names it as .turbiniarc.

In my PR I misspelled turbinia, which will be fixed in the next commit. I also misspelled it in my PR description. Sorry for the unpleasantries.

hacktobeer commented 7 months ago

@HelferDCSO Thank you veyr much for this PR, looks good to me and I am going to merge.