Story #10343

[dockercleaner] mandatory config

Added by Nico César almost 4 years ago. Updated over 3 years ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.00 h)
Story points:


after #9953 was done, there is a mandatory config for dockercleaner.

Make this non-mandatory

Please add examples in the installation guide.


Task #10382: Review 10343-dockercleaner-configResolvedTom Clegg

Related issues

Related to Arvados - Feature #10141: [Packaging] Include sample config file (/etc/arvados/foo/foo.example.yml) with each configurable packageClosed09/28/2016

Has duplicate Arvados - Bug #10336: [Documentation] arvados_docker_cleaner config fileClosed10/22/2016

Associated revisions

Revision cf569180
Added by Tom Clegg almost 4 years ago

Merge branch '10343-dockercleaner-config' refs #10343


#1 Updated by Tom Morris almost 4 years ago

  • Assigned To set to Tom Clegg
  • Target version set to 2016-11-09 sprint
  • Story points set to 0.5
  • Tracker changed from Bug to Story
  • Description updated (diff)

#2 Updated by Tom Clegg almost 4 years ago

  • Status changed from New to In Progress

The packaged systemd unit file seems to be incompatible with Centos7, because of the Python3-via-Software-Collections arrangement.

Also, the arvados-docker-cleaner package seems to have undeclared dependencies on python3-pkg-resources and the python3 meta/wrapper package.

With debian:8...

root@2e901b1c1678:/# apt-get install arvados-docker-cleaner
root@2e901b1c1678:/# arvados-docker-cleaner --help
bash: /usr/bin/arvados-docker-cleaner: /usr/bin/python3: bad interpreter: No such file or directory
root@2e901b1c1678:/# apt-get install python3
root@2e901b1c1678:/# arvados-docker-cleaner --help
Traceback (most recent call last):
  File "/usr/bin/arvados-docker-cleaner", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named 'pkg_resources'
root@2e901b1c1678:/# apt-get install python3-pkg-resources
root@2e901b1c1678:/# arvados-docker-cleaner --help
usage: arvados_docker.cleaner [-h] [--config CONFIG] [--quota QUOTA]

#3 Updated by Tom Clegg almost 4 years ago


test 246413f02ca8711f117a8575fccfec82e5dbfe23

#4 Updated by Nico César almost 4 years ago

review at 246413f02ca8711f117a8575fccfec82e5dbfe23

~$ <span class="userinput">sudo cp /usr/share/doc/arvados-docker-cleaner/arvados-docker-cleaner.service /lib/systemd/system/</span>

<span class="userinput">sudo cp /opt/rh/python33/root/usr/share/doc/arvados-docker-cleaner/arvados-docker-cleaner.service /lib/systemd/system/</span>
$ <span class="userinput">sudo nano /lib/systemd/system/arvados-docker-cleaner.service</span>

User files (not the ones provided by the package are in / etc /systemd/system

The package should include /lib/systemd/system/arvados-docker-cleaner.service and if the user wants to make modifications will copy it to /etc/systemd/system/arvados-docker-cleaner.service

having .service in /usr/share/doc/ is unnatural for the sysadmin

also every DEPRECATED message should help the sysadmin to DTRT

            logger.warning("DEPRECATED: default config file not found; " 
                           "relying on command line configuration")

should be

            logger.warning("DEPRECATED: default config file '{}' not found; " 
                           "relying on command line configuration".format(DEFAULT_CONFIG_FILE)

#5 Updated by Tom Clegg almost 4 years ago

Updated log message.

Updated/rewrote postinst scripts so our Go & Python unit files get installed/enabled/started automatically in Red Hat, too.

test 4e9fd075b8136613e7edbb0465bcb96ccf5b1f45

#6 Updated by Nico César almost 4 years ago

test 4e9fd075b8136613e7edbb0465bcb96ccf5b1f45

I notice the in services/dockercleaner/arvados-docker-cleaner.service the ExecStart somehow complicated as follows:

ExecStart=/bin/sh -c 'if [ -e /opt/rh/python33/root/bin/arvados-docker-cleaner ]; then exec scl enable python33 arvados-docker-cleaner; else exec arvados-docker-cleaner; fi'

Which I'm aware that is because of Software Collections + SystemD and some other things. I'm not suggesting to change it But we should have a comment that explains why the complexity or points to a public URL explaining why...

I know Red Hat's guide is different on this subject:

But I think we're good to go with it...

#7 Updated by Nico César almost 4 years ago

I feel uncomfortable that we don't have a way to test packages without uploading them to the repositories.

this commit has changes in:

  • build/go-python-package-scripts/postinst
  • build/go-python-package-scripts/prerm

that will affect all the go and python packages. we don't have a way to test integration once packages are built.

But that's another issue to deal with

#8 Updated by Tom Clegg over 3 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF