Project

General

Profile

Actions

Idea #10343

closed

[dockercleaner] mandatory config

Added by Nico César over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
10/25/2016
Due date:
Story points:
0.5

Description

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

Make this non-mandatory

Please add examples in the installation guide.


Subtasks 1 (0 open1 closed)

Task #10382: Review 10343-dockercleaner-configResolvedTom Clegg10/25/2016Actions

Related issues

Related to Arvados - Feature #10141: [Packaging] Include sample config file (/etc/arvados/foo/foo.example.yml) with each configurable packageClosed09/28/2016Actions
Has duplicate Arvados - Bug #10336: [Documentation] arvados_docker_cleaner config fileClosed10/22/2016Actions
Actions #1

Updated by Tom Morris over 7 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 Idea
  • Description updated (diff)
Actions #2

Updated by Tom Clegg over 7 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]
...
Actions #3

Updated by Tom Clegg over 7 years ago

10343-dockercleaner-config

test 246413f02ca8711f117a8575fccfec82e5dbfe23

Actions #4

Updated by Nico César over 7 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)

Actions #5

Updated by Tom Clegg over 7 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

Actions #6

Updated by Nico César over 7 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:
https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/1/html/Packaging_Guide/sect-Software_Collection_Initscript_Support.html

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

Actions #7

Updated by Nico César over 7 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

Actions #8

Updated by Tom Clegg over 7 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF