charm not setting docker-opts in /etc/default/docker

Bug #1939038 reported by Jeff Hillman
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Docker Subordinate Charm
Fix Released
High
George Kraft

Bug Description

k8s 1.19
latest/stable docker charm
openstack ussuri on focal

When running `juju config docker docker-opts="--default-ulimit=memlock=-1:-1" nothing gets set in /etc/default docker. The file just stays as it was.

Tags: cpe-onsite
Revision history for this message
George Kraft (cynerva) wrote :

Thanks for the report. The docker-opts config option clearly is not implemented in the charm:

$ git grep docker-opts
config.yaml: docker-opts:
reactive/docker.py:@when('config.changed.docker-opts', 'docker.ready')
reactive/docker.py: Options here will be merged with configured docker-opts when layer-docker

The charm responds to config.changed.docker-opts, and docker-opts is mentioned in a docstring, but there is no actual reference to docker-opts in the code.

Changed in charm-docker:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Jeff Hillman (jhillman) wrote :

subscribed field high

George Kraft (cynerva)
Changed in charm-docker:
assignee: nobody → George Kraft (cynerva)
status: Triaged → In Progress
Revision history for this message
Jeff Hillman (jhillman) wrote :

FYI, the workaround of

juju run -m <model> --application docker -- 'echo DOCKER_OPTS=\"--default-ulimit=memlock=-1:-1\" > /etc/default/docker ; service docker restart'

Is not persistent. Because /etc/default/docker is coming from the docker.defaults template file, /etc/default/docker is being intermittently overwritten.

Revision history for this message
George Kraft (cynerva) wrote :
tags: added: review-needed
Changed in charm-docker:
status: In Progress → Fix Committed
tags: removed: review-needed
Changed in charm-docker:
milestone: none → 1.22+ck1
Revision history for this message
George Kraft (cynerva) wrote :
George Kraft (cynerva)
Changed in charm-docker:
status: Fix Committed → 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.